Image
Build
Connect & operate
Design & teams
Start hereScope a build in one callBring a spec, a wireframe, or a paragraph. You leave with an architecture, a timeline, and a number.Request a scoping call
AI software
LLM & data systems
Vibe coding
Ready to ship?Put AI where the work isAgents, RAG, and private LLMs wired into the systems your team already uses — not a chatbot bolted to a homepage.Discuss an AI project
Domain firstWe learn your workflow before we model itRegulated, operational, or high-volume — the constraints belong in the schema, not in a training doc.Talk about your domain
Samuel Edwards
Author
How to Ship Customer Managed Encryption Keys in Enterprise SaaS — featured image
11/26/2026

How to Ship Customer Managed Encryption Keys in Enterprise SaaS

How do you ship customer managed encryption keys for enterprise SaaS without rewriting the data layer? You wrap every tenant's data keys with a per-tenant KMS CMK, treat envelope encryption as the only write path, and expose rotation and revocation as tenant-owned operations.

The hard part is not AES. It is the governance surface around the key: who grants decrypt, how rotation propagates, what an auditor sees when a tenant revokes. AWS KMS is the implementation here, Postgres or DynamoDB behind it, a multi-tenant SaaS already in production.

What the Security Review Actually Asks For

Enterprise procurement teams have a checklist now. It is short and it is non-negotiable: the customer controls the key, can rotate it, can revoke it, and can prove it was used only when their data was accessed. GDPR Article 32 lists encryption as an appropriate technical measure, which gives legal a clean lever to insist on it. Real-world encryption coverage is thinner than most buyers assume, which is why CMEK has moved from "nice to have" to deal-gating. PCI DSS Requirement 3.7.4 wants a documented cryptoperiod per key, and NIST SP 800-57 recommends one to two years for symmetric encryption keys.

What the reviewer wants to see: a per-tenant KMS key under their control, a grant model the tenant can audit, envelope encryption for anything larger than a few kilobytes, and a revocation path that stops future decrypts within minutes. Everything else is implementation detail.

Share of Organizations Encrypting 80%+ of Cloud Data
Share of Organizations Encrypting 80%+ of Cloud DataEncrypt 80%+ of cloud data: 8%; Encrypt less than 80%: 92%Encrypt 80%+ of clo…8%Encrypt less than 8…92%
Only 8 of every 100 organizations encrypt most of their cloud data, which is why CMEK coverage has become a procurement checkpoint. Source: Thales Cloud Security Study, 2025

The KMS Wiring Underneath

One CMK per tenant, aliased by tenant ID. The alias (alias/tenant-acme-prod) is what application code references; the underlying key ID changes during rotation without application awareness. A KMS grant to the application role issues Decrypt and GenerateDataKey permissions scoped to that single CMK, which means a grant revoked by the tenant takes the application offline for that tenant inside of a minute.

Envelope encryption is not optional. AWS KMS caps direct Encrypt calls at a small per-request size, so the pattern is to call GenerateDataKey, encrypt bulk data locally with the plaintext DEK, store the wrapped DEK next to the ciphertext, and discard the plaintext DEK from memory. Caching the plaintext DEK for a short TTL, seconds to a few minutes, is how you keep KMS request counts and latency sane.

The data model matters. Add a kms_key_arn column at the tenant level, a dek_wrapped column at the ciphertext level, and a dek_version column so rotation can be lazy. Writing the key ARN with the record is what lets a strangler-fig migration work: new rows use the new key, old rows re-encrypt on next read. This is the same discipline that makes a multi-tenant SaaS with proper data isolation hold up under a security review.

A hardware security module card sliding into a server rack, warm lighting along the chassis.
Cloud Data Security Profile, 2025
Cloud Data Security Profile, 2025Cloud data classified sensitive: 54%; Encrypt 80%+ of cloud data: 8%; Cloud security a top-5 priority: 64%; Use 5+ KMS systems: 57%; Use 5+ discovery tools: 61%; Hit by access-based attacks: 68%Cloud data clas…Encrypt 80%+ of…Cloud security…Use 5+ KMS syst…Use 5+ discover…Hit by access-b…
A profile of where organizations are strong or weak on cloud data controls — low encryption coverage sits next to high access-attack exposure. Source: Thales Cloud Security Study, 2025

Accepting Imported Material or a Cross-Account CMK

Customers past a certain revenue threshold want to generate the key material themselves. AWS KMS supports two paths. The first is Import Key Material: the tenant creates a KMS key with EXTERNAL origin, downloads the wrapping public key, wraps their own AES-256 material with it, and uploads. The tenant can delete the key at any time, and that control is the reason for this path.

The second is cross-account. The tenant's KMS CMK lives in their own AWS account, and your application role is granted kms:Decrypt and kms:GenerateDataKey via a key policy statement on their side plus an IAM policy on yours. Use a stable role ARN per environment so the tenant's security team can write a policy they understand. Log the external account ID on every grant, every alias change, and every rotation.

External Key Store exists for the small set of customers who want key material in an on-prem HSM entirely outside AWS. It adds latency and operational burden. Take it only when a specific deal demands it, not as a default offering.

Rotation, Revocation, and the Audit Trail

AWS KMS automatic rotation runs on a defined cadence, with AWS-managed key rotation tightened substantially in 2022. For data that matters, expose a tenant-triggered on-demand rotation that generates a new DEK on every write and lazily re-wraps old DEKs on next read. Match the cryptoperiod the tenant's own policy declares, which is almost always between one and two years.

AWS KMS Key Rotation Periods, in Days
AWS KMS Key Rotation Periods, in DaysCustomer managed (default): 365 days; AWS managed before May 2022: 1,095 days; AWS managed after May 2022: 365 daysCustomer managed(default)365 daysAWS managed before May20221,095 daysAWS managed after May2022365 days
Customer-managed key automatic rotation defaults to one year, matching the tightened AWS-managed key cadence introduced in May 2022. Source: AWS KMS documentation, 2025

Revocation is where most implementations are thin. Revoking a grant stops new Decrypt calls quickly, but anything already decrypted and sitting in a cache or a logs pipeline is out of scope. Document the cache TTL in the security addendum, because the reviewer will ask. For harder revocation, the tenant disables or schedules deletion of their CMK; your reads start failing with AccessDeniedException, which is exactly what they want to prove to their board.

Every KMS API call lands in CloudTrail with the caller identity, the CMK, the encryption context, and the request time. Attach the tenant ID to the encryption context on every GenerateDataKey call. The reviewer will want to filter CloudTrail by their tenant ID, not by your service.

Performance, Cost, and the 4 KB Ceiling

The direct-Encrypt size limit is why envelope encryption exists; it is also why you cache DEKs. A hot write path calling GenerateDataKey on every insert will burn request budget and add 10 to 30 ms per operation. The pattern that holds up: a per-tenant DEK cache keyed by key ARN and version, short TTL, mandatory flush on rotation event, and a circuit breaker on KMS throttling errors.

Cost is predictable. A tenant with a thousand customers and a twenty-second DEK cache rarely crosses $50 per month in KMS fees. Fortune 500 security teams do not negotiate this line; it is below their noise floor. The budget pressure lives in the data layer refactor, not in KMS billing.

Default AWS KMS Request Rates by Operation
Default AWS KMS Request Rates by OperationSymmetric crypto (base regions): 10,000 rps; DescribeKey: 2,000 rps; Custom key store (shared): 1,800 rps; RSA crypto operations: 1,000 rps; CreateGrant: 50 rps; CreateKey: 5 rps10,000 rpsSymmetric crypto(base regions)DescribeKey2,000 rpsCustom key store(shared)1,800 rpsRSA cryptooperations1,000 rpsCreateGrant50 rpsCreateKey5 rps
Circles sized by default requests per second — crypto operations outrun management calls by three to four orders of magnitude, which is why DEK caching matters. Source: AWS KMS documentation, 2025

Where CMEK Sits in the Control Stack

CMEK is one control inside a broader tenant isolation story. Row-level security and tenant-scoped IAM live behind the key. SCIM provisioning controls who gets issued a role at all, and zero trust segmentation controls what that role can reach. Sell the key as a parameter the tenant owns; sell the rest as the surface around it.

The build is usually a two to four week effort for a team with clean service boundaries and a single data access layer. If encryption is scattered across the codebase, the cost is in the refactor, not the KMS calls. The honest estimate usually starts with an API architecture review that maps every call site touching encrypted fields before a single KMS alias is created.

The Number to Watch

Measure the time from a tenant revoking a grant to the last successful Decrypt in your logs. Under two minutes is what a serious security review will accept. Over ten minutes, and the control is theater: the DEK cache is too long, the audit lag is too wide, or the application is holding plaintext material it should not. Rotation schedules and FIPS validation get checked once a year by an auditor. Revocation latency gets checked during the deal, and it is the number that keeps a mid-market SaaS vendor from losing a Fortune 500 account to the vendor who already built it.

Author
Samuel Edwards
Samuel Edwards is the Chief Marketing Officer at DEV.co, SEO.co, and Marketer.co, where he oversees all aspects of brand strategy, performance marketing, and cross-channel campaign execution. With 15+ years of experience in digital advertising, SEO, and conversion optimization, Samuel leads a data-driven team focused on generating measurable growth for clients across industries. Samuel has helped scale marketing programs for startups, eCommerce brands, and enterprise-level organizations, developing full-funnel strategies that integrate content, paid media, SEO, and automation. He is a frequent speaker and contributor on digital trends, with work featured in Entrepreneur, Inc., and MarketingProfs. Based in the greater Orlando area, Samuel brings an analytical, ROI-focused approach to marketing leadership.