Skip to main content
This page complements the Secrets vault design. Section references point there.

Threat model

Delivery slices

Each slice gets an independent security review. Migrations need an exact-SQL review, a full local reset and the gated production workflow. Slices that issue grants (4, 6, 10) are admitted only after slice 5’s epoch revocation passes end to end.

Slice gates

Each gate is a requirement that the named slice must meet before it ships. A focused independent review checks the gate when the slice is built. A gate that turns out to change the trust anchor, the witness or epoch revocation reopens the design instead.

Interim server keys before workload principals

Until workload principals (slice 10) serve server-readable keys, a server key that must be recoverable is minted by a dedicated dispatch-only workflow with mandatory escrow. The first is the people registry root wrap key, .github/workflows/people-registry-key.yaml with scripts/ci/people-registry-key.mjs:
  • It runs only on main, in the shared-secret-production environment, which requires a reviewer.
  • It refuses to run while .github/escrow/people-registry-wrap-key.recipients lists no age recipient. Recipients are public keys; owners keep identities in a synced password manager, and age-keygen -pq hybrid keys are preferred.
  • It escrows first: the key is age-encrypted in memory, stored in the private tuturuuu-secret-escrow R2 bucket under people-registry/<environment>/<kid>.age and read back byte for byte before any Worker receives it. Escrow calls use ESCROW_R2_TOKEN, a dedicated token limited to that bucket’s objects, over R2’s S3-compatible API with SigV4 (Cloudflare accepts object-scoped tokens only there); the Worker writes use the separate Cloudflare Workers token.
  • Each kid is its own Worker secret, PEOPLE_REGISTRY_WRAP_KEY_<kid>, and PEOPLE_REGISTRY_WRAP_KID names the current one. A kid is never rewritten, so rotation adds a kid and re-wraps workspace keys without losing old ones.
  • Targets are the vinext families that serve the registry routes, currently api-core in production; staging has no vinext family Workers yet.
  • A secret write deploys a new version built from the latest upload, so the run refuses unless the latest uploaded version serves all traffic. Dispatch only in a quiet window agreed with the web lane, never during a family rebuild.
Dispatch only when all of these hold:
  1. An independent review has approved the workflow at the dispatched commit.
  2. At least one owner recipient is committed.
  3. The deployed api-core reads PEOPLE_REGISTRY_WRAP_KID and PEOPLE_REGISTRY_WRAP_KEY_<kid> (the per-kid reader in apps/web/src/lib/people-registry/keys.ts), and the vinext build exposes secret bindings to dynamic process.env reads.
  4. The web lane has agreed a quiet window with no family rebuild in progress.
Restore: an owner downloads the escrow object and runs age -d -i <identity> <kid>.age. When workload principals ship, these keys move into a server-readable vault environment and the escrow is retired after a verified restore drill.