-
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
Allow mTLS for mysql secrets engine #9181
Conversation
Test must be run manually after removing the skip which is present to make sure CI doesn't explode.
051fe58
to
702e4ed
Compare
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.
Looks great overall! There's a handful of small things. You should also run gofmt
on the package as there are a few small formatting issues.
|
||
for _, opt := range opts { | ||
err := opt(&builder) | ||
if err != nil { |
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.
Style nit: If we're only evaluating a local variable, it's common to see these statements on one line like so:
if err := opt(&builder); err != nil {
// reference err here
}
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.
Interesting style, noted. Used elsewhere, unsure if I changed this one.
c638808
to
5acc198
Compare
|
* master: (31 commits) changelog++ changelog++ Ui/replication status discoverability (#8705) Update CHANGELOG.md Counter that increments on every secret engine lease creation. (#9244) Add password_policy field to Azure docs (#9249) Replaced ClusterMetricSink's cluster name with an atomic.Value. (#9252) Fix database creds rotation panic for nil resp (#9258) changelog++ changelog++ Move sdk/helper/random -> helper/random (#9226) UI: Disallow kv2 with too large 'max versions' value (#9242) Allow mTLS for mysql secrets engine (#9181) docs: add sample revocation for mongodb (#9245) Add new Telemetry config options (#9238) Add a simple sealed gauge, updated when seal status changes (#9177) Test Shamir-to-Transit and Transit-to-Shamir Seal Migration for post-1.4 Vault. (#9214) Configure metrics wrapper with the "global" object, not just the fanout. (#9099) changelog++ Add backend type to audit logs (#9167) ...
* Extract certificate helpers for use in non-mongodb packages * Created mTLS/X509 test for MySQL secrets engine. * Ensure mysql username and passwords aren't url encoded * Skip mTLS test for circleCI
* Update documentation for MySQL Secrets Engine Update documentation for MySQL Database Secrets Engine to reflect changes introduced with #9181 * Empty Commit to re-trigger tests Co-authored-by: Lauren Voswinkel <[email protected]>
* Update documentation for MySQL Secrets Engine Update documentation for MySQL Database Secrets Engine to reflect changes introduced with #9181 * Empty Commit to re-trigger tests Co-authored-by: Lauren Voswinkel <[email protected]>
* Update documentation for MySQL Secrets Engine Update documentation for MySQL Database Secrets Engine to reflect changes introduced with #9181 * Empty Commit to re-trigger tests Co-authored-by: Lauren Voswinkel <[email protected]> Co-authored-by: arnis <[email protected]>
This change enables the usage of mTLS with the mysql secrets engine.
It requires the following values to be passed to the MySQLConnectionProducer in order to enable mTLS:
These provide a combined Cert and Key PEM block and the CA PEM block of the CA that signed the server and client certs.
An automated test is provided in the code presented, it is skipped by default due to our CI not being able to create and mount files to a docker image.
Feel free to ask any questions to help review this.
Test output: