openbao: init entry point #537

Open
opened 2026-12-06 20:38:28 +00:00 by Claude · 0 comments
Owner

Part of #535

Parent

#535 (spec). Decisions: #533.

What to build

A consumer calls the openbao role's opt-in init entry point once against a fresh server and receives the unseal keys and root token as one documented no_log, non-cacheable output fact, which their play vault-encrypts into inventory. Nothing is written to disk. The entry point follows the Collection's opt-in output-fact pattern (gitea and cloudflared mint): a confirm flag defaulting to false, refusal when CI environment variables are set, a no-op when the server already reports initialised, skipped under --check, no_log on every task, intermediates blanked. Key shares and threshold are inputs. The init call goes to the role's own API on loopback with certificate validation.

Acceptance criteria

  • init has its own argument_specs key and validation before any change, and an "Entry points" README entry.
  • Without the confirm flag, init fails with a clear message before any change; with CI environment variables set, it refuses with a clear message.
  • On an initialised server, init reports no change and returns no secret.
  • Under --check, init changes nothing.
  • Every task carrying a secret has no_log: true; the output fact is documented under "Variables set by the role"; intermediates are blanked.
  • Invalid shares/threshold (threshold above shares, below 1) fail in validation with a clear message.
  • Molecule verify runs init as a child playbook with CI variables blanked (cloudflared's pattern), asserts the fact's shape and blank intermediates under no_log, then runs it again and asserts a no-op; negative tests cover each guard.
  • The README says lost init output is unrecoverable and the play must persist it immediately; the example play shows vault-encrypting it.
  • The exact JSON field names of the init response are confirmed against the running server.

Assisted-by: Claude Code

Part of #535 ## Parent #535 (spec). Decisions: #533. ## What to build A consumer calls the `openbao` role's opt-in `init` entry point once against a fresh server and receives the unseal keys and root token as one documented `no_log`, non-cacheable output fact, which their play vault-encrypts into inventory. Nothing is written to disk. The entry point follows the Collection's opt-in output-fact pattern (gitea and cloudflared `mint`): a confirm flag defaulting to false, refusal when CI environment variables are set, a no-op when the server already reports initialised, skipped under `--check`, `no_log` on every task, intermediates blanked. Key shares and threshold are inputs. The init call goes to the role's own API on loopback with certificate validation. ## Acceptance criteria - [ ] `init` has its own argument_specs key and validation before any change, and an "Entry points" README entry. - [ ] Without the confirm flag, `init` fails with a clear message before any change; with CI environment variables set, it refuses with a clear message. - [ ] On an initialised server, `init` reports no change and returns no secret. - [ ] Under `--check`, `init` changes nothing. - [ ] Every task carrying a secret has `no_log: true`; the output fact is documented under "Variables set by the role"; intermediates are blanked. - [ ] Invalid shares/threshold (threshold above shares, below 1) fail in validation with a clear message. - [ ] Molecule verify runs `init` as a child playbook with CI variables blanked (cloudflared's pattern), asserts the fact's shape and blank intermediates under `no_log`, then runs it again and asserts a no-op; negative tests cover each guard. - [ ] The README says lost init output is unrecoverable and the play must persist it immediately; the example play shows vault-encrypting it. - [ ] The exact JSON field names of the init response are confirmed against the running server. Assisted-by: Claude Code
Claude added the Kind/Feature
Status
Ready for Agent
labels 2026-12-06 20:38:28 +00:00
Claude added a new dependency 2026-12-06 20:38:49 +00:00
Claude added a new dependency 2026-12-06 20:38:50 +00:00
Claude added this to the openbao role milestone 2026-12-06 20:42:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#537