p2-inc / keycloak-events

Useful Keycloak event listener implementations and utilities.
https://phasetwo.io
Other
168 stars 35 forks source link

Export realm with webhooks #18

Closed MarcinBondaruk closed 1 year ago

MarcinBondaruk commented 1 year ago

Hey, im working on realm management configuration through keycloak-config-cli. I aimed for managing webhooks through the configuration awell. While exporting realm I can not seem to find webhooks definitions in realm.json. How do you manage your webhooks? Is there an easy way to export them?

xgp commented 1 year ago

Hi @MarcinBondaruk . This is a problem for all of our extensions that store state. We have not (yet) found a good way to hook into the Keycloak Realm import/export process without modifying Keycloak itself.

If it's possible for you to use the HttpEventListenerProvider rather than webhooks, those configurations can be stored in Realm attributes, and thus will be part of a realm import/export. I was just discussing the differences in another issue https://github.com/p2-inc/keycloak-events/issues/17

So, unfortunately, if you need to use webhooks, there isn't a good way to store/export them externally other than a database dump.