-
Notifications
You must be signed in to change notification settings - Fork 90
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
Have postgresql_privs update all privileges #387
Comments
We recently accepted a PR for the hba module that added an |
Hmm, interesting approach, didn't think about this. However: how does this manage "all in one", as in: "different roles with different privileges on the same object"? I think this still would need a new parameter specifying all privileges in a condensed form. Or overload |
For comparison, the
The grant-only mode translates to the We could introduce a I think the Further, a simpler, better scriptable way of specifying privileges (maybe a list of dicts) would help integration in high-level automation. But this would be a breaking change and a big effort. |
If |
folks, missed the end of the discussion as was on PTO at that time. |
i feel like the mysql module makes the most sense in my mind, so i'd like to see us move towards that. as for backward compat, if we make this change part of the 3.0 milestone, i think that is less of a concern. |
@hunleyd if we gonna introduce breaking changes, i believe 3.0 is imo coming too soon (i hope until summer but several months is too soon), i would suggest targeting at least version 4 but it depends on when we'll make the final decision and announce it. |
May I ask which MySQL module you refer to? Or, more specific: which exact feature do you have in mind which this module should replicate in PostgreSQL? |
I'm referring to this comment @andreasscherbaum |
If I read the past comments correct, The only question is here: what if An alternative is to use Summary:
Would also like to roll this out in steps, starting with tables and schema. |
We can change independently how to specify
This idea was about how privileges can specified, not how actions are specified. So it's rather out of scope for this issue.
Regardless of notation of objects and privileges, it works / would work like that:
|
I'm not a user and my nickels would be:
|
This is a Request for Comments.
SUMMARY
Currently the
postgresql_privs
module can only revoke privileges when an extra task is created.We have a large number of databases and tables, and managing privileges using the
postgresql_privs
module is complicated and cumbersome.Especially removing privileges requires two steps:
In addition to above problems, we would rather have the privileges listed in the inventory, not as tasks scattered across multiple places.
ISSUE TYPE
The idea is to extend the
postgresql_privs
module with a couple new options - or create a new module with the proposed functionality.set_privs
: receives a list of all privileges for the table, when specified this will update all privileges forobjs
to what is listed as argument, including all revokesstate
,privs
,roles
,grant_option
,target_roles
type = table
ignore_superuser
: will not revoke privileges which are set for any database superuser (default = false)ignore_owner
: will not revoke privileges which are set for any object owner (default = false)COMPONENT NAME
This is either an extension for the
postgresql_privs
module, or since this proposal clashes with required options likeroles
, it might be better to move this into a separate module likepostgresql_set_privs
.Another option to discuss: allow to skip the
objs
parameter and specify object names as part ofset_privs
.ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: