Manage database credentials and API keys securely
If you have ever wondered where to store passwords for database connections or keys for external service calls, this tool provides the answer. OpenBao collects this sensitive data in one place, retrieves it securely only when needed, and automatically discards it when its usage period ends. You can protect data according to rules set by the security team without writing complex encryption logic yourself.
Why you do not need to manage passwords directly
Modern systems must handle numerous pieces of secret information, including database connection details, external API keys, and inter-service communication credentials. It is not enough to simply track who accesses what; regularly rotating keys or maintaining detailed audit logs is nearly impossible without a custom solution. OpenBao is designed to solve these problems. The tool encrypts secret information before storing it, so the content remains unknown even if someone accesses the original storage. It can record data in various stores, such as disk or PostgreSQL, allowing you to balance security policies with developer convenience.
Credentials that are created on request and disappear when done
One of OpenBao's key features is dynamic secret generation. For example, when an application needs to access an S3 bucket, requesting credentials from OpenBao immediately generates an AWS key pair with only the necessary permissions. This generated information is automatically discarded when its usage period (lease) expires. Clients can also renew leases through the built-in API. In addition to single secrets, you can revoke all information read by a specific user or all information of a specific type at once. This is highly useful for quickly locking down a system during key rotation or in the event of a breach.
Why you do not need to design encryption logic yourself
Developers do not need to devise encryption methods themselves, as OpenBao handles the process of encrypting and decrypting data. The security team defines encryption parameters, and developers simply store the encrypted data in locations such as SQL databases. In this process, OpenBao does not store the data but only performs encryption and decryption, allowing for flexible management of data flow. This structure separates security policies from development workflows, enabling each team to focus on its own role.
Setting up the development environment and building
To develop or build OpenBao, Go must be installed. The Go version used for CI and releases is pinned in the .go-version file, but it is common to use the latest toolchain for local development. After cloning the repository outside of GOPATH, you can create the binary using the go build -o bin/bao . command. To run the development server, use go run . server -dev. Because the codebase is large, compilation may take some time; adding the -v flag allows you to check progress. You can also manage advanced build settings through the Makefile.
Considerations when using the libraries
This repository publishes two libraries: github.com/openbao/openbao/api/v2 and github.com/openbao/openbao/sdk/v2. While using these libraries in other projects is supported, importing the OpenBao application itself as a dependency is not. Although it is theoretically possible because a go.mod file exists, this is not an officially recommended approach. Since internal code structures may change or bugs may occur without being fixed or restructured for you, it is safer to use only the libraries selectively. If you discover a security vulnerability, you should request responsible disclosure at openbao-security@lists.openssf.org.