How Flux keeps your data isolated from other tenants
Postgres RLS, security_invoker views, and audit-tested isolation.
Flux Team 3 April 2026 5 min
Multi-tenant data isolation at Flux
Every Flux customer (workspace) has their data fully isolated, enforced at the database level.
Mechanism
- Postgres Row Level Security (RLS) enabled on every table with
workspace_id - Each policy:
WHERE workspace_id IN (SELECT FROM workspace_members WHERE user_id = auth.uid()) - Views with
security_invoker = trueso they respect RLS too
Tested
April 28, 2026 audit: simulating Rafael@RFServeis querying directly:
- 12 leads of his own workspace ✅
- 0 leads from other workspaces ✅
- 0 records leaked through any view ✅
Why it matters
- Every customer is a separate "world" in the same database
- A bug in our app code can't leak cross-tenant data — the DB blocks it
- Audit log of every cross-tenant query attempt (none recorded since launch)
#security#rls#multitenant