Urgent.News

What's breaking now, across thousands of outlets.

Tech

Supabase RLS checklist: test row level security before real users

Why the browser key is not the problem Every Supabase app ships a key to the browser. Supabase describes the publishable key, and the legacy anon key it replaces, as safe to expose in a web page, a mobile app or source code. Anyone can read it, so it only reaches what Row Level Security allows. That makes RLS the thing that actually protects your data. Once RLS is enabled on a table, no data is…

Supabase's Row Level Security (RLS) is crucial for protecting data in your app. The publishable key and legacy anon key can be exposed and don't provide protection. The secret key, however, bypasses RLS and must be kept on your servers. Enable RLS on every table in an exposed schema and write policies tied to the logged in user.

Use auth.uid() in policies and wrap it in a select statement to avoid performance issues. Add indexes on filtered columns and enforce them on insert and update. Views bypass RLS by default, so create them with security_invoker = true on Postgres 15 or above. Security definer functions can bypass RLS, so set search_path to an empty string and use schema qualified names.

Store secrets in storage buckets and check for them in the frontend code. The Security Advisor in the Supabase dashboard scans your project for issues, and you can run tests locally with supabase db advisors. Add manual tests and CI tests to ensure your app stays secure after schema changes. Supabase also provides a GitHub Actions workflow for testing.

Remember, RLS only protects against API access, not server functions or webhooks. If your app handles sensitive data, consider a full production rebuild with a new stack and AI features.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How accurate is Google Maps' Ask Maps? It scored 49/100 on PlaceBench

Google Maps now answers questions in plain language through Ask Maps. It's fast. In PlaceBench, our test of six AI assistants on 150 everyday questions about real places, Ask Maps answered in a median…

  • Ask Maps scored 49/100 on PlaceBench evaluation
  • Grok Bot scored lowest with 49, faster response
  • Ask Maps answered 92/150 questions correctly

Agile brought us here: Knowledge-Centric Delivery and new ways of working with AI agents

Originally published on juliancardozo.github.io. Sprints, story points, velocity and daily standups form a management system designed to coordinate people who write code.

  • Knowledge-Centric Delivery prioritizes shared knowledge over code
  • AI agents lower implementation costs, knowledge becomes bottleneck
  • Rootstrap outlines practices, roles, metrics for implementation

More from Thursday 19 November →