-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add TLS connection parameters #369
Add TLS connection parameters #369
Conversation
Ping @Andersson007 @rwky @jpmens |
recheck |
The test
The test
|
Hmm, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jorge-Rodriguez thanks for the PR!
Could you please add integration tests? See existing ones in tests/integration/targes/mysq_user.
(Maybe there is an old version of mysql installed)
if this is a MariaDB feature, there are also tests for mariadb 10+. Look for directories in tests/integration/targets that contain |
I kicked the tests here as well. Please, fix sanity related stuff (there is a guid in the ansible documentation how to run sanity tests locally using docker containers. Helps to catch such errors before pushing) |
The test
The test
|
It is not a MariaDB feature. I found the documentation on the mariadb link but the tls options are part of mysql. Maybe I can find the documentation on mysql. |
any updates on this? |
I'm still working on it, but the last couple of days have been quite busy at work so I didn't manage to get any code in. I have not abandoned this. |
recheck |
Attending #AnsibleAutomates2020, will get on with this afterwards. |
a5d2abc
to
db347c7
Compare
db347c7
to
0fcf827
Compare
@Andersson007 does this look ok, or should I squash into a single commit? |
@Jorge-Rodriguez it's ok as it is, no actions needed. I'm on a public holiday today. I'll try to make time to look at the pr tomorrow. Or maybe today later. Thanks for doing this! |
deprecated_features: | ||
- mysql_user - using ``REQUIRESSL`` in ``priv`` is deprecated in favor of ``tls_requires`` (https://github.com/ansible-collections/community.general/pull/369). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecated_features: | |
- mysql_user - using ``REQUIRESSL`` in ``priv`` is deprecated in favor of ``tls_requires`` (https://github.com/ansible-collections/community.general/pull/369). | |
deprecated_features: | |
- mysql_user - using ``REQUIRESSL`` in ``priv`` is deprecated in favor of ``tls_requires`` (https://github.com/ansible-collections/community.general/pull/369). |
is it necessary to deprecate this feature? I'd avoid deprecations (if possible).
Can we make priv: REQUIRESSL and tls_requires mutually exclusive?
I don't insist, it's just topic to discuss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just reordered the code, now TLS requires are handled after privileges so if both priv:REQUIRESSL and tls_requires are specified, tls_requires takes precedence.
It's not really query optimal as it means that first we'd set REQUIRE SSL and modify it immediately after.
I could remove the deprecation notice and replace it with a 'try to use tls_requires instead, please' note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good (imo).
Still waiting for @bmalynovytch 's opinion because he's a MySQL WG leader
@bmalynovytch what do you think about the pr? |
we also need
I hope you understand why this PR is being reviewed so thoroughly. These changes are significant and the module is one of the crutial for MySQL support. Thanks for your patience and being persistent. |
I have a modification check on the tests (call to user_mod) I could splice the check mode tests in there. I should probably test check mode on user_add, so I could pretend that to the current battery of tests, i.e.:
I'm more than happy to see this PR going through such a thorough review. I need to take a cooler of days off of this now, but you can expect new changes coming by the turn of July. |
CC @bmildren |
all mysql stuff have been recently moved to https://github.com/ansible-collections/community.mysql by @bmildren |
@Jorge-Rodriguez i think there's no point to wait for anyone else. When it's moved, we could merge this. |
@Andersson007 Roger. I still have those extra tests we talked about pending. I'll add those to the moved PR |
@Jorge-Rodriguez ah, nice! |
PR moved to ansible-collections/community.mysql#9 |
SUMMARY
Add support for TLS REQUIRES options, to enforce TLS client connections for users.
ISSUE TYPE
COMPONENT NAME
mysql_user
ADDITIONAL INFORMATION
This is a PoC pull request on how these parameters could be handled.
IMPORTANT!! THIS HAS NOT BEEN TESTED