-
Notifications
You must be signed in to change notification settings - Fork 73
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
TLS certificates #143
TLS certificates #143
Conversation
…nfiguration if parameter is given
…nfiguration if parameter is given
@@ -229,6 +255,14 @@ func parseEnvs(env map[string]string) (Config, error) { | |||
c.Password = null.StringFrom(password) | |||
} | |||
|
|||
if clientCertificate, certDefined := env["K6_PROMETHEUS_RW_CLIENT_CERTIFICATE"]; certDefined { |
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.
if clientCertificate, certDefined := env["K6_PROMETHEUS_RW_CLIENT_CERTIFICATE"]; certDefined { | |
if clientCertificate, certDefined := env["K6_PROMETHEUS_RW_TLS_CLIENT_CERTIFICATE"]; certDefined { |
Do you think we should be more specific about the naming?
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.
Both fine fro me 🤷
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.
Is there something else that we can have a client certificate for ?
If not I am also 🤷 - if yes , then I would prefer to have mtls
even.
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.
Not really, or at least I didn't find it. At the moment, if we mention client certificates then they should set automatically the context for TLS, but I can't guarantee for the future.
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 are doing mostly the same with Username and Password where we aren't specifying that is for BasicAuth.
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.
👍
@@ -229,6 +255,14 @@ func parseEnvs(env map[string]string) (Config, error) { | |||
c.Password = null.StringFrom(password) | |||
} | |||
|
|||
if clientCertificate, certDefined := env["K6_PROMETHEUS_RW_CLIENT_CERTIFICATE"]; certDefined { |
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.
Both fine fro me 🤷
@@ -41,6 +41,16 @@ type Config struct { | |||
// Password is the Password for the Basic Auth. | |||
Password null.String `json:"password"` | |||
|
|||
// ClientCertificate is the public key of the SSL certificate. | |||
// It is expected the path of the certificate on the file system. | |||
// If it is required a dedicated Certifacate Authority then it should be added |
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.
It theory we could also provide the way to add the CA like it's implemented in k6, but not sure if it's under the scope of this 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.
I would prefer if we get an explicit request from users for it. The demand for mTLS
feature seems to be not so high in general.
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!
It adds mTLS support. It continues #90 (rebase + polish).