Using HashiCorp Vault for Hyperswitch key management

A planning guide for running the Hyperswitch vault and encryption service on a HashiCorp Vault backend in infrastructure you control, with the HA, licensing and KMS trade-offs to settle first.

On this page

When a HashiCorp Vault backend fits Hyperswitch key management

A Vault-compatible backend is the practical choice when your Hyperswitch stack runs on-premise or in a private cloud and no cloud KMS is available to hold the keys. Hyperswitch separates its card vault, a Rust service in its own repository, from the app server, and the encryption service handles key management for the data it protects. The Hyperswitch docs describe these components at a high level, so the platform team's first job is to confirm which keys each component needs, where they must be stored and which backend options the chart version you plan to deploy supports. Do not assume that every backend listed in a blog post or older guide is available in your release. Check the current configuration reference for the vault and encryption service charts before you design around it.

The card vault is a separate service with its own compute and database, so key custody decisions affect more than the app server. In the in-house PCI model, the Hyperswitch docs state that the merchant is fully responsible for PCI DSS certification and data handling. That means the Vault backend you choose becomes part of the evidence an assessor will examine, including who can read or unseal key material, how access is logged and how the setup survives a restart. Treat the backend as a control you must document and test, not as an infrastructure detail.

At the same time, HashiCorp Vault is not the only option. Its licensing changed in 2023 and it is now offered as Vault Enterprise under commercial terms, while OpenBao is a community fork under MPL-2.0. Before committing, decide whether you need Enterprise features such as HSM support, and get written confirmation of licensing, support and upgrade terms from the vendor you choose. The sibling sections on AWS KMS and HSM integration cover the alternatives in detail.

How the app server, card vault, encryption service and Vault fit together

The diagram starts with the client request reaching the Router, the core app server that handles routing and retries. The Router and Scheduler both use PostgreSQL and Redis, while card data is sent to the separate card vault, which sits inside the cardholder data environment. The encryption service and the Vault backend supply the keys that protect data in that boundary. Check that the vault, the app server and the key backend sit in separate trust zones and that only the vault reaches stored card data.

Request flow between the app server, card vault, encryption service and secrets backend.

Choosing between Vault Enterprise, Vault Community, OpenBao and a cloud KMS

This table compares the four realistic backends for Hyperswitch key management on license model, licensing terms, HSM and PKCS#11 support, storage and HA options, and fit for on-premise stacks. Read each row against your own audit, HSM and data residency requirements, because the cheapest option on paper may not cover the controls your assessor expects. Vault Enterprise prices are not published, so ask HashiCorp sales for a quote before comparing total cost.

CriterionVault EnterpriseVault Community and OpenBaoCloud KMS
License modelCommercial, self-managed or HCP Vault Dedicated; prices quoted by HashiCorp salesVault Community is a free binary under the Business Source License; OpenBao is MPL-2.0 under the Linux Foundation's OpenSSFMetered managed service from the cloud provider; billing terms set by that provider
Licensing terms to reviewLicensed by IBM under the Vault LICENSE; confirm how the terms apply to your own use and hostingVault versions move to MPL-2.0 four years after publication; OpenBao is MPL-2.0 throughoutReview the provider's service terms and data processing terms with your legal team
HSM and PKCS#11 supportDocuments HSM support and a PKCS#11 provider as Enterprise features requiring a licenseConfirm HSM and PKCS#11 options against the current OpenBao docs before relying on themDepends on the provider's offering; confirm whether keys can be held in a dedicated HSM
Storage and HA optionsIntegrated storage (Raft) recommended; performance and disaster recovery replication are Enterprise featuresIntegrated storage (Raft) and PostgreSQL are the officially supported HA backends for OpenBaoNo cluster for you to operate; availability and regional design follow the provider's model
Migration and tested versionsStart from the Vault version your team already runs and confirm the upgrade path with HashiCorpThe OpenBao migration guide was tested only against Vault 1.14.1 community edition, not EnterpriseNot applicable; key material moves through the provider's import process
Fit for on-premise stacksStrong fit where you need Enterprise controls such as HSM integration and FIPS compliance inside your data centerStrong fit for self-run infrastructure with no commercial license, but you own support and the HSM integration workWeaker fit for air-gapped or fully on-premise deployments because the service runs in the provider's cloud
What to ask for in a quoteEnterprise license scope, support tier, HSM and replication features, and the upgrade commitmentsSupport arrangements from a vendor or partner, plus the HSM and PKCS#11 build you plan to useKey hosting region, HSM tier, request pricing, and the exit or key export process

What the BSL change and IBM ownership mean for your Vault choice

HashiCorp announced on August 10, 2023 that future releases of Vault would move from MPL-2.0 to the Business Source License 1.1. The Vault LICENSE file names IBM as licensor and applies to Vault 1.15.0 and later. It bars competitive hosted or embedded offerings, which means a license review matters if you plan to offer Vault-backed key management to customers, embed it in a product you sell, or run it as a managed service for other organizations. Internal use for your own payment stack is a different question from those cases, and the license text, not this summary, decides it. Each version converts to MPL-2.0 four years after publication, so older releases carry different terms than current ones. Read the HashiCorp announcement on the Business Source License alongside the Vault LICENSE file before you fix a version.

IBM completed its acquisition of HashiCorp on February 27, 2025. For a self-hosted Vault deployment, the practical questions are commercial: whether you need Vault Enterprise features such as performance replication, HSM support or FIPS compliance, how pricing and support terms are set after the acquisition, and whether your procurement team needs a contract rather than a community binary. HashiCorp does not publish Vault Enterprise prices, so ask for a written quote that names the features, node count and support level. Do not assume a change in ownership alters your current terms. Confirm them with the vendor.

Have your legal team review the BSL 1.1 terms against your intended use before you choose Vault as the Hyperswitch key backend, and record the version you approved. If the review finds a restriction that affects your plans, the alternatives are the community fork OpenBao, which is MPL-2.0 licensed, or a cloud KMS. Note that the OpenBao migration guide was tested only against Vault 1.14.1 community edition, so a move between the two needs its own validation.

Token and URL settings for the Hyperswitch vault and encryption service

The app server, the Rust core that handles routing, retries and vault calls, sends key-related requests to the encryption service over an internal endpoint. The settings on this side control where those requests go, how the app server proves who it is, and whether the traffic is protected in transit. Treat this link as a trust boundary, because anyone who can reach the encryption service and present valid credentials can ask it to operate on data keys.

  • Service address: the in-cluster service name or URL the app server uses to reach the encryption service. Keep it internal and do not expose it through an ingress route.
  • Transport protection: whether the connection uses TLS and which certificate authority the app server trusts. Confirm the certificate verification setting, not only the URL scheme.
  • Client identity: the credential or service account the app server presents. Grant it only the operations it needs.
  • Timeouts and retries: how long the app server waits on a key operation before it fails a payment. Test these values under load, because they directly affect checkout latency.

Confirm each of these names and defaults in the chart values for your exact Hyperswitch version, and check the self-hosting guide for changes to how the encryption service is wired in.

Setting up the HashiCorp Vault backend step by step

This sequence takes a self-hosted Hyperswitch stack from an unconfigured Vault to a verified backend for the encryption service and card vault. Each step ends with a check you can record, so the team can show that the cluster, identities and key operations work before any real card reaches the vault.

  1. Confirm Vault version and license terms

    Before installing anything, record which Vault edition you will run and which license terms apply. The current release listed on the Vault GitHub releases page is 2.2.0, and Vault releases from 1.15.0 onward are covered by the Business Source License 1.1, so legal review should happen before the build starts. Enterprise features such as HSM support, performance replication and FIPS compliance need a license applied to the cluster. Your check: a written record of the edition, version and license decision, signed off by the platform owner and legal.

  2. Stand up Vault with integrated storage

    Deploy the Vault servers on infrastructure you control, using integrated storage (Raft), which HashiCorp recommends for most use cases. Place the nodes in separate failure domains, serve them only over TLS, and limit access to the cluster API to the Hyperswitch workloads and your administrators. Use an odd number of nodes so Raft can keep a quorum. Your check: vault operator raft list-peers lists every node as a voter, and each node answers on its health endpoint.

  3. Initialize and unseal the cluster

    Initialize Vault once on the first node, which generates the unseal keys and the initial root token. Split the unseal keys across named custodians so that no single person can unseal the cluster alone, and store each share in a separate controlled location. Use the root token only for the setup in this sequence, then revoke it once the auth methods and policies are in place. Your check: vault status reports the cluster as initialized and unsealed on the active node, and each standby joins and unseals in the same way.

  4. Configure auth methods for each service

    Enable an auth method for each workload so the encryption service and card vault log in with their own identities. AppRole suits services that run outside the cluster, and the Kubernetes auth method suits pods running on it. Configure short token lifetimes and bind each role to one service only, with no shared login. The platform team carries out this step with the Vault administrator. Your check: a test login from each identity returns a token that carries only that service's policy.

  5. Create policies and enable the secrets engine

    Confirm with the Hyperswitch documentation which secrets engine and paths the encryption service and card vault call, then write one policy for each service that grants only those paths. Enable the engine, create the named keys each service expects, and withhold key deletion and key configuration changes from both policies. Your check: each identity can perform its permitted encrypt and decrypt operations, and a request to any other path returns permission denied.

  6. Wire tokens and URLs into Helm values

    Add the Vault address, auth mount and role names, the secret or key paths and the CA certificate for TLS to the Helm values for the encryption service and card vault. Load credentials such as AppRole secret IDs from a Kubernetes secret, keeping them out of the values file. Pin chart and image versions together and record them. Look up each exact key name in the chart's values reference, since names can change between chart versions. Your check: helm template renders the expected Vault address and auth settings, and after rollout the pods log a successful Vault login without errors.

  7. Verify seal, unseal and test encryption

    Test the failure paths before any production data arrives. In a staging environment, seal the cluster, confirm the services stop cleanly, then unseal it with your custodians and confirm the services recover. Restart the active node and confirm a standby takes over. Run an encrypt and decrypt round trip using a dummy test value, never card data, and compare the output. Your check: the round trip matches, every service recovers after the seal cycle and failover, and the results are recorded before the first saved card.

Designing Vault high availability for payment keys

Vault holds the keys that protect stored card data and merchant secrets, so its availability affects whether payments can be authorized. The cards below cover how the active and standby model works, which storage backends are supported for high availability, how OpenBao has added read scaling, and what to confirm about your own license tier before you commit to a design.

Active node and standby model

In Vault's high availability model, one active node serves requests while standby nodes wait to take over. Standbys forward or redirect requests to the active node, so clients should reach the cluster through a stable address such as a load balancer. Decide how many nodes you need, where they sit across failure domains, and how your load balancer health checks identify the active node. Confirm the current HA behavior for your Vault version with HashiCorp's documentation.

OpenBao HA docs

Integrated storage (Raft) as the default

HashiCorp recommends integrated storage (Raft) for most deployments, and it is one of the officially supported HA backends. Raft keeps Vault's data inside the cluster, so you do not operate a separate database just for secrets. Plan for an odd number of voting nodes, persistent disks on each node, and tested snapshot and restore procedures, since losing quorum is the main way this design fails.

Vault storage backends

PostgreSQL as an alternative HA backend

PostgreSQL is also an officially supported HA backend for OpenBao, and its documentation describes it as easier to operate safely than Raft. This fits teams that already run a hardened, backed-up PostgreSQL cluster with its own high availability. Check whether your Vault edition and version support the same backend, because HashiCorp limits external backends such as PostgreSQL to limited support. Weigh the extra failure point against the operational skills you already have.

Read scaling on standbys

Since OpenBao 2.5.0, Raft standbys can serve read-only operations, and OpenBao v2.7.0 extended this to PostgreSQL. Read scaling can reduce load on the active node for workloads that mostly fetch secrets or encryption settings. Confirm which operations your Hyperswitch services send and whether your chosen Vault product supports standby reads, since writes and lease management still go through the active node.

OpenBao releases

Failover and authorization impact

If Vault is unreachable, the Hyperswitch services that depend on it cannot fetch the keys they need to decrypt or encrypt card data, so new authorizations that require a vault operation can fail. Define in writing which payment flows stop, which keep working, and how long a failover is allowed to take. Test failover under load and confirm that Hyperswitch retries and timeouts do not create duplicate payment attempts.

Confirm your license tier

Vault high availability and disaster recovery features depend on your edition. Several capabilities, including performance and disaster recovery replication and redundancy zones, need a Vault Enterprise license applied to the cluster. Ask HashiCorp or your reseller which features your license covers, which replication modes are available, and what the supported HA configuration is for your version before you finalize the node count and failure-domain plan.

Vault Enterprise docs

Questions buyers ask before choosing a Vault backend

Does HashiCorp Vault cost money to run for Hyperswitch key management?

Vault is available as Community Edition binaries or source, as licensed Vault Enterprise, and as HCP Vault Dedicated, so the software cost depends on which edition you choose. Community Edition has no license fee to download, but the features that matter most for a regulated key store, such as HSM support, FIPS compliance, performance and disaster recovery replication, and seal wrapping, are Enterprise features that need a license applied to the cluster. HashiCorp's pricing page does not publish Vault Enterprise prices and directs self-managed Enterprise buyers to sales, so ask for a written quote that names the edition, the features and the term. Your recurring costs also include the servers, storage, monitoring and the staff who operate the cluster.

What does the licence change mean for an on-premise Vault deployment?

HashiCorp announced on August 10, 2023 that future releases would move from MPL-2.0 to the Business Source License 1.1, and the Vault LICENSE file names IBM as licensor. The license bars competitive hosted or embedded offerings, so an internal deployment that protects your own payment data is a different question from reselling a key management service. Each version converts to MPL-2.0 four years after publication. Have your legal team review the license text for your use, and compare it with OpenBao, which is licensed under MPL-2.0 and is a community fork of Vault.

How much of the effort is Vault operations versus the Hyperswitch setup?

The Hyperswitch side is a configuration change, but the Vault side is a standing service: initialization, unsealing, storage backend, high availability, backups, certificate rotation, token policy and upgrades. Operating a highly available cluster needs people who understand Raft or PostgreSQL storage, auth methods and failover testing. Expect the Vault build and its runbooks to take longer than the Hyperswitch wiring. Ask any partner to split the quote into Vault cluster build, Hyperswitch integration, custodian process design and handover, so you can see where the effort sits.

What drives the timeline for a self-hosted Vault backend?

The main drivers are the storage backend choice, whether you already run a PostgreSQL or Raft pattern you trust, the number of Vault nodes and the sites they span, the auth method for the Hyperswitch services, and how long your change board takes to approve production access. An Enterprise license purchase or HSM procurement can add lead time that is outside the technical work. No duration is fixed here, so ask for a timeline that lists each milestone and the client-side approvals it depends on.

What does my team need to provide for a Vault build?

You will need infrastructure for at least one Vault cluster, network paths from the Hyperswitch vault and encryption service to Vault, TLS certificates from your internal authority, a named owner for Vault, and people who can hold unseal or recovery material under a documented custodian process. You also need the Kubernetes or VM platform the cluster runs on, monitoring and log collection, and a backup target. Confirm the exact requirements against the Hyperswitch chart version you deploy, because token and URL settings can change between releases.

Can an in-house team set up and run Vault for Hyperswitch?

A capable platform or security team can do it, provided it has someone who has run Vault in production, the time to build HA and test failover, and a process for unsealing and custodian changes. The harder part is the ongoing discipline: upgrades, policy reviews, backup restores and staff turnover. Ask yourself whether you can staff that for the life of the stack, and whether your auditors will accept your evidence for key handling. DeployOpen can plan, build, document and hand over a Vault backend in your infrastructure, and offer ongoing support as a retainer if you prefer that model.

When is a cloud KMS simpler than Vault for on-premise Hyperswitch?

A cloud KMS is usually simpler when your stack already runs in one cloud provider, you want the provider to hold and rotate keys, and you do not need to run a key service in your own data center. Vault fits better when you must keep key material on premises, need one secrets platform across many systems, or want dynamic secrets and encryption as a service under your own control. The Hyperswitch encryption service supports several key storage options, so decide the backend first, then the operating model. Confirm with your security team whether a cloud dependency is acceptable for your key custody rules.

Is OpenBao a lower-cost alternative to Vault Enterprise?

OpenBao is a community fork of Vault under MPL-2.0, managed by the Linux Foundation's OpenSSF, and it describes itself as a community-driven secrets manager. Its releases, including v2.7.0 on September 23, 2026 and v2.7.1 on October 1, 2026, are free to download, which removes the Vault Enterprise license line from the budget. Be aware that the OpenBao migration guide was tested only against Vault 1.14.1 community edition, not Vault Enterprise, so confirm that the Hyperswitch chart, your storage backend and any HSM requirement are supported before you choose it. Support then comes from a partner contract or the community, and that should be priced into the decision.

How DeployOpen scopes and delivers Vault-backed key management

DeployOpen is a Chainscore Labs company that plans, implements, hardens, backs up and documents self-hosted open-source platforms inside the client's own cloud accounts, data centers or air-gapped networks. For a Hyperswitch key management build on HashiCorp Vault, that means DeployOpen works in your environment: the Vault cluster, the storage backend, the auth method used by the Hyperswitch encryption service and the wiring of the token and URL settings into your deployment. Most engagements are fixed-scope, so the boundaries of that work are written down before any build starts. Ask for the written scope to name the Vault version and edition, the storage backend, the high availability design, the unseal approach and the environments covered.

A quote follows from the written scope, not from a generic package. The cost drivers you should expect to see reflected are the number of Vault clusters and environments, the Vault edition you run (Community Edition binaries, Vault Enterprise or a managed service), the number of Hyperswitch services that consume keys, the depth of backup and restore testing, and whether your team will operate the cluster afterward. Ask the vendor to separate one-time build work from recurring items, since upgrades, support and continuous testing are offered as retainers. DeployOpen prepares systems, controls and evidence for compliance assessments, including documentation of key handling and access, but it does not issue audit reports, attestations or certifications. Your independent assessor decides what the evidence proves, so confirm early which artifacts that assessor expects.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.