如何使kafka安全设置sasl\u ssl与oauth在windows box上?

ibps3vxo  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(283)

我已经启用了sasl\u ssl配置,并使用生成和使用数据的客户机进行了测试
服务器属性

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

消费者财产

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

security.protocol=SASL_SSL
sasl.mechanism=OAUTHBEARER

生产商属性

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

security.protocol=SASL_SSL
sasl.mechanism=OAUTHBEARER

Kafka\服务器\ jaas.conf

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

如何提端点生成新令牌

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题