Keycloak Configuration CLI - Configuration as code for keycloak!

Hi!

since the import API doesn’t work well (e.g. updates configs) we wrote a custom utility to configure our keycloak instances. The goal of the utility was to have the keycloak configuration as code inside our deployment and stage the configuration across multiple stages as part of the release bundle.

We used this tool approx. nice months and work well over multiple keycloak versions.

In our setup we running the config-cli script after every deployment. The schema of the json file is the same as the keycloak realm export json. So if you are lazy you can export your realm from a dev stage and use this tool to configure your keycloak in a test stage without opening the UI.

GitHub Repo: https://github.com/adorsys/keycloak-config-cli

I wish I cloud see this on the community tab on the keycloak page.

12 Likes