/goal /ultracode-workflows [SEC-1] sovereign age-key backup, escrow verification, and rotation runbook + tooling #26

Closed
opened 2026-07-01 02:03:43 +00:00 by plat · 1 comment
Owner

Track/Wave: SEC-1 · Wave M4 · Size M
Repos: mitosis
Depends on: HYB-1

Why

You cannot responsibly hand a client a platform whose single sovereign age key has no backup or rotation path. This is the "robust foundation" gate.

Scope

In bin/lib.sh: (1) germination-time age-encrypted BACKUP of the fork key to an operator-specified location, with explicit acknowledgment before proceeding past the "keep your key forever" banner; (2) a rotate_age_key op that mints a new keypair, rekeys .sops.yaml, re-encrypts every clusters/** sops file PRESERVING VALUES (sops updatekeys, not fork's regen-fresh shortcut), updates the in-cluster sops-age Secret, and gates on fork_verify_all_sealed; (3) a lost-key + suspected-compromise runbook.

Acceptance

On a germinated daughter, after rotate_age_key a previously-set app secret still resolves in the running pod; fork_verify_all_sealed passes against the NEW key and FAILS against the old; the old key decrypts nothing; a documented restore-from-backup recovers a platform whose local key was "lost".

Notes

Seam A (bin/lib.sh) — after HYB-1. Open decision: off-box custody target (password manager / hardware token / escrow).


Part of the First Client Deploy → Governance roadmap. The owning agent may recurse into its own subagent team (ultracode workflow) if the task warrants. Honor the seam-serialization: land on a shared seam by rebase, and don't start a seam position until the prior one has merged.

**Track/Wave:** `SEC-1` · Wave **M4** · Size **M** **Repos:** `mitosis` **Depends on:** HYB-1 ## Why You cannot responsibly hand a client a platform whose single sovereign age key has no backup or rotation path. This is the "robust foundation" gate. ## Scope In bin/lib.sh: (1) germination-time age-encrypted BACKUP of the fork key to an operator-specified location, with explicit acknowledgment before proceeding past the "keep your key forever" banner; (2) a `rotate_age_key` op that mints a new keypair, rekeys .sops.yaml, re-encrypts every clusters/** sops file PRESERVING VALUES (`sops updatekeys`, not fork's regen-fresh shortcut), updates the in-cluster sops-age Secret, and gates on fork_verify_all_sealed; (3) a lost-key + suspected-compromise runbook. ## Acceptance On a germinated daughter, after rotate_age_key a previously-set app secret still resolves in the running pod; fork_verify_all_sealed passes against the NEW key and FAILS against the old; the old key decrypts nothing; a documented restore-from-backup recovers a platform whose local key was "lost". ## Notes **Seam A (bin/lib.sh) — after HYB-1.** Open decision: off-box custody target (password manager / hardware token / escrow). --- *Part of the **First Client Deploy → Governance** roadmap. The owning agent may recurse into its own subagent team (ultracode workflow) if the task warrants. Honor the seam-serialization: land on a shared seam by rebase, and don't start a seam position until the prior one has merged.*
Author
Owner

SEC-1 delivered in plat/mitosis PR #52 (merged).

Validated LIVE on the vxrail:

  • Backup gate exercised during a real valid8e germination: age-encrypted backup written (chmod 600), FORK_KEY_ACK=1 honored, restore decrypts byte-identical to the sovereign key.
  • Rotation run live on throwaway k3d-valid8c (value-preserving): the previously-set MCP_BEARER_TOKEN still resolves in the SAME running mcp pod after rotation (identical value); platform Kustomization Ready=True at the pushed revision (Flux decrypts with the NEW key); in-cluster sops-age swapped to the new key; fork_verify_all_sealed PASSES on the new key and FAILS on the old; the old key decrypts 0/9 clusters/** files; restore-from-backup recovers a platform whose local key was moved aside.
  • Also proven offline against real valid8b gitops: 9/9 decrypted plaintexts identical pre/post rotation.

valid8b (current-stack reference) untouched; platgold2 never touched.

SEC-1 delivered in plat/mitosis PR #52 (merged). Validated LIVE on the vxrail: - **Backup gate** exercised during a real `valid8e` germination: age-encrypted backup written (chmod 600), `FORK_KEY_ACK=1` honored, restore decrypts byte-identical to the sovereign key. - **Rotation** run live on throwaway `k3d-valid8c` (value-preserving): the previously-set `MCP_BEARER_TOKEN` still resolves in the SAME running mcp pod after rotation (identical value); platform Kustomization Ready=True at the pushed revision (Flux decrypts with the NEW key); in-cluster `sops-age` swapped to the new key; `fork_verify_all_sealed` PASSES on the new key and FAILS on the old; the old key decrypts 0/9 `clusters/**` files; restore-from-backup recovers a platform whose local key was moved aside. - Also proven offline against real `valid8b` gitops: 9/9 decrypted plaintexts identical pre/post rotation. `valid8b` (current-stack reference) untouched; `platgold2` never touched.
plat closed this issue 2026-07-01 04:47:10 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
open-platform/mitosis#26
No description provided.