Skip to content

Keycloak

Waldur supports integration with Keycloak identity manager.

Below is a guide to configure Keycloak OpenID Connect client and Waldur intergration.

Configuring Keycloak

Instructions below are aimed to provide a basic configuration of Keycloak, please refer to Keycloak documentation for full details.

  1. Login to admin interface of Keycloak.
  2. Create a new realm (or use existing) New realm
  3. Open a menu with a list of clients. List clients
  4. Add a new client for Waldur by clicking on Create client button. Add client
  5. Make sure that Client authentication is enabled. Set access type
  6. Change client's Valid redirect URIs to "*". Valid redirect URIs
  7. Copy secret code from Credentials tab. Secret code
  8. You can find the settings required for configuration of Waldur under the following path on your Keycloak deployment (change test-waldur to the realm that you are using): /realms/test-waldur/.well-known/openid-configuration

Configuring Waldur

Keycloak is configured in the user interface, not in settings.py.

  1. Open Administration → Configuration → Identity providers.

    Identity providers

  2. Open the Keycloak provider details through the Edit entry of its dropdown menu.

    HomePort provider details

  3. Fill in Client ID, Client secret and Discovery URL from the steps above. For extra security, enable SSL, PKCE and post-logout redirect.

  4. Map user attributes in the … field inputs. Each takes a space-separated list of claims, and the first claim the user has is used, for example schac_home_organization affiliation org. Claims are read from the UserInfo response and the validated ID token, with UserInfo taking precedence. User claim and Extra fields read UserInfo only. The Re-discover entry in the same menu (Discovery wizard before the provider is configured) suggests a mapping from the provider's published claims.

The Keycloak card is Waldur's generic OIDC provider, so other OpenID Connect providers are set up the same way. See Microsoft Entra ID for a worked example.