Configuring Kafka Server with Kafka SASL_SSL

Update the following server.properties in Kafka server configuration directory.

listeners=SASL_SSL:// <KAFKA_HOST>:<KAFKA_PORT>  
security.inter.broker.protocol=SASL_PLAINTEXT 
sasl.mechanism.inter.broker.protocol=PLAIN 
sasl.enabled.mechanisms=PLAIN 
ssl.keystore.location=/PATH/kafka.server.keystore.jks
ssl.keystore.password=password 
ssl.key.password= password 
ssl.truststore.location=/PATH/kafka.server.truststore.jks 
ssl.truststore.password= password 
ssl.endpoint.identification.algorithm= 
ssl.client.auth=required 
security.inter.broker.protocol=SSL 
  1. In case of WebSphere App server
    Add following configuration in <Websphere_Location>\profiles<profileName>\properties\wsjaas.conf
    KafkaClient
    
    {org.apache.kafka.common.security.plain.PlainLoginModule required
    username="alice"
    password="alice-secret"; }
  2. Once you've updated the JAAS configuration, ensure that WebSphere knows about it.
    Add this to the JVM arguments:
    • Open WebSphere Admin Console.
    • Go to Servers > Server Types > WebSphere application servers > Select your server > Java and Process Management > Process Definition > Java Virtual Machine > Custom Properties.
    • Add a new custom property:
      • Name: java.security.auth.login.config
      • Value: C:\path\to\your\kafka_client_jaas.conf