Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

security kafka

avatar
Explorer

Hello Friends

 

You could help me to secure my Kafka servers for both Broker and client. As additional data I am using a KDC. As I see I currently have the security.inter.broker.protocol SASL_PLAINTEXT I don't know if it is correct or how I should secure this service.

 

Thank you

1 ACCEPTED SOLUTION

avatar
Expert Contributor

Hi @Peruvian81 

 

Kafka has multiple ways to be secured:

 

  SSL Kerberos

PLAINTEXTNoNo
SSLYesNo
SASL_PLAINTEXTNoYes
SASL_SSLYesYes

 

If you already are using Kerberos, you can check the document below:

 

https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.4/authentication-with-kerberos/content/kerberos_...

 

For your clients, you can use below command line depending of the Kafka version:

consumer example:

 

bin/kafka-console-consumer.sh --bootstrap-server <kafkaHost>:<kafkaPort> --topic <topicName> --security-protocol SASL_PLAINTEXT

 

For newer versions, consumer example:

 

bin/kafka-console-consumer.sh --topic <topicName> --bootstrap-server <brokerHost>:<brokerPort> --consumer-property security.protocol=SASL_PLAINTEXT

 

 

* Make sure to get a valid Kerberos ticket before running these commands (kinit -kt keytab principal)

** Ensure the Kerberos principal has permissions to publish/consume data from/to the selected topic

 

 

View solution in original post

1 REPLY 1

avatar
Expert Contributor

Hi @Peruvian81 

 

Kafka has multiple ways to be secured:

 

  SSL Kerberos

PLAINTEXTNoNo
SSLYesNo
SASL_PLAINTEXTNoYes
SASL_SSLYesYes

 

If you already are using Kerberos, you can check the document below:

 

https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.4/authentication-with-kerberos/content/kerberos_...

 

For your clients, you can use below command line depending of the Kafka version:

consumer example:

 

bin/kafka-console-consumer.sh --bootstrap-server <kafkaHost>:<kafkaPort> --topic <topicName> --security-protocol SASL_PLAINTEXT

 

For newer versions, consumer example:

 

bin/kafka-console-consumer.sh --topic <topicName> --bootstrap-server <brokerHost>:<brokerPort> --consumer-property security.protocol=SASL_PLAINTEXT

 

 

* Make sure to get a valid Kerberos ticket before running these commands (kinit -kt keytab principal)

** Ensure the Kerberos principal has permissions to publish/consume data from/to the selected topic