gunk-dev/the-valley

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

sourcec91524503e2dmain's published tip history
6.9 KiB · Rendered
1---
2type: decision
3id: dcr-b87f6e8
4status: decided
5title: "Declare identities, keys, and permissions in a governed registry"
6created: 2026-08-06
7source: design conversation, 2026-08-06
8---
9
10# Declare identities, keys, and permissions in a governed registry
11
12A valley declares the people, machines, and services it recognizes in a CUE registry in its
13repository. Each named actor, called a **principal**, has keys, permissions, and any required expiry
14date. Registry changes take effect through integration.
15
16The registry establishes what an identity may do in this valley. Authentication requires proof of
17possession of a registered private key.
18
19## Registry changes and entries
20
21Granting access, rotating a key, and revoking access are ordinary versioned changes. The registry's
22path class requires human approval under the policy model in
23[[dcr-f41f718]](dcr-f41f718-declared-verification-policy.md) and
24[[ida-b7025b5]](../ideas/ida-b7025b5-human-decisions-are-signed-acts.md).
25
26[schema/identity.cue](../../schema/identity.cue) defines the implemented entry format.
27[examples/identity/](../../examples/identity/) provides a worked registry.
28
29Signing names belong to individual keys. The signed-note format binds a name and public key into a
30key hash, as specified in [[dcr-de9d996]](dcr-de9d996-statement-text-and-signed-note.md). A
31principal using different signing names on two machines therefore has two verifier-key entries.
32Compiling the wrong name would prevent the verifier from matching the signature.
33
34Agent runs have no registry entry or key of their own. They act under delegated authority from a
35registered principal, with the run and delegation recorded as provenance.
36[[ida-a8243d2]](../ideas/ida-a8243d2-agent-runs-act-under-delegated-authority.md) and
37[[ida-45178f6]](../ideas/ida-45178f6-agent-identity-is-provenance.md) describe that division.
38
39## Permissions must be enforced
40
41A permission is meaningful only if some part of the running system checks it before allowing an
42action. Examples include SSH access to repositories and authorization to publish on the bus. A
43deployment must reject a declared permission it cannot enforce.
44
45[[dcr-e544f20]](dcr-e544f20-access-is-verbs-on-projects.md) defines the current access model in
46terms of verbs such as fetch, push, request, and govern. Infrastructure settings are generated from
47those declarations. The implemented registry schema still expresses grants through named enforcement
48boundaries; the verb-oriented declaration is the intended interface.
49
50A valley may define reusable permission bundles and membership sets as its own configuration. The
51shared schema does not prescribe role names.
52
53The initial **genesis** principal is created with the valley and holds governance of the registry's
54own stream. Shared identity constraints require expiry for external principals and prohibit them
55from holding registry governance. These are requirements on entries, independent of local principal
56names.
57
58## External identities
59
60An external collaborator can be identified by a domain handle or decentralized identifier that the
61person already controls. Onboarding verifies that reference, and others must be able to verify it
62again.
63
64Each valley independently grants access to that identity. This supports the cross-valley identity
65proposal in [[ida-8482624]](../ideas/ida-8482624-federation-groups.md).
66
67## Web authentication and human approval
68
69A web interface authenticates against a registry key by checking a signature over a fresh challenge,
70then issuing a short session. The intended design uses no separate username and password store.
71[[ida-23aa413]](../ideas/ida-23aa413-project-surfaces-are-derived-views.md) describes the interface.
72
73For human credentials that satisfy the physical-approval requirement, the chosen key class must
74provide hardware binding and evidence of user presence. A browser-mediated assertion is a candidate
75mechanism. Binding its challenge to a statement digest could support approval of that statement.
76
77The approval envelope and its relationship to signed notes remain open. Describing a credential as a
78passkey does not, by itself, specify all of the binding and presence properties required here.
79
80## Credential lifetime
81
82Long-lived credentials must be asymmetric and bound to human-held hardware or a machine host.
83Authentication uses the private key to produce a signature; the private key is not sent to the
84verifier.
85
86Machine and service entries using raw keys require expiry dates. Successful registry compilation
87omits expired entries from generated access artifacts. Access removal therefore occurs through
88convergence after expiry, rather than at the instant the date passes.
89
90Short-lived certificates issued from registry entries are the intended next step for machine access.
91Their issuance service and authentication mechanism remain deferred.
92
93Any bearer secrets still required during migration must be recorded as temporary liabilities with
94expiry. This keeps them visible until the platforms requiring them can be removed.
95[[bd-8a591dc]](../bugs/bd-8a591dc-machine-credentials-never-expire.md) tracks the
96credential-lifetime problem.
97
98## Compilation on the host
99
100The [identity compiler](../../identity/) reads the valley repository's integrated revision and
101produces two artifacts:
102
103- A known-signers file containing the registry's attestation-capable verifier keys. Both the
104 integrator and `attest verify --known-keys` can use it. It includes the integrator's own key.
105- Authorized keys for the Git access boundary, with each key tagged by its principal name.
106
107An unintegrated registry edit grants no access. Schema errors, policy violations, repository-access
108failures, and loss of every unexpired governing key must leave the last valid artifacts in place.
109This prevents a failed render from emptying the access files. It also means failed convergence can
110delay removal of expired or revoked access.
111
112During the initial deployment, generated keys supplement keys declared directly by the host. Those
113declared keys provide a recovery path.
114
115Bus credentials should compile from the same registry when bus authentication is implemented.
116[[bd-500adf7]](../bugs/bd-500adf7-bus-shares-git-user.md),
117[[bd-d853d9c]](../bugs/bd-d853d9c-bus-unauthenticated.md), and
118[[dcr-62ecc36]](dcr-62ecc36-signal-contracts.md) cover service isolation, bus authentication, and
119subject permissions.
120
121## Identity services
122
123The registry is the valley's authority for identity and access. If an integration requires an
124identity-provider protocol, an adapter can expose registry-derived data through that protocol. It
125must not become a separate account authority.
126
127## Open questions
128
129- How are short-lived machine certificates issued, and how is an issuance request authenticated?
130- How does a presence-proving approval compose with the signed-note envelope?
131- How is governance recovered after compromise of the genesis key?
132- What does a signed dispatch authorization identify, and how does it start a delegation chain?