OpenBao auto-unseal with Google Cloud KMS: when your team needs it
If your team runs OpenBao in infrastructure you control and wants nodes to come back up after a restart without people holding Shamir shares at every boot, a Google Cloud KMS seal is one way to remove that manual step. With auto-unseal, OpenBao uses a key held in an external key service to recover its root key when a node starts, so an operator no longer has to supply unseal shares each time. The trade-off is that the unseal path now depends on Google Cloud KMS being reachable and on the identity the server uses to call it. Before choosing this route, confirm that your OpenBao nodes can reach the Cloud KMS endpoints from every site or network segment where they run, and that your recovery keys and procedures still work if the cloud dependency fails.
The Google Cloud KMS seal works by encrypting OpenBao's root key with a Cloud KMS key that you create and control. Three elements become part of your secret-protection chain: the Cloud KMS key itself, the location where that key lives, and the Google Cloud service account (or other identity) that the OpenBao process uses to call the service. Whoever can use that key or impersonate that identity can effectively unseal your OpenBao data, so the IAM roles granted to the identity should be limited to the encrypt and decrypt operations the seal needs. Key location matters for residency and for the availability of your unseal path, so record the region you choose and check it against your data handling requirements. Ask your team to document who administers the key, who can grant access to it, and how that is logged.
Treat the plugin behavior, configuration keys and supported release lines as items to confirm, not facts to assume. Check the OpenBao release notes for the exact version you plan to run, since seal plugins and their configuration have changed across recent lines, and confirm the authentication method and seal configuration syntax in the seal documentation for that release. Plan a test cluster in which you exercise a full node restart, a Cloud KMS permission revocation and a recovery drill before you migrate production. Keep the recovery key material and the migration path from Shamir in your runbook, because moving between seal types is a planned operation that needs its own change control.
How an OpenBao node unseals through Cloud KMS
The diagram starts with an OpenBao node that boots in a sealed state inside the client's VPC or on-premises network. The node calls the Google Cloud KMS plugin using its own identity, and Cloud KMS performs the decryption of the stored key material. Once that step succeeds, the node unseals and serves requests. The encrypted data sits in the storage backend, which stays on the client side of the boundary. Check that the node's identity is the only one allowed to use the key, and confirm exactly which material is held by Cloud KMS and which stays in storage.
Startup path from a sealed OpenBao node to an unsealed node using a Cloud KMS key.
What Cloud KMS protects and what still needs people
With auto-unseal, the root key is no longer typed in as Shamir shares at each start. Instead, OpenBao's root key is wrapped by a key you hold in Google Cloud KMS, and the service account running OpenBao must be allowed to use that key to unwrap it when the server starts. The cloud key protects the unseal path, not the secrets themselves, and it does not replace the need for careful key custody. Anyone who can use that key with the right service account, or who can change the key's IAM bindings, can affect whether the cluster unseals, so the key and its IAM policy belong in the same review as the rest of your secrets infrastructure.
Initialization still generates recovery material that OpenBao keeps outside the cloud key's control. Decide before go-live who holds that material, where it is stored and how access to it is logged and approved. Store it in separate, access-controlled locations rather than in the same project or pipeline that deploys the cluster. Confirm in the OpenBao documentation for your chosen release exactly what recovery material is produced at initialization, how it is used, and whether it can be regenerated, because those details determine how much your custody plan must cover.
Some operations still require people. Recovery-related actions, rekeys and seal migrations, such as moving between a built-in seal and a KMS plugin, are manual procedures with their own prerequisites, quorum or approvals, and risks to availability. Before you rely on any of them, confirm the steps, required inputs and failure handling against the OpenBao documentation for the release you run, and rehearse them in a non-production cluster. Write down who may start each procedure, who must observe it, and what evidence is kept afterward.
Which key location, identity and key scope fit your setup
This table compares the four decisions that shape a Google Cloud KMS auto-unseal setup: key location, key protection level, identity source and key scope. Read each row for when the option fits and what becomes harder to change once OpenBao is initialized and running. Items the supplied sources do not settle are marked for confirmation with Google Cloud and the OpenBao plugin documentation.
| Decision | Option and when it fits | What it makes harder to change later |
|---|---|---|
| Cloud KMS location | Regional key location fits workloads that stay in one region and need data residency in that region. Multi-region fits clusters that must survive a regional problem, after confirming the locations offered for your key type. | Moving a key to another location generally means creating a new key and re-sealing or migrating, so confirm the migration path with the plugin documentation before choosing. |
| Key protection level | Software-protected keys fit most auto-unseal setups where the plugin and your Google Cloud configuration support them. HSM-backed keys fit regulated environments that require hardware key custody, but only if the plugin and key type are confirmed as compatible. | Protection level is set when the key is created, so changing it later usually means a new key and a controlled re-seal. Confirm supported levels for the plugin version you run. |
| Identity source | Workload identity or an attached service account fits clusters running on Google Cloud, because no long-lived credential file needs to be stored on the host. Downloaded key files fit only when the OpenBao host runs outside Google Cloud, and they require their own rotation and storage controls. | Switching identity sources means changing the seal configuration and granting new permissions, and downloaded key files add a secret that must be rotated and protected. Confirm the authentication order the plugin uses. |
| Key scope: one key per cluster | A dedicated key per OpenBao cluster fits most teams because compromise, access review and key rotation stay confined to one cluster. It also keeps each cluster's unseal dependency clear to auditors. | Each new cluster adds a key, IAM bindings and monitoring to maintain. Keys cannot be merged later without re-sealing each cluster. |
| Key scope: shared keys across environments | A shared key across development, staging and production fits only small teams that accept one blast radius for all environments. It reduces key count but couples environments through a single access policy. | Separating a shared key later requires re-sealing every environment that used it, and access granted for one environment usually stays in place for all of them. |
| Key rotation and access grants | Plan rotation of the Cloud KMS key version and review of IAM roles on the key at setup. Confirm with Google Cloud how key version rotation interacts with existing OpenBao seal wrapping. | Retrofitting rotation after go-live adds change windows on a seal that unseals the whole cluster. |
How the identity setup differs by hosting environment
When OpenBao runs as pods, the most common approach is to let the workload obtain Google Cloud credentials through the cluster's workload identity mechanism instead of mounting a long-lived key file into the pod. On Google Kubernetes Engine, that means binding a Kubernetes service account to a Google service account that holds the KMS permissions. On other Kubernetes distributions, the cluster must be configured to federate its service account tokens with Google, and the exact steps depend on how the cluster issues identity. Confirm the current workload identity options for your cluster type in Google Cloud's documentation before you design the setup.
- Service account binding: Map the pod's Kubernetes service account to a dedicated Google service account with only the KMS permissions the seal needs.
- Network path: Confirm that egress from the node pool or pod network can reach the Cloud KMS endpoints, including any private access or egress controls your cluster enforces.
- Key file avoidance: Avoid mounting service account key files into pods where a federated identity option is available, and record the reason if you must use one.
- Restart behavior: Test that a pod reschedule on a different node still obtains credentials and unseals without manual steps.
- Node failure: Verify what happens when a node pool is replaced, since a new node must reach KMS before OpenBao can start serving requests.
Before relying on automatic unseal, delete a pod in a test cluster, confirm it unseals from KMS alone, and confirm the audit trail shows the expected identity.
On Compute Engine, the usual pattern is to attach a service account to the virtual machine so that the instance metadata server supplies short-lived tokens to the OpenBao process. The OpenBao process then uses Application Default Credentials, so no key file has to be copied onto the disk. The team should decide whether the VM service account is dedicated to OpenBao or shared with other workloads, because a shared account widens the set of resources that the same identity can reach. Confirm the current metadata and attached-account behavior in the Google Cloud documentation for your image and operating system.
- Dedicated service account: Attach a service account used only by the OpenBao nodes and grant it the key-level KMS permissions required for encrypt and decrypt.
- Access scopes: Check the instance access scopes and organization policies, since they can limit what tokens the VM may request even when IAM roles are correct.
- Metadata reachability: Confirm that the OpenBao service can reach the metadata server and that container or proxy settings do not block it.
- Network path: Use Private Google Access or the approved egress route so the VM reaches Cloud KMS without traffic leaving the approved network path.
- Instance replacement: Test that a rebuilt instance inherits the same attached identity and that its startup order lets OpenBao reach KMS before it is needed.
Before relying on automatic unseal, stop and start each OpenBao node, confirm it unseals without an operator, and review the Cloud Audit Logs for the calls made under the expected service account.
Nodes in a data center or in another cloud cannot use the metadata server, so they must obtain a Google identity by another route and then call the Cloud KMS API over the network. Options generally involve federating an existing identity provider or workload identity pool with Google, or, where policy allows, using a service account credential stored in a protected location. Each option changes who controls the credential lifecycle, how rotation happens and what an incident response looks like. Confirm which federation and credential options Google Cloud currently supports for your environment, and confirm them with your security team before choosing one.
- Identity source: Decide whether the nodes will authenticate through workload identity federation from their own platform or through a managed service account credential, and document who approves that choice.
- Credential storage: If a key file is used, store it where only the OpenBao service account can read it, and plan rotation and revocation.
- Network path: Confirm firewall rules, proxies and DNS allow outbound HTTPS to the Cloud KMS endpoints from every node, and plan for the outage case when the path is unavailable.
- Latency and dependency: Measure how an unreachable KMS endpoint affects restart and failover, because a sealed node cannot serve requests.
- Egress approval: Record the egress path in the network architecture so auditors can trace how sealed-state recovery depends on an external service.
Before relying on automatic unseal, simulate loss of the KMS path in a test environment, confirm that the failure mode and recovery steps are documented, and confirm that break-glass procedures exist for the period when Google Cloud is unreachable.
Setting up Cloud KMS auto-unseal in order
This sequence takes a cluster from a confirmed release and plugin to nodes that restart and unseal without operator input. Each step closes with a check, so the team can show that the seal works before it depends on it.
Confirm release and plugin support
The platform owner checks the OpenBao releases page and the Google Cloud KMS plugin documentation for the exact version you plan to run. Confirm that the plugin ships with that release, and note the seal configuration keys it expects. Record the OpenBao version in the change record, since the plugin and its settings depend on it. Done when the team has a written version pin and a confirmed plugin name that every later step references.
Create key ring and key
The cloud platform team creates a key ring and a symmetric encryption key in the Google Cloud project and location chosen for the seal. Pick a location that matches your data residency rules and sits close to the nodes, because the location determines where unseal requests are served. Record the project ID, location, key ring and key name. Done when the key shows as enabled and the team has the full resource path written down.
Grant node identity minimal key access
The platform team creates or selects a service account or workload identity for the OpenBao nodes and binds it to the encrypt and decrypt roles on that one key. Confirm the exact role names in the plugin documentation. Do not grant key administration roles, so the node can use the key but cannot change, rotate or delete it. Done when a test encrypt and decrypt succeeds from a node host and the IAM policy on the key shows no broader binding.
Add seal stanza to configuration
The platform engineer adds the Cloud KMS seal stanza to the configuration file on each node, filling in the project, location, key ring, key and the identity method chosen in the previous step. Remove the disable_mlock setting if it is present, because OpenBao stopped using mlock in 2.0.0. Keep the stanza identical across nodes except for node-specific fields. Done when the configuration validates on every node and no file still contains disable_mlock.
Initialize cluster and store recovery material
An operator initializes the cluster once, from a single node. With an auto-unseal seal, initialization returns recovery material used for later operations such as rekeying and generating root tokens, so confirm the exact output format in the OpenBao documentation before the ceremony. Store the recovery material split across named custodians in separate locations, and revoke any root token once the initial configuration is complete. Done when the custodians have confirmed custody and the initialization record is filed.
Restart a node and confirm unseal
The operator restarts one node and checks its status without entering any key. The node should report as unsealed on its own. Review the OpenBao audit log and server logs for the seal and KMS call that completed the unseal. Then restart the remaining nodes one at a time and confirm each returns unsealed. Done when every node unseals with no operator input and the status and log output are saved as evidence.
Test failure behavior in a non-production cluster
In a non-production cluster, the platform team removes the node's access to the key for a short test and restarts a node. The node should stay sealed, and the failure should appear in the server logs and the alerting you have configured. Restore the binding, then confirm the node unseals on its next start. Done when the team has documented how a KMS outage or permission change presents itself and who responds to it.
Security risks to plan for before enabling Cloud KMS unseal
Auto-unseal moves the protection of OpenBao's root key into Google Cloud, so the security of the cluster now depends on how that cloud access is granted, stored, logged and governed. The cards below cover the risks that tend to surface after go-live, each paired with a control or check to confirm before the seal is enabled.
Over-broad IAM roles on the key
The OpenBao identity needs only encrypt and decrypt permissions on the specific CryptoKey used for unsealing. A project-level Editor or Owner role lets the same identity change keys, alter IAM policies or read unrelated resources. Check the IAM policy on the key itself, confirm the granted role is limited to the encrypt and decrypt permissions the plugin requires, and confirm no broader role is inherited from the project, folder or organization. Review the policy after every change to the project.
OpenBao HA docsService account key files on hosts
A downloaded service account JSON key file that sits on an OpenBao host is a long-lived credential that can be copied off the machine. Prefer an identity bound to the runtime, such as the instance or workload identity of the host, where your environment supports it, and document why any key file is used. If a key file is unavoidable, restrict read access to the OpenBao service user, store it outside the configuration directory, rotate it on a fixed schedule and delete old keys in Google Cloud.
Disabling or destroying the unseal key
If the Cloud KMS key is disabled, scheduled for destruction or its versions are destroyed, the OpenBao nodes cannot decrypt the root key on restart, and the cluster cannot be unsealed. Destruction of key material is generally irreversible once the waiting period ends. Restrict key destruction and disable permissions to a small named group, enable deletion protection controls where Google Cloud offers them for your key type, and keep a tested recovery procedure that covers recovery keys and the process for restoring access to the key.
Key location and residency choices
The key ring location determines where the unseal key is stored and where cryptographic operations run. A location that differs from where your OpenBao nodes and backups reside can add latency, cross-border data movement or a regulatory question that your compliance team must answer. Decide the location with your data residency and availability requirements, confirm the location options available for your Cloud KMS protection level, and record the choice in your architecture documentation before creating the key.
Audit logging of decrypt calls
Each unseal operation is a call to decrypt, and Cloud Audit Logs can record these API calls when data access logging is enabled for Cloud KMS. Without it, you cannot see when nodes unsealed, from which identity or from which address. Confirm that the relevant audit log types are enabled for Cloud KMS in the project, route them to a log sink your security team controls, and set an alert for decrypt calls from unexpected identities or outside planned restart windows.
Separation of duties between cloud and OpenBao
Administrators who control the Google Cloud project can disable the key, alter IAM and read logs, which gives them the ability to block unsealing. Administrators who control OpenBao can read and change secrets but should not be able to change the Cloud KMS key. Write down which named roles belong to each group, grant cloud administrators no OpenBao root or policy-admin rights, and review both lists during access reviews. Where one team holds both, record that decision and the compensating controls.
Moving an existing cluster from Shamir keys to Cloud KMS
Moving a running cluster from Shamir unseal to Cloud KMS is a planned change to the seal itself, and the OpenBao documentation describes its own procedure for changing the seal on a running cluster. Treat it as a separate project from the fresh setup in this topic, not as a config edit you make on a Friday afternoon. The first decision is whether the migration is worth doing at all, since the cluster must be unsealed by its Shamir key holders during the change, and every node that depends on the old seal configuration has to follow the same sequence.
Rehearse the full procedure on a non-production cluster first, built from the same OpenBao version, the same storage backend and a comparable Shamir share layout. Before any change, back up the storage backend and confirm that the current unseal shares and recovery material are accounted for and can be reached by the people who must use them. Record the Google Cloud KMS key resource name, the key ring location, and the service account that will hold the decrypt and encrypt permissions, and test that the service account can use the key from every node. Store those details with the recovery material, because a seal change that fails halfway is far harder to recover from when nobody can find the key identifiers.
Confirm the exact migration steps for your OpenBao version in the project documentation before you schedule anything, and do not assume that an in-place seal change is safe because a fresh initialization with the Cloud KMS seal works. Ask your DeployOpen or internal team to document the rollback path, the order in which nodes are changed, the expected behavior of a standby during the transition, and who approves the production window. If the documented procedure requires steps you cannot rehearse in your environment, treat that gap as a reason to delay the production change rather than a detail to resolve during the window.
Limits to confirm in your Google Cloud and OpenBao environment
OpenBao must unseal its root key every time a node starts, and a Cloud KMS key protects that process only if the details below match your project and network. Settle each question with the vendor documentation or your own tests, and record the answers in the design record before you create the key.
Plugin release and seal status
Confirm which OpenBao release line first includes the Google Cloud KMS seal plugin and whether the project recommends it over other seal options. Read the release notes for each minor line you may run, and check whether the plugin ships in the standard binary or needs a separate build. Pin the exact version in your deployment plan so that upgrades do not change seal behavior without a planned test.
OpenBao releasesSupported key types and protection levels
Confirm which Cloud KMS key types the plugin accepts for wrapping the root key, such as symmetric encryption keys, and which protection levels it supports, including software-protected and HSM-protected keys. Check whether asymmetric keys are accepted at all. Create a test key in a sandbox project, run a full seal and unseal cycle, and record the exact key resource path the plugin expects, including project, location, key ring and key name.
Network path from every node
Confirm that every OpenBao node, including standbys and any disaster recovery nodes, can reach the Cloud KMS endpoint over the network path you intend to use. Check DNS resolution, firewall egress rules, private connectivity options and any outbound proxy settings that the server process inherits. A node that cannot reach KMS cannot unseal after a restart, so run the test from each node itself rather than from a bastion host.
Quotas and API request limits
Ask whether your Google Cloud project quotas for the Cloud KMS API cover the expected number of unseal operations across node restarts, upgrades and autoscaling events. Review the request quotas in the console, and confirm with Google Cloud whether quota increases need lead time. Set alerts on KMS error rates, and test how a node retries after a throttled request so that a brief limit does not leave the cluster sealed.
Behavior during a regional outage
Confirm what happens if the Cloud KMS location holding your key becomes unavailable. Nodes that are already unsealed may keep serving, but any node that restarts, fails over or is replaced cannot unseal until KMS returns. Choose the key location with your recovery objectives in mind, rehearse a node restart while KMS is unreachable in a test cluster, and write down the recovery steps your operators would follow.
Compliance acceptance of Google Cloud custody
Ask your compliance and security team whether they accept Google Cloud as the custodian of the wrapping key that protects OpenBao's root key. Document who may use the key, how IAM bindings are reviewed, where Cloud Audit Logs for key use are retained, and which key locations your data residency rules allow. Bring this decision to the design review before the key is created, because moving the seal later is a planned change, not a setting you flip.
Questions buyers ask about Cloud KMS auto-unseal for OpenBao
What does Cloud KMS auto-unseal for OpenBao cost and what drives the effort?
The cost is mostly the engineering time to design and verify the setup, and the effort depends on how much of your Google Cloud environment already exists. The main drivers are the cloud identity design (how OpenBao authenticates to Google Cloud and which service account it uses), the network path from each OpenBao node to Cloud KMS, the size of any migration from a Shamir-sealed cluster, the depth of failover and recovery testing, and the documentation your audit or security teams expect. A fixed-scope quote from DeployOpen should list each of these as a line item with its deliverables and timeline agreed in writing before work starts. Ask the quote to separate one-time work from anything recurring.
How long does a Cloud KMS auto-unseal rollout take?
The duration follows the sequence of steps rather than a fixed number, because each step can wait on your own approvals. A typical rollout covers agreeing the key location and identity design, creating the Cloud KMS key ring and key with the right permissions, granting the OpenBao identity access to the key, configuring the seal in a non-production cluster, testing node restarts and a simulated loss of KMS access, then planning the cutover in a change window. Migration from an existing Shamir-sealed cluster adds steps for handling the current unseal keys. Ask any provider to show the steps and the approval points in its written plan.
What does our internal team need to provide for this work?
Your team needs to provide access to the Google Cloud project where the key will live, named IAM owners who can approve role grants and key policies, and change windows for configuration changes and node restarts. You will also need the OpenBao cluster details, the current seal configuration and a contact who can approve the test plan. If the cluster runs in a private network, network staff must confirm the path from OpenBao nodes to the Cloud KMS endpoints. Put these inputs in the quote so that dependencies are visible before the schedule is set.
Can our own engineers set up Cloud KMS auto-unseal without a partner?
Yes, a team with Google Cloud IAM experience and OpenBao operations skills can do it alone, provided it has the time and a test environment to validate the setup. The work involves key policy design, service account permissions, seal configuration, and recovery testing, and mistakes in any of these can leave the cluster unable to unseal after a restart. Teams often choose a partner for the design review, the failure testing, or the documentation evidence that compliance reviewers ask for. The decision depends on your in-house experience, your deadline, and how much independent review you need.
What recurring charges come with Cloud KMS auto-unseal?
The recurring charges are Google Cloud KMS costs for the key and for the cryptographic operations OpenBao performs against it, plus the ongoing staff time for key policy reviews, IAM changes and upgrade testing. Google bills key storage and operations under its own published pricing, which changes over time and varies by key type and location, so confirm the current rates on Google's Cloud KMS pricing page before budgeting. Ask any provider to state which charges it expects you to pay directly to Google and which fall under its own support fees.
What happens if the Cloud KMS key or the Google Cloud project is lost?
If the key is disabled, destroyed, or the project is lost, OpenBao cannot decrypt its root key, so a restarted node cannot unseal and the cluster stays unavailable. Protecting against this requires controlled key destruction windows, restricted IAM on key administration, and a documented recovery path, including whether you keep a separately stored recovery method. Destroyed Cloud KMS key versions cannot be restored, so treat key deletion as a high-risk change with dual approval. Before go-live, confirm the recovery procedure in writing and test it in a non-production cluster.
Which key location should we choose for Cloud KMS auto-unseal?
Choose the key location based on where your OpenBao nodes run, your data residency rules and your recovery needs, because the key is a dependency for every unseal. Placing the key close to the cluster reduces network dependence, while a location that matches your residency commitments may be required by your compliance team. Confirm the regional and multi-regional options that Google Cloud KMS offers on its documentation and record the decision, the reason and the failover assumptions in your design document before creating the key.
How DeployOpen scopes and delivers Cloud KMS auto-unseal
DeployOpen plans, builds, tests and documents OpenBao auto-unseal with Google Cloud KMS inside your own Google Cloud projects and networks. Each engagement starts with a written scope that fixes the key location, the service account roles, the unseal path and the handover evidence before any configuration changes are made.
How we scope
- We confirm which Google Cloud projects, key rings and key locations your policies allow for the unseal key.
- We map the service account, IAM roles and workload identity path OpenBao nodes will use to call Cloud KMS.
- We record the failure cases to test, such as KMS unavailability, revoked permissions and node restarts, in the written scope.
How we build
- We deploy the OpenBao cluster configuration with the Google Cloud KMS seal and verify it on every node.
- We test initialization, restart and recovery paths so that unseal succeeds without manual key shares under normal operation.
- We check that the recovery keys, root token handling and audit logging match the design agreed during scoping.
How we hand over
- We deliver the configuration files, IAM bindings and key settings as documented artifacts in your repositories.
- We provide a runbook covering key rotation, permission changes, KMS outage response and a documented recovery procedure.
- We walk your platform and security teams through the test results so they can review the setup against their own controls.
How we support
- Engagements are fixed-scope, so changes after go-live are agreed as a written amendment before work starts.
- Ongoing upgrades, retesting after OpenBao releases and seal reviews are available as a retainer.
- Confirm with us during scoping which support hours, response channels and escalation paths your retainer would include.

