HashiCorp Vault
Keep secret values in a HashiCorp Vault (or OpenBao) KV version 2 secrets engine. Read Secret stores first for how stores, Resolve on and the default store work.
What you need
| Setting | Default | Description |
|---|---|---|
| Vault address | — | e.g. https://vault.example.com:8200 (cloud stores only; workers use their own) |
| Token | — | A Vault token (cloud stores only) |
| KV v2 mount | secret | The mount path of the KV v2 engine |
| Path prefix | (none) | Prepended to every entry name, e.g. blokkio → secret/data/blokkio/<name> |
| Namespace | (none) | Vault Enterprise / HCP namespace |
Entry names are paths below the prefix, e.g. billing/stripe. Blokkio reads and writes the field value; read
another field with #: billing/db#password.
Policy
Read only:
path "secret/data/blokkio/*" {
capabilities = ["read"]
}
To let Blokkio also create and delete entries (values typed into Blokkio, connection credentials of the default store):
path "secret/data/blokkio/*" {
capabilities = ["create", "read", "update"]
}
path "secret/metadata/blokkio/*" {
capabilities = ["delete"]
}
Create a token for it, for example vault token create -policy=blokkio -period=768h. A periodic token must be
renewed (or replaced in Blokkio) before it expires.
Resolve on Blokkio cloud
Enter the address, token, mount, prefix and namespace, then Test connection. Blokkio checks the token
(auth/token/lookup-self) and reads a name that doesn't exist under the prefix. The Vault must be reachable from
the internet; private and internal addresses are refused by Blokkio's outbound network guard.
Resolve on your worker pool
For a Vault inside your network. Enter only the mount, prefix and namespace on the store; each worker uses its own Vault access from its environment:
VAULT_ADDR=https://vault.internal:8200
VAULT_TOKEN=<token with the read policy>
# VAULT_NAMESPACE=<namespace> (Vault Enterprise)
or the equivalent settings Worker__SecretStores__Vault__Address, Worker__SecretStores__Vault__Token and
Worker__SecretStores__Vault__Namespace. A worker never takes a Vault address or token from Blokkio, so a store
setting can't send your worker's token anywhere else.
Behaviour
- Deleting a secret Blokkio created deletes the entry's metadata (all versions).
- Blokkio always reads the latest version.
Test it live
Blokkio's automated tests mock Vault. To try a real one you need: a Vault (a dev server is enough:
vault server -dev), the address, a token with the policy above, and a KV v2 mount. For worker-pool stores,
set VAULT_ADDR and VAULT_TOKEN on a worker.
Troubleshooting
| Message | What to do |
|---|---|
| Vault refused the token (403) | The token expired, or its policy doesn't cover <mount>/data/<prefix>/… |
| Vault is sealed or unavailable (503) | Unseal Vault or check its health |
| This worker has no HashiCorp Vault access configured | Set VAULT_ADDR and VAULT_TOKEN on the worker container |
| There is no secret named … in … | Check the mount, prefix and entry path; KV version 1 mounts aren't supported |