Supabase's Oct 30 change: new tables aren't exposed automatically
Updated November 12, 2026. Supabase's scheduled October 30 rollout date for existing projects has passed.
On October 30, 2026, existing Supabase projects stop exposing new public tables to the Data API. A missing GRANT returns error 42501. Copy-paste fix.
Check what your anon key can read
This check counts the rows your anon key can see, from your browser. It does not detect the October 30 grant change. For that, run the two read-only Am I affected queries.
Only test projects you own or are authorized to test. The anon key is never sent to ShipSecurely. It is never sent to our servers. Supabase receives it. We do not receive it, log it, or store it. What this check sends.
By ShipSecurely Editorial · Updated · How we make these guides
Citing this? Copy the link
Last updated
Markdown
[Supabase Data API grants after Oct 30 (ShipSecurely)](https://shipsecurely.dev/issues/supabase-data-api-grants)
HTML
<a href="https://shipsecurely.dev/issues/supabase-data-api-grants">Supabase Data API grants after Oct 30 (ShipSecurely)</a>
Shows up in: Supabase, Postgres
What it is
Supabase's changelog, Tables not exposed to Data and GraphQL API automatically, was published April 28, 2026. From that day, a new project can be created so tables in the public schema are not exposed to the Data API or the GraphQL API until you grant a role access. On May 30, 2026 that setting starts to become the default for new projects, rolled out over a few weeks. On October 30, 2026 it is enforced on existing projects. The same post says that on May 18, 2026, pg_graphql will not be enabled by default.
What changes on October 30
Each line quotes the Supabase changelog.
- Existing tables keep their grants. "Existing tables are not affected in your project, they keep their current grants and stay reachable." (changelog)
- New tables in
publicneed an explicit grant. "Once the change is rolled out to your project, new tables you create inpublicschema require an explicit opt-in (via a Postgresgrant) before the Data API can see them." (changelog) - A missing grant is error 42501. "If a grant is missing, PostgREST returns a clear error rather than a silent failure", with
"code": "42501"and the messagepermission denied for table your_table. The full response is below. (changelog) - Row level security does not change. "RLS behavior remains unchanged." (changelog)
- Direct Postgres connections are not affected. "If your app reads and writes Postgres over a direct connection (via psql, ORM or an app server with a connection string), this change will not affect you." (changelog)
- Storage, auth, realtime, and custom schemas are not affected. The changelog FAQ says "Tables in
storage,auth,realtime, and any custom schemas you expose via the Data API keep their current grants and their current defaults." (changelog)
The changelog's missing-grant response:
{
"code": "42501",
"message": "permission denied for table your_table",
"hint": "Grant the required privileges to the current role with: GRANT SELECT ON public.your_table TO anon;"
}
Since the change
October 30, 2026 has passed. Supabase scheduled enforcement on existing projects for that date; the changelog does not confirm completion for every project. Once the change reaches a project, new tables in public need explicit grants for Data API and GraphQL API access. Existing tables keep their grants. Our advice: check your project's default privileges rather than assuming the rollout has reached it.
The short fix, which grants authenticated first and adds anon only for a public read, is Oct 30: what broke, and the 2-minute fix.
Does a Supabase grant replace row level security?
No.
Securing your API says grants determine which roles can reach a table over the Data API, row level security policies determine which rows those roles can read or modify, and you use both for every exposed object. The Row Level Security guide says adding policies doesn't take grants back: a table protected only by policies still hands anon an insert path if you never revoke the grant.
-- 1. Grants: which roles can reach the table over the Data API
revoke all on table public.your_table from anon, authenticated;
grant select on table public.your_table to authenticated;
-- 2. Enable row level security
alter table public.your_table enable row level security;
-- 3. Policies: which rows each role can read or change
create policy "Users can view their own rows"
on public.your_table for select
to authenticated
using ( (select auth.uid()) = user_id );
The changelog lists the same three steps (grant, enable row level security, add policies) and says to treat them as a unit. The Row Level Security guide also revokes existing grants from anon and authenticated before granting back only what each role needs, and puts the grants and row level security in the same migration. The policy assumes a user_id column. The guide writes (select auth.uid()) so Postgres can cache the result per statement instead of calling the function on each row, and to authenticated so the policy does not run for anon. Add one policy per command you grant. Insert policies use with check, and update policies use using and with check.
Once the changelog's setting is on for a project, a new table in public needs an explicit Postgres grant before the Data API can see it. Existing tables keep the grants they already have and stay reachable. The change applies to the Data API, which the changelog describes as Supabase's auto-generated REST and GraphQL layer, the one supabase-js and the other client libraries call, including HTTP to /rest/v1/ or /graphql/v1. A direct Postgres connection, through psql, an ORM, or an app server with a connection string, is outside this change.
The project-creation checkbox is named "Automatically expose new tables" in the "what's changing" section, and "Automatically expose new tables and functions" where the changelog lists the three dates. Unchecking it opts in to the new behavior. On May 30, 2026 that opt-out becomes the default for new projects.
Before this change, a new Supabase project granted select, insert, update, and delete on every table in public to anon, authenticated, and service_role, so a new table showed up in the client as soon as it was created. Securing your API says that on existing projects, tables created in public receive those four privileges for those roles, and functions receive EXECUTE. It also says those default privileges do not bypass row level security, and that the internal supabase_admin role grants them and cannot authenticate through the Data API.
Grants and row level security are separate. A grant decides whether a role can touch the table at all. Row level security decides which rows that role can see. If the grant is missing, Postgres rejects the query before any policy runs. PostgREST then returns this JSON. The 42501 troubleshooting page says Postgres 42501 errors are often reported by clients as HTTP 401 or 403:
{
"code": "42501",
"message": "permission denied for table your_table",
"hint": "Grant the required privileges to the current role with: GRANT SELECT ON public.your_table TO anon;"
}
The hint names the role that is missing the privilege, and the GRANT for that role. In the sample the role is anon, because that is the role the example request used. It is the grant for the current role, not a requirement that every table be opened to anon.
The API keys guide maps the keys to Postgres roles. A publishable key with nobody signed in is anon. A publishable key with a signed-in user is authenticated. A secret key is service_role. anon and service_role are the legacy keys, and that guide says Supabase is deprecating them by the end of 2026. service_role has BYPASSRLS, so policies never apply to a secret key, and a missing grant is still a permission error for service_role. Postgres checks the grant first. A SELECT filtered out by RLS returns no rows. An INSERT or UPDATE rejected by an RLS WITH CHECK policy can return 42501. A secret key does not work in a browser: Supabase matches the User-Agent header and returns HTTP 401.
An earlier Data API change is a different break. Removing access to the OpenAPI spec via the anon key, published February 17, 2026, stops the anon key from reading the OpenAPI spec at https://[projectref].supabase.co/rest/v1/. The error is Access to schema is forbidden, with the hint that schema access is allowed only with a secret API key. The service role key and the secret API keys still work. That post says this does not affect normal Data API usage: /rest/v1/your_table and client libraries keep working. Its timeline sets March 11, 2026 for newly created projects and April 8, 2026 for existing projects, and says those dates may be pushed back and will not be moved forward. It says that less than 0.1% of projects had requested that endpoint with the anon key in the last 24 hours, as of that post. A March 23, 2026 update on that post says there is a Management API endpoint for the CLI and third party integration that only requires the "Read-only project database access" permission. The October 30 changelog lists the March schema enumeration restriction as an earlier change in that series.
The changelog schedules enforcement on existing projects for October 30, 2026 and says existing tables retain their grants. Its communications plan covers Security Advisor notices through October 30 and emails to owners and admins of every active project, including projects with no flagged tables. The final email is scheduled for October 23, 2026. These dates do not independently confirm rollout completion or delivery of every notice.
To see whether the anon key can already read a row, use the Supabase exposure checker. It runs in your browser. The checker does not cover the October 30 grant change. A 401, 403, or Postgres 42501 from that check is inconclusive. The grant SQL is on this page. A missing grant is a different failure from a row hidden by a policy, which is covered in Supabase tables without row level security.
If you use an AI coding tool
The October 30 changelog says you need to act when an AI coding tool, a CLI script, or a Management API call creates tables in public and expects them to be reachable over the Data API on creation. The same post says that without a grant, the API cannot see the table no matter how it was created, and it names an AI coding tool as one of those paths. A direct Postgres connection is outside the change. This section does not count apps. To confirm what a coding agent changed, see Check your coding agent's security work.
Grants and row level security stay separate. Securing your API says a grant decides whether a role can touch the table, and row level security decides which rows. If the grant is missing, Postgres rejects the query before a policy runs. The 42501 troubleshooting page says clients often report that Postgres error as HTTP 401 or 403.
Do not clear a 42501 by granting every command to anon while row level security is off. Securing your API says a table or view exposed through the Data API without row level security can be accessed by any role with a matching grant.
The API keys guide is the other source already on this page. A publishable key with nobody signed in is anon. A publishable key with a signed-in user is authenticated. A secret key is service_role. The February 17, 2026 OpenAPI changelog is a different break, described above, and it is not this check.
The statement below is a read-only select for the SQL editor on a project you own. It is a partial inventory of ordinary and partitioned tables in the schemas this query can treat as exposed, with each table's anon and authenticated grants and whether row level security is enabled. Using custom schemas says public is exposed on the Data API by default, and that another schema is exposed only after you add it under Exposed schemas. The PGRST106 page says PostgREST uses the authenticator role's pgrst.db_schemas setting to decide which schemas to expose when that setting is present, and that resetting the setting hands the list back to the dashboard. PostgREST configuration says alter role authenticator in database ... set pgrst.db_schemas overrides the role-wide setting. PostgreSQL stores that database-specific value in pg_db_role_setting, and the role-wide value on pg_roles.rolconfig. This select reads the current database's row first, then rolconfig. A surrounding pair of double quotes is removed from each schema name so a quoted name can match pg_namespace. An empty setting, or one that names no schema after that, uses public. When neither setting is stored, it also uses public. A schema you exposed only in the dashboard, and did not store on the role, is still missing. That is one reason the inventory is partial.
The 42501 page shows information_schema.role_table_grants for one table. PostgreSQL privileges say a grant to PUBLIC applies to every role, so that grant is not a row whose grantee is anon or authenticated. This statement uses has_table_privilege, which reports whether the named role holds the privilege. It does not list the grantee. rls_enabled is pg_class.relrowsecurity, which PostgreSQL defines as true when row-level security is enabled. Securing your API's enable row level security is the statement that turns that flag on. Those Supabase pages do not print this statement. relkind r is an ordinary table. relkind p is a partitioned table.
-- Partial inventory. Read-only select for the SQL editor on a project you own.
with db_setting as (
select u.setting
from pg_db_role_setting s
join pg_roles r on r.oid = s.setrole
cross join lateral unnest(coalesce(s.setconfig, array[]::text[])) as u(setting)
where r.rolname = 'authenticator'
and s.setdatabase = (select oid from pg_database where datname = current_database())
and u.setting like 'pgrst.db_schemas=%'
limit 1
),
role_setting as (
select u.setting
from pg_roles r
cross join lateral unnest(coalesce(r.rolconfig, array[]::text[])) as u(setting)
where r.rolname = 'authenticator'
and u.setting like 'pgrst.db_schemas=%'
limit 1
),
chosen as (
select coalesce(
(select setting from db_setting),
(select setting from role_setting)
) as setting
),
raw as (
select nullif(
btrim(coalesce(substring(setting from 'pgrst\.db_schemas=(.*)$'), '')),
''
) as raw_schemas
from chosen
),
parsed as (
select btrim(btrim(part), '"') as schema_name
from raw
cross join lateral unnest(string_to_array(raw_schemas, ',')) as part
where raw_schemas is not null
),
exposed as (
select schema_name
from parsed
where schema_name <> ''
union all
select 'public'
where not exists (select 1 from parsed where schema_name <> '')
)
select
n.nspname as schema_name,
c.relname as table_name,
c.relkind,
c.relrowsecurity as rls_enabled,
has_table_privilege('anon', c.oid, 'SELECT') as anon_select,
has_table_privilege('anon', c.oid, 'INSERT') as anon_insert,
has_table_privilege('anon', c.oid, 'UPDATE') as anon_update,
has_table_privilege('anon', c.oid, 'DELETE') as anon_delete,
has_table_privilege('authenticated', c.oid, 'SELECT') as authenticated_select,
has_table_privilege('authenticated', c.oid, 'INSERT') as authenticated_insert,
has_table_privilege('authenticated', c.oid, 'UPDATE') as authenticated_update,
has_table_privilege('authenticated', c.oid, 'DELETE') as authenticated_delete
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
join exposed e on e.schema_name = n.nspname
where c.relkind in ('r', 'p')
order by schema_name, table_name;
A row is an ordinary table (r) or a partitioned table (p) in a schema this query treated as exposed. rls_enabled is whether row level security is on. Each anon_* and authenticated_* column is one of SELECT, INSERT, UPDATE, or DELETE. Any one of those counts as a grant for that command. A service_role grant alone does not remove the row. A server-only table that is supposed to have no anon or authenticated grant still appears, as a row to review, not as a bug by itself. A row with rls_enabled false and an anon or authenticated table grant true is the case Securing your API describes: a table exposed through the Data API without row level security can be accessed by any role with a matching grant. That reach also needs USAGE on the schema. PostgreSQL privileges say schema USAGE is what lets a role access objects in the schema, and Using custom schemas grants USAGE before the table grants. A table grant in a schema where the role lacks USAGE is not reachable.
This partial inventory misses:
- Views (
relkindv) and materialized views (relkindm). Securing your API says a view on the Data API without row level security can be accessed by any role with a matching grant. This select does not list them. To check your views, see Do Supabase views bypass RLS?. - Child partitions. A parent (
relkindp) and a child both appear. The parent/child relationship is not shown.pg_class.relispartitionmarks a partition, and this select does not return that flag. - Column privileges.
GRANTcan giveSELECTon one column without a tableSELECT.has_table_privilegereports the table privilege, sogrant select (id) on table ... to anonleavesanon_selectfalse even thoughanoncan read that column. This select does not list column privileges. - Policies.
relrowsecuritydoes not include the policy expression.using (true), or no policy, is not distinguished. - Functions, sequences, and schemas this select did not treat as exposed. A dashboard Exposed schemas list that is not stored on
authenticatoris in that group. - How the privilege was granted.
has_table_privilegereports whether the role holds it. It does not say whether the grant was direct, toPUBLIC, or through another role. - The February 17, 2026 OpenAPI restriction. That change is not a row in this result.
A publishable key in a VITE_ or NEXT_PUBLIC_ name is a separate check, in Public env vars, the Supabase anon key, and row level security.
How to check in 5 minutes
Open the migration or SQL that created the new table. If it enables row level security and adds policies, but has no
grantfor the role the app uses, Securing your API says the table is not reachable through the Data API. The missing-grant JSON code is42501.In the dashboard, open Integrations, then Data API. The 42501 troubleshooting page says privileges can be changed on that screen or with SQL, and it shows
select grantee, privilege_type from information_schema.role_table_grants where table_name = 'your_table';.Call the table with the publishable key. With no user session that key is the
anonrole, and with a session it isauthenticated, per the API keys guide.permission denied for tablewith code42501is a missing table privilege. That troubleshooting page also lists other 42501 causes: theauthorvaultschema, a custom schema the Data API cannot query, and a column privilege (includingselect *). A SELECT filtered out by RLS returns no rows, which is not the missing-grant error. An INSERT or UPDATE rejected by an RLS WITH CHECK policy can return 42501.Confirm the app uses the Data API (
supabase-js,/rest/v1/, or/graphql/v1). A direct database connection is outside the October 30 change. A call to the bare/rest/v1/OpenAPI spec with the anon key is the February 17, 2026 change, and that post says/rest/v1/your_tableand client libraries are unaffected by it.
How to fix
Supabase
Put the grant, row level security, and the policies in the same migration. The changelog says to treat those three steps as a unit. Its example grants select to anon, and select, insert, update, and delete to authenticated and service_role, then enables row level security and adds one select policy. That anon grant is not the grant for every table. Securing your API says to grant the minimum privileges each role needs, and the changelog says anon and authenticated need different privileges in most schemas. The sample below leads with authenticated. That order is ours, so a reader does not copy the changelog's anon line as a universal fix. Add the anon block only for a table signed-out visitors should read, and only with row level security. The same split is in Oct 30: what broke, and the 2-minute fix. The guide How do I add Supabase Data API grants to my migrations? shows where each role's grant goes in the migration that creates the table.
-- 1. Grant signed-in users and server code. Skip anon unless the next block applies.
grant select, insert, update, delete on public.your_table to authenticated;
grant select, insert, update, delete on public.your_table to service_role;
-- 2. Enable RLS
alter table public.your_table enable row level security;
-- 3. Add the policies you need
create policy "users can read their own rows"
on public.your_table
for select
to authenticated
using (auth.uid() = user_id);
Only for a table that signed-out visitors should read, and only together with a select policy for anon:
grant select on public.your_table to anon;
create policy "anyone can read public rows"
on public.your_table
for select
to anon
using (true);
The first block is ours. It assumes a user_id column. The changelog's example is the one that grants select to anon first. Securing your API says tables created in the Dashboard have row level security enabled by default, and tables created in the SQL editor or another tool need enable row level security in SQL. It also says tables and views exposed through the Data API without row level security can be accessed by any role that has a matching grant, and that row level security does not apply to functions, so EXECUTE goes only to roles that should call the function. The same guide's function example is:
grant execute on function public.your_function() to anon, authenticated;
The 42501 page says granting a privilege lets the Data API reach the table, so enable row level security and write the policies. Add insert, update, and delete policies when those commands are granted. An insert or update policy needs with check. Repeat the request as the role you granted and confirm the 42501 is gone.
The scheduled October 30, 2026 rollout date has passed. The changelog also provides revoke statements for adopting the new default on an existing project. Our advice: check your project's default privileges before deciding whether those statements are needed. The SQL block contains two statements, although the following sentence calls them four. They affect future tables and sequences created by postgres in public; existing objects retain their grants.
alter default privileges for role postgres in schema public
revoke select, insert, update, delete on tables from anon, authenticated, service_role;
alter default privileges for role postgres in schema public
revoke usage, select on sequences from anon, authenticated, service_role;
Securing your API goes further. Its Revoke default privileges section says to run these statements in the SQL Editor. They revoke all default privileges on new tables, sequences, and functions in public from anon, authenticated, and service_role, and default execute on functions from public:
alter default privileges for role postgres in schema public
revoke all on tables from anon, authenticated, service_role;
alter default privileges for role postgres in schema public
revoke all on sequences from anon, authenticated, service_role;
alter default privileges for role postgres in schema public
revoke all on functions from anon, authenticated, service_role;
alter default privileges for role postgres
revoke execute on functions from public;
After that, it says new tables, sequences, and functions require explicit grants before Data API roles can access them. It also cautions that the last statement restricts functions postgres creates in other schemas, such as helper functions your row level security policies call. Grant execute on each of those to the roles that call them, or the policies that use them fail.
Can anyone call your Supabase functions? explains why the last statement has no in schema, and how to find and revoke execute on the functions you already have.
alter default privileges affects future objects only. To take an existing table off the Data API, the changelog shows revoke all on table public.your_table from anon, authenticated, service_role;. The Data API exposure badge in the Table Editor and Security Advisor list tables to review.
If you opted in, created tables, and need the old behavior back, the changelog's rollback is two blocks. The first restores future defaults:
alter default privileges for role postgres in schema public
grant select, insert, update, delete on tables to anon, authenticated, service_role;
alter default privileges for role postgres in schema public
grant usage, select on sequences to anon, authenticated, service_role;
The second grants tables and sequences created since the revoke:
grant select, insert, update, delete on all tables in schema public to anon, authenticated, service_role;
grant usage, select on all sequences in schema public to anon, authenticated, service_role;
The changelog says that after both blocks the project matches the pre-revoke state, and that a table you want to keep private should be revoked individually afterward: revoke all on table public.your_private_table from anon, authenticated, service_role;. That holds after the changelog's own two statements, because the blocks grant back what they revoked: select, insert, update, and delete on tables and usage and select on sequences. After the four statements in Securing your API, the same blocks restore less. That page's default privileges table also lists truncate, references, trigger, and maintain, where supported, on new tables, update on new sequences, and execute on new functions, and the revoke all statements remove them. The rollback grants none of these back. It also has no statement for functions, so new functions stay without execute for anon, authenticated, service_role, and PUBLIC.
If the app never uses Supabase client libraries, REST, or GraphQL data endpoints, Securing your API says you can turn Enable Data API off in the Data API integration overview. With the Data API disabled, none of the auto-generated REST endpoints respond, regardless of grants or row level security.
Do not "fix" a 42501 by granting every command to anon while row level security is off. Securing your API says a table or view exposed through the Data API without row level security can be accessed by any role with a matching grant. That is the failure in Supabase tables without row level security.
Next.js
The changelog says a Next.js app is in scope when it reads or writes public through supabase-js or HTTP to /rest/v1/ or /graphql/v1, and out of scope when it uses a direct Postgres connection string. The missing grant is SQL. Changing a route does not add it. The API keys guide shows the publishable key in client code under a NEXT_PUBLIC_ name, and says the secret key must not use that prefix. A browser call with the publishable key needs a grant for anon or authenticated. Server code that uses the secret key still needs a grant for service_role, that role bypasses row level security, and the key stays off the client. A secret key in the browser gets HTTP 401.
Copy the fix prompt
Paste this into Cursor, Lovable, Bolt, or Claude Code. Read the diff before you merge it.
You are fixing Data API access for a new Supabase table. Do not add features. Do not print row contents. Supabase scheduled enforcement on existing projects for October 30, 2026. That date has passed, but the changelog does not confirm completion for every project. Check the project's default privileges. Once the new default applies, a new table in public needs a role grant for Data API or GraphQL access; existing tables retain their grants. Row level security does not run when the grant is missing. A missing grant is PostgREST code 42501 and the message "permission denied for table". Clients often report that as HTTP 401 or 403. The hint names the role that lacks the privilege. Do not grant anon only because the sample hint says anon. The February 17, 2026 change is separate. It blocks the anon key from the OpenAPI spec at /rest/v1/. It does not change /rest/v1/your_table or client libraries. Do this in the same migration: 1. Grant only the commands the role needs. The changelog example grants select to anon, and select, insert, update, delete to authenticated and to service_role. Skip anon when anonymous clients should not reach the table. 2. Enable row level security. Add a policy per command. The changelog example is a select policy for authenticated with using (auth.uid() = user_id). Insert and update policies need with check. 3. service_role bypasses row level security and still needs the table grant. Keep the secret key on the server. A secret key does not work in the browser. 4. If default privileges were revoked, new functions need execute for the roles that should call them, and new sequences need usage and select. Row level security does not apply to functions. Do not GRANT ALL to anon. Do not turn row level security off. A missing grant is a permission error. A SELECT filtered out by RLS returns no rows. Do not treat that empty result as a missing grant. An INSERT or UPDATE rejected by an RLS WITH CHECK policy can return 42501. Show the SQL. Then say how to confirm the 42501 is gone for the role that should have access, and that a request with no session still cannot read another user's row when anon was not granted access.
Questions
Does a Supabase grant replace row level security?
No. Securing your API says grants determine which roles can reach a table over the Data API, and row level security policies determine which rows those roles can read or modify. Use both for every exposed table. The Row Level Security guide says adding policies doesn't take grants back, so revoke the grants a role should not have, grant back only what it needs, enable row level security, and add a policy per command, in the same migration.
Do I have to re-grant every table I already have?
No. The changelog says existing tables keep their grants and stay reachable. The new default affects tables created after it applies to the project. October 30, 2026 was the scheduled enforcement date for existing projects, not independent confirmation that every project has received the rollout. Our advice: check your project's default privileges.
Why do my policies exist and the API still says permission denied?
A policy answers which rows. A grant answers whether the role can touch the table. Postgres checks the grant first, including for service_role. Code 42501 with permission denied for table is the missing table privilege. A SELECT filtered out by RLS returns no rows. An INSERT or UPDATE rejected by an RLS WITH CHECK policy can return 42501. The 42501 troubleshooting page also says a column privilege can return 42501, including for select *.
Does this affect storage, auth, or custom schemas?
The October 30 changelog says no for the default-privilege change. It touches public only. Tables in storage, auth, realtime, and custom schemas keep their current grants and their current defaults. A 42501 from auth or vault is a different case: the troubleshooting page says API roles cannot access those schemas. A custom schema still needs permission for the Data API to query it, which that page states separately from this default change.
Does the OpenAPI change block reads of my table?
No. Changelog 42949 says the anon key loses the OpenAPI spec at the /rest/v1/ root, and that /rest/v1/your_table and client libraries continue to work. Table access for a new table is the October 30 grant change, not that February post.
How do I undo the new default now that October 30 has passed?
If your project has the new default, the changelog provides rollback SQL for future objects and for objects created since the revoke. Our advice: check your project's default privileges first. The rollback does not undo function execute revokes from Securing your API. After the bulk grant, revoke access to any table that should stay off the Data API.
Sources
- Supabase changelog: tables not exposed to the Data API automatically
- Supabase changelog: removing OpenAPI spec access via the anon key
- Securing your API
- Row Level Security
- Database API 42501 errors
- API keys
- Using custom schemas
- PGRST106: the schema must be one of the following
- PostgreSQL privileges
- PostgreSQL access privilege inquiry functions
- PostgreSQL pg_class
- PostgreSQL pg_db_role_setting
- PostgreSQL GRANT
- PostgREST configuration
Related
Guides
- Supabase permission denied for table (42501) on a new table: what changed on October 30, 2026?
- Can anyone call your Supabase functions?
- How to check if RLS is enabled on every Supabase table
- Secret keys shipped in the frontend
- Open storage buckets
- Public env vars, the Supabase anon key, and row level security
Fix pages for this guide
Need someone to fix it for you? See /help.
The weekly fix
The weekly fix: 3 real security mistakes in vibe-coded apps and how to fix them, every Tuesday.