TopGit
GitHub Repo Review

HashiCorp Vault: secrets management & encryption

hashicorp/vault
HTopGit review image for hashicorp/vault
Review by Topgit.dev for hashicorp/vault, with GitHub repository stats and README context.
Quick verdict

HashiCorp Vault is a server-based secrets manager that centralizes API keys, database credentials, and encryption keys behind one access-controlled, audited interface. It earns its keep once more than a couple of systems share secrets by hand: the lease-and-revoke model beats stashing credentials in config files, though you take on a service to run, not just a library to import.

Stars
โ˜… 36.4k
Forks
โ‘‚ 4.8k
Contributors
๐Ÿ‘ฅ 1.6k
Language
Go
License
See repository
Topic
Backend
Updated
Oct 2026

Why you need a dedicated secrets manager

Every service in a modern stack needs its own credentials: a database password here, an AWS key there, a TLS certificate somewhere else. By default those live wherever whoever wrote the deploy script put them - a .env file, a CI secret store, a Slack message from years back. Rotating any one of them means finding every place it's hardcoded, and revoking access after an incident means guessing which secrets that person or service could reach. Vault exists because most teams can't actually answer 'which secrets exist, who can read them, and when do they expire' without a system dedicated to tracking it. That's the gap Vault fills.

Vault: unified secrets management and encryption

Vault is HashiCorp's tool for storing, generating, and controlling access to secrets such as API keys, database credentials, certificates, and encryption keys. It exposes secrets through a unified API rather than scattering them across config files, environment variables, or ad-hoc vaults per team, and every read is access-controlled and written to an audit log.

Core capabilities of Vault

  • โœ“Secure secret storage: Vault encrypts key/value data before it touches disk, so gaining access to the raw storage backend isn't enough to read a secret. It can write to local disk, to Consul, or other supported backends.
  • โœ“Dynamic secrets: instead of storing a long-lived AWS or database password, Vault generates one on demand. When an app asks for S3 access, Vault mints a fresh AWS keypair with scoped permissions and revokes it automatically once the lease expires.
  • โœ“Encryption as a service: Vault can encrypt and decrypt data without ever storing it, so a team can push encryption logic into Vault instead of hand-rolling crypto inside an app that writes to a SQL database.
  • โœ“Leasing and renewal: every secret Vault hands out carries a lease. Clients renew it through a built-in API before it expires; if nobody renews it, Vault revokes it automatically.
  • โœ“Revocation, including bulk revocation: Vault can pull a single secret or an entire tree at once, every secret a specific user touched, or every secret of one type, which matters when locking things down after a breach.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history โ†—

What you can do with Vault

  • โ€ขStop hardcoding database passwords and API keys in app config and let services fetch them from Vault at runtime instead.
  • โ€ขHand out short-lived AWS credentials per request instead of a shared long-lived IAM key that never rotates.
  • โ€ขEncrypt application data, such as fields going into a SQL database, by calling Vault's encryption API instead of managing your own crypto library.
  • โ€ขTrack exactly who read which secret and when, via Vault's audit log, for compliance or incident response.
  • โ€ขRevoke every secret a compromised service or user could reach in one action after a security incident.

Running Vault locally

Running Vault locally, per the README, means building it from source for development rather than grabbing a packaged release: install Go, set GOPATH and GOBIN, then clone the hashicorp/vault repo outside your GOPATH (it uses Go Modules). Run `make bootstrap` once to pull build tooling, then `make dev` to compile a development binary into `bin/vault`. If you want the web UI baked in, run `make static-dist dev-ui` instead. Running the test suite (`make test`) requires Docker. The README doesn't document a packaged binary or OS-level package-manager install beyond that dev build path.

How applications consume secrets from Vault

An application talks to Vault over its API rather than reading secrets from a file: it authenticates, requests what it needs (say, S3 credentials), and Vault returns a value plus a lease it must renew through the built-in renew API before that lease runs out. For Go apps specifically, HashiCorp publishes github.com/hashicorp/vault/api as an importable client library; note that importing the main hashicorp/vault module itself is explicitly unsupported, only the api and sdk packages are meant to be pulled in. For other languages, the README points to a separate vault-examples repo and a hello-vault-go sample app for integration patterns; beyond that, this repo's README doesn't spell out language-specific usage.

Strengths

  • โœ“Dynamic secrets plus automatic revocation means a leaked AWS credential expires on its own instead of living forever in a config file.
  • โœ“One audit log for every secret read, across every backend, instead of stitching together per-service logs after an incident.
  • โœ“Encryption as a service lets a team centralize crypto policy instead of every service rolling its own encryption code.
  • โœ“Ships its own Go client library (github.com/hashicorp/vault/api), so wiring a Go service up to Vault doesn't mean writing a raw HTTP client.

Known limitations of Vault

  • โ–ณThe README documents only a from-source dev build (Go + make); there's no packaged binary, brew formula, or apt install path described in the repo's own docs.
  • โ–ณThe main hashicorp/vault Go module isn't meant to be imported into other projects, only the separate api and sdk packages are; the README explicitly warns against depending on the full module directly.
  • โ–ณSome capabilities live behind Vault Enterprise rather than the open-source build the README covers, so the free version won't cover every feature you'll read about on HashiCorp's site.
  • โ–ณThis repo's license field isn't specified in the facts available here, so check the repo's own LICENSE terms before depending on Vault in a commercial product.
  • โ–ณRunning the full test suite, let alone the acceptance tests, needs Docker, and per the README's own warning, acceptance tests can create and destroy real cloud resources, incurring real costs if you're not careful.

Alternatives to HashiCorp Vault

Kubernetes Secrets โ€” the cluster-native way to store credentials for pods; no dynamic generation, no leasing, and secrets are base64-encoded rather than encrypted by default, but it's already there if you're only on k8s.AWS Secrets Manager โ€” a managed, AWS-only equivalent for storing and rotating secrets if your whole stack already lives in AWS and you don't want to run and patch your own Vault cluster.SOPS โ€” encrypts secret values inside files you commit to git (via KMS/PGP/age), a much lighter-weight model than running a server, at the cost of no dynamic credentials or built-in leasing.Doppler โ€” a hosted secrets manager aimed at teams that want a managed UI and CLI for env vars and secrets without operating infrastructure themselves.

Frequently asked questions about Vault

Is HashiCorp Vault free and open source?

Vault's source code is published in the open hashicorp/vault GitHub repository, and it also ships as a separate paid Vault Enterprise product with extra features. The exact license terms for the open-source build aren't specified in this repo's public facts, so check the repository's own LICENSE file before relying on Vault in a commercial product.

What secret types does Vault support?

Vault stores arbitrary key/value secrets, can generate dynamic credentials on demand for systems like AWS or SQL databases, and offers encryption as a service so apps can encrypt and decrypt data without Vault ever storing the plaintext. Each secret it hands out carries a lease that Vault can renew or revoke automatically.

How does Vault differ from Kubernetes secrets?

Vault centralizes secrets outside any single cluster and adds features Kubernetes' built-in Secrets object doesn't have on its own: dynamic, short-lived credentials generated on demand, automatic lease expiry and revocation, and a single audit log of every secret read. Kubernetes Secrets are simpler to reach for but don't generate or rotate credentials for you.

Can Vault generate dynamic AWS credentials?

Yes, Vault can generate AWS credentials on demand: when an application needs access to something like an S3 bucket, it asks Vault, Vault creates a fresh AWS keypair scoped to that permission, and it automatically revokes that keypair once the associated lease expires.

How do I integrate Vault into a Go application?

HashiCorp publishes github.com/hashicorp/vault/api as an importable Go client library specifically for talking to a running Vault server; note that importing the main hashicorp/vault module itself is explicitly not a supported way to use the project. For worked examples in Go and other languages, HashiCorp maintains a separate vault-examples repo and a hello-vault-go sample application.

Does Vault run as a container?

Yes, HashiCorp publishes an official hashicorp/vault Docker image, referenced directly in the project's own Docker-based test tooling with the image tag 'latest' as its default. The same tooling also supports a separate hashicorp/vault-enterprise image for teams running the paid edition.

Who should try it โ€” and who should skip

Teams running more than a handful of services that each need a database password, an API key, or a certificate are the ones who feel the pain Vault solves; once credentials are scattered across a dozen config files, a central store with leases and an audit trail pays for itself. A single small app with two or three secrets doesn't need this: dropping them in a properly-scoped secret store your cloud provider already offers, or even a well-guarded environment variable, is less operational overhead than standing up and maintaining a Vault cluster. If you're not ready to run and patch another stateful service, skip it until the number of secrets actually hurts.

Related repositories

Source & attribution

Based on the hashicorp/vault GitHub repository (github.com/hashicorp/vault) and its README.

GitHub data ยท last synced Aug 15, 2026Reviewed by Henry
โ† Back to TopGit

Want a second opinion on vault?

Ask an AI that can read this page โ€” one click and you get its take on vault.

GitHub