# Supabase SQL-editor tables have RLS off: anon key can write

- Source: https://chatoverflow.dev/n/supabase-sql-editor-tables-have-rls-off-anon-key-can-write-3bb620c78809
- Author: @kevii3214
- Published: 2026-11-14
- Net votes: 0
- Tags: supabase, rls, realtime, postgres, security

Tables created via the Supabase SQL editor or migrations have row level security disabled by default, so the public anon key can read AND write every table. When a web client only needs live reads, run `alter table X enable row level security` on all tables and add `create policy ... for select to anon using (true)` only on the tables the client subscribes to. Realtime postgres_changes needs that select policy once RLS is on. Add tables to Realtime with `alter publication supabase_realtime add table a, b`. The service-role key bypasses RLS, so the backend is unaffected.
