Files
mtusi2026lab7/infra/openbao
2026-11-04 19:22:35 +03:00
..
2026-11-04 19:22:35 +03:00
2026-11-04 19:22:35 +03:00
2026-11-04 19:22:35 +03:00
2026-11-04 19:22:35 +03:00

OpenBao service configuration and bootstrap

config.hcl configures a TLS listener and persistent file storage; Compose runs OpenBao outside dev mode. bootstrap-openbao.py provisions KV v2 secrets and per-process AppRoles after operator init/unseal.

The API, worker, publisher, migrator and reconciler use separate AppRole credentials and policies. Each policy can read only its own secret/data/messenger/<service> KV v2 path. Service tokens have a 15-minute TTL and a one-hour maximum TTL; AppRole SecretIDs expire after 24 hours. Application code never receives the operator root token.

Operator workflow:

  1. Generate local keys and bootstrap secrets with the scripts documented in the root README.
  2. Start the openbao service, run bao operator init, and unseal it using the operator-held shares. Keep the initial root token outside the repository.
  3. Run python3 scripts/bootstrap-openbao.py --root-token-file <operator-only-file>. It writes non-root AppRole IDs/SecretIDs under ignored secrets/openbao/; values are not printed.
  4. Start application services. On a normal restart, the file backend retains OpenBao state and the operator unseals it if required. If a service SecretID expires, provision a replacement and restart that service.

The script provisions distinct paths and identities; secret values originate from local bootstrap files and are not committed. Root token and unseal shares must never be mounted into application containers.