Keycloak SPI written in Scala to publish events to a MQTT broker
project | ||
src/main | ||
.gitignore | ||
.scalafmt.conf | ||
build.sbt | ||
LICENSE | ||
README.md |
MQTT Event Listener Provider for Keycloak
Keycloak SPI to publish events to a MQTT broker written in Scala
Based on https://github.com/softwarefactory-project/keycloak-event-listener-mqtt
TODO: Reduce JAR size
Configuration
server-uri
(String): MQTT broker URIusername
(String) /password
(String): Credentialstopic
(String): MQTT base topicuse-persistence
(Boolean): MQTT persistenceretained
(Boolean): Message retentionclean-session
(Boolean): Establish clean sessionsconnection-timeout
(Int): Timeout duration in secondsqos
(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