Cannot connect to Kafka Broker using SASL with OAUTHBEARER
See original GitHub issueHello,
I’m trying to connect to my Kafka Broker using SASL. I’m using the docker version 0.20.0. I can successfully connect to the broker when running
kafka-topics --bootstrap-server broker:9094 --command-config command_sasl.properties --list
The command_sasl.properties lokks like this:
security.protocol=SASL_SSL
ssl.key.password=<pass>
ssl.keystore.location=keystore.jks
ssl.keystore.password=<pass>
ssl.truststore.location=truststore.jks
ssl.truststore.password=<pass>
sasl.mechanism=OAUTHBEARER
sasl.login.callback.handler.class=io.confluent.kafka.clients.plugins.auth.token.TokenUserLoginCallbackHandler
sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required \
username="username" \
password="password" \
metadataServerUrls="https://broker:8090" ;
My appllication.yml looks like this (sorry for the missing indents):
akhq:
connections:
my-sasl:
properties:
bootstrap.servers: "broker:9094"
security.protocol: SASL_SSL
ssl.key.password: pass
ssl.keystore.location: /akhq/keystore.p12
ssl.keystore.password: pass
ssl.keystore.type: PKCS12
ssl.truststore.location: /akhq/truststore.jks
ssl.truststore.password: pass
sasl.mechanism: OAUTHBEARER
sasl.login.callback.handler.class: io.confluent.kafka.clients.plugins.auth.token.TokenUserLoginCallbackHandler
sasl.jaas.config: org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required username="username" password="password" metadataServerUrls="https://broker:8090" ;
But when I try to connect to the cluster, I get this error:
akhq_1 | 2021-12-23 15:49:14,712 ERROR r-thread-9 o.a.c.ErrorController Invalid value io.confluent.kafka.clients.plugins.auth.token.TokenUserLoginCallbackHandler for configuration sasl.login.callback.handler.class: Class io.confluent.kafka.clients.plugins.auth.token.TokenUserLoginCallbackHandler could not be found.
Any ideas?
Thanks and best regards
Jens
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Related StackOverflow Question
Hi! That was quick. Thanks a lot. Will be able to test not before beginning of January. Will give feedback then.
Hello @tchiotludo !
I just confirmed with my colleague tha we successfully connected to the same Kafka Cluster using Julie.
We are currently working on it. As soon as I have something to show, I will let you know.
Thanks and kind regards
Jens