Authorization — roles, grants, guardrails¶
This page is the precise, lookup-oriented companion to Authorization, which explains the model in plain language. Here you get the exact action vocabulary, the default role bundles, the grant and ceiling shapes, and the order the server composes them in.
Authorization is decided by two independent axes that evaluate in opposite directions:
- Grants — the additive axis. What a principal can do:
effective = union(role bundles, individual grants). Allow-only, and default-deny — an action not in the union is refused. - Ceilings — the narrowing axis. What a principal is capped to: a
conjunctive policy chain (
org ∧ user ∧ app ∧ run). Every present layer can only ever subtract; no role or grant overrides it.
The final verdict is the intersection:
allowed = (action ∈ union(roles, grants)) AND (every present ceiling allows it)
This mirrors AWS's identity-policies ∩ permission-boundaries split.
There is no explicit Deny and no allow/deny precedence — "a
Contributor may not clone" is expressed by omitting memory.clone from
the Contributor bundle, never by a deny rule.
The rules are enforced server-side. Every other surface — the portal, the CLI, an AI agent, a third-party client — only predicts the server's decision to shape its UI (grey out a button, pre-empt a tool call). An upstream "allow" is a floor, never the final word; the server re-decides on every request.
Action vocabulary¶
Authorization is expressed over action strings, and the table below is the set
today, not a fixed one. The tool.<name> namespace is reserved for
capability-tool actions.
No command lists these policy action names; this page is where the set is kept.
The released CLI says so: hadron policy explain --help (v0.55.0) reads "No
command lists them; the current set is in the hadron-docs reference
docs/reference/authorization.md (the set today, not a fixed one)."
Grant actions are a separate list. hadron team grant actions reads "an App's
registered grant actions: the actions a grant can allow (cor:acl:140:02)", per
its help, and it does not list the names in this table.
| Action | Governs |
|---|---|
memory.read |
Read a memory's nodes. |
memory.write |
Create, edit, and delete nodes within a memory. |
memory.create |
Create a new organization-shared memory. |
memory.clone |
Copy an entire memory, including into another organization. |
memory.delete |
Delete an organization-shared memory. |
run.execute |
Execute a headless multi-node run. |
llm.invoke |
Invoke an LLM. |
comm.outbound |
Send an outbound communication (e.g. a chat or email message). |
tool.<name> |
Reserved namespace for capability-tool actions. |
Matcher grammar. Everywhere an action list appears — a role bundle, a grant, or a ceiling's allow-list — entries match an action three ways:
| Entry | Matches |
|---|---|
memory.write |
Exactly that action. |
memory.* |
Any action with that prefix (memory.read, memory.write, memory.create, …). |
* |
Every action. |
Roles as bundles¶
A role is a named bundle of actions — the everyday shorthand, so
permissions aren't handed out one at a time. OrgMember.role is one of a
four-rung ladder: OWNER > ADMIN > CONTRIBUTOR > READER.
The default bundles (DEFAULT_ROLE_BUNDLES) are:
| Role | Bundled actions |
|---|---|
READER |
memory.read |
CONTRIBUTOR |
memory.read, memory.write |
ADMIN |
memory.read, memory.write, memory.create, memory.clone, memory.delete |
OWNER |
memory.read, memory.write, memory.create, memory.clone, memory.delete |
Notes:
memory.create/memory.clone/memory.deleteare Admin/Owner only. A Contributor can read and write existing memories but cannot create, clone, or delete organization-shared ones.- The run-time verbs (
run.execute,llm.invoke,comm.outbound) are not in any role bundle — they are governed by the ceiling chain and the run gates, not the role ladder. - Personal and private memory creation is the owner path (a person
creating their own memory: outside an App, any org member; in an App, the rule
below), outside the role ladder entirely — see
strict-owner classes below. In an App the bar is
membership of the App, not an organization role, so the same membership bar
applies in a user-owned App, which has no organization: its owner and each
member they invite may each create their own (
cor:dmo:060:20). Only the person, signed in as themselves, creates it. A person who is neither a member nor the owner of a user-owned App is refused (FORBIDDEN); so is a worker session (FORBIDDEN), an impersonation session (IMPERSONATION_READ_ONLY) and an App key (UNAUTHENTICATED). An organization role adds no path of its own: an organization owner who is not a member of the App, and an admin of another organization, are each refused (FORBIDDEN). The owner of a user-owned App needs no membership row. A run is refused by the rule; its code was not observed. Seen on a test stack through GraphQL, not on the live deployment. - The bundle map is a deliberate, versioned constant. A planned change
moves
memory.createintoCONTRIBUTORwhile keepingmemory.cloneout; when it lands it will be an explicit edit to this map, never a silent shift.
Individual grants¶
A grant hands one principal extra actions without changing their
role — the additive exception. It is backed by a PrincipalGrant row:
| Field | Meaning |
|---|---|
principalType |
USER (v1); reserved for future app/agent principals. |
principalId |
The granted user. |
organizationId |
The org the grant applies within. |
actions[] |
Allowed actions, in the matcher grammar above (e.g. ['memory.clone']). |
expiresAt |
Optional expiry; NULL = perpetual until revoked. |
deletedAt |
Soft-delete column; a revoked grant is one with deletedAt set. |
Grants are purely additive — they only ever add actions to the union, never remove them. Two properties are load-bearing:
- A grant is an exception on top of membership, never a substitute for
it. The gate reads the caller's live
OrgMemberrow and their live, in-scope grants together. With no live membership, even a live grant authorizes nothing — revoking someone's membership instantly cuts every capability, grants included. - Only live, in-scope grants count. The server filters on
deletedAt IS NULL, an unexpiredexpiresAt(NULL OR > now), and the matchingorganizationIdbefore the grant enters the union.
To let one Contributor clone memories, attach a memory.clone grant —
you never promote them to Admin, and you never touch anyone else's
permissions. (There is no custom-role mechanism today: OrgMember.role
holds exactly one of the four ladder roles, and the grant is the
supported way to add a single action to one member.)
Ceilings — the policy chain¶
A ceiling is the opposite of a grant: it sets a cap that trims what's allowed and cannot be overridden. Ceilings compose as a strict conjunction over four ordered layers:
- Absent layer (no policy row) — contributes no restriction; it is simply not part of the conjunction.
- Present layer — default-deny over its
allowlist: the action must match an entry (exact,prefix.*, or*) or that layer denies. - Overall — allowed only if every present layer allows. Order does not change the result (conjunction is commutative); it only keeps failure reporting stable.
A ceiling can only ever subtract, so no role or grant can buy past it.
What the ceiling chain governs today. The policy chain was built for
headless runs — it gates the run-time action vocabulary
(run.execute, llm.invoke, comm.outbound, tool.*) as a run
executes. It is not currently consulted for interactive
memory-management mutations (memory.create / clone / delete): those
existing Organization.policy rows were authored to constrain runs, and
silently re-scoping them to interactive actions would change their
meaning. Extending ceilings to interactive management actions is a
planned, deliberate step, not today's behavior.
Composition order¶
The server composes the axes in one canonical order. The two pure axes above (grants, ceilings) sit in the middle; strict ownership and the platform bypass wrap around them:
- Strict-owner classes first. A
personal- orprivate-class memory is owner-only. No role, grant, ceiling, or platform bypass reaches it — the owner (or, for agent-mediated access, the owner's own installed agent under an active subscription) is the only principal who can. See Memory access for the per-class gates. - Platform
ADMIN/OWNERbypass. For non-strict classes, a platform-level admin or owner is allowed without consulting the axes. This bypass sits outside the evaluator. - The additive union.
action ∈ union(role bundles, live grants), default-deny. This is where an ordinary member's role and any individual grants decide a management action. - The ceiling chain. Every present
org ∧ user ∧ app ∧ runlayer must also allow the action (see the scope note above for which verbs this currently applies to).
An action is permitted only if it survives every applicable step.
Worked evaluations¶
A Contributor clones a memory — refused. memory.clone is not in the
CONTRIBUTOR bundle and the member holds no grant, so the union does not
contain it → refused at step 3. Promoting to Admin or attaching a
memory.clone grant fixes it; both are additive.
A Contributor with a memory.clone grant — allowed. The union is
{memory.read, memory.write} (bundle) ∪ {memory.clone} (grant) =
{memory.read, memory.write, memory.clone}, which contains the action →
step 3 passes. No management ceiling applies today → allowed.
A revoked member with a still-live grant — refused. The grant row is
live, but the OrgMember row is soft-deleted, so step 3 finds no
membership and refuses before the union is even consulted. A grant never
outlives the membership it hangs on.
A run tries comm.outbound under an org policy of ['run.execute'] —
refused. The additive axis may allow it, but the org ceiling layer is
present and its allow-list doesn't match comm.outbound, so the
conjunction fails at step 4.
Session access¶
A session is not governed by the action vocabulary above. It has its own gate, and the gate is deliberately narrower than org membership.
Read¶
| Principal | May read a session |
|---|---|
The attributed user (Session.userId) |
Yes — always, regardless of App association. |
| The same user while impersonated | No. |
| A member of the owning organization | Yes. |
| The session's App | Yes. |
Platform ADMIN/OWNER |
Yes. |
The attributed-user self-read exists because a coding session started from the CLI has no App context. Without it, the person who started the session could not see their own work — every other read path is App-scoped. It is identity-scoped: it applies to that user themself, and is excluded under impersonation, which is read-only and never reaches another member's own records.
Write¶
updateSession and endSession share one gate. Exactly three
principals pass it:
| Principal | May write a session |
|---|---|
| The session's App, as a pure App-key principal | Yes. |
The attributed user (Session.userId) |
Yes. |
Platform ADMIN/OWNER |
Yes. |
| A member of the owning organization | No — membership reads, never writes. |
| A hybrid principal (a user carrying an active-App selection) | No. |
The hybrid exclusion is the subtle one. An MCP caller with an active App selected is a user who has scoped their calls to an App, not the App itself — the selection is a scope, not a credential. The gate therefore requires the absence of a user identity on the App branch. The practical effect: co-members of an App cannot end or edit each other's sessions.
Update semantics¶
updateSession(id, prNumber, branch) is the mid-session write path — a
PR is usually opened after the session started.
- Explicit
nullclears a field; an omitted field is preserved. - An empty update is valid: it writes nothing and refreshes the
session's last-activity timestamp. That touch is one of the liveness
heartbeats
hasLiveSessioncounts. - Updates on an ended session are allowed, so a PR merged after the work stopped can still be attributed.
- Sessions are addressed by id only — they have no URN.
What ends a session, and what merely describes one
Two distinct mechanisms, and hadron-server#1114 separated them.
Ending. A 15-minute server sweep
(hadron-server#930)
ends sessions past their hard expiresAt — and since #1114 that is
the only rule it acts on. It stamps autoExpiredAt alongside
endedAt, so "ended" stays the single predicate no end time, and
autoExpiredAt records only how the session ended. startSession
leaves expiresAt null, so nothing auto-ends a session started
that way; startAgentSession stamps it from the App's
sessionTimeoutSeconds.
Describing. Worker.hasLiveSession is computed at read time —
not ended and driven inside its type's idle window (24 hours by
default — a deployment setting, not a platform constant). Going
quiet changes this answer and writes nothing. Inactivity is no
longer a reason to end a session: silence is not evidence of
abandonment, and an inferred end destroys the handoff the stint had
not written yet.
updateSession's timestamp touch is a heartbeat for the second of
these, not the first.
Who is an App participant¶
Pages across these docs name "the App's participants" as the audience for an
App's team space, its free-standing app memories and its team chat. A
participant of an App is any one of these (cor:acl:010:01):
| You are | Participant? |
|---|---|
An AppMember of the App, at any role (reader included). |
Yes. |
An org member with CONTRIBUTOR+ on the org that owns the App. |
Yes, with no App membership needed. |
| The owner of a user-owned App, or one of its members. | Yes. |
An org READER with no App member row. |
No. |
What participants can do.
- Read and write the App's team space and any free-standing app memory
(Memory access). The
write: yesthe CLI shows on such a memory is true, not a listing bug. - Read and post in the App's team chat, which follows the memory's audience
(
cor:acl:030:01,cor:agt:020:04). - Read the App's roster. Casting and amending workers is narrower; see Staffing a team.
Membership is one route in, not the gate. An org CONTRIBUTOR+ already
participates in every App of their org, so being refused joinApp does not
mean being locked out of the team space. Defining the audience by the App
member table alone, or by org roles alone, is ruled out by the spec. An org
READER reaches an App through an App member row. A user-owned App has no org,
so for it a member row, or owning the App, is the only route.
Two limits.
- Participants are people. An App's own key reads the team space but does not write it.
- Write access to a memory does not let anyone write a Channel's address or the governed kinds of node.
What membership still controls. These two are described from the server's behavior, not from a spec:
- Self-service joining is a per-App opt-in, separate from the audience. It
is closed unless the App's primary Agent declares a self-join role, and the
joiner gets that role, never
owner. A refusedjoinAppsays nothing about what you can already read or write as an orgCONTRIBUTOR+. - Force-releasing another holder's worker name needs an
ADMINorOWNERof the App's org, or the owner of a user-owned App. An App member row at any role does not admit it. Seeworker release.
Staffing a team — casting and amending workers¶
Casting a Worker (the named casting of an installed agent into a team App) has its own gate, and it is deliberately narrower than the gate for reading the roster. Following a team's staff is not the same act as changing it.
| Principal | May cast / amend a worker |
|---|---|
An org member with CONTRIBUTOR+ on the App's org |
Yes. |
An AppMember of the App whose role is not reader |
Yes. |
| The owner of a user-owned App | Yes. |
| A pure App-key principal | No — staffing is a human act. |
| A worker session (casting, previewing, retiring, deleting) | Only with an instruction or its own workers.staff grant, and only if its holder could do it. Refused without either. |
A worker session is not admitted on its holder's right alone. It needs the call
to carry an instruction, or the worker to hold its own workers.staff grant, and
the holder's own rights still apply on both. Adding and removing App members
(including leaving) follows the same pattern with the app.members grant. A
session launched by a host ignores any instruction and acts only on its grant.
See Staffing and membership
doors.
The App-key exclusion is the one worth noting: an App key may read its
own staff, so team automation can follow the roster, but it can never add
to it. Reading (workers, worker) additionally admits an AppMember at
any role, reader included, and an org member with CONTRIBUTOR+.
A worker you may not read is reported as not found — the same answer an absent name gets, so the roster cannot be probed by guessing.
App keys — who lists, mints, revokes and rotates them¶
An App key (hdr_app_…) is a credential for an App's backend or automation.
Listing an App's keys, minting one, revoking one and rotating one are all
gated by the same rule: whoever manages the App, acting as themselves (Holger's ruling of 2026-10-10;
cor:dmo:050:05, cor:dmo:050:12, cor:acl:010:01). Nobody else sees the
keys at all, so the same rule covers Query.appKeys and the nested
App.keys. Rotating revokes all of the App's active keys and mints one
replacement, in one step.
| Principal | May list, mint, revoke and rotate |
|---|---|
| The owner of a user-owned App | Yes. |
An AppMember whose role is owner |
Yes. |
An ADMIN or OWNER of the org that owns the App |
Yes. |
| A platform admin | Yes, on an org-owned App. On a user-owned App not yet: that is open under hadron-server#1734. |
Any other AppMember role, or any other org role |
No. |
| An App key | No — a key can't list or mint keys. |
| A request made through impersonation | No. |
| A bound worker session | Listing and revoking only, and only on a holder's instruction. The holder must manage the App, and the worker's session must be one its holder started by hand. Minting and rotating stay person-only. See below. |
A caller who is refused gets a plain authorization refusal. Reading the
nested App.keys as a non-manager is refused too, rather than returning an
empty list.
A worker acting on its holder's instruction. A person who manages the App
may have their held worker list and revoke credentials for them, by passing an
instruction claim (see Acting on a holder's
instruction). Five doors
accept it: listing keys (appKeys, appKeysPage), and revoking a key, a key
scope or an App grant (revokeAppKey, revokeAppKeyScope,
revokeAppGrant). Without an instruction the worker is refused.
The App write and read grant doors that used to sit beside these are gone. Giving
an App's runs write or read access to a memory is now a signed memory.write or
memory.read grant made with createGrant; see App
grants.
- A worker whose holder does not manage the App gets the holder's own refusal.
- A refused worker gets the same answer whether or not the key, scope or grant exists. A person still gets "not found" for a missing key (which includes the key a scope revoke names) or a missing App grant. Revoking a scope the key does not hold is a no-op, not "not found".
- A session launched by a host is refused whatever it claims, and nothing is recorded. There is no grant arm at these doors.
- Minting, rotating and giving stay person-only, and so does the nested
App.keys, which refuses a worker session with or without an instruction.
An instructed revoke that changed a row records one app.credential-act event.
A revoke that changed nothing records none, and neither does a person acting
directly. An instructed list records one event per call, so one per page. The
event never names a key, scope or grant id.
Granting and revoking a key's scopes already use the same manager audience. A newly minted or rotated key starts with no scopes.
This replaces the earlier rule that only an org ADMIN could do these things.
Source: hadron-server#2080
(merge 0ed948e), which closed
#1744. Where to click:
the App's Client tab;
a person's own user keys are a different thing, described in
Manage API keys.
Related¶
- Authorization — the same model in plain language, with the badges/keys/house-rules analogy.
- Teams, workers, and sessions — why the session gate is shaped this way, and the provenance chain it protects.
- Memory access — how the per-class gates (system, app, knowledge, personal, group, private) resolve read and write.
- Edge conditions — the deterministic conditions a headless run evaluates as it walks a flow.
- Multi-node run flows — where the run-time action vocabulary and the policy chain are exercised.