feat(mysql): add optional authPlugin parameter for MySQL user creation#212
feat(mysql): add optional authPlugin parameter for MySQL user creation#212ymaniukevich wants to merge 5 commits intocrossplane-contrib:masterfrom
Conversation
Signed-off-by: ymaniukevich <yauheni.maniukevich@gmail.com>
|
So this functionality not implemented yet :( Thanks, |
|
|
||
| query := fmt.Sprintf( | ||
| "CREATE USER %s@%s IDENTIFIED BY %s%s", | ||
| "CREATE USER %s@%s IDENTIFIED %s%s", |
There was a problem hiding this comment.
Do you know if it works to use xsql.Query here, this would use parameterized queries and reduce the likelyhood of any issues due to quoting.
There was a problem hiding this comment.
I’m not sure, haven’t tried using xsql.Query in this context.
|
@ymaniukevich could you rebase? I don't see any button to run CI here, usually there's a button to approve CI for first time contributors @alekseikurepin would you be able to test this in your environment when we get a build? |
Sure, I've done it
While working on my implementation, I reviewed PR #186 and ensured that my changes cover the same use case. |
35a2179 to
bda9267
Compare
Signed-off-by: ymaniukevich <yauheni.maniukevich@gmail.com>
|
@chlunde sorry, cannot upgrade current "provider-sql" from version 0.9.0 on staging environment, take time. |
Signed-off-by: ymaniukevich <yauheni.maniukevich@gmail.com>
|
@ymaniukevich I researched this issue quite a bit this weekend. I think #133 is a more complete approach, as it will support any plugin, and there are many. Additionally it supports changing the plugin/auth method, unlike this feature. Another complicating factor is differences in supported plugins, even default plugin, for mariadb vs msql, and differences in syntax. But we can keep this issue open until we see that #133 is mergeable. This is a much simpler approach. Regardless of the outcome, thanks a lot for this contribution! |
Description of your changes
This pull request adds the ability to specify an authentication plugin when creating MySQL users. This enhancement allows users to define which authentication method should be used, providing greater flexibility and compatibility with various MySQL setups.
Supported Authentication Plugins: mysql_native_password, caching_sha2_password, AWSAuthenticationPlugin.
Fixes #106
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
I built and tested the package locally using the following resources as well .