Conceptual overview
This page describes the multi-tenant Organizations model introduced in CYPEX v2.0.0 and why PostgreSQL Row-Level Security (RLS) is part of it.
Before v2.0.0, a CYPEX instance was effectively single-tenant:
- One database, one application schema, one set of users.
- Multi-tenancy was emulated at the application layer by filtering rows on a client identifier.
- PostgreSQL row-level security was not enabled on tenant-scoped tables.
This worked, but every enforcement decision lived in application code. A
single missing WHERE clause, an ad-hoc reporting query, or a hand-written
maintenance script could leak rows across tenants.