D4 — RLS roles
Architecture decision record, relocated verbatim from the retired single-file
docs/tenancy/decision log. Status, thematic clusters, and how to record a new ADR: the decision log index.
- Central role = the existing app role (
stableslocally) — keepsBYPASSRLS, owns the schema, runs migrations andphp artisan tenants:rls. - RLS role = dedicated login role with
NOBYPASSRLS, used only inside tenant context.- Username/password via
TENANCY_RLS_USERNAME/TENANCY_RLS_PASSWORD. - Local default:
stables_rls.
- Username/password via
- Local dev: provisioned by a Postgres init script (fresh volumes) + a
maketarget for existing volumes. Prod/staging: provisioned viastables-core-infra(out of this repo).