chore(secrets): create the disaster-recovery escrow, which had never existed - #1002
Merged
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first
sensitive/dr/bitwarden-export.agethis repository has ever contained.Why this is not routine
ADR-028 §5 specifies a disaster-recovery escrow:
bw sync+bw exportpiped in memory into age, encrypted to the operator's own recipient, round-trip verified, written 0600, and committed — the directory's.gitignoreun-ignores*.ageprecisely so the encrypted blob rides in git and is therefore offsite by construction.It had never run.
dotf secrets backupfails withbw export: Vault is lockedbecause the export shells out to thebwCLI, which authenticates fromBW_SESSION, while every read path moved to thebw servedaemon in #975. That is #993, and the escrow is its most expensive consequence.Two facts made the absence serious rather than untidy:
migratedrops theage:pointer when it flips a secret to Bitwarden, so 28 migrated secrets had no age copy the registry still claimed. Bitwarden was the only copy in existence.checks_dr.goreports an absent escrow asSKIP, sodotf doctorhad never once mentioned it. The gap was invisible for the same reason the PAT-expiry check was dead all morning: the only reachable branch was the one that means "nothing to check".What was done
141 KB, mode 0600, genuine age ciphertext, and
dotf secrets backupdecrypts it back and byte-compares before it will report success — a corrupt escrow is removed rather than committed.The other half, not in this PR
An escrow is worthless if its key has a single point of failure, and this one did: the age identity's only off-machine copy lived inside Bitwarden, the vault the escrow exists to survive the loss of. That circular dependency is now broken — the key is on a separate USB, so recovery is
USB key + git clonewith two independent failure modes. Tracked in #1000, where what remains is verification rather than exposure: the registry still does not declare the key (#937), nothing checks the two copies still match, and the recovery chain has never been executed end to end.Note on the commit
Committed directly to
mainfirst, in error, and moved onto this branch before pushing. Everything in this repository goes through a PR; the escrow is not an exception just because it is a binary blob.