Skip to content
Opinie artikel

Keycloak – Configuration as Code Pt.1

Most projects that use Keycloak make use of some kind of configuration automation. While you can literally do almost anything via the admin UI of Keycloak, it also supports other ways of configuration, such as:

  • JSON file imports
  • Shell script configuration via the Keycloak admin CLI
  • Configuration as code (i.e. the Keycloak admin REST client in Java)

When using Keycloak in bigger (enterprise) projects, you will want to use a more sophisticated way of configuring your instance than just “clicking things together” in the admin interface.
In the following few blog posts, and as part of the “Configuration as code with Keycloak” series, we will create a brand-new project, that will eventually result in a completely containerized Keycloak instance that is entirely configured by Java code.

In detail, our acceptance criteria for this demo project include the following:

  • The output of our build is one docker image that includes Keycloak, our custom Keycloak extensions code and the configuration code
  • The latest version of Keycloak is used (>=20.0.3 at time of writing)
  • All configuration of our Keycloak instance has to be achieved in form of code. If we clear the underlying database, the only thing we need to do is re-start our Keycloak instance and re-run the configuration script.
  • Keycloak can be made environment aware (i.e. DEV, ACC, PRD) via configuration properties

Meer lezen:

Also interesting