Service: OpenBao - EyevinnOSC/community GitHub Wiki
OpenBao
OpenBao (serviceId openbao-openbao, service page) is an open source secrets manager (a Linux Foundation project, MPL-2.0) with a Vault-compatible API. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance that runs as a single node with Raft integrated storage on a persistent volume (5 GiB, mounted at /data), so no external database is needed. The instance initializes itself on first start, so there is no manual init step.
What it can do
- Store application secrets, certificates and keys in encrypted key/value storage (KV v2 mounted at
secret/). - Generate dynamic, short-lived credentials for systems such as AWS and SQL databases, and encrypt/decrypt data without storing it (upstream features).
- Lease, renew and revoke credentials.
- Be used through the web UI and the Vault-compatible HTTP API.
Creating an instance
Generate an unseal key (32 random bytes as 64 hex characters) and choose a strong admin password. Save both in a password manager; the stored data cannot be decrypted without this exact key.
openssl rand -hex 32
Store both as service secrets with create-service-secret on serviceId openbao-openbao, for example baounseal and baoadmin. Then call create-service-instance with serviceId: "openbao-openbao":
{
"name": "mybao",
"UnsealKey": "{{secrets.baounseal}}",
"AdminPassword": "{{secrets.baoadmin}}"
}
Wait for the instance to be running (wait-for-service-ready) and use describe-service-instance to get the URL. Wait a couple of minutes before using the API (see Limitations).
Options
| Option | Required | Type | Meaning |
|---|---|---|---|
| name | Yes | string | Name of the instance. Alphanumeric, at most 20 characters. |
| UnsealKey | Yes | string, sensitive | Key that unseals OpenBao automatically on every start: 32 bytes as 64 hex characters, for example from openssl rand -hex 32. Keep a copy somewhere safe, because the stored data cannot be decrypted without this exact key, and anyone with the key and the volume can read the data. Sets BAO_STATIC_SEAL_KEY (static seal). |
| AdminPassword | Yes | string, sensitive | Password for the initial OpenBao admin user, named admin. It is applied only on the very first start, when OpenBao sets itself up, so changing the option later or restarting with another value keeps the original password. Sets BAO_ADMIN_PASSWORD. |
Both options are sensitive: use service secrets and {{secrets.NAME}} as the whole field value. To change the admin password after first start, change it inside OpenBao as admin.
Using the instance
On the first start with empty storage OpenBao initializes itself: it enables the userpass auth method, creates a superuser policy with full access including sudo, creates the user admin with the password from AdminPassword, and mounts KV v2 at secret/. No root token and no recovery keys are produced.
Sign in to the UI: open the instance URL and sign in to OSC (the UI is behind the OSC sign-in), then on the OpenBao sign-in page change Method to Username and enter user admin and the admin password (copy the whole password).
After your first sign-in, create a second user with the superuser policy, or configure another auth method, and store its credentials separately.
Check health (200 when OpenBao is initialized and unsealed):
curl -s -o /dev/null -w "%{http_code}\n" https://<your-instance-url>/v1/sys/health
Log in as admin and get a client token (auth.client_token in the response):
curl -s -X POST https://<your-instance-url>/v1/auth/userpass/login/admin \
-d '{"password":"<admin-password>"}'
Write and read a secret:
curl -s -X POST https://<your-instance-url>/v1/secret/data/hello \
-H "X-Vault-Token: <client-token>" \
-d '{"data":{"hello":"osc"}}'
curl -s https://<your-instance-url>/v1/secret/data/hello \
-H "X-Vault-Token: <client-token>"
The listener is plain HTTP on $PORT (default 8080) with TLS terminated by OSC. The UI is enabled.
Limitations
- Save the unseal key and the admin password. Losing the unseal key, the volume or all admin credentials means losing access to the data. Starting with a wrong key on existing data leaves the server sealed with "message authentication failed". There is no root token or recovery key; if the admin password is lost and there is no second admin, the only remedy is deleting the instance.
- Only some paths are public. Reachable from the internet and protected by OpenBao's own auth:
/v1/sys/health, the KV API under/v1/secret/, and the login and token API under/v1/auth/. The UI at/ui, the rest ofsys/, other mounts such as/v1/transit/or/v1/pki/, and namespaces stay behind the OSC sign-in, so an application outside OSC cannot reach them. Token self-renewal underauth/token/works. - Wait a couple of minutes after creation. For the first minute or two, requests under
/v1/may be answered by the OSC gate (401, 302 or a failed connection). This fails closed; nothing is exposed. - Single node only, no high availability. No backup is configured; upstream has Raft snapshots, but they are not set up.
- Anyone with the unseal key and the volume can read the data. Upstream warns that static-key unseal is weaker than a KMS. Use the
adminuser for administration and create policies and scoped tokens for applications. - Rotating the unseal key needs upstream's seal-migration procedure.