Authorization Service Config. Import From Dev. to Prod

We have two separated instances of Keycloak running, one for development and one with production data.

Since we need to import all the authorization service configuration from Dev into Prod and this can be tedious process, I was wondering if you any experience or advice on how to automate this process.

Thank you :pray:

P.S.: I made a small tool to visualize Authorization Service configurations
https://behrooz-tahanzadeh.github.io/visualize-keycloak/

1 Like

Wow! The visualization tool is awesome. I’m definitely going to use this. Is it open source?

It’s possible to get the export programmatically from GET https://<host>/auth/admin/realms/<realm>/clients/<client_id>/authz/resource-server/settings, but I haven’t tried to import it to another realm.

1 Like

Thank you, Yes, of course :smiley:
It’s built on top of the Mermaid library
Mermaid live editor

We can make a periodic task to back-up the settings JIC. I also get an error trying to import it.

Hey behrooz-tahanzadeh, were you able to find a nice solution?

I’ve tried having a central repository that builds a Keycloak image with a realm.json and that can be pulled into multiple deployments but I had no success when Keycloak connects to a database (it just ignores the base configurations that comes with the image and resets all realms to the standard master).