Secrets
Reeve reads its start-up secrets (database password, JWT signing key, OIDC state key, bootstrap
administrator password, Data Protection KEK) from a setting, a file (_FILE) or a read-only secret
provider reference (_REF). Plugin credentials and workload passwords stored in the database can be moved
to a provider afterwards. The reference syntax and every provider setting are in
External secret providers; ordinary Compose file secrets are
in Deployment; the chart's secret sources are in
Secrets in the chart. How secrets are protected at rest is in
Secrets and audit.
Vault or OpenBao references on Compose
The default Compose stack uses its generated secret files. To read from Vault or OpenBao instead, add the
provider overlay; it supplies one provider to backend, and the multi-replica provider overlay repeats it
for every replica.
-
Copy
deploy/.env.exampletodeploy/.envand addSECRET_PROVIDER_ADDRESS, the mount, the allowed prefix and eachREEVE_*_REFto a real reference. Replace the samplehome:provider id if needed. -
Create
deploy/secrets-providers/vault-ca.pem,approle-role-idandapprole-secret-idwith the PEM roots and the AppRole credentials. Protect them as any static credential. They must exist as files before Compose starts, or a bind mount creates a directory where the CA file is expected. They are ignored by git and mounted read-only into the backend containers only. Never put their contents in.env. -
Start the stack from the repository root:
docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.secret-providers.yml up -dFor the replicated stack:
docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.secret-providers.yml \ -f deploy/docker-compose.multi.yml -f deploy/docker-compose.multi.secret-providers.yml up -d
The provider overlay maps references for the database password, the JWT signing key, the OIDC state
signing key and the bootstrap administrator password. The client secret of a provider declared in Managed:Oidc
takes a ClientSecret_REF of its own, see managed configuration. Give every configured reference a real path and key.
Provider policy
Reeve uses the KV v2 API of Vault and OpenBao and never writes secret values. For each allowed path
prefix, grant read on the mount's data path and list and read on its metadata path. With mount
kv (set KvMount to the same name) and prefix reeve/:
path "kv/data/reeve/*" {
capabilities = ["read"]
}
path "kv/metadata/reeve/*" {
capabilities = ["list", "read"]
}
path "auth/token/lookup-self" {
capabilities = ["read"]
}
path "auth/token/renew-self" {
capabilities = ["update"]
}
- Values are read with
GET /v1/<mount>/data/<path>and paths listed withLIST /v1/<mount>/metadata/<path>; metadatareadshows the available versions. auth/token/lookup-selfandauth/token/renew-selfnormally come from thedefaultpolicy. Keep that policy, or add the grants when usingtoken_no_default_policy.- With
X-Vault-Namespaceconfigured, create the policy in that namespace and use paths relative to it. reeve/*covers child paths; a secret stored at exactlyreeveneeds its own policy path.- KV v1 paths do not work.
The provider supports AppRole, Kubernetes and token authentication. A token file can replace AppRole:
declare a Compose secret backed by a protected token file, mount it into every backend, and set
SecretProviders__0__Parameters__Auth__Method=token and
SecretProviders__0__Parameters__Auth__Token__File to its container path. The file is reread when it
changes. AppRole credentials are static files: Compose has no workload identity.
OpenBao Agent database password
When PostgreSQL and Reeve run in the same Compose project, an OpenBao Agent can render the database password to a tmpfs volume shared by PostgreSQL and every backend. Start with the provider overlay, its AppRole files and CA bundle, then add the Agent overlay ("Single Agent" or "Multi Agent" in the combinations table); it clears the database reference and points both consumers at the rendered file. The multi Agent overlay builds on the single one, which declares the shared tmpfs.
- Set the KV path in
deploy/.env. The provider address is set indeploy/secrets-providers/agent.hcl, not in.env. The template reads the configured mount, path and key and writespostgres-password. - Keep the Agent and all consumers in this project: the tmpfs is local to the Docker host and disappears when the project stops.
- The backend image runs as
app(UID and GID 1654), and the Agent runs as the same numeric identity. Make both AppRole files owned by1654:1654with mode0400, and keep the CA file readable by UID 1654. Compose's file-backed secrets are bind mounts, so the long-syntaxuid,gidandmodedo not remap them; set ownership and mode on the host. - The JWT, OIDC state key and bootstrap password stay provider references for the backend.
PostgreSQL reads POSTGRES_PASSWORD_FILE only when it initialises an empty data directory. For an existing
database the provider value must equal the role's current password, or you change the role's password
before switching. When the provider value changes, the Agent updates the file but neither PostgreSQL's
stored password nor Reeve's open connections: change the role's password to match, then restart Reeve so
it builds a connection string with the new value. PostgreSQL needs no restart.
Data Protection KEK
The KEK wraps the Data Protection key ring that protects every encrypted value in the database. Leave
DataProtection__Kek_REF and DataProtection__KekPrevious_REF unset when you first move secrets to a
provider; the provider overlay does not set them. Configure the KEK as a separate later step:
- Keep a database backup together with its matching Data Protection key ring, and take a fresh one just before.
- Configure the KEK source on every replica and restart them all.
- Backups taken before wrapping still hold the plaintext key ring and the ciphertexts it opens: delete them or rotate the secrets they contain.
Rotation and recovery are in Configuration.
Optional profile credentials
The Matter bridge and the media plane are opt-in Compose profiles with their own credential overlays:
| Overlay | Supplies | Files under deploy/secrets/ |
|---|---|---|
docker-compose.matter-bridge-secrets.yml |
The bridge's workload token to the backend and the bridge | matter-bridge-workload-token |
docker-compose.media-plane-secrets.yml |
The media plane's Password and IngestSecret to the backend |
cameras-media-plane-password, cameras-media-plane-ingest-secret |
docker-compose.matter-dac-key-secrets.yml |
The bridge's production DAC key (MATTER_DAC_KEY_FILE) |
matter-dac-key |
docker-compose.multi.profile-secrets.yml |
The same profile credentials to replicas two and three | as above |
Create the files with restrictive host permissions. The DAC key is needed only with production attestation; the bridge waits up to 30 seconds for a missing key file and then refuses to start, and refuses an empty file at once.
MediaMTX has no file-backed setting for its internal user's password. With the media-plane profile, set
CAMERAS_MEDIA_PLANE_PASSWORD in the Compose environment; Compose passes it only to the MediaMTX process.
It must equal the value in deploy/secrets/cameras-media-plane-password, and it is limited to the
characters MediaMTX accepts (see the camera media plane). Keep it
out of shell history, and protect the Docker daemon, which can inspect container environments.
Supported Compose file combinations
Run these from deploy/, adding --profile '*' to include the profile services. Files are listed in
order. The multi provider files extend their single provider files, and the multi profile-secrets file
supplies credentials to replicas two and three.
| Configuration | -f files, in order |
|---|---|
| Default | docker-compose.yml |
| Multi-replica | docker-compose.yml, docker-compose.multi.yml |
| Profiles | docker-compose.yml, docker-compose.matter-bridge-secrets.yml, docker-compose.media-plane-secrets.yml |
| Optional Matter DAC key | docker-compose.yml, docker-compose.matter-bridge-secrets.yml, docker-compose.matter-dac-key-secrets.yml |
| Multi-replica profiles | docker-compose.yml, docker-compose.multi.yml, docker-compose.matter-bridge-secrets.yml, docker-compose.media-plane-secrets.yml, docker-compose.multi.profile-secrets.yml |
| Single provider | docker-compose.yml, docker-compose.secret-providers.yml |
| Multi provider | docker-compose.yml, docker-compose.secret-providers.yml, docker-compose.multi.yml, docker-compose.multi.secret-providers.yml |
| Single provider with profiles | docker-compose.yml, docker-compose.secret-providers.yml, docker-compose.matter-bridge-secrets.yml, docker-compose.media-plane-secrets.yml |
| Multi provider with profiles | docker-compose.yml, docker-compose.secret-providers.yml, docker-compose.multi.yml, docker-compose.multi.secret-providers.yml, docker-compose.matter-bridge-secrets.yml, docker-compose.media-plane-secrets.yml, docker-compose.multi.profile-secrets.yml |
| Single Agent | docker-compose.yml, docker-compose.secret-providers.yml, docker-compose.secret-providers-agent.yml |
| Multi Agent | docker-compose.yml, docker-compose.secret-providers.yml, docker-compose.multi.yml, docker-compose.multi.secret-providers.yml, docker-compose.secret-providers-agent.yml, docker-compose.multi.secret-providers-agent.yml |
| Single Agent with profiles | docker-compose.yml, docker-compose.secret-providers.yml, docker-compose.secret-providers-agent.yml, docker-compose.matter-bridge-secrets.yml, docker-compose.media-plane-secrets.yml |
| Multi Agent with profiles | docker-compose.yml, docker-compose.secret-providers.yml, docker-compose.multi.yml, docker-compose.multi.secret-providers.yml, docker-compose.secret-providers-agent.yml, docker-compose.multi.secret-providers-agent.yml, docker-compose.matter-bridge-secrets.yml, docker-compose.media-plane-secrets.yml, docker-compose.multi.profile-secrets.yml |
scripts/compose-config-check.sh renders every row with docker compose config --format json and checks
that no service has two sources (value, _FILE, _REF) for one secret. An empty value or reference is
ignored by the backend; a _FILE setting is a source even when its path is empty. It checks every row again
with non-empty profile values, taking the remaining settings from .env.example. Run it by hand after changing
an overlay.
Moving stored secrets to a provider
Reeve can keep plugin credentials and workload password parameters in its database, protected at rest, or read them through references to a configured provider. Providers are read-only: write each value to the provider before replacing it in Reeve. Keep a database backup with its matching Data Protection key ring until every moved integration works with its reference. Some plugin fields need a plugin version that reads references; the host resolves references for every other field without a plugin change.
Provider status
Secrets, Secret providers (needs secrets.bind) shows each configured provider's last health check and
this replica's renewal and unresolved-reference diagnostics, and can request a cluster-wide reference
refresh. Loading the tab does not call the provider, and another replica can show a different renewal time
or count. Connection details omit credential and CA contents. Each replica checks provider health shortly
after start and every 60 seconds, with a 15-second timeout per provider. An unhealthy provider raises the
secrets.provider_unhealthy alert, and references that do not resolve raise
secrets.references_unresolved.
Find and move stored values
Open Secrets, Stored secrets with secrets.bind, which allows the inventory, the step-up-protected
reveal and binding. The list names the instance and field without returning any value. Empty plugin fields
and empty workload parameters are left out. An unreadable plugin value or an undecryptable workload password
is marked unreadable, and reveal and bind answer 409 unreadable for it; neither returns or compares
ciphertext. For each readable value:
- Write the current value to the provider; Reveal once shows it to copy.
- Choose Move to provider, select the provider path and key, and choose Check and move. Reeve resolves the reference freshly and compares it with the stored value; the field changes to the reference only on an exact match.
- On a mismatch, correct the provider entry or the reference and retry. A mismatch, an unresolved reference, a stale location or a concurrent edit leaves the stored value unchanged.
For a plugin field, the replacement and its audit row share one transaction. For a workload parameter, the
host resolves and compares, then the workloads library compare-and-sets the old literal to the reference,
keeping the applied specification hash, so binding does not redeploy the workload or nudge reconciliation.
The library then writes workload.password_reference_rebound on the WorkloadInstance, and the host writes
secrets.bind on the owning PluginInstance with the workload, field and reference; search for
secrets.bind to find every binding. A process failure between persistence and an audit write can leave a
completed move without its audit row. When the library call fails before committing while another request
binds the same reference, a reload confirms the reference but cannot tell whose write it was, and the host
records the requesting actor for it.
An unversioned workload reference does not follow provider rotations on its own: a rotation creates a pending rollout that needs explicit approval before the running workload changes. Pin a version where that matters; pinning is the default for network keys.
Reveal once
Reveal once needs a fresh, purpose-bound step-up confirmation. The value appears in a dismissable dialog on the current page only, and closing it clears it; do not capture or share the screen meanwhile. A successful reveal is audited with the actor and the field, never the value, and if the audit cannot be written the value is not returned. References and unreadable values cannot be revealed. The endpoint is rate-limited as a sensitive operation.
After binding
The stored value is replaced by the reference, and Reeve resolves it on the normal read path. The comparison resolves freshly without updating the shared resolver cache, so if the cache has not yet seen a provider rotation, a newly bound plugin may keep its cached old value until the next refresh pass sees the change and restarts its consumers.