Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.

Conversation

@KernelDeimos
Copy link
Contributor

BACKGROUND

We have two nspecs for capabilityDAO: capabilityDAO and localCapabilityDAO. capabilityDAO is served, while localCapabilityDAO is intended for use by the system.

CapabilityAuthService, as well as a number of rules, are accessing capabilityDAO with a system context, which introduces an inconsistency - the possibility of a system context - that each DAO decorator in capabilityDAO has to deal with individually.

THIS PR

PreventSystemDAO is a DAO decorator that prevents a system context from accessing a DAO. It can be configured with three modes of operation:

  • ABORT_REQUEST: the default behaviour; do not handle the request. May produce an alarm.
  • REDIRECT_REQUEST: log a warning, but redirect system context requests to the appropriate DAO (like localCapabilityDAO)
  • WARN_ONLY: just warn about system contexts; don't modify behaviour. This is a helpful first-step for finding the common cases.

@google-cla google-cla bot added the cla: yes label Dec 1, 2020
@KernelDeimos KernelDeimos changed the title [NP-2927] Add DAO decorator to warn about system context [NP-2927] Add DAO decorator to warn about (or redirect) system context Dec 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant