Skip to content

feat(security): RLS default-deny on all tables (closes #144)#7

Merged
PolGuixe merged 1 commit into
stagingfrom
feat/rls-hardening
Jun 5, 2026
Merged

feat(security): RLS default-deny on all tables (closes #144)#7
PolGuixe merged 1 commit into
stagingfrom
feat/rls-hardening

Conversation

@PolGuixe
Copy link
Copy Markdown
Member

@PolGuixe PolGuixe commented Jun 5, 2026

Migration 0002 (PIP-adapted). Enables RLS + revokes anon/authenticated grants → default-deny; service-role backend unaffected. Verified on staging: 27/27 tables RLS-on, PostgREST reads denied (401/403), backend APIs still work. Closes the upstream-willchen96#144 cross-tenant exposure gap. Per-row policies + user-JWT refactor deferred.

…n96#144)

Migration 0002, adapted from cpatpa/PIP's 0011_rls.sql to Supabase:
enable + force RLS on every public table and revoke grants from anon /
authenticated, with no policies → default-deny for the public key while
the service-role backend (BYPASSRLS) is unaffected.

Verified on staging: RLS on 27/27 tables; reading projects via PostgREST
returns 401 (anon) / 403 (authenticated user JWT); backend org APIs and the
signup/provisioning SECURITY DEFINER triggers keep working.

Safe because Mike's frontend never queries tables directly (auth-only) and
all data flows through the backend. Per-row policies + a service-role ->
user-JWT refactor (to also guard the backend path) remain deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PolGuixe PolGuixe merged commit e8f201e into staging Jun 5, 2026
5 checks passed
@PolGuixe PolGuixe deleted the feat/rls-hardening branch June 5, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant