#411: managed re-encryption (drain) — job, lock deferral, ledger, boot tripwire, Rotation UI #412
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "drain-411"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the drain half of ADR 0002 (closes #411).
Backend
internal/keydrain: throttled, pausable, idempotent re-encryption pass. Walks the bare base driver, classifies by trial unwrap, rewrites retired-only objects through the encrypt decorator (custody re-resolution + PQ upgrade; below ownermeta/filelock/quota, so ownership and accounting are untouched by construction). Live-locked files are deferred with path/type/holder; state objects re-seal via the statestore (no double-wrap).key-rotation.json, statestore-backed) + boot tripwire: removing an undrained retired key from config refuses to start;CAIRN_KEYDRAIN_FORCE=1is the explicit escape hatch. The coverage scan (keyscan.OnComplete) marks entries drained at proven zero.POST/GET/DELETE /api/v1/admin/keydrain; onekey-drainaudit event per pass.Frontend (per the approved drain-locked-files mockup)
Verified in CI on the branch: go vet/build, keydrain/keyscan/api/webcheck tests, node web tests.