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]

Community Articles

Find and share helpful community-sourced technical articles.
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!
Labels (2)
avatar
Contributor

The video provides the steps to connect to the Kafka server using SASL_SSL protocol.

 

Open the video on YouTube here

 

To connect to Kafka server using SASL_SSL protocol using one way SSL, do the following:

Server side

  1. Configure the following properties in Ambari server > Kafka > config > Custom kafka-broker.
    ssl.keystore.location=path-to-your-keystore
    ssl.keystore.password=keystore-password
    ssl.truststore.location=path-to-your-truststore
    ssl.truststore.password=keystore-password
  2. Under Ambari server > Kafka > config Kafka Broker > Listeners can add the security protocol as: SASL_SSL://localhost:<port>
  3. Since this is a one way SSL communication between client-server, ensure to have enabled the property ssl.client.auth=none. This means that a client authentication is not required. By default this property is set to None. This can be double checked from Ambari console > Kafka > Configs. The same can be searched using the filter text box at the top right of the service screen.

Client Side

  1. Create a file client.properties with the following content:
    ssl.truststore.location=<pathToTrustStore> // This file must contain server rootCA
    ssl.truststore.password=<trustStore password>
  2. Get a valid Kerberos ticket and execute new producer/consumer API as follows:

Producer

/usr/hdp/current/kafka-broker/bin/kafka-console-producer.sh --broker-list <brokerHost>:<brokerSASL_SSLPort> 
--topic <topicName> --producer.config <path_To_client.properties> --security-protocol SASL_SSL

Consumer

/usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --bootstrap-server <brokerHost>:<brokerSASL_SSLPort> 
--topic <topicName> --consumer.config <path_To_client.properties> --security-protocol SASL_SSL
1,995 Views
0 Kudos
Version history
Last update:
‎12-22-2020 11:31 PM
Updated by: