micado-eu / micado_deployment

The micado deployment
European Union Public License 1.2
0 stars 5 forks source link

Keycloak for Micado #56

Open mthsbk opened 3 years ago

mthsbk commented 3 years ago

@gioppoluca following issue describes what we discussed/learned about Keycloak in Antwerp:

Keycloak general concepts

How to manage Keycloak

How to implement Keycloak for Micado

gioppoluca commented 3 years ago

can a user belong to more than 1 group within the same app?

mthsbk commented 3 years ago

Yes, a user can be in multiple groups.

mthsbk commented 2 years ago

Keycloak theming

Adding themes to Keycloak

Custom themes reside in the keycloak/themes directory (/opt/jboss/keycloak/themes in our Docker image).

So we need to create a /opt/jboss/keycloak/themes/micado directory there and link a local directory as a volume to that folder.

That way each local administration can use their own theme files in the local directory, that will be picked up by Keycloak.

Developing a theme

The best way to create a custom theme is to extend an existing one. That way you only have to override the resources you want to adapt.

You can either extend the base or keycloak theme, with the latter being more complex and having images.

⚠️ If you decide to override HTML templates bear in mind that you may need to update your custom template when upgrading to a new release.

Details about how to implement the actual themes can be found in the official documentation: https://www.keycloak.org/docs/latest/server_development/#creating-a-theme

Selecting themes in Keycloak admin

  1. Log into the Admin Console.
  2. Select your realm from the drop-down box in the top left corner.
  3. Click Realm Settings from the menu.
  4. Click the Themes tab.
  5. Select the newly added theme