Skip to content

Multi-tenancy isolation

Why multi-tenancy gets its own page

Cross-tenant data exposure is the most consequential failure an IAM platform can have: a bug that lets one tenant see another’s users is a data breach, not a defect. AtmanID therefore puts the boundary in the database, where a mistake in application code fails closed, and adds independent checks around it.

This page states what each control guarantees and what it does not cover. Implementation detail is available under NDA through the Trust page.

The controls at a glance

  1. Row-Level Security on every tenant table. A row is visible only to a request running for that row’s tenant, and the application’s database login cannot bypass it.
  2. A tenant context on every query. The tenant is set from the signed-in session for each query. A query with no tenant sees no tenant data.
  3. Iris queries built by the server. The AI assistant never writes SQL, and its queries run on a login that can read only curated, tenant-filtered views.
  4. Checks that stop regressions. Automated checks fail changes that weaken isolation, and a database canary probes every tenant table for cross-tenant access.

1 — Row-Level Security

PostgreSQL Row-Level Security attaches a policy to every query against a table. AtmanID’s policies compare each row’s tenant with the tenant recorded for the current request, so the database filters every read and every write — a request can neither see another tenant’s rows nor insert a row into another tenant. The application also filters by tenant in its own queries, as a second layer.

Two details make this hold:

  • The application cannot bypass the policies. It connects with a dedicated database login that has no permission to bypass Row-Level Security, separate from the login that changes the schema.
  • The policies also bind the tables’ owners. PostgreSQL normally exempts a table’s owner from its policies; AtmanID forces them on the owner as well. A small number of tables — five — are deliberately not forced, because they are written by tightly scoped database functions or must be read before a request’s tenant is known. The application login still cannot read across tenants in any of them, and an automated check fails any change that adds another.

2 — The tenant context on every query

The tenant comes from the signed-in session — never from the request body, the URL or anything else the browser supplies. Each query runs in its own short transaction that records the tenant first, so the setting cannot carry over to another request that reuses the same connection.

If a query ever ran without a tenant set, it would return no tenant data rather than all of it, and the application logs such queries so the gap is visible. Routes that serve signed-in users get the tenant context from shared authentication code, so an individual route cannot forget it.

3 — Iris queries

Iris answers data questions through a read-only tool that does not accept SQL. The model describes the question in a fixed structure — which curated view, which columns, filters and groupings — and the server checks every name against the view’s real columns before building the query itself. Nothing the model writes is executed as SQL.

Those queries run on a separate login that can read only the curated views, never the underlying tables, inside a read-only transaction with a time limit and with the tenant taken from the session. Results are checked again before they are returned, as a backstop; any blocked result is recorded in the audit log.

4 — Checks that stop regressions

  • Tenant context. An automated check fails a change that adds a database query outside a tenant context, other than in explicitly cross-tenant work such as a scheduled job that visits each tenant in turn.
  • Forced policies. An automated check fails a change that adds a tenant table without forced Row-Level Security.
  • Database canary. When the schema changes, and weekly, a database is built from the repository and every tenant table is probed as the application login: can it read, change, delete or insert another tenant’s rows, and is anything visible with no tenant set? The most recent run, on 2026-10-10, found no leak.
  • Adversarial Iris tests. Every change runs a library of cross-tenant attack patterns against the Iris query builder, including attempts to change the tenant from inside a question.

Data that is not per tenant

A small amount of data is deliberately global — the list of tenants itself, schema version tracking, and reference data shared by every tenant. Each table without a tenant is classified as global by design, scoped through a parent that does belong to a tenant, or reserved for a feature not yet in use, so that “no tenant” never means “forgotten.”

Some tables hold platform defaults alongside tenant rows — for example, a default MFA policy readable by every tenant — while each tenant’s own rows remain private to it.

What this design does not provide

  • Per-tenant encryption keys. Data at rest is encrypted by the database provider with platform-managed keys, not a key per tenant. Customer-managed keys are on the roadmap.
  • Network-level separation. All tenants share the same application and database. Isolation is enforced in the application and the database, not by separate infrastructure.
  • Complete per-tenant quotas. Some resources, such as agents and applications, have per-tenant quotas; others do not yet.
  • A self-service isolation test environment. Customers cannot currently test cross-tenant isolation themselves. Contact us if your review needs independent evidence.

Adjacent reading

© AtmanID · Privacy