How to make Kafka security setup SASL_SSL with oAuth on Windows box?

887 views Asked by At

I have enabled SASL_SSL configuraion , And tested with clients producing & consuming data

server.properties

security.inter.broker.protocol=SASL_SSL
sasl.mechanism.inter.broker.protocol=OAUTHBEARER
sasl.enabled.mechanisms=OAUTHBEARER

listeners=PLAINTEXT://localhost:9092,SSL://localhost:9093,SASL_SSL://localhost:9094
advertised.listeners=PLAINTEXT://localhost:9092,SSL://localhost:9093,SASL_SSL://localhost:9094

ssl.keystore.location=c:/kafka/config/kafka.server.keystore.jks
ssl.keystore.password=test1234
ssl.key.password=test1234
ssl.truststore.location=c:/kafka/config/kafka.server.truststore.jks
ssl.truststore.password=test1234

ssl.client.auth=required

consumer.properties

sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required \
unsecuredLoginStringClaim_sub="alice";

security.protocol=SASL_SSL
sasl.mechanism=OAUTHBEARER

producer.properties

sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required \
unsecuredLoginStringClaim_sub="alice";

security.protocol=SASL_SSL
sasl.mechanism=OAUTHBEARER

kafka_server_jaas.conf

KafkaServer {
    org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required
    unsecuredLoginStringClaim_sub="admin";
};

how to mention end point to generate the fresh token

0

There are 0 answers