Skip to content
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

MySQL - Add username customization #10834

Merged
merged 4 commits into from
Feb 11, 2021
Merged

MySQL - Add username customization #10834

merged 4 commits into from
Feb 11, 2021

Conversation

pcman312
Copy link
Contributor

@pcman312 pcman312 commented Feb 3, 2021

Adds the ability to customize username generation for dynamic users in MySQL.

Uses the new field username_template with the go template language.

@vercel
Copy link

vercel bot commented Feb 3, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

vault-storybook – ./ui

🔍 Inspect: https://vercel.com/hashicorp/vault-storybook/9awh7gpvn
✅ Preview: Canceled

plugins/database/mysql/mysql.go Outdated Show resolved Hide resolved
helper/testhelpers/mysql/mysqlhelper.go Show resolved Hide resolved
plugins/database/mysql/connection_producer.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – vault February 5, 2021 19:02 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 5, 2021 19:02 Inactive
@pcman312 pcman312 requested a review from calvn February 5, 2021 19:03
Copy link
Contributor

@calvn calvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few suggestions, otherwise 👍 !

plugins/database/mysql/connection_producer.go Outdated Show resolved Hide resolved
plugins/database/mysql/connection_producer.go Outdated Show resolved Hide resolved
plugins/database/mysql/mysql.go Outdated Show resolved Hide resolved
@@ -483,35 +718,6 @@ func TestMySQL_UpdateUser(t *testing.T) {
}
}

func TestMySQL_Initialize_ReservedChars(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was added for coverage against a bug that we ended up fixing and is not specific to templating, but rather a check against this codeblock. We might want to keep it around.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is being checked in the TestMySQL_Initialize table tests as the password being used is the same as in this tests. I'll see about making this check more explicit though. I'd like to keep it in the table tests, but TBD on whether that's reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you've addressed this on 716ddc4, thanks!

@pcman312 pcman312 requested a review from calvn February 10, 2021 18:09
@vercel vercel bot temporarily deployed to Preview – vault February 10, 2021 18:10 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 10, 2021 18:10 Inactive
@pcman312 pcman312 merged commit 7bfe785 into master Feb 11, 2021
@pcman312 pcman312 deleted the customize-username-mysql branch February 11, 2021 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants