v2.0.0 is the release in which CYPEX becomes a multi-tenant PostgreSQL
application platform. Tenancy is a first-class object (Organizations),
isolation is enforced in the database (Row-Level Security), authorization
is two-dimensional (Capabilities × Data Scope), schema exposure is explicit
(Schema Access), identity can be federated (SSO Gateway), and outbound
integrations are governed (allowlist, credentials, enablement, audit).
Warning
This is not a drop-in patch. v2.0.0 changes the permission and tenancy model.
Read the Upgrade to v2.0.0
operator guide before planning a maintenance window, then the
Upgrading to v2.0.0
technical reference for the database detail.
RLS, role semantics, Schema Access, new service, route changes
Organizations
A CYPEX deployment can serve more than one tenant — an Organization — from
the same PostgreSQL database. Isolation is enforced by Row-Level Security in
the database, not by UI filtering.
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.
The single-tenant model (v1.x)
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.
Before you start assigning clients to organizations, walk through this
preparation checklist. The procedures on this page are the same shape as
the v2.0.0 pre-upgrade checklist, but
focused on the post-upgrade multi-tenant setup rather than the upgrade
itself.
1. Confirm the v2.0.0 upgrade is complete
The procedures here assume the v2.0.0 migrations have been applied. Verify:
This page is the mandatory upgrade entry point for CYPEX v2.0.0. It is
written for operators who run CYPEX in production
and need a single walkthrough that covers every breaking change in this
release.
Audience. Read this end-to-end before opening the maintenance window.
It links out to detailed pages for each topic; follow every link in
the order presented.
What is changing in v2.0.0
v2.0.0 introduces seven platform-level changes. Each one is breaking or
behavior-changing for at least one class of deployment.
CYPEX v2.0.0 introduces multi-tenant Organizations with PostgreSQL
Row-Level Security (RLS). Tenant isolation is enforced in the
database, not by application-layer filters that can be bypassed or
misconfigured. This is the most significant schema and permission-model
change since v1.0.0.
This section is the canonical place to plan, validate, and execute a v2.0.0
upgrade. It is written from the perspective of factual upgrade behavior:
what the migrations actually do, what is additive, what is breaking, and
what is behavior-changing.
An Organization is the unit of multi-tenancy in CYPEX. It is the data
boundary that decides which rows a user can see, insert, update, or delete.
Organizations are not an authorization system on their own. Capabilities —
what a user is allowed to do — come from PostgreSQL role grants. An
Organization adds a second, independent layer: a per-request data scope on top
of those capabilities.
This page is the conceptual reference. For the post-upgrade procedure for
assigning clients to organizations, see
Detailed organization setup.
This page lists the changes in CYPEX v2.0.0 that may require action on
the part of operators, integrators, or end users. These are the changes you
need to plan for during the upgrade.
1. cypex_user becomes SELECT-only on most tables
The cypex_user role loses INSERT, UPDATE, and DELETE privileges on
most tenant-scoped tables. After the upgrade, cypex_user is essentially
read-only on those tables, with the exceptions listed below.
The CYPEX permission model is two-dimensional. A request succeeds only
when both dimensions allow it:
Capabilities — what the user is allowed to do. Defined by PostgreSQL
role grants on queries, functions, and tables.
Data Scope — which rows the user is allowed to act on. Defined by
Organization membership and enforced by Row-Level Security policies that
read the request JWT.
The two are deliberately independent. Granting a capability and assigning an
organization are separate operations, and neither implies the other.
This page walks through the SQL primitives for enabling PostgreSQL
Row-Level Security on a CYPEX application-schema table and attaching the
baseline organization policy.
The v2.0.0 migration already enabled RLS on CYPEX core tables
(t_object, t_object_field, t_ui, etc.). This page is about enabling
RLS on client application-schema tables during the post-upgrade
multi-tenant setup.
Prefer the automated
client-add-organization-id SQL template
for bulk migrations. Use the primitives below when you need a single-table
or large-table (batched) path.
This is the hands-on companion to SSO (the architecture overview). It walks through adding a real provider, signing in through it, and approving the resulting user — using real screenshots captured against a Generic OIDC provider configured against Google, plus the JWT claim trace that applies to every provider identically.
Before you start
You need the Organizations administrator role for the target organization (or system admin).
The host running the SSO Gateway needs outbound HTTPS to the IdP’s discovery, authorization, token, and JWKS endpoints.
Register the CYPEX callback URL on the IdP side before you save the provider — the default is {app-origin}/auth/{providerType}/callback (e.g. http://localhost:4000/auth/oidc/callback in dev), and the gateway rejects a login whose stored callbackUrl doesn’t match the IdP’s registered redirect URI byte-for-byte.
Step 1 — Add a provider
Under Authentication → SSO Providers → Add provider: