Support RDS IAM authentication for MySQL#186
Support RDS IAM authentication for MySQL#186fortra-cloudops-platform wants to merge 1 commit intocrossplane-contrib:masterfrom
Conversation
…sers Signed-off-by: cten <cxtenberge5@gmail.com>
|
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.
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.
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? |
|
We'll move forward with #212 instead of this. We can extend it with more features if needed. |
Description of your changes
Fixes #106, provides the ability to create MySQL users with the AWSAuthenticationPlugin
I have:
make reviewableto 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.