-
Notifications
You must be signed in to change notification settings - Fork 186
Grant minimum required permissions for non-superuser usage #475
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
base: master
Are you sure you want to change the base?
Conversation
These grants allow table owners to use pg_repack with --no-superuser-check. Importantly, table ownership permissions still prevent users from accessing intermediate repack data and log tables of other users.
Replace repack schema permission grants with a test that creates a user-owned table and verifies pg_repack works for non-superuser with --no-superuser-check flag.
|
Thank you @ardentperf, Would it make sense to grant permissions only to Moreover we could allow in |
|
There is a relevant PR #451 |
|
this patch #451 offers a more secure and maintainable solution by leveraging PostgreSQL's native trusted extension mechanism (available in PostgreSQL 13+). the approach uses the Also, we don't need to modify any test cases as the patch is backward compatible. let me know if this looks good, appreciate any reviews on the PR and waiting for inclusion of the patch in future releases. Thanks. |
|
@za-arthur pg_repack is effectively a substitute for
Version 1.5.2 of pg_repack allowed non-superusers to repack their own tables (but not other people's tables) by updating privilege checks in several backend functions. Importantly, table ownership permissions still prevent users from accessing intermediate repack data and log tables of other users. This proposed PR does not grant access to The third regression test verifies that the |
Version 1.5.2 of pg_repack allowed non-superusers to repack their own tables by updating privilege checks in several backend functions (PR #431). This capability is important for environments where platform teams manage postgres installation and upgrades, but non-superusers directly manage their own schemas and tables including repacks. However version 1.5.2 did not grant the actual privileges to run pg_repack to non-superusers. This change adds the missing grants and allows table owners to use pg_repack with
--no-superuser-check. This also adds a successful non-superuser test case, which was missing before.Importantly, table ownership permissions still prevent users from accessing intermediate repack data and log tables of other users. (cf https://github.com/ardentperf/pg_repack_isolation/blob/main/test_multiuser_isolation.log )