- ADR: ADR 0077
- Title: Replace compose-directory .env secrets with OpenBao Agent sidecar injection backed by host tmpfs
- Status: live_applied
- Branch:
codex/adr-0077-compose-secrets-injection - Worktree:
.worktrees/adr-0077 - Owner: codex
- Depends On:
adr-0043-openbao,adr-0025-docker-compose-stacks,adr-0047-short-lived-creds,adr-0065-secret-rotation-automation - Conflicts With: any workstream that writes new
.envfiles to compose directories - Shared Surfaces:
roles/common/tasks/openbao_compose_env.yml, Compose stack templates ondocker-runtime,config/image-catalog.json,scripts/validate_repo.sh
- add a shared OpenBao Agent helper under
roles/common/ - template
openbao-agent.hcl.j2for configurable AppRole auth and runtime env output under/run/lv3-secrets/<service>/runtime.env - provision per-service AppRole credentials, write
role_idandsecret_idto/opt/<service>/openbao/, and remove legacy compose-directory.envfiles - migrate the current Compose-managed secret consumers on
docker-runtime: windmill, mattermost, keycloak, open-webui, netbox, platform-context, and the mail-platform gateway - add a
make validateguard that fails when any*.envfile is present in the repository checkout - reuse the pinned
openbao_runtimeimage contract for the OpenBao Agent sidecars - document the migration guide in
docs/runbooks/compose-secrets-injection.md
- migrating non-Compose services (systemd-managed services continue to use Ansible lookup plugin)
- dynamic secret generation (dynamic DB credentials from OpenBao are a follow-on task)
roles/common/templates/openbao-agent.hcl.j2roles/common/tasks/openbao_compose_env.yml- updated Compose templates and runtime roles for windmill, mattermost, keycloak, open-webui, netbox, platform-context, and mail-platform
- updated
config/image-catalog.jsonusage for the shared OpenBao server/agent image contract docs/runbooks/compose-secrets-injection.mddocs/adr/0077-compose-runtime-secrets-injection.mddocs/workstreams/adr-0077-compose-secrets-injection.mdworkstreams.yaml
- windmill, mattermost, keycloak, open-webui, netbox, platform-context, and the mail-platform gateway running with OpenBao Agent sidecars once applied
- no legacy
.envfiles in/opt/<service>/compose directories ondocker-runtime - AppRole credentials at
/opt/<stack>/openbao/(mode 0600, root only) - runtime env files present only under
/run/lv3-secrets/<service>/runtime.env
make validatemake syntax-check-windmillmake syntax-check-keycloakmake syntax-check-mattermostmake syntax-check-open-webuimake syntax-check-netboxmake syntax-check-rag-contextmake syntax-check-mail-platformmake validatefails if a.envfile is committed to the repo
- all current Compose-managed secret consumers on
docker-runtimeare migrated in repository automation - secret rotation test passes for at least one migrated stack
- the
.envvalidation gate is integrated intomake validate - migration runbook is complete and reviewed
- Applied from
mainon 2026-03-23 with repo version0.86.0and platform version0.39.0 - All migrated services on
docker-runtimenow render runtime secrets under/run/lv3-secrets/<service>/runtime.envvia healthy OpenBao Agent sidecars
- Grafana is intentionally not part of the final implementation because the current mainline still runs it as a package-managed service on
monitoring - each service now has a dedicated AppRole and a dedicated
kv/data/services/<service>/runtime-envpayload - the implementation uses host
/runrather than a Docker named volume because Compose resolvesenv_fileon the host filesystem