Keycloak: Subscribe events like create user to trigger a webservice
Asked Answered
P

1

8

I need to update from the Keycloak to another proprietary data store information about created users (no matter if created directly in Keycloak or in a connected LDAP/Active directory). I tried to enhance the logging but it seems that this is not logging everything.

Is there a way in Keycloak to subscribe to some events (like create user) and trigger some logging / web Service call from that event – so that all information are transmitted? What would be the right point to do this?

Phenanthrene answered 9/8, 2019 at 13:26 Comment(0)
A
7

You can write your own Event Listener by implementing the EventListenerProvider and EventListenerProviderFactory interfaces, more can found in server development documentation.

You can also find sample event listener that writes events to System.out in keycloak-quickstarts

Aurelio answered 10/8, 2019 at 6:57 Comment(1)
That looks promising - Works with accessing local users (form session) has to be verified if federated users work as well. Next problem would be to send a web-request form within the plugin without pulling external dependencies.Phenanthrene

© 2022 - 2024 — McMap. All rights reserved.