kafka-offset-exporter icon indicating copy to clipboard operation
kafka-offset-exporter copied to clipboard

Connect to broker using SSL

Open piequi opened this issue 7 years ago • 2 comments

Hi there,

Your exporter is just the one I need, it exposes just the right thing ! My only concern is that I need to connect to the broker using SSL...

When I connect to the broker using kafka-consumer-groups.sh tool, I specify the following variables in a separated properties file and use the --command-config flag

security.protocol=SSL
ssl.keystore.location=/etc/kafka/keystore/keystore.jks
ssl.keystore.password=xxx
ssl.truststore.location=/etc/kafka/keystore/truststore.jks
ssl.truststore.password=xxx

In the sarama/client_tls_test.go they use something like :

config := NewConfig()
config.Net.TLS.Enable = true
config.Net.TLS.Config = clientConfig

With clientConfig being a GO TLS config (as far as I understand)...

Would there be a way to configure those properties in your exporter to establish a SSL connection ?

Thanks a lot

piequi avatar Jun 08 '18 08:06 piequi

Hey there, from a quick look at the docs I'm not sure that you can read Java keystores in Go without additional libraries such as https://github.com/pavel-v-chernykh/keystore-go. If you would like that support, it would seem best for you to fork the project. All the best!

echojc avatar Jun 09 '18 00:06 echojc

Hi, We actually create keystore and trusstore using crt and key files. I'll try to find a way to create that TLSConfig correctly using those files. Thanks

piequi avatar Jun 12 '18 08:06 piequi