supabase-grants-check: see who can reach your tables before the 30 Oct grants change #51529
Replies: 1 comment 2 replies
|
This is the right pre-flight for the date, and the service_role catch (your own backend, not just client reads) is the one that actually surprises people — most "Oct 30" write-ups only cover anon. One complementary check that pairs with it: the policy-side of the same change. Your file covers grants (who can reach the table); the other half is whether the policies those grants unlock are actually scoped. The class I find most in the wild: policies with a correct-looking predicate but no select tablename, policyname, roles
from pg_policies
where schemaname = 'public' and roles::text = '{public}';Every row is a policy the anon key can hit. Pairing your grants-check with this gives the full picture — grants answer "can they reach it," policies answer "what do they get once they do." (Policy side written up here, with the self-healing pattern for tables created after the date: https://dev.to/cekuu35/supabases-default-privileges-expose-every-new-table-heres-the-self-healing-fix-43jn ) Two additions worth folding into grants-check if you extend it:
The "changes nothing / read-only" guarantee is what makes this safe to run on production — good call shipping it that way. |
Uh oh!
There was an error while loading. Please reload this page.
On 30 Oct 2026 Supabase stops giving new public tables to anon, authenticated and service_role on existing projects. Old tables keep their grants. New ones are closed until you grant them, and the app gets 42501.
My server reads tables with the service role, so the next table I add after 30th would fail, and not just for my own backend but also for users.
So I wrote one SQL file you paste into the SQL editor. It only reads, it changes nothing. It gives back one table:
Each row has the exact line to paste if you decide to change something and nothing runs for you.
I myself have tested it on Postgres 18 with the 3 Supabase roles and it works fine.
https://github.com/lagudafuadtosin/supabase-grants-check
MIT, and pls tell me if something goes wrong, so I can fix it
All reactions