Database Encryption Key Management for Regulated Workloads

Auditors want proof of key control, and this shows how to build it.

· 9 min read
Cover illustration for “Database Encryption Key Management for Regulated Workloads”
Data Sovereignty · November 9, 2026 · 9 min read · 1,978 words

Database encryption key management for regulated workloads requires proof of control. Auditors need evidence of how keys are generated, accessed, rotated, revoked, and logged. Engineers can build that evidence without a dedicated cryptography team, but only if key management is part of the architecture.

Why encryption alone does not satisfy a compliance audit

“We encrypt everything” establishes that data is unreadable without a key, leaving who holds that key and who can use it as open questions for an auditor. Nor does it explain what happens when access is revoked. “We use AES-256” leaves the same questions unanswered.

The gap is between encryption and accountable control. HIPAA calls for documented key management procedures and retained audit records, while PCI-DSS v4.0 requires formal procedures and annual cryptographic review. SOC 2 Type II expects documented controls that are tested, monitored, and supported by evidence.

What the key lifecycle actually requires, framework by framework

HIPAA’s key management obligations extend beyond choosing an algorithm. Documented procedures and six-year audit log retention put operational records within the scope of the architecture. Retention therefore cannot be an afterthought in logging configuration. The team must be able to show how its controls operated.

PCI-DSS v4.0 requires strong cryptography for cardholder data and formal key management procedures. Requirement 12.3.3 calls for an annual review of the cryptographic cipher suites and protocols in use. That review needs evidence. A rotation schedule does not replace the review of what cryptography the system actually uses.

SOC 2 Type II auditors expect a written rotation policy, a rotation calendar, and evidence that the work happened when it was scheduled. KMS logs that show rotation events help build that record. Decommissioned keys also need records, with verification that the protected data was re-encrypted or destroyed. The policy and its execution are separate audit artifacts.

As of March 1, 2026, the CA/B Forum capped Code Signing Certificate validity at a maximum of 460 days. Renewal and redeployment must fit within that window. Certificate management belongs in the lifecycle plan even when a separate service handles it.

The envelope encryption pattern and why CMEK changes the compliance calculus

Envelope encryption separates data encryption from control of the keys. Data Encryption Keys, or DEKs, encrypt the data, while a Key Encryption Key, or KEK, encrypts those DEKs. The master key sits in a hardware security module, or HSM. This arrangement limits KMS API calls and allows KEK rotation by re-wrapping DEKs while leaving the underlying data unchanged.

Platform-managed keys are a reasonable baseline when the organization accepts the provider’s technical ability to access them. Customer-managed keys, or CMEK, change that relationship. SingleStore’s CMEK documentation describes a customer-supplied KEK that never leaves the customer’s cloud account and is never stored by the vendor. The analogy is a safety deposit box. The bank supplies the vault, but the customer controls the key.

That independent control is needed when regulations or contracts call for customer-controlled keys, sector rules require it, or enterprise contracts call for key sovereignty. It also supports GDPR Article 17 erasure obligations when cryptographic erasure is the chosen mechanism. But that power has an operational cost. SingleStore describes revocation as making wrapped DEKs permanently inaccessible, including to the vendor, so accidental revocation or deletion belongs in the runbook as a potential irrecoverable loss.

How to choose a key management architecture before writing any code

The first decision is the required deployment model. For a single-cloud estate, start with cloud-native KMS because service integration, IAM access controls, and native audit logging are already available. A dedicated purchase must improve on that baseline. But if compliance requires dedicated hardware custody, an HSM-backed model is needed before the team starts choosing products.

If keys are spread across clouds or business units, look at enterprise or hybrid key management. Separate accounts, acquired products, and independent encryption policies can fragment the audit trail. Central inventory and enforced rotation policies address that fragmentation. If the need also includes application credentials, dynamic secrets, and certificates, evaluate a secrets platform as a distinct layer from KMS.

Before putting rotation in place, map every service that calls each key and set up and test a rollback path. Dependency mapping is not optional operational housekeeping. Rotation without it is a common cause of production encryption failures. The architecture must explain not only who can change a key, but which services depend on that change succeeding.

Cloud-native key management on AWS, Azure, and GCP — where the defaults differ and why it matters

AWS KMS combines AWS service integrations with IAM-governed access and audit records from an AWS logging service. Automatic rotation is configurable from 90 days to 7 years. External Key Store and CloudHSM provide paths for stricter sovereignty requirements. Access review must look at account-scoped key policies and IAM together.

Azure Key Vault brings keys, secrets, and certificates into one service, with managed identities and either RBAC or legacy access policies. That breadth adds governance work across different object types. Standard Key Vault has a 7-day minimum rotation interval and no version cap. Managed HSM has a 28-day minimum and a 100-version-per-key cap, so the two tiers have different lifecycle constraints.

GCP Cloud KMS organizes keys into key rings and locations using standard IAM. Google Cloud’s default encryption uses Google-managed keys as part of the platform, separate from Cloud KMS. Cloud KMS supports configurable symmetric-key rotation and charges by key-version, unlike AWS’s per-customer-managed-key model.

These differences become more consequential across subscriptions, accounts, and teams. A regulated healthcare pattern on Azure places a tenant root wrapping key in Managed HSM, with workload CMKs in Premium Key Vault instances in each subscription wrapped by that root. Azure Policy automates rotation, while Microsoft Sentinel surfaces the activity.

When single-cloud KMS is not enough and how to centralize across a multi-cloud estate

Start native, centralize when keys sprawl, and use sovereign custody where regulations require it. Estate shape should drive the choice of tool. With more than one cloud-native store, teams may have to gather records from separate systems to give a consistent answer on compliance. Centralization addresses that governance problem rather than replacing native tools merely for uniformity.

Thales CipherTrust provides centralized lifecycle management, BYOK and HYOK orchestration, tokenization, and data discovery across clouds and datacenters. Its supported HSM backing includes Luna and other options. Fortanix Data Security Manager addresses a different boundary by running key management inside confidential-computing enclaves. That adds runtime protection where keys need protection even from the hosting infrastructure.

Jurisdiction and custody can narrow the choice further. Securosys offers Swiss-built HSMs and cloud HSM services that have roots in SIC banking infrastructure for programs that need to keep keys under Swiss law. Entrust nShield HSMs and Cryptographic Security Platform Key Manager, formerly KeyControl, address root-key ceremonies, code-signing custody, and compliance-focused key management.

Application-embedded encryption is a separate path through this decision. Ubiq offers client libraries, format-preserving options, and key management through an API. Its pricing is available upon request. This model fits teams that add encryption to application code rather than build a key governance layer across their infrastructure.

HashiCorp Vault, OpenBao, and the application secrets layer

Secrets platforms govern dynamic credentials, certificates, and application secrets as well as encryption keys. Their scope differs from a pure enterprise KMS. HashiCorp Vault 2.2, released October 2026, expands identity-based security for AI agents and non-human identities and automates more of the certificate lifecycle. It also adds target-side encryption for secrets pushed to AWS Secrets Manager and Google Cloud Secret Manager, plus TPM authentication for Linux workloads.

HCP Vault Secrets retirement requires attention from affected teams. HashiCorp retired that service as of July 1, 2026, directing customers toward HCP Vault Dedicated or Vault Community Edition. Migration changes the budget calculation as well as deployment choices. Teams must account for managed-tier pricing or the operational work of running the community option.

OpenBao is the fork governed by the Linux Foundation and an open-source security foundation, created after HashiCorp’s BUSL relicensing. Its v2.7 beta adds external key support for PKI and Transit through KMS plugins, as well as pure post-quantum TLS. A self-managed deployment still needs storage, unsealing, recovery, upgrades, monitoring, policy review, and incident procedures.

That work can justify a platform team’s ownership. It can also be excessive for a small application team managing a few stable vendor keys. Lyft’s Confidant illustrates a narrower application-layer approach, generating unique KMS data keys for every secret change and integrating with AWS KMS and DynamoDB.

What post-quantum readiness means for key management decisions made today

AWS Private CA made PQC certificates generally available in November 2025, while Microsoft Active Directory Certificate Services shipped generally available ML-DSA certificate issuance in May 2026. Vault 2.2 subsequently added native ML-DSA support to its PKI engine in October 2026.

The architecture needs to support ready changes to algorithms. Vault 2.2’s Transit crypto-agility feature allows algorithm updates without changing downstream key configuration. OpenBao’s ML-DSA support and v2.7 beta pure post-quantum TLS provide another concrete capability difference for open-source evaluations. Beta features and shipped support should remain distinct in that assessment.

A key inventory provides a practical starting point. Identify which keys protect long-lived regulated data and prioritize those for PQC migration planning. Algorithm flexibility now belongs among the criteria for choosing the key management layer.

Integrating key management into CI/CD without creating new vulnerabilities

Define KMS keys, rotation schedules, and access policies in Terraform or CloudFormation. Code review should cover encryption across data stores, while deployment pipelines can request DEKs when creating microservices or databases. This makes controls part of the release process instead of relying on individual developer discipline.

Pipeline runners should authenticate with short-lived tokens, retrieve secrets, and inject them as environment variables without persisting credentials in definitions or logs. Long-lived AWS IAM access keys, database passwords, code-signing private keys, and non-expiring API tokens do not belong in pipelines. The deployment path must keep the same access boundaries as the running application.

Elastic Load Balancing adds points where encryption and decryption take place, and a Web Application Firewall adds more, each of which needs certificate and key management. Manual request, issuance, and deployment steps slow that process. Automating the certificate lifecycle addresses the cause of the delay.

Regulated AI workloads need the same integration discipline. Vault can work with cloud KMS to manage keys protecting data at rest, keeping decryption behind key management controls even when a misconfigured AI system exposes encrypted data. The cost of a secret store also depends on how it is accessed. AWS Secrets Manager and GCP Secret Manager charge per secret, while Azure Key Vault charges per operation.

What compliance-ready key management looks like for a small engineering team without a cryptography specialist

Small teams need the right abstraction. Start with cloud-native KMS, enable CMEK for regulated workloads, define rotation schedules as infrastructure code, and route KMS audit logs into the existing observability stack. That creates the foundation for producing compliance evidence without custom tooling. The remaining work is ownership of the controls and their records.

The team still needs a written rotation policy, an execution calendar with evidence, a service-to-key dependency map, and a tested revocation runbook. No platform removes those responsibilities from the team. Dedicated sovereign HSM custody can wait until a specific regulatory or contractual requirement triggers it. Its per-cluster cost favors consolidation.

The same cost discipline applies to self-managed secrets platforms. No license fee does not mean no operating cost, because engineers still handle unsealing, backups, upgrades, and policy review. A managed platform can cost less than those engineering hours. A small team should weigh that trade-off before taking on another production system to maintain.

When production infrastructure runs in the team’s own account, CMEK revocation, audit logs, rotation schedules, and access policies stay within its control plane. Those controls are visible and auditable without depending on a vendor’s internal access policies. Shared-tenant infrastructure cannot offer the same ownership guarantee to an auditor.

Filed underData Sovereignty

More in Data Sovereignty