feat(#528): custody token maintenance — boot self-check, renewal, metrics #534
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-528"
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?
Closes the failure class behind last night's incident: the openbao custody token hit its default 768h TTL, OpenBao's expiration manager revoked it, every fresh decrypt 403'd, and nothing said so until a user opened a file.
lookup-self+ a canary KV read at startup. Dead custody logs ERROR at boot; a non-renewable expiring token logs WARN with its remaining lifetime; healthy logs INFO with ttl/renewability. The canary treats 404 as healthy — the token is accepted on the data tree without requiring any secret to exist.cairn_custody_errors_total(fetch/put/lookup/renew failures),cairn_custody_token_ttl_seconds(0 = non-expiring),cairn_custody_token_renewable— emitted only while a custody provider is active.CustodyLastError()exported for the admin Encryption & keys card as a follow-up.TDD, red witnessed on the runner first (missing symbols across both packages), then green on the full suite. The test helper is
maintBao— the existing suite already owns the namefakeBaoas a type, which the red build-failure masked; caught and renamed in the green run.After this merges and the dogfood restarts, the boot log should show
custody self-check ok token_ttl=… renewable=true, and the renewal loop makes the 2026-10-16 fuse a non-event. ACairnCustodyFailingPrometheusRule lands in homelab-config next.