SnuK87 / keycloak-kafka

Keycloak module to produce events to kafka
Apache License 2.0
100 stars 37 forks source link

Compatibility for Keycloak v25 #50

Closed alfredopoveda closed 1 month ago

alfredopoveda commented 2 months ago

This module does not work with keycloak v25. Is there a roadmap where they intend to provide support for keycloak v25?

jtognazzi commented 2 months ago

We just updated to Keycloak 25, but we did not noticed any error with the plugin. What kind of error do you have ?

but we are still using version 1.5.0

SnuK87 commented 2 months ago

I tested the latest release on Keycloak 25.0.5 and it was working fine. https://github.com/SnuK87/keycloak-kafka/releases/tag/1.2.0

does not work

That's not a lot of information to help you there. Do you get an error message or anything to narrow down the issue?

apoveda25 commented 2 months ago

Hi @jtognazzi @SnuK87, thanks for replying!

The output of keycloak is as follows:

imagen

This is my Dockerfile:

image

This is my definition of keycloak:

image

This is my definition of broker (redpanda === kafka):

image

When updating a user, I don't get any errors from keycloak, the event just doesn't reach the broker, do you have any idea why?

Maybe I missed something.

jtognazzi commented 2 months ago

I checked again on our environment if the message was really produced and consume properly, and I can confirm that it works as before 😌 I see you used the brand new 1.2.0 version of this plugin, maybe you could try to downgrade to the previous version 1.5.0 ?

apoveda25 commented 2 months ago

Hi, I tried v1.1.5, v1.1.6 and v1.2.0. With none of them I was able to get keycloak events to reach kafka. I have tried another module for MQTT and this one works for me. https://github.com/softwarefactory-project/keycloak-event-listener-mqtt

SnuK87 commented 2 months ago

Sorry but I'm not able to help you when you just post some screenshots.

Can you post your keycloak log file here? Then I can check if the spi is loading correctly. Or your docker-compose file, then I can run it locally and debug it.

apoveda25 commented 2 months ago

Hi @SnuK87, i'm leaving you the Dockerfile and the docker-compose here, I hope with this you can replicate the error.

Dockerfile.zip docker-compose.zip

SnuK87 commented 2 months ago

@apoveda25 You didn't configure the kafka-keycloak spi in your posted files.

apoveda25 commented 2 months ago

Sorry, I sent you a later version of those files. This is the previous version in which I used the Kafka module.

docker-compose.zip Dockerfile.zip

SnuK87 commented 2 months ago

Your topic name is invalid.

org.apache.kafka.common.errors.InvalidTopicException: Invalid topics: [oidc/changes]: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.InvalidTopicException: Invalid topics: [oidc/changes]

I don't know about redpanda and couldn't verify your setup but when I replace it with vanilla kafka then it's all working.