-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add mutual TLS support to prometheus_client output plugin #5473
Add mutual TLS support to prometheus_client output plugin #5473
Conversation
Signed-off-by: Robert Sullivan <rsullivan@pivotal.io>
This would be a nice feature, we actually have most of this implemented for use in plugins. The best example to follow is in
For tests, look in https://github.com/influxdata/telegraf/tree/master/testutil/pki |
23ab3ea
to
0b65983
Compare
Signed-off-by: Jesse Weaver <jeweaver@pivotal.io>
0b65983
to
05af32b
Compare
"github.com/influxdata/telegraf/plugins/outputs/prometheus_client" | ||
"github.com/influxdata/telegraf/testutil" | ||
"github.com/influxdata/toml" | ||
. "github.com/onsi/gomega" |
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 will need to remove this dependency, I don't want to add it only for testing this one aspect.
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.
Replaced with require
@@ -105,6 +106,12 @@ var sampleConfig = ` | |||
## If set, enable TLS with the given certificate. | |||
# tls_cert = "/etc/ssl/telegraf.crt" | |||
# tls_key = "/etc/ssl/telegraf.key" | |||
|
|||
## If set, enable TLS client authentication with the given CA. | |||
# tls_ca = "/etc/ssl/telegraf_ca.crt" |
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.
Update this option:
## Set one or more allowed client CA certificate file names to
## enable mutually authenticated TLS connections
# tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
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.
Done
# tls_ca = "/etc/ssl/telegraf_ca.crt" | ||
|
||
## Boolean value indicating whether or not to skip SSL verification | ||
# insecure_skip_verify = false |
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.
Remove this option, it's not available for the server configuration. Don't forget to update the README as well.
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.
Done
Signed-off-by: Robert Sullivan <rsullivan@pivotal.io>
Signed-off-by: Robert Sullivan <rsullivan@pivotal.io>
Signed-off-by: Robert Sullivan rsullivan@pivotal.io
Required for all PRs: