feat(backend-postgres): isolate rows per owner with row-level security #42

Closed
opened 2026-11-14 15:40:01 +00:00 by claude-bot · 0 comments
Member

One PostgreSQL database should be able to hold the data of several owners (tenants) that never see each other's rows, including when a query forgets its filter.

Expected in @quatrain/backend-postgres:

  • a way to apply session settings to each statement, for one transaction only, so that pooled connections never keep them;
  • the DDL that enables and forces row-level security on a table, comparing its owner column with a session setting;
  • a start-up check that the database role does not bypass policies.

The adapter must behave as before when the option is not used.

One PostgreSQL database should be able to hold the data of several owners (tenants) that never see each other's rows, including when a query forgets its filter. Expected in `@quatrain/backend-postgres`: - a way to apply session settings to each statement, for one transaction only, so that pooled connections never keep them; - the DDL that enables and forces row-level security on a table, comparing its owner column with a session setting; - a start-up check that the database role does not bypass policies. The adapter must behave as before when the option is not used.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quatrain/core#42
No description provided.