Recovery identity off the servers: envelope keyring / operational key / KMS, with authenticated state values #1176

Open
opened 2026-11-15 01:44:31 +00:00 by Cordy · 0 comments
Owner

Follow-up from #742 batch A (decided 2026-11-15, research .superpowers/sdd/2026-11-14-b9v07/research-742a-rotation.md, section 6.3 C and 7.2).

Why: today the recovery identity's secret sits in every server's config (at-rest key derivation, state sealing, recovery open, key drain). State values are sealed with age to the recovery (and deployment) recipients, so they are confidential but not authenticated against a writer who knows a recipient (age has no sender authentication). With external NATS, an operator who knows the recovery public key could replace a state value with a forged one. Batch A documents this under Known limitations.

Idea (to research and decide): a versioned cluster/instance data key (keyring) stored wrapped to an operational key or a KMS/HSM, with values sealed under the data key (format cairn-state/2 with a key id), so that:

  • routine recovery rotation becomes a re-wrap of one record;
  • the break-glass recovery secret can leave the servers;
  • state values are authenticated against store writers (recipient never published).

Scope: single-instance and cluster alike (export to local mode, snapshots, restore of format-1 backups, keyscan sources, re-seal pass, cluster format raise and dual-read for mixed versions, docs).

Known limit (from the research): after a suspected compromise (the handbook's rotation triggers), the data key must still be replaced and every value re-sealed. The keyring makes routine rotation cheap; it does not remove the compromise path.

Run through the research playbook first (market, standards: NIST SP 800-57 Pt 1, ISO/IEC 27002:2022 8.24, KMS v2 / Vault / CockroachDB patterns, incidents).

Follow-up from #742 batch A (decided 2026-11-15, research `.superpowers/sdd/2026-11-14-b9v07/research-742a-rotation.md`, section 6.3 C and 7.2). **Why:** today the recovery identity's secret sits in every server's config (at-rest key derivation, state sealing, recovery open, key drain). State values are sealed with age to the recovery (and deployment) recipients, so they are confidential but not authenticated against a writer who knows a recipient (age has no sender authentication). With external NATS, an operator who knows the recovery public key could replace a state value with a forged one. Batch A documents this under Known limitations. **Idea (to research and decide):** a versioned cluster/instance data key (keyring) stored wrapped to an operational key or a KMS/HSM, with values sealed under the data key (format `cairn-state/2` with a key id), so that: - routine recovery rotation becomes a re-wrap of one record; - the break-glass recovery secret can leave the servers; - state values are authenticated against store writers (recipient never published). **Scope:** single-instance and cluster alike (export to local mode, snapshots, restore of format-1 backups, keyscan sources, re-seal pass, cluster format raise and dual-read for mixed versions, docs). **Known limit (from the research):** after a suspected compromise (the handbook's rotation triggers), the data key must still be replaced and every value re-sealed. The keyring makes routine rotation cheap; it does not remove the compromise path. Run through the research playbook first (market, standards: NIST SP 800-57 Pt 1, ISO/IEC 27002:2022 8.24, KMS v2 / Vault / CockroachDB patterns, incidents).
Sign in to join this conversation.
No labels
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.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1176
No description provided.