Skip to content

Commit f6afbb1

Browse files
feat: add RLS Policy Playground API endpoints
Adds new API endpoints for simulating and debugging Row Level Security policies: - GET /rls-playground/roles - List available database roles - GET /rls-playground/tables?schema=X - List tables with RLS status - GET /rls-playground/policies/:schema/:table - Get policies for a table - GET /rls-playground/rls-status/:schema/:table - Check if RLS is enabled - POST /rls-playground/simulate - Run policy simulation with custom context - POST /rls-playground/evaluate-expression - Test single policy expression The simulation endpoint allows users to: - Set a database role (anon, authenticated, service_role, custom) - Provide JWT claims to simulate auth.jwt() - See which rows are accessible under the simulated context - Get policy-by-policy evaluation results for debugging All simulations run in rolled-back transactions for safety.
1 parent be1e9de commit f6afbb1

File tree

3 files changed

+680
-0
lines changed

3 files changed

+680
-0
lines changed

0 commit comments

Comments
 (0)