| 1 | // The worked identity registry: an example instance, written against |
| 2 | // schema/identity.cue. The compiler renders it into |
| 3 | // ../compiled/, which is what the enforcement boundaries read — so this |
| 4 | // pair is the schema's evidence, and the golden case of the identity-e2e |
| 5 | // check. |
| 6 | // |
| 7 | // The keys were generated for this example, and their private halves were |
| 8 | // discarded. Nothing in a registry is a secret: it holds public halves |
| 9 | // only, which is why it is an ordinary document in the instance repository |
| 10 | // rather than a provisioned file. |
| 11 | package identity |
| 12 | |
| 13 | boundaries: { |
| 14 | // The host serving the instance's repositories. sshd is the gate: a key |
| 15 | // in the compiled authorized_keys may push, and one that is not there |
| 16 | // cannot reach the repositories at all. |
| 17 | "valley-host-push": kind: "git-push" |
| 18 | |
| 19 | // The integration path that admits a change to this document. |
| 20 | "registry": kind: "registry" |
| 21 | |
| 22 | // The same host's pre-receive hook, deciding who may write an |
| 23 | // integration request. A key it does not find among the holders cannot |
| 24 | // file one. |
| 25 | "valley-host-request": kind: "request" |
| 26 | } |
| 27 | |
| 28 | genesis: "operator" |
| 29 | |
| 30 | principals: { |
| 31 | // The operator. Five keys across four machines, and the signing name |
| 32 | // varies per key rather than per entry: two keys on the workstation sign |
| 33 | // under that machine's attestations name, the plain key on |
| 34 | // valley-host signs under the operator's own name, and the two that |
| 35 | // sign nothing push and never attest. The operator files integration |
| 36 | // requests, so the entry holds request beside push. |
| 37 | "operator": { |
| 38 | kind: "human" |
| 39 | keys: [ |
| 40 | { // workstation, first system |
| 41 | class: "ssh-ed25519" |
| 42 | bound: "host" |
| 43 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINeHRYwKqCETPj0ZZ/+B5c5Julf3dJZclYZaRWixQs1D" |
| 44 | signs: "workstation/attestations" |
| 45 | }, |
| 46 | { // workstation, second system |
| 47 | class: "ssh-ed25519" |
| 48 | bound: "host" |
| 49 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIORtFu8o9epEZ6UPhN7EfghFnP0gUTrvuZxdSwlHGGWQ" |
| 50 | signs: "workstation/attestations" |
| 51 | }, |
| 52 | { // valley-host |
| 53 | class: "ssh-ed25519" |
| 54 | bound: "host" |
| 55 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMsWYyDSCNBwb6MnvQ7sfu++kZold+0HuP5leY4IiKnV" |
| 56 | signs: "operator" |
| 57 | }, |
| 58 | { // cloud-shell |
| 59 | class: "ssh-ed25519" |
| 60 | bound: "host" |
| 61 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFtx7r+B/QI75Oohpr5+TQIEmTBstSuby0rsG9d4T8vx" |
| 62 | }, |
| 63 | { // laptop |
| 64 | class: "ssh-ed25519" |
| 65 | bound: "host" |
| 66 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA2HH5cIC6Nmby7aN2bEOxeF6pe4EYvtOLTiLdztbQFG" |
| 67 | }, |
| 68 | ] |
| 69 | grants: { |
| 70 | push: boundary: "valley-host-push" |
| 71 | request: boundary: "valley-host-request" |
| 72 | govern: boundary: "registry" |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | // A scratch machine: it clones and pushes topic branches, files no |
| 77 | // request, decrypts nothing, and holds its raw key until the |
| 78 | // certificate issuance service exists. Hence the expiry, which is what |
| 79 | // makes the compilation a revocation already scheduled (bd-8a591dc). |
| 80 | "agent-vm": { |
| 81 | kind: "machine" |
| 82 | keys: [{ |
| 83 | class: "ssh-ed25519" |
| 84 | bound: "host" |
| 85 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO0AEJMcSrXCOYKlyVrdVWG07RF2SIM/8gaI/8oDEMRI" |
| 86 | }] |
| 87 | grants: push: boundary: "valley-host-push" |
| 88 | expires: "2026-10-01" |
| 89 | } |
| 90 | |
| 91 | // The host itself, signing the execution claims `attest run` produces on |
| 92 | // it. It pushes nowhere, so it holds no grant — and it is still in the |
| 93 | // compiled known-signers, because that artifact is every |
| 94 | // attestation-capable key rather than the holders of some grant. |
| 95 | "valley-host": { |
| 96 | kind: "machine" |
| 97 | keys: [{ |
| 98 | class: "ssh-ed25519" |
| 99 | bound: "host" |
| 100 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGRtI+7TYX67rzFGIp3ZJEVLAnaL4SA2n5ipYkFqpgKS" |
| 101 | signs: "valley-host/attestations" |
| 102 | }] |
| 103 | expires: "2027-06-01" |
| 104 | } |
| 105 | |
| 106 | // The integrator, signing its transfer statements under its own name. |
| 107 | // No push grant: it reaches the repositories through the git group on |
| 108 | // the host, not through sshd. |
| 109 | "integrator": { |
| 110 | kind: "service" |
| 111 | keys: [{ |
| 112 | class: "ssh-ed25519" |
| 113 | bound: "host" |
| 114 | public: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEGTRJkpUO9Z+nujKT+u5Ho7jcovPYu070iz6poQIKoI" |
| 115 | signs: "integrator" |
| 116 | }] |
| 117 | expires: "2027-06-01" |
| 118 | } |
| 119 | } |