add audit logs to openbao

Summary

Add the audit logs to openbao by patching the configration (in file vault.yaml in the unit vault) with the fields below:

   "audit": [
    {
      "file": {
        "to-stdout": {
          "description": "Write audit information to Pod's logs.",
          "options": {
            "file_path": "stdout"
          }
        }
      }
    }
  ],

The pod logs are completed with information like (here the user root list secrets engine):

{
  "time": "2026-09-11T13:32:46.246615789Z",
  "type": "request",
  "auth": {
    "client_token": "hmac-sha256:7e7508a3745d335d4913a6cb0df838d94a0f912fac1f9c42bd986d05ec971e26",
    "accessor": "hmac-sha256:9d1c51b1315704e5c6d910b79e97589555b2fd79d348f5e7c35ea8ddd857a2f2",
    "display_name": "root",
    "policies": [
      "root"
    ],
    "token_policies": [
      "root"
    ],
    "policy_results": {
      "allowed": true,
      "granting_policies": [
        {
          "name": "root",
          "namespace_id": "root",
          "type": "acl"
        }
      ]
    },
    "token_type": "service",
    "token_issue_time": "2026-09-11T13:15:56Z"
  },
  "request": {
    "id": "ed166786-2ac3-e989-faf2-de34f96d5389",
    "client_id": "0DHqvq2D77kL2/JTPSZkTMJbkFVmUu0TzMi0jiXcFy8=",
    "operation": "read",
    "mount_point": "sys/",
    "mount_type": "system",
    "mount_running_version": "v2.6.1+builtin.bao",
    "mount_class": "secret",
    "client_token": "hmac-sha256:7e7508a3745d335d4913a6cb0df838d94a0f912fac1f9c42bd986d05ec971e26",
    "client_token_accessor": "hmac-sha256:9d1c51b1315704e5c6d910b79e97589555b2fd79d348f5e7c35ea8ddd857a2f2",
    "namespace": {
      "id": "root"
    },
    "path": "sys/mounts",
    "remote_address": "127.0.0.1",
    "remote_port": 52144
  }
}

cc @frmenguy

Details

Edited by Pierrick Seite