Secdevops Openbao
OpenBao Giving secrets one with an audit trail How OpenBao differs from HashiCorp Vault Origin and governance What’s the same Where they diverge Concepts Installation and Setup as a systemd Service Install Configuration file Initialize and unseal Authenticate KV Secrets Engine Policies Capability reference Write a read-only policy Create a token scoped to a policy AppRole Authentication The “secret zero” problem — where does the Secret ID come from? Python Integration with hvac Read a static secret Authenticate with AppRole Complete get-secret script Audit Logging Eliminating Plaintext Credentials Key takeaways References
Giving secrets one with an audit trail
How OpenBao differs from HashiCorp Vault Origin and governance What’s the same Where they diverge
Origin and governance
Installation and Setup as a systemd Service Install Configuration file Initialize and unseal Authenticate
Initialize and unseal
Policies Capability reference Write a read-only policy Create a token scoped to a policy
Write a read-only policy
Create a token scoped to a policy
AppRole Authentication The “secret zero” problem — where does the Secret ID come from?
The “secret zero” problem — where does the Secret ID come from?
Python Integration with hvac Read a static secret Authenticate with AppRole Complete get-secret script
Authenticate with AppRole
Complete get-secret script
Eliminating Plaintext Credentials
Giving secrets one with an audit trail
OpenBao is an open-source secrets management system. It stores secrets encrypted at rest, enforces access policies, issues time-limited dynamic credentials, and logs every access with a full audit trail.
OpenBao is the Linux Foundation fork of HashiCorp Vault, created in 2023 after Vault moved from the open-source MPL to the Business Source License (BSL). It is API- and CLI-compatible with Vault — the commands below are the same ones you would run against Vault, with bao in place of vault — so the concepts transfer directly. This course standardizes on OpenBao for the same reason it uses OpenTofu instead of Terraform: both are the OSI-licensed forks of tools HashiCorp relicensed.
The core problem OpenBao solves: secrets have to live somewhere. .env files get committed. Environment variables leak through process listings and crash logs. Shared credentials mean no accountability. OpenBao centralizes secrets with controlled access and an audit log that answers “who read the database password and when.”
ℹ️ OpenBao is only as strong as how you handle the unseal keys and root token. bao operator init prints them once. In this lab a text file is acceptable; in production the key shares belong in separate custody (HSMs, distinct people) and the root token is revoked after initial setup. Anyone holding a threshold of unseal keys can decrypt everything.
ℹ️ OpenBao is only as strong as how you handle the unseal keys and root token. bao operator init prints them once. In this lab a text file is acceptable; in production the key shares belong in separate custody (HSMs, distinct people) and the root token is revoked after initial setup. Anyone holding a threshold of unseal keys can decrypt everything.
OpenBao also shows up in the pipeline context — see CI/CD, secret management, and GitOps for how services pull secrets during a deploy.
How OpenBao differs from HashiCorp Vault
“API-compatible fork” undersells what has happened since 2023 — the projects are actively diverging, in both directions. Knowing the differences matters when you read Vault documentation (most of it still applies), interview at a shop running one or the other, or advise on a migration.
Origin and governance
OpenBao forked from Vault 1.14, the last MPL-2.0 release, after HashiCorp relicensed Vault under the Business Source License (BSL 1.1) in August 2023. The BSL is source-available but not open source: its “Additional Use Grant” forbids offering Vault as a competing hosted service. The fork now develops under the Linux Foundation (currently the OpenSSF, after starting in LF Edge). Meanwhile IBM closed its acquisition of HashiCorp in February 2025, and Vault 2.0 (April 2026) moved the product onto IBM’s versioning and support lifecycle — so today the comparison is really community-governed fork vs. IBM enterprise product .
The security model: seal/unseal, Shamir key shares, policies, leases, audit devices.
The API surface and CLI verbs — bao kv put is vault kv put ; hvac and most client libraries work against either.
Core secrets engines (KV, PKI, database, transit, SSH) and auth methods (token, AppRole, userpass, JWT/OIDC, Kubernetes, LDAP).
Configuration format — the openbao.hcl above is a valid vault.hcl apart from paths.
Two patterns worth noticing in that table. First, OpenBao’s headline additions — namespaces, HSM unseal, read scaling — are precisely features Vault reserves for Enterprise; the fork competes by open-sourcing the paywall. Second, OpenBao’s removals (legacy storage backends, the SSPL-licensed MongoDB plugin) are a security posture: fewer code paths, only OSI-licensed dependencies, Raft or Postgres so every deployment looks alike. Smaller attack surface is a feature.
⚠️ Migration is only supported one way and from one place: OpenBao documents in-place migration from Vault 1.14.x specifically. A Vault cluster that has been upgraded past that (or uses Enterprise features like replication) has no clean path across, and OpenBao data does not migrate back to Vault. Treat the two as compatible dialects that drift further apart every release — check both changelogs before assuming a Vault feature exists in OpenBao or vice versa.
⚠️ Migration is only supported one way and from one place: OpenBao documents in-place migration from Vault 1.14.x specifically. A Vault cluster that has been upgraded past that (or uses Enterprise features like replication) has no clean path across, and OpenBao data does not migrate back to Vault. Treat the two as compatible dialects that drift further apart every release — check both changelogs before assuming a Vault feature exists in OpenBao or vice versa.
For this course none of the gaps matter: everything in the labs (KV, policies, AppRole, audit devices) sits in the shared core. The skills transfer to a Vault shop unchanged.
Installation and Setup as a systemd Service
OpenBao ships as a .deb release asset. The Ansible playbook installs it for you; to do it by hand:
Initialize and unseal
OpenBao starts in a sealed state — it holds encrypted data but cannot decrypt it until enough unseal keys are provided. Initialization generates the master key and splits it using Shamir’s Secret Sharing.
The Key-Value (KV) engine stores arbitrary secrets as key-value pairs. Version 2 (KV-v2) keeps a history of every version.
Policies grant the minimum capabilities needed — nothing more. A policy for a service that only reads its own secrets should not be able to list all secrets or write to other paths.
Write a read-only policy
Create a token scoped to a policy
AppRole Authentication
Token-based auth works for humans. Services that need to authenticate programmatically use AppRole: a role with a Role ID (like a username) and a Secret ID (like a one-time password).
The “secret zero” problem — where does the Secret ID come from?
AppRole splits the credential in two on purpose: the Role ID is static and non-sensitive (bake it into the config, image, or an environment variable — alone it is useless), while the Secret ID is the sensitive half. That raises the obvious question: if the app needs a Secret ID to fetch its secrets, how does the Secret ID itself reach the app securely? Storing it in a file to the code just moves the problem — that file is now the secret you have to protect. This is the secret zero (or secure introduction ) problem: the first credential in the chain, the one that unlocks all the others.
The answer is that the Secret ID is delivered at deploy time by something the workload already trusts , and held only in memory long enough to log in — never committed, never parked at rest. Two standard patterns:
Response wrapping (the general-purpose answer). Whatever provisions the workload — your orchestrator, deploy job, or the Ansible run — asks OpenBao to wrap the Secret ID instead of returning it in the clear: # Provisioner (trusted) mints a single-use wrapping token, valid 120s bao write -wrap-ttl = 120s -f auth/approle/role/dvwa-role/secret-id # Output includes: # wrapping_token: # wrapping_token_ttl: 2m0s # Only the wrapping token is handed to the app. The app unwraps it once # to retrieve the real Secret ID, then logs in as usual: BAO_TOKEN = bao unwrap The wrapping token is single-use and short-lived : the app unwraps it exactly once, and any interception is tamper-evident — if an attacker unwraps it first, the legitimate app’s unwrap fails and the deploy loudly breaks instead of silently leaking. The plaintext Secret ID never crosses the wire.
Response wrapping (the general-purpose answer). Whatever provisions the workload — your orchestrator, deploy job, or the Ansible run — asks OpenBao to wrap the Secret ID instead of returning it in the clear:
The wrapping token is single-use and short-lived : the app unwraps it exactly once, and any interception is tamper-evident — if an attacker unwraps it first, the legitimate app’s unwrap fails and the deploy loudly breaks instead of silently leaking. The plaintext Secret ID never crosses the wire.
Platform identity (better still, when available). On Kubernetes, the pod’s service-account JWT is the credential — use the kubernetes auth method and there is no Secret ID to ship at all. The same holds for cloud instance identity ( aws / gcp / azure auth): the workload proves who it is with an identity the platform already issued, and OpenBao trusts that platform. This dissolves secret zero rather than protecting it.
Platform identity (better still, when available). On Kubernetes, the pod’s service-account JWT is the credential — use the kubernetes auth method and there is no Secret ID to ship at all. The same holds for cloud instance identity ( aws / gcp / azure auth): the workload proves who it is with an identity the platform already issued, and OpenBao trusts that platform. This dissolves secret zero rather than protecting it.
⚠️ Never generate the Secret ID inside the service and store it long-term, and never commit one — that recreates the very problem AppRole exists to solve. The design goal running through the whole chain is that no long-lived, directly-usable credential sits at rest on the app host : the Role ID is useless alone, the Secret ID is single-use and short-lived, the resulting token expires in an hour, and (with the database engine) even the fetched credential can be per-session.
⚠️ Never generate the Secret ID inside the service and store it long-term, and never commit one — that recreates the very problem AppRole exists to solve. The design goal running through the whole chain is that no long-lived, directly-usable credential sits at rest on the app host : the Role ID is useless alone, the Secret ID is single-use and short-lived, the resulting token expires in an hour, and (with the database engine) even the fetched credential can be per-session.
Python Integration with hvac
hvac is the Vault HTTP API client for Python. Because OpenBao speaks the same API, hvac works against it unchanged — just point it at the OpenBao address. Installed by the Ansible playbook.
Authenticate with AppRole
Complete get-secret script
OpenBao’s audit device logs every request and response. Enable it early — the audit log is what you query during an incident to answer “did anything read this secret?”
Eliminating Plaintext Credentials
After setting up OpenBao, verify no credentials exist anywhere in plaintext on the system:
Any credential that appears in these searches needs to be rotated and removed.
OpenBao is the OSI-licensed (MPL-2.0) Linux Foundation fork of HashiCorp Vault — API/CLI compatible, so everything here applies to Vault too, with bao in place of vault .
The projects are diverging: OpenBao open-sources formerly Enterprise-only features (namespaces, HSM auto-unseal, standby reads) and removes legacy code paths; Vault (an IBM product since 2025) keeps replication, Sentinel, and FIPS builds behind the Enterprise license.
It centralizes secrets with encryption at rest, per-path access policies, and an audit log that answers “who read this and when.”
It boots sealed : initialization splits the master key with Shamir’s Secret Sharing, and a threshold of unseal keys is required before OpenBao can decrypt anything.
Write policies for least privilege — a service that only reads its own secrets gets read / list on its own paths and nothing else.
Humans use tokens; services use AppRole (a static Role ID plus a short-lived, single-use Secret ID) so credentials can rotate without redeploying.
Enable a file audit device early and verify no plaintext credentials remain in configs, /proc/*/environ , or git history.
OpenBao Documentation —
OpenBao releases ( .deb assets) —
OpenBao CHANGELOG — feature/version history for the fork —
Jorijn Schrijvershof — HashiCorp Vault vs OpenBao: a thorough comparison for platform teams —
InfoQ — HashiCorp Vault 2.0 Marks Shift to IBM Lifecycle —
hvac Python client —
OpenBao AppRole auth method —
OpenBao KV secrets engine v2 —
NIST SP 800-57 — Recommendation for Key Management —
Related course pages: CI/CD & DevOps · Container security · DevSecOps fundamentals
🛠️ Maintenance note: OpenBao is the OpenBao Project (Linux Foundation) fork of HashiCorp Vault, adopted here because Vault moved to the BSL license in 2023 (the same reason this course uses OpenTofu over Terraform). The install pins a release tag ( openbao_version in the Ansible group_vars , currently 2.5.5) — bump it from the releases page each term. The CLI is bao ; it reads BAO_ADDR / BAO_TOKEN but still honors the legacy VAULT_ADDR / VAULT_TOKEN . Because OpenBao tracks Vault’s API, hvac works unchanged — re-check its read_secret_version argument names against the installed version.
🛠️ Maintenance note: OpenBao is the OpenBao Project (Linux Foundation) fork of HashiCorp Vault, adopted here because Vault moved to the BSL license in 2023 (the same reason this course uses OpenTofu over Terraform). The install pins a release tag ( openbao_version in the Ansible group_vars , currently 2.5.5) — bump it from the releases page each term. The CLI is bao ; it reads BAO_ADDR / BAO_TOKEN but still honors the legacy VAULT_ADDR / VAULT_TOKEN . Because OpenBao tracks Vault’s API, hvac works unchanged — re-check its read_secret_version argument names against the installed version.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
