By NHI Mgmt Group Editorial TeamPublished 2026-06-15Domain: Workload IdentitySource: WorkOS

TL;DR: Multi-tenant SaaS encryption at rest only protects data if the key boundary sits at the tenant layer, not the database layer, according to WorkOS. Cryptographic isolation turns application bugs into contained leaks instead of cross-tenant breaches, because each tenant’s ciphertext is wrapped by a different key boundary.


At a glance

What this is: This is a technical analysis of cryptographic key isolation in multi-tenant SaaS and the finding that encryption at rest is not enough when application-layer access still crosses tenant boundaries.

Why it matters: It matters because IAM, NHI, and application-security teams need controls that limit blast radius when auth logic, admin sessions, or service access fail.

👉 Read WorkOS's analysis of cryptographic key isolation in multi-tenant SaaS


Context

Cryptographic isolation in multi-tenant SaaS means each tenant's data is protected by a key boundary that other tenants cannot cross, even if the application layer leaks ciphertext. The primary identity and governance question is not whether data is encrypted, but whether the decryption path is scoped tightly enough to prevent one tenant or workload from reaching another tenant's plaintext.

Most teams stop at logical isolation, where tenant separation depends on query filters, schemas, or row-level security. That works only as long as the code and credentials stay correct. Once an admin session is compromised, an API is misconfigured, or a query bug slips through, the application boundary fails and the only remaining control is the cryptographic boundary.


Key questions

Q: How should security teams implement tenant-level key isolation in multi-tenant SaaS?

A: Start by making the tenant identifier the default encryption context, then ensure each context resolves to a separate key-encryption key. Keep application authorization in place, but design the cryptography so a database leak or query bug still cannot expose another tenant's plaintext. That combination limits blast radius when controls fail.

Q: Why does encryption at rest not prevent cross-tenant SaaS breaches?

A: Encryption at rest protects storage media, not the application paths that legitimately decrypt data. If a compromised session, admin bug, or misconfigured API can reach plaintext, encryption has already been bypassed at the trust boundary that matters. Tenant-scoped key isolation is what prevents a storage leak from becoming a cross-tenant breach.

Q: What breaks when all tenants share one encryption key?

A: A shared key makes every tenant's ciphertext part of the same blast radius. If that key is exposed, every object wrapped by it becomes decryptable, regardless of which tenant originally owned the data. That design turns one compromise into a platform-wide incident instead of a contained customer-specific event.

Q: What is the difference between logical isolation and cryptographic isolation?

A: Logical isolation depends on code, such as tenant IDs, schemas, or row-level policies, to keep records separated. Cryptographic isolation uses different keys so even leaked ciphertext remains unreadable outside the intended boundary. The first can fail through a bug or privileged session. The second still holds if the key separation is correct.


Technical breakdown

Logical isolation vs cryptographic isolation in SaaS

Logical isolation separates tenants in code, usually with tenant IDs, schemas, or application-level access rules. It is necessary, but it fails whenever an attacker reaches the database directly, abuses a privileged session, or triggers a query bug that bypasses the intended scope. Cryptographic isolation shifts the trust boundary to the key itself. If Tenant A and Tenant B use different key-encryption keys, ciphertext stolen from one context remains unreadable to the other, even when the application layer is wrong.

Practical implication: treat application scoping as one control layer and key isolation as the blast-radius limiter when that layer fails.

Envelope encryption, DEKs, and KEKs

Envelope encryption uses a short-lived data encryption key, or DEK, to encrypt the actual data, then wraps that DEK with a longer-lived key encryption key, or KEK. The data never relies on the KEK directly. This design matters because KEK rotation does not require re-encrypting every object, only re-wrapping the DEKs. It also means compromise of one DEK exposes only one object, while compromise of a KEK affects only the tenant or context bound to that KEK.

Practical implication: design rotation and revocation around KEK boundaries, not around re-encrypting entire datasets.

Key context as the tenant boundary

Key context is a declarative way to tell the key service which boundary applies to an object, such as organizationId or dataType. Each unique context maps to a separate KEK, so the system manages tenant separation without a manual key registry. That removes a common operational failure mode where teams skip rotation or mishandle mappings because the process is too brittle. The context becomes the durable identity of the encryption boundary, and the key service resolves the right KEK at read time.

Practical implication: use context to encode tenant and sensitivity boundaries consistently, then let the key service resolve decryption automatically.


NHI Mgmt Group analysis

Cryptographic isolation is the control that converts a tenant bug into a bounded incident. In multi-tenant SaaS, the failure is rarely that encryption is absent. The failure is that the key boundary sits too wide, so one broken authorization path can still expose every tenant's plaintext. The practitioner conclusion is simple: blast radius is a key-design problem, not only an access-control problem.

Single-key architectures create shared compromise by design. When one key protects the whole application, the compromise of that key becomes the compromise of the whole customer base. That is not a weak implementation of isolation. It is the absence of isolation. The implication is that teams should stop treating per-tenant keying as an optimization and start treating it as the baseline for credible tenancy boundaries.

Manual per-tenant key registries turn security into an operations tax. Once key-to-tenant mapping must be maintained by hand, rotation slows, revocation is delayed, and new tenants arrive with security debt already attached. That is where teams start cutting corners, and those corners become the breach path. The conclusion for governance teams is that scaling isolation requires eliminating the registry burden, not just documenting it.

Key context is a named pattern for identity blast radius management. It ties data access to a declared tenant or sensitivity boundary so that the decryption path can be derived without human intervention. This is the right abstraction for multi-tenant SaaS because it keeps encryption policy aligned to operational identity boundaries. Practitioners should see it as a discipline for limiting exposure, not as a convenience feature.

Authorization and cryptographic isolation solve different failure modes. A valid application session can still return plaintext, while ciphertext stolen from storage can remain unreadable. Those are distinct control planes, and one cannot substitute for the other. The implication is that identity governance for SaaS must coordinate API authorization, tenant scoping, and key separation as one containment model.

From our research:

  • 85% of organisations lack full visibility into third-party vendors connected via OAuth apps, with 38% reporting no or low visibility and 47% only partial visibility, according to The State of Non-Human Identity Security.
  • Only 1.5 out of 10 organisations are highly confident in their ability to secure NHIs, compared to nearly 1 in 4 for securing human identities.
  • For a broader governance lens, see NHI Lifecycle Management Guide for how lifecycle discipline reduces hidden access paths.

What this signals

Key context boundaries are becoming the practical control point for SaaS security. As tenant counts rise, teams need to know whether their encryption model actually prevents one customer from inheriting another customer's plaintext. The operational signal to watch is not only whether data is encrypted, but whether the key boundary is derived from identity context that can survive application mistakes.

This architecture also changes how teams should think about governance. When key context is declarative, the programme can align encryption boundaries with tenancy, data sensitivity, and delegated access without introducing a separate key registry that drifts out of sync.

With 1 in 4 organisations already investing in dedicated NHI security capabilities and 60% planning to do so within twelve months, per The State of Non-Human Identity Security, tenant-scoped identity boundaries are moving from design preference to governance expectation.


For practitioners

  • Define tenant-level key boundaries first Set organizationId or an equivalent tenant identifier as the default encryption context for every customer from day one, then extend it only when a second boundary such as data type is truly required.
  • Remove manual key registries Let the key service derive and resolve KEKs from stored context instead of maintaining a separate database mapping tenants to key IDs, because registry drift is an operational failure mode.
  • Separate regulated data into distinct contexts Use a second context dimension for sensitive classes such as PII, credentials, or payment data so regulated objects do not share the same key boundary as general application secrets.
  • Pair cryptographic isolation with API authorization Keep application-layer access checks in place, but design the encryption model so that a mistaken read path still cannot decrypt another tenant's data without the correct key boundary.

Key takeaways

  • Encryption at rest is not tenant isolation unless the decryption path is tenant-specific.
  • Shared keys create shared blast radius, while per-context keys contain failures to the intended customer or data class.
  • The strongest SaaS designs combine application authorization with cryptographic boundaries that still hold when logic fails.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0PR.AC-4Tenant-scoped access boundaries depend on least privilege and access enforcement.
NIST Zero Trust (SP 800-207)SC-13Cryptographic protection and boundary enforcement align with zero trust containment.
OWASP Non-Human Identity Top 10NHI-03Key isolation and rotation are central to non-human identity and secret governance.

Use tenant-specific key handling and rotation discipline to limit compromise impact across SaaS identities.


Key terms

  • Cryptographic Isolation: A security property where data is encrypted with keys whose decryption paths are separated by tenant, context, or sensitivity boundary. It prevents ciphertext from being readable outside the intended scope, even when application logic, database access, or administrative sessions fail.
  • Envelope Encryption: A two-layer encryption pattern that uses a short-lived data encryption key to protect the data and a longer-lived key encryption key to wrap that data key. It scales rotation, supports tenant separation, and keeps the primary key material out of direct data handling.
  • Key Context: A set of metadata values that tells a key service which encryption boundary applies to an object, such as tenant ID or data class. In practice, it lets the system derive the correct key without a manual registry, while keeping the boundary stable and auditable.
  • Blast Radius: The amount of data, access, or operational scope affected when a control fails or a credential is compromised. In SaaS encryption design, blast radius describes whether one broken key exposes one object, one tenant, or the entire customer base.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or operational governance in your organisation, it is worth exploring.

This post draws on content published by WorkOS: Cryptographic key isolation in multi-tenant SaaS. Read the original.

NHIMG Editorial Note
Published by the NHIMG editorial team on 2026-06-15.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org