OpenBao: Centralized management for secrets, certificates, and dynamic credentials
A Go service for backend teams to manage secrets and credentials, generating and auto-revoking dynamic AWS and SQL secrets by lease.
GitHub openbao/openbao Updated 2026-09-26 Branch main Stars 7.7K Forks 585
Go Secret management AWS PostgreSQL Go Modules

🧭 Decision Guide

Try it if you

  • Your services need temporary AWS or SQL database credentials on demand.
    The README's Dynamic Secrets section states that OpenBao can generate AWS or SQL database secrets on demand and revoke them after the lease expires.
  • You want to store encrypted data in PostgreSQL without designing your own encryption method.
    The README's Data Encryption section says OpenBao can encrypt and decrypt data without storing it, while Secure Secret Storage lists PostgreSQL as a storage backend.
  • Your Go project needs github.com/openbao/openbao/api/v2 or sdk/v2.
    The README's Importing OpenBao section lists both libraries as importable by other projects.
  • You need to revoke credentials in bulk by user or secret type.
    The README's Revocation section states that OpenBao can revoke a single secret or a tree of secrets read by a specific user or belonging to a particular type.

Skip it if you

  • You plan to import the github.com/openbao/openbao root module as an application dependency.
    The README's Importing OpenBao section explicitly says this usage is NOT supported and that related bugs will not be fixed.
  • You plan to submit an OpenBao pull request without reading CONTRIBUTING.md.
    The README's Developing OpenBao section warns that a pull request may be rejected if CONTRIBUTING.md is not read and understood.

Requirements

  • Developing OpenBao itself requires Go; the toolchain version used in CI and releases is pinned in .go-version.
  • The project uses Go Modules, and the README recommends cloning the repository outside GOPATH.
  • The README build command for a bao binary is `go build -o bin/bao .`.
  • The repository also contains the website and ui subtrees, with development instructions in website/README.md and ui/README.md.

First step (verbatim from README)

$ go run . server -dev # Or `./bin/bao server -dev` if you've built the binary already.

Watch out

  • Do not treat the github.com/openbao/openbao root module as a supported SDK.
    The README's Importing OpenBao section supports github.com/openbao/openbao/api/v2 and github.com/openbao/openbao/sdk/v2, while explicitly rejecting root-module dependency usage.
  • For cold-cache builds, use -v to inspect the longer Go compilation progress.
    The README's Developing OpenBao section says the large codebase takes time to compile from a cold cache and recommends adding -v to build commands.
  • When modifying website or ui, do not rely only on the Go project instructions.
    The README says the repository also contains website and ui and points to website/README.md and ui/README.md.

Not stated in the README

  • The README does not describe production high-availability topology, node counts, or failover behavior.
  • The README does not provide a complete list of systems and version compatibility for AWS, SQL, or PostgreSQL dynamic credentials.
  • The README does not provide throughput, latency, secret-count, or concurrent-lease capacity metrics.
  • The README does not describe the specific changes between v2.7.0 and the previous 4 releases.
  • The README does not compare features, migration paths, or compatibility with other secret-management products.
  • The README does not explain API stability, authentication methods, or upgrade compatibility for api/v2 and sdk/v2.

💡 Deep Analysis

6
No I maintain Go microservices and want to import github.com/openbao/openbao directly to reuse OpenBao's internal testing tools. Is this integration method supported?
For: A Go engineer maintaining microservices who plans to import the OpenBao repository module directly to reuse its internal testing tools

No. This is not a suitable integration method because the README explicitly rejects importing the entire github.com/openbao/openbao repository as an application dependency; the supported entry points are api/v2 and sdk/v2.

  • The repository publishes github.com/openbao/openbao/api/v2 and github.com/openbao/openbao/sdk/v2 for use by other projects.
  • The README states that importing the whole repository is “NOT, and has NEVER been, a supported way” to use OpenBao.
  • The project will not fix bugs caused by that usage or refactor internal code to make it easier.
  • The core project is implemented in Go, so Go integration has explicit entry points, but the application itself should not be treated as a stable ordinary dependency.

The first step is to evaluate whether api/v2 or sdk/v2 provides the required capabilities. The README does not state their API stability guarantees or version-compatibility matrix.

  • README, “Importing OpenBao”: "This repository publishes two libraries ... api/v2 and sdk/v2"
  • README, “Importing OpenBao”: "This is NOT, and has NEVER been, a supported way to use the OpenBao project"
  • Project data: main language is Go
Not stated in the README:The README does not define the functional boundaries of api/v2 versus sdk/v2.;The README does not describe their semantic-versioning policy, compatibility guarantees, or upgrade migration process.
No I have a legacy application that cannot renew leases and can only cache a database credential after obtaining it once. Is OpenBao dynamic secrets suitable for direct integration?
For: An SRE integrating a legacy application that cannot renew leases and can only cache a database credential obtained once

No, not for direct integration. OpenBao dynamic secrets use leases as their lifetime boundary, while this application cannot renew or reacquire credentials after expiration.

  • The README states that every secret has a lease and that OpenBao automatically revokes the secret when the lease ends.
  • Clients are expected to renew leases through built-in renewal APIs; an application that cannot renew cannot ensure continuous credential validity.
  • Dynamic AWS or SQL credentials are automatically revoked after the lease expires, so long-lived caching can leave the application using invalid credentials.
  • OpenBao’s design explicitly combines generation, renewal, and revocation into one lifecycle; bypassing those mechanisms undermines the intended model.

Unless the legacy application adds renewal, expiration-based reacquisition, or an external proxy that manages those operations, dynamic secrets should not be its sole credential source. The README does not describe an official legacy-application proxy or caching component.

  • README, “Leasing and Renewal”: "All secrets in OpenBao have a lease associated with them"
  • README, “Leasing and Renewal”: "At the end of the lease, OpenBao will automatically revoke that secret"
  • README, “Dynamic Secrets”: "OpenBao will also automatically revoke them after the lease is up"
  • README, “Leasing and Renewal”: "Clients are able to renew leases via built-in renew APIs"
Not stated in the README:The README does not say whether an official sidecar, proxy, or client-cache mechanism exists to handle renewal for legacy applications.;The README does not specify the exact error format or retry semantics when a lease expires.
Yes I only want to start OpenBao locally with Go and validate secret storage and API calls. Does the README provide a directly executable path?
For: A Go developer who needs to validate the secret API locally using the Go toolchain and the development mode described in the README

Yes for local validation. The README provides direct Go build and server -dev commands, but this path only demonstrates development-mode operation and is not evidence of production readiness.

  • The core project uses Go; the README asks users to install Go and notes that CI and releases use the toolchain version pinned in .go-version.
  • You can build a bao binary or start OpenBao directly with go run.
  • The README explicitly provides server -dev as the development-mode startup path, which is suitable for checking the service and API flow.
  • Production requirements such as formal initialization, persistence, access control, and high availability are not covered by this quick-start path.

Use it for local validation, but do not treat development mode as a production configuration. The README does not specify dev-mode authentication, data retention, or security boundaries.

  • README, “Developing OpenBao”: "you'll first need Go installed"
  • README, “Developing OpenBao”: "$ go run . server -dev"
  • README, “Developing OpenBao”: "$ go build -o bin/bao ."
  • Project data: main language is Go
$ go run . server -dev # Or `./bin/bao server -dev` if you've built the binary already.
Not stated in the README:The README does not specify the default listen address, authentication method, or data directory for development mode.;The README does not provide the exact migration steps from development mode to a persistent production deployment.
Yes I manage both PostgreSQL databases and AWS resources; can I use OpenBao instead of long-lived database passwords and AWS access keys in application configuration?
For: A DevOps/SRE engineer managing PostgreSQL databases and AWS resources who wants applications to receive short-lived credentials on demand

Yes. OpenBao is a good fit because it explicitly supports dynamic credentials for AWS and SQL databases, with leases defining their lifetime.

  • An application can request AWS credentials on demand, and OpenBao generates an AWS keypair with valid permissions.
  • Dynamic credentials are automatically revoked when their lease expires, reducing exposure from long-lived static credentials.
  • Every secret has a lease, and clients can renew it through built-in renewal APIs.
  • PostgreSQL can be used as an OpenBao persistence backend, although that does not by itself define the database roles or privileges required by the application.

The application must handle renewal failures, expiration, and credential reacquisition. The README does not specify the exact configuration syntax for PostgreSQL dynamic roles or AWS permission templates.

  • README, “Dynamic Secrets”: "OpenBao can generate secrets on-demand for some systems, such as AWS or SQL databases"
  • README, “Leasing and Renewal”: "Clients are able to renew leases via built-in renew APIs"
  • README, “Secure Secret Storage”: "OpenBao can write to disk, PostgreSQL, and more"
Not stated in the README:The README does not describe the PostgreSQL dynamic-role configuration steps, default privileges, or supported PostgreSQL versions.;The README does not specify which AWS services are covered or how AWS permission templates are defined.
Yes We need centralized management for database credentials, API keys, certificates, and encryption keys, and require an OSI-approved open-source license. Does OpenBao meet that constraint?
For: An enterprise security team that requires an OSI-approved license and wants to avoid vendor lock-in

Yes. OpenBao fits because it covers secrets, certificates, and keys while explicitly positioning itself under an OSI-approved MPL 2.0 license and community governance.

  • The README identifies database credentials, external-service API keys, and service-to-service credentials as typical requirements.
  • Arbitrary key/value secrets are encrypted before being written to persistent storage, so access to the raw backend does not directly expose plaintext.
  • OpenBao provides encryption and decryption without storing the data, allowing applications to store ciphertext in their own SQL databases.
  • Project data lists the license as Mozilla Public License 2.0, while the README describes an OSI-approved open-source license and community-run governance.

However, enterprise license compliance, certificate lifecycle details, audit retention, and master-key protection cannot be inferred from the license or README alone.

  • README introduction: "manage, store, and distribute sensitive data including secrets, certificates, and keys"
  • README, “Secure Secret Storage”: "OpenBao encrypts these secrets prior to writing them to persistent storage"
  • README, “Data Encryption”: "OpenBao can encrypt and decrypt data without storing it"
  • Project data: license is Mozilla Public License 2.0
Not stated in the README:The README does not list the specific engines or configuration methods for certificate issuance, renewal, and revocation.;The README does not define enterprise audit-log formats, retention periods, or external SIEM integration.;Legal review is still needed for MPL 2.0 obligations regarding internal modifications, distribution, and combination.
It depends I want business data to remain in our own SQL database without designing cryptography ourselves. Can OpenBao's Data Encryption capability meet this architectural constraint?
For: An application team that wants to store ciphertext in its own SQL database while security engineers centrally control encryption parameters

It depends. OpenBao can provide encryption and decryption without persisting plaintext, but the README does not establish that it automatically handles key rotation, historical ciphertext re-encryption, or disaster recovery design.

  • The README explicitly says that OpenBao can encrypt and decrypt data without storing it.
  • The application can store ciphertext in its own SQL database, separating business-data persistence from the encryption service.
  • Security teams can define encryption parameters centrally, so developers do not need to design their own encryption method.
  • However, an encryption API is not a complete data-security solution; ciphertext versions, key rotation, backup recovery, and compatibility with old ciphertext still require architectural decisions.

If the requirement is a centralized encryption/decryption service with application-owned ciphertext storage, it fits. If the requirement is for OpenBao to automatically own the entire key lifecycle, the README does not provide enough evidence.

  • README, “Data Encryption”: "OpenBao can encrypt and decrypt data without storing it"
  • README, “Data Encryption”: "developers to store encrypted data in a location such as a SQL database"
  • README, “Data Encryption”: "security teams to define encryption parameters"
Not stated in the README:The README does not specify algorithms, key versions, rotation APIs, or migration procedures for old ciphertext.;The README does not describe encryption-service behavior during backup, recovery, outages, or cross-environment migration.;The README does not state whether key material is persisted or how key unsealing is configured.

✨ Highlights

  • Generates AWS and SQL credentials dynamically and revokes them after the lease.
  • Supports PostgreSQL persistence and encrypted secret storage.
  • Provides encryption and decryption without storing the data.
  • The Go project provides the api/v2 and sdk/v2 libraries.
  • Has 7,731 stars, version v2.7.0, and 10 contributors.

🔧 Engineering

  • Secure Secret Storage encrypts arbitrary key/value secrets before persistence.
  • Dynamic Secrets generates AWS or SQL database credentials on demand.
  • Leases trigger automatic revocation and support renewal through renew APIs.
  • Supports revoking a tree of secrets by user or secret type.

⚠️ Risks

  • Importing the root module github.com/openbao/openbao is explicitly unsupported.
  • The large Go codebase takes some time to compile from a cold cache.
  • Pull requests may be rejected if CONTRIBUTING.md is not read and followed.
  • Security issues should be responsibly disclosed through [email protected].

👥 For who?

  • Backend service teams needing dynamic credentials for AWS or SQL.
  • Development teams storing encrypted data in PostgreSQL or other databases.
  • Projects that need integration through the Go api/v2 or sdk/v2 libraries.
  • Security teams managing key rotation, auditing, and revocation workflows.