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

MSSQL - Add username customization #10767

Merged
merged 4 commits into from
Feb 5, 2021
Merged

Conversation

pcman312
Copy link
Contributor

@pcman312 pcman312 commented Jan 26, 2021

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

Uses the new field username_template with the go template language.

Docs PR will come after all other updates for username customization are complete for this release.

Note: #10766 is vendoring in the template files so this PR is failing the go-mod-vendor check until that PR is merged.

@vercel
Copy link

vercel bot commented Jan 26, 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/dj4wj9cgo
✅ Preview: Canceled

[Deployment for 6bf5fb2 canceled]

Copy link
Contributor

@catsby catsby left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -69,12 +76,37 @@ func (m *MSSQL) Initialize(ctx context.Context, req dbplugin.InitializeRequest)
if err != nil {
return dbplugin.InitializeResponse{}, err
}

usernameTemplate := getString(req.Config, "username_template")
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use strutil.GetString from your other PR. 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 that was the plan!

@vercel vercel bot temporarily deployed to Preview – vault February 4, 2021 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 4, 2021 23:35 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 5, 2021 17:38 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 5, 2021 17:38 Inactive
@pcman312 pcman312 merged commit 5436e75 into master Feb 5, 2021
@pcman312 pcman312 deleted the customize-username-mssql branch February 5, 2021 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants