-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
This pull request is being automatically deployed with Vercel (learn more). vault-storybook – ./ui🔍 Inspect: https://vercel.com/hashicorp/vault-storybook/dj4wj9cgo [Deployment for 6bf5fb2 canceled] |
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.
LGTM 👍
plugins/database/mssql/mssql.go
Outdated
@@ -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") |
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.
We can use strutil.GetString
from your other PR. 🙂
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.
👍 that was the plan!
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.