996 B
996 B
OpenBao operator bootstrap
The service runs in server mode with file-backed persistent storage, never in dev mode. openbao-init performs the reproducible local initialization and AppRole issuance; root token and unseal keys are written only to ignored local storage and must not be committed:
docker compose exec openbao bao operator init -key-shares=3 -key-threshold=2
docker compose exec openbao bao operator unseal
docker compose exec openbao bao operator unseal
docker compose exec openbao bao secrets enable -path=secret kv-v2
docker compose exec openbao bao policy write messenger-api /bao/policies/api.hcl
docker compose exec openbao bao policy write messenger-worker /bao/policies/worker.hcl
The application is never given a root token. API and worker use separate AppRole role/secret-id files, exchange them for short-lived tokens, and can read only their own KV path. Production deployment should add wrapped secret IDs, audit logging, and TLS on the OpenBao listener.