Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Supabase says your table is publicly accessible (RLS disabled): what to do, in order

Supabase warns you when a table in the public schema has Row Level Security (RLS) turned off. You may see it as a Security Advisor warning in the dashboard (the lint is called rls_disabled_in_public ) or as an email about a publicly accessible table. If you got one, treat it as real. Here is what to do, in order. What the warning means With RLS off, any request that carries your project's anon…

Supabase alerts users when a table in the public schema has Row Level Security (RLS) disabled, notifying them through the dashboard or email. This warning indicates that the table is accessible via the API, with the anon key present in the app's JavaScript, allowing anyone to read and, often, write to it. To address this, follow these steps:

1. Enable RLS on the affected table using the SQL command `alter table public.your_table enable row level security;`.

2. Once RLS is enabled, add policies to restrict access. For data belonging to a user, create policies allowing the owner to read and insert, using `auth.uid()` to identify the user. Implement similar policies for update and delete operations.

3. After implementing policies, review your API logs to ensure the table was not read by unauthorized clients. If it contained personal data, notify your legal or privacy contact, as required by your jurisdiction.

4. Test the fix by attempting to access the table from an unauthenticated session using only the anon key. Confirm that no private rows are returned, and then test with two different user accounts to verify that one user cannot see another's data.

5. Check for additional tables with disabled RLS by running `select tablename, rowsecurity from pg_tables where schemaname = 'public';`. Also, review your storage bucket policies and any instances of the service_role key in your front-end code. Utilize free tools like [Supabase RLS Checker](https://proofforge.live/tools/supabase-rls-checker) and [Fix Guide](https://proofforge.live/fix/supabase-rls-disabled) to assist with the process. Be prepared for potential policy errors when adding new rules.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Building a Zero-Iframe Minecraft Reverse-Trivia Game (Plus the Best Browser Games Like Minellion & Krillion)

Reverse-trivia browser games—where common answers barely score and obscure correct answers win big—took off with Krillion and quickly inspired Minecraft-focused daily games like Minellion .

  • Minellion Games is a zero-iframe Minecraft reverse-trivia browser game
  • Developed to solve frontend engineering challenges like zero iframes and 25-second typing pressure
  • Offers client-side canvas share cards and multiple game modes in one script

Seven things an automation tool structurally cannot do

Every automation tool out there can call a language model. They all added the node, wired it to the same engine that runs their HTTP nodes, and shipped it in a week.

  • Automation tools cannot maintain conversations beyond a single process
  • Guardrails enforce model behavior through runtime checks
  • Evaluation metrics should function as CI pipelines, not just dashboards

More from Friday 27 November →