-
Notifications
You must be signed in to change notification settings - Fork 64
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
Support RDS IAM authentication for MySQL #186
base: master
Are you sure you want to change the base?
Support RDS IAM authentication for MySQL #186
Conversation
…sers Signed-off-by: cten <[email protected]>
I was about to rebase #133, but it's a bit complicated because a lot of things have changed since that PR have been submitted. |
I found that setting the default to mysql_native_password fails, documentation makes me believe it should work but failed on the MySQL version I tried. I can try to replicate the changes from #133 on current master. I think those might be cleaner code. Only difference would be not setting a default plugin name. |
At least I can confirm that this PR works fine. I'm using it right now. |
if pw == "" { | ||
pw, err = password.Generate() | ||
switch authplugin { | ||
case "": |
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.
default:"mysql_native_password"
is not handled here?
// AuthPlugin defines the MySQL auth plugin (ie. AWSAuthenticationPlugin for AWS IAM authentication when using AWS RDS ) | ||
// See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.DBAccounts.html | ||
// +optional | ||
AuthPlugin string `json:"authPlugin,omitempty" default:"mysql_native_password"` |
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.
since the code only accepts specific values here, I think you should use an enum to limit to the valid types. Alternatively, let the code handle any value, if that possible
I'm not a maintainer of this project (and not a MySQL user), but as you pinged me I left some comments :) A couple more:
|
@fortra-cloudops-platform, can you check/react to PR comments? |
Description of your changes
Fixes #106, provides the ability to create MySQL users with the AWSAuthenticationPlugin
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
Honestly I have had issues testing as I don't know how to get the provider to run my image successfully, any help appreciated.