-
-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
To make RLS perform acceptably, I often make views with security definer and then filter the data with filters that use auth.uid() or auth.jwt() , or joins to other views that do. This performs drastically better than raw queries against RLS tables for us ( I am assuming because it will filter with optimizations as part of the whole query rather than a row-by-row if it is RLS).
For example, the following query is detected as a security error
create view profile_my with (security_barrier = true, security_invoker=off) as (
select p.* from profile p
where p.user_id = (select auth.uid()) and not p.deleted
);
Supabase treats errors as very serious in its communication via the weekly email, and there is no way to ignore them individually. So it makes these false positives frustrating to see permanently against the project.
djgrant
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working