-
Notifications
You must be signed in to change notification settings - Fork 74
feat(mysql): add optional authPlugin parameter for MySQL user creation #212
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: ymaniukevich <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
@chlunde sorry, cannot upgrade current "provider-sql" from version 0.9.0 on staging environment, take time. |
Signed-off-by: ymaniukevich <[email protected]>
@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 reviewable
to 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 .