Secrets Management π‘ BETA
Read every secret from Vault, keep only VAULT_* variables in .env, and never write a credential into the repository.
Admin guide Β· secrets runbook
| When to use | Before you start | Steps | Verify | Roll back |
|---|---|---|---|---|
| Bringing up a node, rotating a key, recovering a sealed Vault | Vault access and the CA certificate | Read only VAULT_*, fetch from paths, restart cached providers | Service works, no secret in file | Restore prior Vault value or snapshot |
When to use
Use this runbook when a service cannot authenticate, when a token must change, or when Vault is sealed after a restart.
Before you start
- The
.envfile at the repository root holds onlyVAULT_*variables. Every other secret comes from Vault. - Token and unseal key files live in
/tmp(/tmp/vault-token-gb,/tmp/vault-unseal-key-gb), never in the repository. - Service paths include
secret/gbo/drive,secret/gbo/tables,secret/gbo/cache,secret/gbo/directory,secret/gbo/llm,secret/gbo/vectordb,secret/gbo/alm,secret/gbo/email,secret/gbo/meetandsecret/gbo/encryption. - Use hostnames and environment variables; do not record an internal address.
Steps
# 1. Read only the Vault connection from .env.
source <(grep -E '^VAULT_' "${WORKSPACE}/.env")
export VAULT_ADDR="$VAULT_ADDR"
export VAULT_CACERT="${WORKSPACE}/botserver-stack/conf/system/certificates/ca/ca.crt"
export VAULT_TOKEN=$(cat /tmp/vault-token-gb 2>/dev/null || echo "$VAULT_TOKEN")
VAULT_BIN="${WORKSPACE}/botserver-stack/bin/vault/vault"
# 2. Verify Vault is unsealed before fetching anything.
$VAULT_BIN status
# 3. Fetch the values a service needs without printing them.
$VAULT_BIN kv get -field=accesskey secret/gbo/drive > /tmp/drive-accesskey
$VAULT_BIN kv get -field=secret secret/gbo/drive > /tmp/drive-secret
# 4. Rotate through the rotation runbook; a provider built at boot requires
# a restart of the caching process.
Configuration Layers
| Layer | Contains | Does not contain |
|---|---|---|
.env |
VAULT_* connection only |
service credentials |
| Vault | service and per-bot secrets | source code |
| config.csv | bot behaviour | secret values |
| Directory service | users, passwords, MFA | application secrets |
How Secrets Flow
At Startup
The server reads Vault for service credentials and the global LLM fallback; per-bot values are resolved from the bot's path.
At Runtime
A config.csv change is reloaded on ETag change. A provider built at boot needs a restart; do not claim a Vault-only LLM change took effect without one.
Vault Auto-Unseal Options
The deployment may use a secrets file, TPM, HSM or transit unseal. Read the active configuration before changing it; three of the five Shamir keys are needed for a manual unseal and they live under /tmp.
Emergency Access
An unseal after restart uses the key file in /tmp. Three passes must reach 3/3; do not chain the unseal with a failing SQL statement, because a transaction rollback discards the group insert.
Security Best Practices
Restrict access to init.json, enable audit logging, rotate keys on a schedule and back up Vault data. Never log a token or a query string.
Verify
| Check | Command / surface | Pass condition |
|---|---|---|
| Env file | grep -E '^VAULT_' .env |
no other variable present |
| Vault | vault status |
unsealed |
| Secrets | repository search | no credential value committed |
| Rotation | one service operation with the new value | succeeds |
| Restart | provider process start time | rebuilt after a Vault change |
Roll back
π΄ Put the prior value back in Vault and restart the caching process. A leaked credential is revoked at the provider and reported through incident response.