openbao_config: new role for OpenBao configuration as code #530

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

Problem

Follow-up of the planned openbao role (a single-node OpenBao server: tarball install, raft storage, consumer-supplied TLS, an opt-in init entry point returning a no_log fact, optional Shamir unseal from vaulted keys, an update entry point and a declarative file audit device). That role stops at a running, unsealed server. Everything configured through OpenBao's API (auth methods, policies, secret engines) is then done by hand and not reviewable.

Out of scope: installing or unsealing the server (the openbao role).

Proposal

A new role openbao_config that declares, from consumer variables:

  • auth methods and their roles;
  • ACL policies;
  • secret engines, including the PKI engine: a root CA, an intermediate CA signed by it, issuing roles, and the PKI ACME directory. Verify first that OpenBao's PKI engine supports ACME and in which version.

The API client is to be decided as part of this issue:

  • OpenTofu with the OpenBao fork of the Vault provider (a new tool in CI);
  • community.hashi_vault (OpenBao compatibility is undocumented; it would be a new Collection dependency, with a version floor and a stated reason);
  • ansible.builtin.uri against the HTTP API (no new dependency, more code).

The role must be idempotent and keep tokens under no_log.

Acceptance criteria

  • The client choice is recorded (an ADR if it adds a Collection dependency or a tool).
  • A Molecule scenario configures a server from the openbao role with a policy, an auth method and a PKI engine with root and intermediate CA, and a second converge reports no changes.
  • Verify issues a certificate from a PKI role, and, if ACME is supported, reaches the ACME directory URL.
  • No token or key appears in task output.
  • A changelog fragment in minor_changes.

Assisted-by: Claude Code

### Problem Follow-up of the planned `openbao` role (a single-node OpenBao server: tarball install, raft storage, consumer-supplied TLS, an opt-in `init` entry point returning a `no_log` fact, optional Shamir unseal from vaulted keys, an `update` entry point and a declarative file audit device). That role stops at a running, unsealed server. Everything configured through OpenBao's API (auth methods, policies, secret engines) is then done by hand and not reviewable. Out of scope: installing or unsealing the server (the `openbao` role). ### Proposal A new role `openbao_config` that declares, from consumer variables: - auth methods and their roles; - ACL policies; - secret engines, including the PKI engine: a root CA, an intermediate CA signed by it, issuing roles, and the PKI ACME directory. Verify first that OpenBao's PKI engine supports ACME and in which version. The API client is to be decided as part of this issue: - OpenTofu with the OpenBao fork of the Vault provider (a new tool in CI); - `community.hashi_vault` (OpenBao compatibility is undocumented; it would be a new Collection dependency, with a version floor and a stated reason); - `ansible.builtin.uri` against the HTTP API (no new dependency, more code). The role must be idempotent and keep tokens under `no_log`. ### Acceptance criteria - [ ] The client choice is recorded (an ADR if it adds a Collection dependency or a tool). - [ ] A Molecule scenario configures a server from the `openbao` role with a policy, an auth method and a PKI engine with root and intermediate CA, and a second converge reports no changes. - [ ] Verify issues a certificate from a PKI role, and, if ACME is supported, reaches the ACME directory URL. - [ ] No token or key appears in task output. - [ ] A changelog fragment in `minor_changes`. Assisted-by: Claude Code
Claude added the
Status
Needs Triage
label 2026-12-06 20:16:11 +00:00
Claude added a new dependency 2026-12-06 20:16:23 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#530