OpenBao key-custody backend (uniform AD + Keycloak) #29
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Manuel's suggestion for the open AD key-management question. Add a third
KeyProviderbacking per-user age keys in OpenBao (the active Linux-Foundation Vault fork; its transit engine is "encryption/keys as a service" — per-key derivation, convergent encryption, rotation, audit logs).Source: https://openbao.org/docs/secrets/transit/
Decision — approved (Manuel's review, relayed by Nikola 2026-07-31):
Un-gated. OpenBao becomes the approved key-custody backend alongside (eventually uniform across) AD + Keycloak environments. Implementation prerequisites when greenlit: deploy OpenBao on k3s (GitOps like everything else), define the custody interface as a third
keyCustodymode next tokeycloak-profileanddeployment, and per #30's rejection the model stays unique-key-per-user/group — OpenBao stores and serves those identities, it does not derive them.Shipped in v0.3.28 (PR #99) as
keyCustody: "openbao".Implemented as a KV v2 custody store, not the transit engine Manuel linked — deliberate: Cairn's at-rest format stays plain age files so
age -drecovery keeps working (sovereignty feature), which means the backend must hand cairnd the identity rather than perform the crypto. Layout:{mount}/data/{prefix}/users/<username>and.../groups/<space>(#18 group keys covered), fieldidentity. Lazy provisioning with check-and-set (cas=0) so racing replicas can never overwrite a live custody key. Config:openbaoBaseUrl,openbaoToken(orCAIRN_ENC_OPENBAO_TOKEN),openbaoMount(defaultsecret),openbaoPathPrefix(defaultcairn). Recovery recipient handled identically to the other custody modes.Unit-tested against a fake KV v2 (provision, group isolation, cas race, recovery). Not yet e2e'd against a real OpenBao — that wants an OpenBao instance on k3s, same pattern as the Keycloak e2e; worth doing before any customer runs this custody mode. Closing the build; the e2e can ride the AD-parity dress rehearsal.