-
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
secrets/database: adds ability to manage alternative credential types and configuration #15376
Conversation
… and configuration
@@ -27,6 +27,8 @@ message NewUserRequest { | |||
google.protobuf.Timestamp expiration = 3; | |||
Statements statements = 4; | |||
Statements rollback_statements = 5; | |||
int32 credential_type = 6; | |||
bytes public_key = 7; |
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.
Maybe a minor thing, but since we're only using PEM-encoded keys, those should all be valid string
s, right?
I mostly worry that bytes
(or []byte
) above might lead someone to think we're using something like DER.
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.
Yep, I originally used a string
type here. I would be fine going back to string
since we are going with PEM encoding. Will do so if others agree.
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 don't have a strong preference either way. FWIW the standard library call pem.EncodeToMemory
also returns it as []byte
.
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. Whew, big change, but I like it. A minor possible nit/suggestion. :)
… and configuration (hashicorp#15376)
Overview
This PR adds the ability for the database secrets engine to manage alternative credential types and configuration. This provides the foundation for the secrets engine to start managing database credentials other than passwords (e.g., asymmetric keys, x.509 client certificates).
Initially, this will be used to enable Vault to manage RSA key pair credentials to be consumed by the Snowflake database plugin. This will enable clients to use key pair authentication using a Vault-managed credential. See hashicorp/vault-plugin-database-snowflake#15 for example usage on the plugin side.
Dynamic Role Usage:
Static Role Usage:
Testing
Basic testing has been included in this PR. Tests that integrate with Snowflake to use RSA key pair credentials are included in the Snowflake database plugin PR.
Additional tests are in progress and will be included in further commits.