Securing Materialized Views
I'm new to materialized views (MV) and am trying to figure out how to lock them down. I understand I can't add RLS to the MV and found that a common practice is to:
and then create a role that will be granted SELECT privileges to the MVs:
then create a regular view that is basically a secure wrapper of the MV and grant it priviledges:
When I go to the supabase console and look at my_mv_secure, I don't see any rows. I want to confirm i'm doing this correctly/securely and the reason I don't see them in the console is because their is no auth.uid() set?
and then create a role that will be granted SELECT privileges to the MVs:
then create a regular view that is basically a secure wrapper of the MV and grant it priviledges:
When I go to the supabase console and look at my_mv_secure, I don't see any rows. I want to confirm i'm doing this correctly/securely and the reason I don't see them in the console is because their is no auth.uid() set?