Keycloak SPI written in Scala to publish events to a MQTT broker
Go to file
Dominic Grimm b681c3f492 Update README.md 2024-03-06 20:39:56 +00:00
project Add license 2024-02-18 19:03:59 +01:00
src/main Fix topic routing 2024-02-27 17:50:25 +01:00
.gitignore Init 2024-02-18 17:11:38 +01:00
.scalafmt.conf Init 2024-02-18 17:11:38 +01:00
LICENSE Add license 2024-02-18 19:03:59 +01:00
README.md Update README.md 2024-03-06 20:39:56 +00:00
build.sbt Fix topic routing 2024-02-27 17:50:25 +01:00

README.md

MQTT Event Listener Provider for Keycloak

Keycloak SPI written in Scala to publish events to a MQTT broker

Based on https://github.com/softwarefactory-project/keycloak-event-listener-mqtt

Configuration

  • server-uri (String): MQTT broker URI
  • username (String) / password (String): Credentials
  • topic (String): MQTT base topic
  • use-persistence (Boolean): MQTT persistence
  • retained (Boolean): Message retention
  • clean-session (Boolean): Establish clean sessions
  • connection-timeout (Int): Timeout duration in seconds
  • qos (Int): MQTT QoS

Installtion

Copy the JAR into providers/ and run Keycloak with these options:

./bin/kc.sh start \
        --proxy=edge \
        --hostname-strict=false \
        --spi-events-listener-mqtt-server-uri tcp://localhost:1883 \
        --spi-events-listener-mqtt-username username \
        --spi-events-listener-mqtt-password password \
        --spi-events-listener-mqtt-topic keycloak \
        --spi-events-listener-mqtt-use-persistence true \
        --spi-events-listener-mqtt-retained true \
        --spi-events-listener-mqtt-clean-session true \
        --spi-events-listener-mqtt-qos 0