/keycloak-kafka-event-listener

Event listener provider for Keycloak that writes to Kafka

Primary LanguageJavaApache License 2.0Apache-2.0

Keycloak Event Listener for Kafka

This demo project listens for Keycloak Events and writes them to Apache Kafka.

Prerequisite

  • Docker (latest)
  • Compose (latest)

Quick Start

You can run the project with the following command

> docker-compose up -d

Check that all containers are up with:

> docker-compose ps

Tail the Keycloak logs and watch as events are printed to the console

> docker-compose logs -f keycloak

Now open the keycloak UI at http://localhost:8080

login with:

username: juliuskrah
password: password

Go to the Events left menu item, and navigate to Config. Under Event Listeners, add keycloak-demo and save.

Logout and log back in. Watch the console for changes.

Building the Containers

To build the containers:

> cd keycloak-provider
> ./gradlew clean assemble
> cd ..
> docker-compose up -d --build