openbao: declarative file audit device #539

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

Part of #535

Parent

#535 (spec). Decisions: #533.

What to build

A consumer gets every OpenBao request logged from the first unseal without an API call: the role renders a declarative audit stanza in the server config creating a file audit device at the audit log path, on by default and switched by openbao_audit_file_enabled. logrotate rotates the log and signals OpenBao through the unit's reload so the file is reopened.

Acceptance criteria

  • openbao_audit_file_enabled (default true) and the audit log path are inputs in defaults and argument_specs.
  • The audit directory is owned by the service user, writable through the unit's ReadWritePaths, and the log is not world-readable.
  • A logrotate config rotates the audit log and triggers a reload (SIGHUP) afterwards.
  • With the switch off, no audit stanza is rendered and no logrotate config is left.
  • Molecule verify asserts that a request to the unsealed server writes a line to the audit log, and that a forced logrotate run leaves OpenBao writing to the new file.
  • The minimum OpenBao version supporting the declarative audit stanza is confirmed to be at or below the pinned version.
  • The README warns that an audit device that cannot write makes OpenBao refuse requests, and tells the consumer to monitor disk space on the audit path.

Assisted-by: Claude Code

Part of #535 ## Parent #535 (spec). Decisions: #533. ## What to build A consumer gets every OpenBao request logged from the first unseal without an API call: the role renders a declarative `audit` stanza in the server config creating a file audit device at the audit log path, on by default and switched by `openbao_audit_file_enabled`. logrotate rotates the log and signals OpenBao through the unit's reload so the file is reopened. ## Acceptance criteria - [ ] `openbao_audit_file_enabled` (default true) and the audit log path are inputs in defaults and argument_specs. - [ ] The audit directory is owned by the service user, writable through the unit's `ReadWritePaths`, and the log is not world-readable. - [ ] A logrotate config rotates the audit log and triggers a reload (SIGHUP) afterwards. - [ ] With the switch off, no audit stanza is rendered and no logrotate config is left. - [ ] Molecule verify asserts that a request to the unsealed server writes a line to the audit log, and that a forced logrotate run leaves OpenBao writing to the new file. - [ ] The minimum OpenBao version supporting the declarative `audit` stanza is confirmed to be at or below the pinned version. - [ ] The README warns that an audit device that cannot write makes OpenBao refuse requests, and tells the consumer to monitor disk space on the audit path. Assisted-by: Claude Code
Claude added the Kind/Feature
Status
Ready for Agent
labels 2026-12-06 20:38:42 +00:00
Claude added a new dependency 2026-12-06 20:38:51 +00:00
Claude added this to the openbao role milestone 2026-12-06 20:42:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#539