-
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
Influxdb Output - Support SSL #191
Comments
thanks for bringing it to my attention :-) |
I was going to submit a PR, but it doesn't seem like certificates are actually supported in the Go Influx client, so perhaps one for that project too. Ideal situation is a similar setup to the Ruby SDK for influx |
I'm not very familiar with the Ruby Influx SDK, could you include a link to the relevant code? |
SSL verify, SSL enabled and cert path are what we should add. https://github.com/influxdb/influxdb-ruby/blob/master/lib/influxdb/client/http.rb If the cert store can't be used as in ruby, a ca.pem, cert and key setup would work too. cert, err := tls.LoadX509KeyPair(*certFile, *keyFile)
if err != nil {
log.Fatal(err)
}
// Load CA cert
caCert, err := ioutil.ReadFile(*caFile)
if err != nil {
log.Fatal(err)
}
caCertPool := x509.NewCertPool()
caCertPool.AppendCertsFromPEM(caCert)
// Setup HTTPS client
tlsConfig := &tls.Config{
Certificates: []tls.Certificate{cert},
RootCAs: caCertPool,
InsecureSkipVerify: true,
}
tlsConfig.BuildNameToCertificate()
transport := &http.Transport{TLSClientConfig: tlsConfig}
client := &http.Client{Transport: transport} |
Missing this. Don't know Ruby. How can we get it in? |
Yeah, it would be great to get some SSL support here. Can't really configure InfluxDB over HTTPS without Telegraf supporting https connections too. |
+1 |
@sparrc any update on this? We would really like to use telegraf but our use case requires data transfer over public wire which requires authenticating with influx and TLS. |
I'll try to get to this next week. It will require a change to the influxdb client as well |
thanks @sparrc please let me know if there is anything i can do to help |
Any progress on this one? |
InfluxDB client has tls support now as of Wednesday, I should be able to add this into master today for testing |
this is now in master, if anyone has cycles to test it out on a working influxdb with ssl setup I'd be much obliged! |
Anyone has tested this out yet with any success? I'm getting
|
I've just switched about 20 or so nodes in our estate to using the native SSL support (away from a whacky stunnel4 setup) and it's working fine. We make use of Puppet's SSL configuration for our PKI, so this ends up looking like:
|
@cherwin you need ssl_cert and ssl_key as well for a valid self-signed setup |
@yankcrime @sparrc awesome, exactly what I needed. Why isn't it enough to only trust the CA on telegraf's side? |
@cherwin that might be a bug here: https://github.com/influxdata/telegraf/blob/master/internal/internal.go#L90, we don't create a certificate at all unless all three are defined |
@cherwin could you open an issue? |
@sparrc will do |
Would like to use self signed certs with telegraf, seems to be missing from the output options and config.
The text was updated successfully, but these errors were encountered: