Isolation is not a convention

Every multi-tenant platform makes a promise: your data and my data never mix. The interesting question is where that promise is kept.

On most platforms, it is kept in the application code — a WHERE tenant_id = ? clause on every query, added by every developer, on every read and every write, forever. It works right up until the one query that forgot. And that query is not hypothetical; it is a matter of time.

Below the query

openbis.tech keeps the promise below the query. Every tenant's rows are fenced by row-level security in the database itself. The policy is evaluated by the database on every statement, whether the code above remembered to filter or not. A missing WHERE clause returns your own rows, never someone else's — because the rows that aren't yours were never visible to the statement in the first place.

The default is deny

When a read genuinely needs data that has no public row-level-security branch — an entitlement check, say — the platform makes a momentary, explicitly scoped hop and restores the prior scope in a finally block. Nothing stays open. The base state is always "see nothing."

Why it changes how you ship

When isolation is a convention, every code review carries a tax: did this query filter by tenant? Every new engineer has to internalise the rule before they can be trusted with a query. Every refactor is a chance to drop the clause.

When isolation is a property of the system, that tax disappears. You write the query you mean, and the database keeps the boundary. Reviews get faster because the scariest class of bug — the cross-tenant leak — cannot be written into a normal query at all.

That is the whole point of building isolation into the foundation instead of the habits: it lets you move quickly because you stopped having to be careful about the one thing you can never afford to get wrong.

What this looks like in practice

  • Tenants are fenced by row-level security — the boundary holds regardless

of the code above it.

  • Agents are governed the same way people are: an agent is a scoped session,

so it sees exactly what its permissions allow and nothing more.

  • The warehouse rolls analytics up across tenants without any single query

ever crossing a boundary, because the boundary is in the storage layer.

Isolation you have to remember is isolation you will eventually forget. Isolation the system enforces is isolation you can build on.