Configuration examples and usage guide for OpenBao with the dev stack.
OpenBao is a Vault-compatible secrets management solution that provides secure storage for sensitive data like passwords, API keys, and certificates.
Add to your .env file:
OPENBAO_ENABLED=truemake setup # First time - initializes and unseals OpenBaomake status
# Should show: OpenBao: http://localhost:8200 (token: <your-root-token>)# View the root token
cat volumes/openbao/init-keys.json | jq -r '.root_token'
# Or check .env (auto-configured by setup)
grep ITENTIAL_VAULT_TOKEN .envOpen http://localhost:8200 in your browser and sign in with:
- Method: Token
- Token: Your root token from
volumes/openbao/init-keys.json
Install the OpenBao CLI (bao) from GitHub Releases:
Linux (Debian/Ubuntu):
# Download latest release (check GitHub for current version)
wget https://github.com/openbao/openbao/releases/download/v2.1.0/bao_2.1.0_linux_amd64.deb
sudo dpkg -i bao_2.1.0_linux_amd64.debmacOS:
brew install openbaoAlternative: The HashiCorp Vault CLI (vault) is also compatible - use vault instead of bao for all commands.
Configure the CLI using environment variables:
# Point to your OpenBao server
export VAULT_ADDR=http://localhost:8200
# Authenticate with your root token
export VAULT_TOKEN=$(cat volumes/openbao/init-keys.json | jq -r '.root_token')Note: The CLI uses
VAULT_*environment variables (notBAO_*) for backward compatibility with HashiCorp Vault tooling.
To persist these settings, add them to your shell profile (~/.bashrc or ~/.zshrc).
# Check status
bao status
# Write a secret
bao kv put -mount=secret myapp/database username=admin password=secret123
# Read a secret
bao kv get -mount=secret myapp/database# Get your token
export VAULT_TOKEN=$(cat volumes/openbao/init-keys.json | jq -r '.root_token')
# Write a secret
curl -X POST http://localhost:8200/v1/secret/data/myapp/database \
-H "X-Vault-Token: $VAULT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"data": {
"username": "admin",
"password": "secret123"
}
}'
# Read a secret
curl -s http://localhost:8200/v1/secret/data/myapp/database \
-H "X-Vault-Token: $VAULT_TOKEN" | jq .
# List secrets at a path
curl -s http://localhost:8200/v1/secret/metadata/myapp \
-H "X-Vault-Token: $VAULT_TOKEN" \
-X LIST | jq .When OPENBAO_ENABLED=true, the setup script automatically:
-
Configures Platform environment - Adds these variables to
.env:ITENTIAL_VAULT_URL=http://openbao:8200 ITENTIAL_VAULT_AUTH_METHOD=token ITENTIAL_VAULT_TOKEN=/opt/vault/token.txt # File path (not raw token) ITENTIAL_VAULT_SECRETS_ENDPOINT=secret/data ITENTIAL_VAULT_READ_ONLY=falseThe actual token is written to
volumes/platform/vault/token.txtand mounted into the container. -
Installs HashiCorp Vault adapter - Clones from GitLab and runs npm install:
volumes/platform/adapters/adapter-hashicorp_vault/ -
Configures the adapter - Creates and configures via Platform API with OpenBao connection settings
The adapter is automatically installed and configured to connect to OpenBao. After setup, you can:
- View the adapter status in Platform UI under Admin > Adapters
- Use adapter methods in workflows to read/write secrets
- Access secrets programmatically via the adapter API
Platform can reference secrets stored in OpenBao via:
- Vault Adapter - Use adapter methods in workflows (recommended)
- Environment Variables - Platform reads
ITENTIAL_VAULT_*settings for native integration
Consult Itential's Vault documentation for detailed usage.
When OpenBao is enabled with ITENTIAL_VAULT_READ_ONLY=false, Platform supports two methods for encrypting sensitive adapter properties.
Adapters with propertiesDecorators.json files automatically encrypt marked properties (like passwords and API tokens) and store them in OpenBao.
How it works:
- Adapter defines sensitive properties in
propertiesDecorators.json - When you save adapter config via UI or API with plaintext values
- Platform automatically encrypts and stores in OpenBao (not MongoDB)
- Values are retrieved from OpenBao at runtime
Requirements:
OPENBAO_ENABLED=trueITENTIAL_VAULT_READ_ONLY=false(default when auto-configured)- Adapter must have
propertiesDecorators.jsonwith encryption decorators
Example propertiesDecorators.json:
[
{"type": "encryption", "pointer": "/password"},
{"type": "encryption", "pointer": "/apiToken"}
]Check existing adapter decorators:
docker exec platform cat /opt/itential/platform/server/services/adapter-ldap/propertiesDecorators.jsonSee Automatic Property Encryption for details.
Reference pre-existing secrets in OpenBao using the $SECRET syntax in adapter properties.
Syntax:
$SECRET_<path> $KEY_<key>
Example:
# Create a secret in OpenBao
export VAULT_TOKEN=$(cat volumes/openbao/init-keys.json | jq -r '.root_token')
curl -X POST http://localhost:8200/v1/secret/data/adapters/myapi \
-H "X-Vault-Token: $VAULT_TOKEN" \
-d '{"data": {"password": "supersecret", "apikey": "abc123"}}'
# Reference in adapter property (via UI or API)
# password field: "$SECRET_adapters/myapi $KEY_password"
# apikey field: "$SECRET_adapters/myapi $KEY_apikey"Example secrets for testing:
Setup automatically creates example secrets at secret/example/credentials:
# View the example secrets
curl -s http://localhost:8200/v1/secret/data/example/credentials \
-H "X-Vault-Token: $VAULT_TOKEN" | jq '.data.data'
# Use in adapter: "$SECRET_example/credentials $KEY_password"Use cases:
- Pre-populate secrets before adapter configuration
- Share secrets across multiple adapters
- Integrate with external secret management workflows
See Manual Property Encryption for details.
Store credentials for an adapter in OpenBao:
export VAULT_TOKEN=$(cat volumes/openbao/init-keys.json | jq -r '.root_token')
# Store ServiceNow credentials
curl -X POST http://localhost:8200/v1/secret/data/adapters/servicenow \
-H "X-Vault-Token: $VAULT_TOKEN" \
-d '{
"data": {
"host": "dev12345.service-now.com",
"username": "api_user",
"password": "api_password"
}
}'
# Store Cisco DNA Center credentials
curl -X POST http://localhost:8200/v1/secret/data/adapters/dnac \
-H "X-Vault-Token: $VAULT_TOKEN" \
-d '{
"data": {
"host": "dnac.example.com",
"username": "admin",
"password": "admin123"
}
}'| Variable | Description | Default |
|---|---|---|
OPENBAO_ENABLED |
Enable OpenBao service | false |
OPENBAO_VERSION |
OpenBao image version | 2 |
OPENBAO_PORT |
Host port for API | 8200 |
These are automatically set when OPENBAO_ENABLED=true:
| Variable | Description | Auto Value |
|---|---|---|
ITENTIAL_VAULT_URL |
Vault API URL | http://openbao:8200 |
ITENTIAL_VAULT_AUTH_METHOD |
Authentication method | token |
ITENTIAL_VAULT_TOKEN |
File path to token | /opt/vault/token.txt |
ITENTIAL_VAULT_SECRETS_ENDPOINT |
KV secrets path | secret/data |
ITENTIAL_VAULT_READ_ONLY |
Read-only mode (false enables property encryption) | false |
OpenBao uses file-based persistent storage:
- Data persists - Secrets survive container restarts in the
openbao-dataDocker volume - Initialization - Required on first run (handled automatically by
make setup) - Unsealing - Required after restart (handled automatically by
configure-openbao.sh) - Keys stored locally - Root token and unseal keys saved in
volumes/openbao/init-keys.json
If OpenBao shows as "sealed" after a container restart, run:
./scripts/configure-openbao.shThis script:
- Checks if OpenBao is initialized
- Unseals using saved keys from
volumes/openbao/init-keys.json - Is idempotent (safe to run multiple times)
To completely reset OpenBao (removes all secrets):
make clean
make setupThis removes the openbao-data volume and init-keys.json, forcing reinitialization.
| File | Purpose |
|---|---|
volumes/openbao/config/config.hcl |
OpenBao server configuration |
volumes/openbao/init-keys.json |
Root token and unseal keys (gitignored) |
scripts/configure-openbao.sh |
Initialize/unseal script |
Check the logs:
make logs LOG=openbaoRun the configure script to unseal:
./scripts/configure-openbao.sh-
Verify the container is running:
docker ps | grep openbao -
Check the port is accessible:
curl http://localhost:8200/v1/sys/health
If volumes/openbao/init-keys.json is deleted but the volume still exists, you'll need to reset:
make clean
make setup-
Verify environment variables are set:
docker exec platform env | grep VAULT
-
Check Platform can reach OpenBao:
docker exec platform wget -q -O - http://openbao:8200/v1/sys/health