| 1 | --- |
| 2 | type: decision |
| 3 | id: dcr-b87f6e8 |
| 4 | status: decided |
| 5 | title: "Declare identities, keys, and permissions in a governed registry" |
| 6 | created: 2026-08-06 |
| 7 | source: design conversation, 2026-08-06 |
| 8 | --- |
| 9 | |
| 10 | # Declare identities, keys, and permissions in a governed registry |
| 11 | |
| 12 | A valley declares the people, machines, and services it recognizes in a CUE registry in its |
| 13 | repository. Each named actor, called a **principal**, has keys, permissions, and any required expiry |
| 14 | date. Registry changes take effect through integration. |
| 15 | |
| 16 | The registry establishes what an identity may do in this valley. Authentication requires proof of |
| 17 | possession of a registered private key. |
| 18 | |
| 19 | ## Registry changes and entries |
| 20 | |
| 21 | Granting access, rotating a key, and revoking access are ordinary versioned changes. The registry's |
| 22 | path 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 | |
| 29 | Signing names belong to individual keys. The signed-note format binds a name and public key into a |
| 30 | key hash, as specified in [[dcr-de9d996]](dcr-de9d996-statement-text-and-signed-note.md). A |
| 31 | principal using different signing names on two machines therefore has two verifier-key entries. |
| 32 | Compiling the wrong name would prevent the verifier from matching the signature. |
| 33 | |
| 34 | Agent runs have no registry entry or key of their own. They act under delegated authority from a |
| 35 | registered 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 | |
| 41 | A permission is meaningful only if some part of the running system checks it before allowing an |
| 42 | action. Examples include SSH access to repositories and authorization to publish on the bus. A |
| 43 | deployment 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 |
| 46 | terms of verbs such as fetch, push, request, and govern. Infrastructure settings are generated from |
| 47 | those declarations. The implemented registry schema still expresses grants through named enforcement |
| 48 | boundaries; the verb-oriented declaration is the intended interface. |
| 49 | |
| 50 | A valley may define reusable permission bundles and membership sets as its own configuration. The |
| 51 | shared schema does not prescribe role names. |
| 52 | |
| 53 | The initial **genesis** principal is created with the valley and holds governance of the registry's |
| 54 | own stream. Shared identity constraints require expiry for external principals and prohibit them |
| 55 | from holding registry governance. These are requirements on entries, independent of local principal |
| 56 | names. |
| 57 | |
| 58 | ## External identities |
| 59 | |
| 60 | An external collaborator can be identified by a domain handle or decentralized identifier that the |
| 61 | person already controls. Onboarding verifies that reference, and others must be able to verify it |
| 62 | again. |
| 63 | |
| 64 | Each valley independently grants access to that identity. This supports the cross-valley identity |
| 65 | proposal in [[ida-8482624]](../ideas/ida-8482624-federation-groups.md). |
| 66 | |
| 67 | ## Web authentication and human approval |
| 68 | |
| 69 | A web interface authenticates against a registry key by checking a signature over a fresh challenge, |
| 70 | then 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 | |
| 73 | For human credentials that satisfy the physical-approval requirement, the chosen key class must |
| 74 | provide hardware binding and evidence of user presence. A browser-mediated assertion is a candidate |
| 75 | mechanism. Binding its challenge to a statement digest could support approval of that statement. |
| 76 | |
| 77 | The approval envelope and its relationship to signed notes remain open. Describing a credential as a |
| 78 | passkey does not, by itself, specify all of the binding and presence properties required here. |
| 79 | |
| 80 | ## Credential lifetime |
| 81 | |
| 82 | Long-lived credentials must be asymmetric and bound to human-held hardware or a machine host. |
| 83 | Authentication uses the private key to produce a signature; the private key is not sent to the |
| 84 | verifier. |
| 85 | |
| 86 | Machine and service entries using raw keys require expiry dates. Successful registry compilation |
| 87 | omits expired entries from generated access artifacts. Access removal therefore occurs through |
| 88 | convergence after expiry, rather than at the instant the date passes. |
| 89 | |
| 90 | Short-lived certificates issued from registry entries are the intended next step for machine access. |
| 91 | Their issuance service and authentication mechanism remain deferred. |
| 92 | |
| 93 | Any bearer secrets still required during migration must be recorded as temporary liabilities with |
| 94 | expiry. 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 |
| 96 | credential-lifetime problem. |
| 97 | |
| 98 | ## Compilation on the host |
| 99 | |
| 100 | The [identity compiler](../../identity/) reads the valley repository's integrated revision and |
| 101 | produces 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 | |
| 107 | An unintegrated registry edit grants no access. Schema errors, policy violations, repository-access |
| 108 | failures, and loss of every unexpired governing key must leave the last valid artifacts in place. |
| 109 | This prevents a failed render from emptying the access files. It also means failed convergence can |
| 110 | delay removal of expired or revoked access. |
| 111 | |
| 112 | During the initial deployment, generated keys supplement keys declared directly by the host. Those |
| 113 | declared keys provide a recovery path. |
| 114 | |
| 115 | Bus 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 |
| 119 | subject permissions. |
| 120 | |
| 121 | ## Identity services |
| 122 | |
| 123 | The registry is the valley's authority for identity and access. If an integration requires an |
| 124 | identity-provider protocol, an adapter can expose registry-derived data through that protocol. It |
| 125 | must 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? |