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

Cassandra - Add username customization #10906

Merged
merged 2 commits into from
Feb 16, 2021
Merged

Conversation

pcman312
Copy link
Contributor

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

Uses the new field username_template with the go template language.

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 👍 minor nit/suggestion about changing from errwrap -> fmt.Errorf while we're here, but don't feel blocked by it

@@ -125,15 +125,11 @@ func (c *cassandraConnectionProducer) Initialize(ctx context.Context, req dbplug

if req.VerifyConnection {
if _, err := c.Connection(ctx); err != nil {
return dbplugin.InitializeResponse{}, errwrap.Wrapf("error verifying connection: {{err}}", err)
return errwrap.Wrapf("error verifying connection: {{err}}", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could use this opportunity to change these to fmt.Errorf("blah %w", err) while we're here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had held off on this because we hadn't updated errwrap to 1.1 in a previous PR, but it looks like it was updated shortly after that PR was merged. I'll update accordingly and as I see them.

@vercel vercel bot temporarily deployed to Preview – vault-storybook February 12, 2021 22:04 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 12, 2021 22:04 Inactive
@pcman312 pcman312 merged commit 1f23c60 into master Feb 16, 2021
@pcman312 pcman312 deleted the customize-username-cassandra branch February 16, 2021 19:39
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