Watch: Lock down my Supabase tables with RLS | Vovy

Watch Vovy do it on a Mac: "Check my Supabase tables and turn on Row Level Security the right way". Find tables with Row Level Security off, write policies so users only see their own rows, and test that strangers get nothing.

"Check my Supabase tables and turn on Row Level Security the right way"

Find tables with Row Level Security off, write policies so users only see their own rows, and test that strangers get nothing.

What happens in the video

  1. Scan for unprotected tables: Vovy opens Supabase's Security Advisor and lists every table where RLS is disabled. Anyone with your public key can read those.
  2. Explain RLS in one card: Row Level Security is a rule on each table saying who can see or change which rows. With RLS on and no policies, nobody gets anything.
  3. Draft policies per table: Vovy reads how your app uses each table and drafts policies, like "users can read rows where user_id equals auth.uid()". You review them in plain English.
  4. Turn on RLS and apply policies: Vovy asks, then enables RLS and adds the policies in one migration, so your app doesn't break between the two steps.
  5. Test as a stranger and as a user: Vovy queries each table as a logged-out visitor and as a test user, then shows a table of who can read and write what.
Read the step-by-step guide