strimzi / strimzi-kafka-oauth

OAuth2 support for Apache Kafka® to work with many OAuth2 authorization servers
Apache License 2.0
147 stars 90 forks source link

Token can't validate proper #162

Open namson0482 opened 2 years ago

namson0482 commented 2 years ago

Hi @mstruk, @see-quick and team

I already got latest source code from branch main after you fixed https://github.com/strimzi/strimzi-kafka-oauth/pull/161. But I got other errors like above:

image

You can reproduce as per step below:

Step 1: go to folder examples/docker

Step 2: Execute command: docker-compose -f compose.yml -f kafka-oauth-strimzi/compose-ssl.yml -f keycloak/compose-ssl.yml -f keycloak-import/compose-ssl.yml up --build

Step 3: Now, you open kafka log then you will see error as image above

Thanks

mstruk commented 2 years ago

How do you have your Kafka client configured?

What you see is explained in the troubleshooting chapter of the README.md.

It means that the token used by Kafka client was not issued by this instance of Keycloak or for the same realm.

This can happen if you restart the Keycloak instance without restarting your Kafka client afterwards. It can also happen if your Kafka client is configured to use a different Keycloak instance or realm.