-
Notifications
You must be signed in to change notification settings - Fork 101
Description
SUMMARY
When updating a role, its privileges are either added or replaced, depending on the append_privs
argument. I would like to add an argument to revoke privileges explicitly.
USECASE
I read the desired privileges from a dynamic source. To ensure no privileges are revoked in case the dynamic source accidentally returns incomplete information, I need to revoke privileges explicitly.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
modules mysql_role, mysql_user
IMPLEMENTATION IDEAS
I propose 3 alternative ways to implement that:
1) add argument subtract_privs
Add a new boolean argument subtract_privs
(default no
, mutual conflict with append_privs
). If enabled, the module would revoke the privileges specified by priv
(without granting any privileges).
2) add argument revoke_privs
Add a new argument revoke_privs
which takes the same format as privs
. If set, all privileges in revoke_privs
that are not in privs
will be revoked.
privs
and append_privs
continue to work as before.
3) add argument privilege_state, deprecate option append_privs
Add a new argument privilege_state
with three possible values:
exact
(default, like previous behavior withappend_privs: no
)granted
(like previous behaviour withappend_privs: yes
)revoked
(revoke all privileges specified bypriv
)
This options should mutually conflict with append_privs
. privilege_state: granted
should be used instead of append_privs: yes
.
What implementation idea would you prefer?