-
Notifications
You must be signed in to change notification settings - Fork 88
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
Create ROLES, assign them and SET default role #50
Comments
@Markus- hi, thanks for the feature idea! |
This looks like it would require both a new module and an overhaul of the user module. |
@Jorge-Rodriguez yes, looks like that. |
Today I stumbled uppon this, since mysql_user stopped working for me, since the parse function for the GRANT throws an exception, IF a 'SET DEFAULT ROLE' Statement is found. So atleast this module should ignore those lines for the time beeing. IMHO |
The comment from @RealKelsar points to this being related to #77 |
Hi @Jorge-Rodriguez , any update regarding this mariadb_role module? |
I meant |
No updates so far, sorry. I'm in the middle of a major move so my backlog is not getting any love :( |
Hi everyone, I created the PR #189. |
I'm busy on something else but here is my module to manage ROLES with MariaDB https://gist.github.com/camillehuot/e53e0e5ecbff3527386f1bac5dc6bdcd, in case it helps whoever wants to work on an official one (I really can't). I've taken the mysql_user.py file and stripped/adapted it to manage roles. About the interface, here's mine:
The only new attribute is Best regards |
Thanks @camillehuot that's very helpful! |
@camillehuot thanks for sharing your work! We'll take a look |
FYI I've update the file with a modified API
instead of 'with_admin'. I think this change is a good idea.
I don't expect more changes from me. |
@camillehuot thanks for the info! I have a question to everyone who knows: does the |
It looks like a bug of
to |
@camillehuot do i understand correctly that:
If yes, I'd suggest skipping
So I personally see the only option to change the admin via the future Alternatively, I'd put that the What do you guys think? |
i added the option + warning. Needs help with manual testing of #189 with MariaDB and |
Finished #189. Ready for review |
PR #189 is ready for review |
community.mysql 2.2.0-a1 has been released and available to install via galaxy or directly from https://galaxy.ansible.com/community/mysql. Thanks everyone! I'll be waiting for your feedback |
SUMMARY
Implement ROLE feature which is part of MySQL 8 / MariaDB 10
https://mariadb.com/kb/en/roles_overview/
https://dev.mysql.com/doc/refman/8.0/en/create-role.html
ISSUE TYPE
COMPONENT NAME
mysql_user
ADDITIONAL INFORMATION
I didn't find any way to create a ROLE (collection of GRANTS) which can be assigned to a USER.
Those ROLES doesn't have a host and can make permission handling easier when you have many users.
You also can set a default role of a user so it is transparent for the application.
Did I miss anything?
Regards
Markus
The text was updated successfully, but these errors were encountered: