# Filebeat to Kafka SSL (with jks)

**URL:** <https://discuss.elastic.co/t/filebeat-to-kafka-ssl-with-jks/213595>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [January 2, 2020, 3:33pm UTC](https://discuss.elastic.co/t/filebeat-to-kafka-ssl-with-jks/213595 "2020-01-02T15:33:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nisham](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@nisham](https://discuss.elastic.co/u/nisham)\
**Post date:** [January 2, 2020, 3:33pm UTC](https://discuss.elastic.co/t/filebeat-to-kafka-ssl-with-jks/213595/1 "2020-01-02T15:33:47Z")

</div>

Hello,

I have setup a Kafka server with SSL enabled using the jks file. I'm able to read and write from the Kafka topic using Logstash by providing the JKS files in the logstash config file.

I need to write data from Filebeat to Kafka over the SSL using jks (but in documentation there is no option for jks). I tried with converting jks to cert.pem and key.pem but its not working.

Could someone help me on this ? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [January 16, 2020, 6:57pm UTC](https://discuss.elastic.co/t/filebeat-to-kafka-ssl-with-jks/213595/2 "2020-01-16T18:57:10Z")

</div>

Hi,

If you simply need to authenticate the Kafka nodes, you'll only need (in _filebeat.yml_):  
`ssl.certificate_authorities: /path/to/ca/cert/ca.cert`

In case, it's a 2-way auth, you'll need to add these **too** :

`ssl.certificate: /path/to/host/cert/cert.pem`  
`ssl.key: /path/to/host/key/cert.key`

Filebeat isn't JAVA dependent (it was written in Go if I'm not mistaken) so you'll need to convert the JKS to PKI type of cert and key.  
I didn't use 2-way auth for FB, let me know if it worked!

I used [this](https://www.elastic.co/guide/en/beats/filebeat/master/kafka-output.html#_ssl_3) and [this](https://www.elastic.co/guide/en/beats/filebeat/master/configuration-ssl.html#_certificate_authorities) doc for the above.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 13, 2020, 6:57pm UTC](https://discuss.elastic.co/t/filebeat-to-kafka-ssl-with-jks/213595/3 "2020-02-13T18:57:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
