liveBook · Manning

Override

As explained in Authorization in Action

A policy override is a rule or configuration that applies a local exception to an otherwise applicable authorization policy without modifying the base policy.

A policy override adds a local exception beside an existing authorization rule rather than changing the shared rule itself. It suits cases where a customer, workspace, or project needs stricter or more permissive access than the standard template allows. For example, a customer may forbid all sharing, or a project may grant an external contractor temporary editing rights. section 9.7.2

Use overrides when the exception is local and deliberate:

  • Scope the exception to a particular resource, workspace, or customer instead of applying it organization-wide. section 9.7.2
  • Keep the template-generated policy unchanged, preserving its consistency for other resources. section 9.7.2
  • Distinguish overrides from global constraints: overrides express delegated local decisions, while global constraints enforce central guardrails everywhere. section 9.7.2
  • Label overrides clearly, such as with an #override tag, so reviewers can locate and audit exceptions in the policy store. section 9.7.2

Restricting a sensitive workspace

A document-view template normally lets an owner's readers team view documents. An override can forbid viewing in the legal-review workspace unless the requester is the owner, tightening access without altering the global template. section 9.7.2

// added to #override document-view-template to restrict legal workspace
forbid(
    principal is ACME::Employee,
    action == ACME::Action::"doc:view",
    resource is ACME::Document::"workspace:legal-review"
)
when { resource.owner != principal };

This Cedar policy demonstrates a resource-scoped override: it forbids document viewing in one workspace whenever the principal is not the owner. section 9.7.2

How Authorization in Action covers it

How deep it goes
Defines additional Cedar policies, contrasts them with global constraints, and demonstrates a scoped forbid rule.
Examples
Uses stricter customer sharing, temporary contractor editing, and a sensitive legal workspace as examples.
What it assumes
Assumes familiarity with Cedar policies and template-generated rules.
What you can do after
Operate/configure Cedar by adding a scoped exception without editing the originating template.
How it connects
Connects Cedar policy templates, global constraints, delegated administration, and resource-scoped authorization.

Also explained in

Compare how 5 books explain override →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Authorization in Action. The section links point to the parts of the book it draws on.