gunk-dev/the-valley

dcr-b87f6e8-identity-is-a-governed-registry.md

sourcec14b0e68e9c3main's published tip history
11.9 KiB · Rendered
1---
2type: decision
3id: dcr-b87f6e8
4status: decided
5title: "Identity is a governed registry: possession-proving keys, boundary-grounded grants, first-class expiry"
6created: 2026-08-06
7source: design conversation, 2026-08-06
8---
9
10# Identity is a governed registry
11
12An instance's identities are a governed registry: one declared CUE document in the instance
13repository, changed only through the integration path. A principal — a named actor the instance
14grants something to: a human, a machine, a service — is an entry in that document, holding a name,
15one or more keys, its grants, and where the kind warrants it an expiry. Keys prove possession, every
16grant is grounded in an enforcement boundary that checks it, and expiry is a first-class property of
17an entry. This node sits beside [[dcr-f41f718]]
18([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md)) as a
19sibling: the same schema-versus-instance split and the same floor machinery, applied to who may act.
20
21## The registry
22
23Granting, rotating, and revoking are ordinary changes — reviewed, landed, visible in history.
24Registry 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
26named set of paths carrying required checks, and for this class the required checks include human
27approval ([[ida-b7025b5]]
28([ida-b7025b5-human-decisions-are-signed-acts.md](../ideas/ida-b7025b5-human-decisions-are-signed-acts.md))).
29
30The schema is [schema/identity.cue](../../../schema/identity.cue), and it is the authority on what
31an entry may hold; the worked registry at [examples/identity/](../../../examples/identity/) is the
32shape read rather than imagined. An entry, illustratively:
33
34```cue
35principals: "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
48A key's signing name is recorded per key rather than per entry. The note format's key hash binds the
49name to the key ([[dcr-de9d996]]
50([dcr-de9d996-statement-text-and-signed-note.md](./dcr-de9d996-statement-text-and-signed-note.md))),
51so one person signing from two machines under two names holds two verifier keys, and a compilation
52that recorded the wrong name would write a line no verifier can match.
53
54An 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)))
56and is named by its provenance ([[ida-45178f6]]
57([ida-45178f6-agent-identity-is-provenance.md](../ideas/ida-45178f6-agent-identity-is-provenance.md)));
58the registry holds the top of that chain, never its links.
59
60## The boundary rule
61
62A grant is a named permission. An enforcement boundary is the point in the running system that
63refuses an action when the grant is absent — the SSH server deciding whether a key may push, the bus
64deciding whether a connection may publish. A grant may exist only where an enforcement boundary
65checks it, and each grant names its boundary. The schema grows a capability when its gate ships,
66never before. The test: if removing a name from the schema breaks no enforcement point, it was
67ontology and never belonged.
68
69Roles are not schema. A deployment may define named grant bundles and groups as instance content —
70templates a registry embeds, compiled to what gates check — and the substrate never requires a role
71name.
72
73The one structural requirement is the genesis entry: created at instance birth, the anchor later
74boundaries verify against, holding governance of the registry's own stream.
75
76## Groups, bundles, and the floor
77
78A grant bundle is a named set of grants; a group is a named set of members. Both are
79instance-defined, and both compile into the same gate-checked artifacts as any entry. A grant's
80scope is the boundary it names, and nothing narrower. A stream list — the streams of the instance a
81grant covers — is the natural next narrowing, and the boundary rule holds it back: the one boundary
82that exists is host-level, so a stream list would be a scope nothing checks. It arrives with the
83first boundary that checks one. The floor — the substrate's mandatory minimum over every instance
84registry, the counterpart of [[dcr-f41f718]]'s
85([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md))
86instance floor over project policy — mandates properties, never names: external principals carry
87expiry, and no external principal holds registry governance.
88
89## External identity is cited, not minted
90
91An external collaborator's entry references an identity the person already controls — a domain
92handle or a decentralized identifier — verified at onboarding and re-verifiable by anyone. The
93registry decides what that identity may do here; it never becomes the person's identity. This is the
94shape 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
99A passkey is an asymmetric, hardware-bound, presence-proving credential: a key pair whose private
100half lives in hardware the person holds and signs only on a physical gesture, with the browser
101supplying the ceremony. It is the same class of credential as a hardware SSH key. The registry holds
102a 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)))
104authenticates by assertion — the hardware signing a fresh challenge — against the registry, and
105issues a short session. There is no username or password store anywhere.
106
107A presence assertion whose challenge is the digest of a statement is a hardware signature over that
108statement. 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)));
110its envelope binding is deliberately open.
111
112## Long-lived credentials prove possession
113
114A bearer secret is a credential that authenticates whoever presents it — a token or password whose
115possession is the entire proof, copyable without trace. Bearer secrets are rejected. Long-lived
116credentials are asymmetric and bound — to hardware for humans, to a host for machines. They prove
117possession: the private half never travels, and authentication is a signature only its holder could
118produce.
119
120Machines hold no stored long-lived secrets beyond their bound keys. The direction for machine access
121is short-lived certificates derived from registry entries, issued per instance; that issuance
122service is deliberately deferred. For now machine and service entries carry their raw keys with
123mandatory expiry, and expiry is enforced at compilation: the step that renders the registry into
124gate artifacts refuses expired entries, so access ends at the first convergence after expiry.
125Revocation 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
128Bearer secrets the transition still requires are inventoried in the registry as liabilities with
129expiry, so they stay visible and lintable until their platforms are exited.
130
131## No identity provider at the root
132
133The registry is the root of identity for the instance. An external identity platform — outsourced or
134self-hosted — would reintroduce the account authority the registry replaces. Where an integration
135someday demands such a protocol, it can be a facade compiled from the registry, never the source.
136
137## The staged path: qinling first
138
139The first enforcement compilation is the existing push boundary: the registry renders the host's
140authorized 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
142real. 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
144namespace [[dcr-62ecc36]] ([dcr-62ecc36-signal-contracts.md](./dcr-62ecc36-signal-contracts.md))
145carved.
146
147The compiler is [identity/](../../../identity/), and it renders two artifacts. One is the
148known-signers file: every attestation-capable key of the registry, written as the note format's
149verifier 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
151git user's authorized keys, one tagged line per key of every principal holding a grant at a push
152boundary — the tagged-key shape the host module already reads a principal name off.
153
154It runs on the host, reading the registry from the served instance repository's integrated tip, the
155same provenance the verification floor has ([[dcr-f41f718]]
156([dcr-f41f718-declared-verification-policy.md](./dcr-f41f718-declared-verification-policy.md))): a
157registry edit governs nothing until it lands. A compilation that fails for any reason — a schema
158violation, a floor violation, an unreachable repository — leaves the last good artifacts exactly as
159they were, because a compiler that emptied them would lock the host's git user out. Access is
160therefore 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.