Declared Access Grants

Some instances have their access decided on their deployment record. A test instance where every member is a tester is the typical case. On such an instance, who holds which role is part of the instance's declaration, made by pull request like everything else on the record. A customer instance decides access through governed activities instead, and its record states no grants.

"accessGrants": [
  { "scope": "/",   "role": "Underwriter", "to": { "allMembers": true } },
  { "scope": "/",   "role": "Underwriter", "to": { "user": "rbuergi" } },
  { "scope": "Esl", "role": "AvpEsl",      "to": { "group": "EslTeam/EslTeam" } }
]
Field Meaning
scope / (the default) is the instance root; otherwise a node path such as a partition. A path segment may not start with _.
role A built-in role or one a Role node declares.
to Exactly one of user (a user id), group (a group path) or allMembers: true.

Every member (allMembers) means every signed-in, non-virtual user of this instance, and never an anonymous visitor. It is the platform's Public subject, which the permission fold ORs into the roles of every signed-in viewer.

How it works

  1. The record renders Access__DeclaredGrants__N__Scope|Role|User|Group|AllMembers (DeploymentPortalConfig.PortalConfig, on both the Helm and the Aspire route).
  2. The portal reads Access:DeclaredGrants (DeclaredAccessGrants.Read). It turns each valid entry into a computed AccessAssignment at {scope}/_Access (_Access for the root), served as a static node (IStaticNodeProvider). Its governedBy is record:Access:DeclaredGrants:{N}, the provenance (DeclaredAccessGrants.IsRecordOwned).
  3. The permission fold already unions static assignments into every evaluation. A declared grant is therefore a grant like any other: it is inherited down the scope, expanded through groups, and subtracted by a Denied assignment. hub.HoldsRole, the permission checks and the role lookups (Doc/Architecture/RoleChecks) all answer for it. There is one fold and no second evaluator.

Declared, not derived

The record is the source of truth (policy declared-not-derived), and nothing is written:

When a change applies. The grants are read when the portal boots. A record change reaches the pods by a roll, which boots them from the new render, and a running process keeps the set it booted with. The process-wide security queries carry the static nodes they were first built with.

One instance only. Each portal reads its own record. A grant on one record reaches no other instance, and a record that states none renders no Access__DeclaredGrants key at all.

The read paths

The C# permission fold (HoldsRole, CheckPermission, the layout areas and menus) includes declared grants. The Postgres search projection reads stored rows only, so a declared role's permissions do not widen what a SQL search returns. That direction is fail-closed. Gating process moves by role is unaffected, because the role question is answered by the fold.

Proven by

See also: Role Checks · Configuring an Instance from Aspire (the record's parity table) · Declared Not Derived.