docs(rls): per-user isolation reference and decomposition for PMS-255 #185
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/pms-255-rls-isolation-plan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds
dev-docs/rls-per-user-isolation.md: the implementation reference for PMS-255 (per-user data isolation), plus the decomposition into nine runner-sized child issues (PMS-256 through PMS-264). No code change.Why
PMS-255 is an epic that the automated runner could not process as a single task. This doc supplies the ground-truth schema inventory and an ordered, explicit breakdown so each piece is independently executable.
Key findings (verified live against
migrations/*.sqlandsrc/on 2026-06-12)place_bunyip_userprovisions akind='personal'tenant per user, and the PMS-243/245 backfill re-homes non-admin users off the shared default tenantUuid::from_u128(1).024RLS policy is fail-open (matches all rows whenapp.current_tenantis unset), is set only inbegin_with_tenantwhich most read paths bypass, and isUSING-only (noWITH CHECK, so writes are unconstrained).tenant_id:tenants(root, by design),user_oauth_identities(cross-tenant unique-constraint collision),kb_article_versions,invoice_lines,rate_card_items,sla_targets.Resolved decisions
kind='personal'), reusing the existing tenant boundary; org tenants + teams come later.Open decisions flagged in the doc (to confirm before the affected child issue runs)
Child issues
PMS-256 (GUC plumbing), PMS-257 (fail-closed + WITH CHECK), PMS-258 (6 no-tenant_id tables), PMS-259 (per-user lookup seeding), PMS-260 (known leak points), PMS-261 (worker scoping), PMS-262 (single-tenant feature removal), PMS-263 (backfill), PMS-264 (isolation test suite).
🤖 Generated with Claude Code