| 1 | --- |
| 2 | type: decision |
| 3 | id: dcr-b87f6e8 |
| 4 | status: decided |
| 5 | title: "Identity is a governed registry: possession-proving keys, boundary-grounded grants, first-class expiry" |
| 6 | created: 2026-08-06 |
| 7 | source: design conversation, 2026-08-06 |
| 8 | --- |
| 9 | |
| 10 | # Identity is a governed registry |
| 11 | |
| 12 | An instance's identities are a governed registry: one declared CUE document in the instance |
| 13 | repository, changed only through the integration path. A principal — a named actor the instance |
| 14 | grants something to: a human, a machine, a service — is an entry in that document, holding a name, |
| 15 | one or more keys, its grants, and where the kind warrants it an expiry. Keys prove possession, every |
| 16 | grant is grounded in an enforcement boundary that checks it, and expiry is a first-class property of |
| 17 | an entry. This node sits beside [[dcr-f41f718]] |
| 18 | ([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md)) as a |
| 19 | sibling: the same schema-versus-instance split and the same floor machinery, applied to who may act. |
| 20 | |
| 21 | ## The registry |
| 22 | |
| 23 | Granting, rotating, and revoking are ordinary changes — reviewed, landed, visible in history. |
| 24 | Registry changes are a path class in the sense of [[dcr-f41f718]] |
| 25 | ([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md)): a |
| 26 | named set of paths carrying required checks, and for this class the required checks include human |
| 27 | approval ([[ida-b7025b5]] |
| 28 | ([ida-b7025b5-human-decisions-are-signed-acts.md](../ideas/ida-b7025b5-human-decisions-are-signed-acts.md))). |
| 29 | |
| 30 | The schema is [schema/identity.cue](../../../schema/identity.cue), and it is the authority on what |
| 31 | an entry may hold; the worked registry at [examples/identity/](../../../examples/identity/) is the |
| 32 | shape read rather than imagined. An entry, illustratively: |
| 33 | |
| 34 | ```cue |
| 35 | principals: "runner-03": { |
| 36 | kind: "machine" |
| 37 | keys: [{ |
| 38 | class: "ssh-ed25519" |
| 39 | bound: "host" |
| 40 | public: "ssh-ed25519 AAAA…" |
| 41 | signs: "runner-03/attestations" |
| 42 | }] |
| 43 | grants: fetch: boundary: "qinling-push" |
| 44 | expires: "2026-09-01" |
| 45 | } |
| 46 | ``` |
| 47 | |
| 48 | A key's signing name is recorded per key rather than per entry. The note format's key hash binds the |
| 49 | name to the key ([[dcr-de9d996]] |
| 50 | ([dcr-de9d996-statement-text-and-signed-note.md](./dcr-de9d996-statement-text-and-signed-note.md))), |
| 51 | so one person signing from two machines under two names holds two verifier keys, and a compilation |
| 52 | that recorded the wrong name would write a line no verifier can match. |
| 53 | |
| 54 | An agent run holds no entry. A run acts under authority delegated from a principal ([[ida-a8243d2]] |
| 55 | ([ida-a8243d2-agent-runs-act-under-delegated-authority.md](../ideas/ida-a8243d2-agent-runs-act-under-delegated-authority.md))) |
| 56 | and is named by its provenance ([[ida-45178f6]] |
| 57 | ([ida-45178f6-agent-identity-is-provenance.md](../ideas/ida-45178f6-agent-identity-is-provenance.md))); |
| 58 | the registry holds the top of that chain, never its links. |
| 59 | |
| 60 | ## The boundary rule |
| 61 | |
| 62 | A grant is a named permission. An enforcement boundary is the point in the running system that |
| 63 | refuses an action when the grant is absent — the SSH server deciding whether a key may push, the bus |
| 64 | deciding whether a connection may publish. A grant may exist only where an enforcement boundary |
| 65 | checks it, and each grant names its boundary. The schema grows a capability when its gate ships, |
| 66 | never before. The test: if removing a name from the schema breaks no enforcement point, it was |
| 67 | ontology and never belonged. |
| 68 | |
| 69 | Roles are not schema. A deployment may define named grant bundles and groups as instance content — |
| 70 | templates a registry embeds, compiled to what gates check — and the substrate never requires a role |
| 71 | name. |
| 72 | |
| 73 | The one structural requirement is the genesis entry: created at instance birth, the anchor later |
| 74 | boundaries verify against, holding governance of the registry's own stream. |
| 75 | |
| 76 | ## Groups, bundles, and the floor |
| 77 | |
| 78 | A grant bundle is a named set of grants; a group is a named set of members. Both are |
| 79 | instance-defined, and both compile into the same gate-checked artifacts as any entry. A grant's |
| 80 | scope is the boundary it names, and nothing narrower. A stream list — the streams of the instance a |
| 81 | grant covers — is the natural next narrowing, and the boundary rule holds it back: the one boundary |
| 82 | that exists is host-level, so a stream list would be a scope nothing checks. It arrives with the |
| 83 | first boundary that checks one. The floor — the substrate's mandatory minimum over every instance |
| 84 | registry, the counterpart of [[dcr-f41f718]]'s |
| 85 | ([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md)) |
| 86 | instance floor over project policy — mandates properties, never names: external principals carry |
| 87 | expiry, and no external principal holds registry governance. |
| 88 | |
| 89 | ## External identity is cited, not minted |
| 90 | |
| 91 | An external collaborator's entry references an identity the person already controls — a domain |
| 92 | handle or a decentralized identifier — verified at onboarding and re-verifiable by anyone. The |
| 93 | registry decides what that identity may do here; it never becomes the person's identity. This is the |
| 94 | shape that the open cross-valley identity mapping of [[ida-8482624]] |
| 95 | ([ida-8482624-federation-groups.md](../ideas/ida-8482624-federation-groups.md)) slots into. |
| 96 | |
| 97 | ## Web authentication is a registry key class |
| 98 | |
| 99 | A passkey is an asymmetric, hardware-bound, presence-proving credential: a key pair whose private |
| 100 | half lives in hardware the person holds and signs only on a physical gesture, with the browser |
| 101 | supplying the ceremony. It is the same class of credential as a hardware SSH key. The registry holds |
| 102 | a passkey like any key; a web surface ([[ida-23aa413]] |
| 103 | ([ida-23aa413-project-surfaces-are-derived-views.md](../ideas/ida-23aa413-project-surfaces-are-derived-views.md))) |
| 104 | authenticates by assertion — the hardware signing a fresh challenge — against the registry, and |
| 105 | issues a short session. There is no username or password store anywhere. |
| 106 | |
| 107 | A presence assertion whose challenge is the digest of a statement is a hardware signature over that |
| 108 | statement. That is the candidate mechanism for the human approval gate ([[ida-b7025b5]] |
| 109 | ([ida-b7025b5-human-decisions-are-signed-acts.md](../ideas/ida-b7025b5-human-decisions-are-signed-acts.md))); |
| 110 | its envelope binding is deliberately open. |
| 111 | |
| 112 | ## Long-lived credentials prove possession |
| 113 | |
| 114 | A bearer secret is a credential that authenticates whoever presents it — a token or password whose |
| 115 | possession is the entire proof, copyable without trace. Bearer secrets are rejected. Long-lived |
| 116 | credentials are asymmetric and bound — to hardware for humans, to a host for machines. They prove |
| 117 | possession: the private half never travels, and authentication is a signature only its holder could |
| 118 | produce. |
| 119 | |
| 120 | Machines hold no stored long-lived secrets beyond their bound keys. The direction for machine access |
| 121 | is short-lived certificates derived from registry entries, issued per instance; that issuance |
| 122 | service is deliberately deferred. For now machine and service entries carry their raw keys with |
| 123 | mandatory expiry, and expiry is enforced at compilation: the step that renders the registry into |
| 124 | gate artifacts refuses expired entries, so access ends at the first convergence after expiry. |
| 125 | Revocation is the default, not an act of hygiene — this resolves [[bd-8a591dc]] |
| 126 | ([bd-8a591dc-machine-credentials-never-expire.md](../bugs/bd-8a591dc-machine-credentials-never-expire.md)). |
| 127 | |
| 128 | Bearer secrets the transition still requires are inventoried in the registry as liabilities with |
| 129 | expiry, so they stay visible and lintable until their platforms are exited. |
| 130 | |
| 131 | ## No identity provider at the root |
| 132 | |
| 133 | The registry is the root of identity for the instance. An external identity platform — outsourced or |
| 134 | self-hosted — would reintroduce the account authority the registry replaces. Where an integration |
| 135 | someday demands such a protocol, it can be a facade compiled from the registry, never the source. |
| 136 | |
| 137 | ## The staged path: qinling first |
| 138 | |
| 139 | The first enforcement compilation is the existing push boundary: the registry renders the host's |
| 140 | authorized keys, replacing the hand-maintained list. That begins the service split of [[bd-500adf7]] |
| 141 | ([bd-500adf7-bus-shares-git-user.md](../bugs/bd-500adf7-bus-shares-git-user.md)) and makes expiry |
| 142 | real. Bus credentials compile from the same entries when the authentication of [[bd-d853d9c]] |
| 143 | ([bd-d853d9c-bus-unauthenticated.md](../bugs/bd-d853d9c-bus-unauthenticated.md)) ships, per the |
| 144 | namespace [[dcr-62ecc36]] ([dcr-62ecc36-signal-contracts.md](./dcr-62ecc36-signal-contracts.md)) |
| 145 | carved. |
| 146 | |
| 147 | The compiler is [identity/](../../../identity/), and it renders two artifacts. One is the |
| 148 | known-signers file: every attestation-capable key of the registry, written as the note format's |
| 149 | verifier keys. That single artifact serves both the integrator's acceptance list and any reader's |
| 150 | `attest verify --known-keys`, so it holds the integrator's own key like any other. The other is the |
| 151 | git user's authorized keys, one tagged line per key of every principal holding a grant at a push |
| 152 | boundary — the tagged-key shape the host module already reads a principal name off. |
| 153 | |
| 154 | It runs on the host, reading the registry from the served instance repository's integrated tip, the |
| 155 | same provenance the verification floor has ([[dcr-f41f718]] |
| 156 | ([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md))): a |
| 157 | registry edit governs nothing until it lands. A compilation that fails for any reason — a schema |
| 158 | violation, a floor violation, an unreachable repository — leaves the last good artifacts exactly as |
| 159 | they were, because a compiler that emptied them would lock the host's git user out. Access is |
| 160 | therefore additive over what the host declares by hand, and the declared keys are the way back in. |
| 161 | |
| 162 | ## Open |
| 163 | |
| 164 | - The certificate issuance service: its design, and what authenticates an issuance request — the |
| 165 | tailnet composition. |
| 166 | - The presence-assertion envelope for approvals, and how it composes with the signatures of the note |
| 167 | format ([[dcr-de9d996]] |
| 168 | ([dcr-de9d996-statement-text-and-signed-note.md](./dcr-de9d996-statement-text-and-signed-note.md))). |
| 169 | - Re-rooting after a genesis-key compromise. |
| 170 | - What a dispatch authorization names, and its signature — the top of the delegation chain |
| 171 | ([[ida-a8243d2]] |
| 172 | ([ida-a8243d2-agent-runs-act-under-delegated-authority.md](../ideas/ida-a8243d2-agent-runs-act-under-delegated-authority.md))) |
| 173 | as a first-class signed act; discussed, not settled. |
| 174 | |
| 175 | ## Related |
| 176 | |
| 177 | - [[dcr-f41f718]] |
| 178 | ([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md)) — |
| 179 | the sibling decision: the same declared-in-CUE, floor-plus-instance machinery, over verification |
| 180 | policy. |
| 181 | - [[ida-b7025b5]] |
| 182 | ([ida-b7025b5-human-decisions-are-signed-acts.md](../ideas/ida-b7025b5-human-decisions-are-signed-acts.md)) |
| 183 | — the human approval registry changes gate on, and the act a presence assertion carries. |
| 184 | - [[ida-a8243d2]] |
| 185 | ([ida-a8243d2-agent-runs-act-under-delegated-authority.md](../ideas/ida-a8243d2-agent-runs-act-under-delegated-authority.md)) |
| 186 | and [[ida-45178f6]] |
| 187 | ([ida-45178f6-agent-identity-is-provenance.md](../ideas/ida-45178f6-agent-identity-is-provenance.md)) |
| 188 | — agent runs hold no entry; the registry names the chain's top. |
| 189 | - [[ida-8482624]] ([ida-8482624-federation-groups.md](../ideas/ida-8482624-federation-groups.md)) — |
| 190 | the federation layer above the valley the registry lives inside, and the cross-valley identity |
| 191 | mapping this gives a shape to. |
| 192 | - [[ida-23aa413]] |
| 193 | ([ida-23aa413-project-surfaces-are-derived-views.md](../ideas/ida-23aa413-project-surfaces-are-derived-views.md)) |
| 194 | — the web surface that authenticates against the registry. |
| 195 | - [[dcr-62ecc36]] ([dcr-62ecc36-signal-contracts.md](./dcr-62ecc36-signal-contracts.md)) — the bus |
| 196 | subject namespace registry-compiled credentials fill. |
| 197 | - [[bd-8a591dc]] |
| 198 | ([bd-8a591dc-machine-credentials-never-expire.md](../bugs/bd-8a591dc-machine-credentials-never-expire.md)), |
| 199 | [[bd-500adf7]] ([bd-500adf7-bus-shares-git-user.md](../bugs/bd-500adf7-bus-shares-git-user.md)), |
| 200 | [[bd-d853d9c]] ([bd-d853d9c-bus-unauthenticated.md](../bugs/bd-d853d9c-bus-unauthenticated.md)) — |
| 201 | the credential bugs this resolves, begins, and serves. |