Hosted Storage migration 0073: supported rollout and recovery for residual TRUNCATE grants #51616
Replies: 1 comment
|
Adding the effective-risk layer to your (thorough) catalog work, because one fact in your post deserves a flag before anyone treats the enabled RLS as the mitigation: TRUNCATE is not subject to row-level security in Postgres. RLS filters SELECT/INSERT/UPDATE/DELETE — TRUNCATE bypasses it by design. So the residual TRUNCATE grants on Who can exercise these grants on hosted Supabase
select p.proname, n.nspname, pg_get_userbyid(p.proowner) as owner
from pg_proc p
join pg_namespace n on n.oid = p.pronamespace
join pg_roles r on r.oid = p.proacl::regrole
where p.prosecdef and n.nspname = 'public'
and exists (
select 1 from aclexpansion(acl) -- or your preferred ACL expansion
);(The practical version: list your own SECURITY DEFINER functions in
So the effective exercise surface today is: none through the supported paths, gated only by future changes — which is exactly why you're right to want the provider-supported rollout rather than a workaround. What migration 0073 changes (from the merged storage PR)The tenant migration addresses precisely the three tables you listed (plus vector-permission and default-privilege cleanup). Two things worth noting for your recovery procedure:
The interim verification setWhile waiting for the supported rollout, the checks that keep the file clean: -- 1. Effective grants haven't grown (the census you already run)
select grantee, table_name, privilege_type
from information_schema.role_table_grants
where table_schema = 'storage'
and grantee in ('anon', 'authenticated')
order by table_name, privilege_type;
-- 2. No SECURITY DEFINER bridge in your own schema (the class above)
select p.proname
from pg_proc p
join pg_namespace n on n.oid = p.pronamespace
where n.nspname = 'public' and p.prosecdef;
-- 3. Default privileges for future storage objects haven't drifted
select * from pg_default_acl where defaclnamespace = 'storage'::regnamespace::oid;Baseline all three today, re-run after the platform announces the rollout — any drift between the two runs is your support-ticket evidence, which is a materially stronger artifact than a one-time snapshot. For the credential-side hygiene questions that pair with this managed-surface audit (what the rotation path records where, and which channels can't guarantee redaction) — the adjacent threads have the channel-by-channel map: #51544 and #51499. |
Uh oh!
There was an error while loading. Please reload this page.
Hello Supabase team/community,
We are seeking an officially supported security assessment and recovery procedure for managed Storage privileges on hosted PostgreSQL 17. This is a guidance request, not a claim of a demonstrated exploit or authorization to change a project.
Read-only catalog inspection found six residual direct and effective TRUNCATE grants:
RLS is enabled on these objects. We have not performed destructive tests, changed managed privileges/owners or tried privilege escalation. These current-object grants are distinct from any future default privileges.
The official managed-schema restriction announcement includes revoking privileges from API roles in Storage among restricted client operations. We want to preserve supported service behavior, ownership and recovery.
We also reviewed the related community question and verified the merged official Storage PR 1395. Its tenant migration 0073 addresses these three tables, but also other privileges, defaults and vector-table permissions. We have not run that SQL ourselves. Our remaining question is the provider-supported hosted rollout and recovery path, not a workaround for managed ownership.
Could you please confirm:
No private project/account identifiers, customer records, credentials, session data, object content or internal files are included. We request guidance only and will obtain separate approval before any managed change.
Thank you.
All reactions