immo-grant
Real-estate listings whose real subject is authorisation: every access rule lives in the PostgreSQL schema.
- 6 × 4profiles × operations
- 24named tests
- 53tests in total
The problem
An access rule written in the application can be bypassed as soon as another client talks to the database. Delegated mandates, which expire, are where that leak costs the most.
The approach
Every rule is declared in the schema as an RLS policy: none is reimplemented in the application. Recursion between policies goes through a SECURITY DEFINER function, and what WITH CHECK cannot express goes through column privileges.
The proof
A 24-cell authorisation matrix, each cell covered by a named test, run against the schema as applied in an in-process PostgreSQL (PGlite), without containers or external services.
