HashiCorp Vault and OpenBao
Read KV v2 secrets from HashiCorp Vault or OpenBao into your deployments.
Resolve secrets from the KV version 2 engine of HashiCorp Vault or OpenBao. Both share one provider because their APIs are identical.
Before you start
- A Vault or OpenBao server reachable from the wtree Cloud server.
- A token from a policy that grants only what wtree Cloud needs:
path "secret/data/myapp/*" {
capabilities = ["read"]
}
path "secret/metadata/*" {
capabilities = ["list"]
}list powers autocomplete only.
Connect
Open Integrations › Secret vaults › Add provider and choose HashiCorp Vault / OpenBao.
| Field | Value |
|---|---|
| Name | Reference name, for example prod-vault |
| Vault URL | For example https://vault.example.com:8200 |
| Token | Token with read and list on the paths to expose |
| KV Mount | Mount path of the KV v2 engine. Default secret |
| Namespace | Optional. For Vault Enterprise or OpenBao namespaces, for example admin |
Click Test connection, save, and assign projects and environments.
Use it
A KV v2 secret is a map of fields, so a reference carries the path and the field:
DB_PASSWORD=${{vault.prod-vault.myapp/prod:DB_PASSWORD}}
API_KEY=${{vault.prod-vault.shared:API_KEY}}Autocomplete walks the KV tree and suggests full path:field references.
To try it locally, run OpenBao in dev mode, then create the provider with URL http://<your-host>:8200, token dev-token and mount secret:
docker run -d --name openbao -p 8200:8200 \
-e BAO_DEV_ROOT_TOKEN_ID=dev-token \
-e BAO_DEV_LISTEN_ADDRESS=0.0.0.0:8200 \
openbao/openbao:latestLimits
Dev mode keeps everything in memory. Use it for testing only.
Only the KV v2 engine is supported.
