Replies: 1 comment
|
The linked pg_net discussion appears to apply to unaccent as well: on hosted projects, the extension objects are owned by the internal supabase_admin role, so the postgres role cannot reliably revoke privileges that were granted by that owner. The warning and unchanged ACL are consistent with that ownership boundary. The important distinction is that a PUBLIC EXECUTE grant is not automatically a Data API exposure. Since extensions is not in db_schema, PostgREST should reject direct REST or RPC access to those functions. I would still treat that as an exposure boundary, not as a reason to assume the ACL can be changed from a migration. For the least-privilege check, I would:
I would not stop migrations over this alone, but I would ask Supabase Support to confirm whether the unaccent ACL is platform-managed and whether they consider it an expected default. If Support removes or changes it, verify the result again after the next extension lifecycle event. |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I'm looking for clarification about the expected security model for extension functions owned by
supabase_adminon hosted Supabase.This appears very similar to discussion #49421 concerning
pg_net, but in our case the extension isunaccent.Environment
Hosted Supabase project running PostgreSQL 17.
The
unaccentextension is installed in theextensionsschema.These functions are owned by
supabase_admin:Their ACL is:
Therefore
PUBLIChas EXECUTE granted bysupabase_admin, which meansanon,authenticated, andservice_roleeffectively have EXECUTE as members of PUBLIC.Attempted REVOKE
A migration executed as
postgrescontained:The migration completed, but the PUBLIC grant remained.
Our catalog checks show:
So this appears to be the same ownership limitation described in #49421:
postgrescannot revoke a privilege originally granted by the internalsupabase_adminowner.Data API exposure
Our PostgREST configuration is:
Therefore
extensionsis in the extra search path but is NOT one of the exposed Data API schemas.We have not attempted to change ownership, role memberships, or gain access to
supabase_admin.Questions
Is
PUBLIC EXECUTEonextensions.unaccent(...)intentional/expected on hosted Supabase?Does the answer given in How can a project owner revoke PUBLIC privileges on the `net` schema (pg_net)? #49421 for
pg_netalso apply tounaccent— i.e. becauseextensionsis not an exposed PostgREST schema, should we leave the extension's default ACL untouched?Is keeping
extensionsoutsidedb_schemathe intended security boundary for Supabase-managed extension functions?Is there any supported self-service method for a project owner to revoke a PUBLIC grant created by
supabase_admin, or should these ACLs simply be treated as platform-managed?Is there any realistic API bridge risk we should additionally guard against — for example, an executable function in
publicorgraphql_publiccallingextensions.unaccent(...)?Could an extension upgrade/reinstallation recreate these PUBLIC grants even if Supabase Support removed them?
Our goal is not to gain access to
supabase_admin. We want to establish the correct, supported least-privilege invariant so that our Staging and Production migration procedures remain reproducible.For now we have stopped subsequent migrations rather than attempting an unsupported ACL workaround.
Thanks.
All reactions