-
-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
permission denied for table wrappers_fdw_stats error when wrappers is created in the extensions schema. We recently also updated the docs to suggest creating the wrappers extension in the extensions schema to fix an RLS warning (ticket id 2081530023).
To Reproduce
Steps to reproduce:
- Run
create extension if not exists wrappers with schema extensions;from dashboard. - Run
\dp wrappers_fdw_statsfrom psql and notice the permissions:
postgres=# \dp wrappers_fdw_stats
Access privileges
Schema | Name | Type | Access privileges | Column privileges | Policies
------------+--------------------+-------+----------------------------------------+-------------------+----------
extensions | wrappers_fdw_stats | table | postgres=a*r*w*d*D*x*t*/supabase_admin+| |
| | | supabase_admin=arwdDxt/supabase_admin | |
(1 row)
- Create a foreign data table and run a select query from
anonrole and observe the errorpermission denied for table wrappers_fdw_stats.
Expected behavior
There should be no error when running a select query on a foreign table.
Screenshots
N/A
System information
- wrappers version
0.1.19
Additional context
The permissions are missing only when the wrappers extension is created in the extensions schema. To confirm this:
- Run
drop extension wrappers if exists cascade;to drop the extension if it is present. - Run
create extension if not exists wrappers; - Run
\dp wrappers_fdw_statsfrom psql and notice the permissions:
postgres=# \dp wrappers_fdw_stats
Access privileges
Schema | Name | Type | Access privileges | Column privileges | Policies
--------+--------------------+-------+---------------------------------------+-------------------+----------
public | wrappers_fdw_stats | table | postgres=arwdDxt/supabase_admin +| |
| | | supabase_admin=arwdDxt/supabase_admin+| |
| | | anon=arwdDxt/supabase_admin +| |
| | | authenticated=arwdDxt/supabase_admin +| |
| | | service_role=arwdDxt/supabase_admin | |
(1 row)
Notice additional permissions when the extension is created in the public schema. See ticket 2117241996 for details.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working