-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
permission denied for table wrappers_fdw_stats
error when wrappers
is created in the extensions
schema
#203
Comments
Hitting this as well. Is there a workaround? Is putting wrappers in the public schema safe? |
@ryan-managai since this is not yet fixed, reach out to support to get it fixed in your project. |
This has to do with the default privileges in each schema ( If create view public.wrappers_fdw_stats as select * from extensions.wrappers_fdw_stats;
revoke all on public.wrappers_fdw_stats from anon, authenticated; |
The permissions issue was resolved by explicitly granting privileges to the necessary roles. The following SQL command was used to correct the permissions:
This command ensures that the anon, authenticated, and service_role roles have full access to the wrappers_fdw_stats table, thus resolving the permission denied error. Recommendation: I've shared the resolution to the permission issue that worked in my case, but I am seeking feedback on the safety and best practices regarding this approach. If there are any concerns or alternative recommendations about granting such privileges, especially related to security implications, please share your insights. I aim to ensure that the solution not only resolves the functional problem but also adheres to best security practices. |
Bug report
Describe the bug
permission denied for table wrappers_fdw_stats
error whenwrappers
is created in theextensions
schema. We recently also updated the docs to suggest creating thewrappers
extension in theextensions
schema to fix an RLS warning (ticket id 2081530023).To Reproduce
Steps to reproduce:
create extension if not exists wrappers with schema extensions;
from dashboard.\dp wrappers_fdw_stats
from psql and notice the permissions:anon
role 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
0.1.19
Additional context
The permissions are missing only when the
wrappers
extension is created in theextensions
schema. To confirm this:drop extension wrappers if exists cascade;
to drop the extension if it is present.create extension if not exists wrappers;
\dp wrappers_fdw_stats
from psql and notice the permissions:Notice additional permissions when the extension is created in the
public
schema. See ticket 2117241996 for details.The text was updated successfully, but these errors were encountered: