Spread the loveKafka Topics List existing topics bin/kafka-topics.sh –zookeeper localhost:2181 –list Purge a topic bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –config retention.ms=1000 … wait a minute … bin/kafka-topics.sh –zookeeper localhost:2181 –alter –topic mytopic –delete-config retention.ms
In this post, we will see how can we enable encryption or authentication in Kafka by using SSL
Security feature is introduced in Kafka in 0.9 version but it’s a beta version and the complete security features in 0.10 version onwards so now to use this encryption or authentication we need to install or work with Kafka version 0.10 in our compute/VM/machine/computer.
I want to give you some theory about how it will work and what are the steps we need to do.
First of all we have to prepare the SSL Certificates so this is the pre work so before we install the Kafka and working with the SSL.
Follow the below steps:
- Generate a certificate(X509) for each Kafka broker
- Generate a certificate authority(CA) for signing
- Sign all the broker certificates with generated CA
- Import the CA and signed certificate to broker key store
- Import CA to client trust store & broker trust store
- 2-way authentication(Broker has to trust client)