ca_trust: new role to install a root CA into the system trust store #531

Open
opened 2026-12-06 20:16:12 +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). A certificate from an internal CA, such as one OpenBao's PKI engine issues, is only trusted by hosts that carry its root. No role installs a root CA today, so each consumer does it by hand.

Out of scope: issuing or renewing certificates; per-application trust stores (Java keystores, browser profiles).

Proposal

A new role ca_trust that takes one or more consumer-supplied root CA certificates (PEM content) and, on every host it runs on:

  • writes each to /usr/local/share/ca-certificates/<name>.crt;
  • runs update-ca-certificates through a handler when a file changed;
  • removes certificates the consumer marks absent.

It is generic: any internal CA, not only OpenBao's.

Acceptance criteria

  • A Molecule scenario installs a test root CA, and verify shows it in /etc/ssl/certs/ca-certificates.crt and that openssl verify accepts a leaf it signed.
  • A second converge reports no changes.
  • Marking the certificate absent removes it from the bundle.
  • The role refuses input that is not a PEM certificate (argument spec or an assert).
  • 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). A certificate from an internal CA, such as one OpenBao's PKI engine issues, is only trusted by hosts that carry its root. No role installs a root CA today, so each consumer does it by hand. Out of scope: issuing or renewing certificates; per-application trust stores (Java keystores, browser profiles). ### Proposal A new role `ca_trust` that takes one or more consumer-supplied root CA certificates (PEM content) and, on every host it runs on: - writes each to `/usr/local/share/ca-certificates/<name>.crt`; - runs `update-ca-certificates` through a handler when a file changed; - removes certificates the consumer marks absent. It is generic: any internal CA, not only OpenBao's. ### Acceptance criteria - [ ] A Molecule scenario installs a test root CA, and verify shows it in `/etc/ssl/certs/ca-certificates.crt` and that `openssl verify` accepts a leaf it signed. - [ ] A second converge reports no changes. - [ ] Marking the certificate absent removes it from the bundle. - [ ] The role refuses input that is not a PEM certificate (argument spec or an assert). - [ ] A changelog fragment in `minor_changes`. Assisted-by: Claude Code
Claude added the
Status
Needs Triage
label 2026-12-06 20:16:12 +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#531