-
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
Use the role name in the db username #2812
Conversation
@@ -89,7 +96,7 @@ func PluginFactory(pluginName string, sys pluginutil.LookRunnerUtil, logger log. | |||
// This prevents users from executing bad plugins or executing a plugin | |||
// directory. It is a UX feature, not a security feature. | |||
var handshakeConfig = plugin.HandshakeConfig{ | |||
ProtocolVersion: 1, | |||
ProtocolVersion: 2, |
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.
Bumping this means all existing plugins will need to recompile and probably update their code.
@@ -29,6 +29,13 @@ type Statements struct { | |||
RenewStatements string `json:"renew_statements" mapstructure:"renew_statements" structs:"renew_statements"` | |||
} | |||
|
|||
// UsernameConfig is used to configure prefixes for the username to be | |||
// generated. | |||
type UsernameConfig struct { |
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.
What would be a case where DisplayName
and RoleName
are different?
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.
Display names are tied to tokens- the vault user who created the cred. Role name is the name of the database role that created the cred
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.
I see, so the role name (and unix timestamp) is now included as part of the username for more verbosity as to who and when the token was created?
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.
Correct!
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!
No description provided.