<div dir="ltr">Hello Guus,<div><br></div><div>I build something along the lines of: <a href="https://github.com/hawkular/hawkular-accounts/tree/master/keycloak-event-listener-jms">https://github.com/hawkular/hawkular-accounts/tree/master/keycloak-event-listener-jms</a></div><div>However you need to publish "normal" Keycloak events as well as AdminEvents which are fired when interacting via the Keycloak Admin REST interfaces, e.g. by using AdminConsole or the Admin-REST client.</div><div><br></div><div>When dealing with the AdminEvents be prepared to do a lot of string pattern matching against the associated REST resource-paths.</div><div>As an example for detecting whether an AdminEvent denotes a client-role assignment to a user you need to check the resourcePath for the following Pattern:</div><div>^users/(" + UUID_PATTERN_STRING + ")/role-mappings/clients/(" + UUID_PATTERN_STRING + ")<br></div><div>first uuid-group marks the userId the second one marks the clientId...<br></div><div><br></div><div>I think the AdminEvents should be enriched with some additional context information to ease the event matching in custom EventHandlers.</div><div><br></div><div>Cheers,</div><div>Thomas</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-04 13:51 GMT+02:00 Guus der Kinderen <span dir="ltr"><<a href="mailto:guus.der.kinderen@gmail.com" target="_blank">guus.der.kinderen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>Can you suggest an approach (or better yet, an existing solution if one is available) for the following?</div><div><br>We have an application that is interested in events regarding user management. We would like it to be notified of user creation, modification and deletion that occurs within Keycloak.</div><div><br></div><div>Is there some kind of publish/subscribe mechanism available for this?</div><div><br></div><div>Our initial thought was to create a module for Keycloak, that would somehow register itself as an event listener, and subsequently transmit those events via the XMPP pub/sub mechanism (our software is XMPP-capable).</div><div><br></div><div>Thoughts?</div><div><br></div><div>Regards,</div><div><br></div><div> Guus</div></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>