Everything within this section is only visible while editing. Use Page Properties ID "STUB", "REFACTURE", "PROGRESS", "rDEV", "rDOC", "rLANG" and "DONE".

Everything contained within the table is displayed in the (INTERNAL) Reports page.

Product Version
Report Note
Assignee

Resources & Remarks

Always keep at the same state! enaio - official help: https://help.optimal-systems.com/enaio/v910/admin/administrator/en/dienste/idprovider.htm
... with first 3 sections of this page.

yuuvis Impulse: https://wiki.optimal-systems.de/pages/viewpage.action?spaceKey=MAN&title=Keycloak

yuuvis Momentum & enaio: https://wiki.optimal-systems.de/display/EnaioServices/Keycloak

  • Antje: page started as collection of existing information, has to be split later on in yuuvis and enaio part and translated.
  • Antje: installation guide copied from official enaio documentation (English version) and modified for yuuvis.
  • Antje: information for yuuvis added (from Oktopus wiki)

Modification History

Add a new line to this table and fill it whenever you edit the page.

NameDateProduct VersionAction
Antje08 FEB 20212.4New page properties macro.
Antje27 SEP 20212021 WinterImpersonation Section added.
Agnieszka04 OCT 20212021 WinterrLANG
Antje10 NOV 20212021 Winterremove roles from access tokens
Agnieszka10 NOV 20212021 WinterrLANG
Antje24 MAY 2022all versionsadd session cookies



Guideline for manual installation and configuration of keycloak as an identity provider for yuuvis® Momentum.



Table of Contents


Introduction

Identity providers such as Keycloak can be connected to yuuvis® API for authentication using Connect/OAuth2 via the authentication-service.

Keycloak is the recommended identity provider for yuuvis® Momentum and is consistently used for testing. In principle, any identity provider supporting OAuth2 can be used in the same way.

As standard, the installation is done by means of a Helm chart. Two demonstration tenants are created and configured automatically. Further tenants for productive use have to be added and configured manually.
>> Installation Guide

The manual installation and configuration of Keycloak for yuuvis® Momentum API are broadly described here.

After installation, Keycloak provides two administrative services, one for system administrators and one for users.

Keycloak Installation

To install Keycloak manually, follow these steps:

Note: For productive use, it is recommended to connect Keycloak to a different relational database management system (RDBMS) instead of the embedded standard H2. Suggestions for compatible RDBMS are provided by Keycloak: https://www.keycloak.org/docs/latest/server_installation/index.html#database.

Keycloak: Tenant and User

You require a tenant and a user.

Note: Users in Keycloak must also be entered in the yuuvis® user administration.

To create tenants and users, follow these steps:

Keycloak: Connecting to yuuvis® API

To establish a connection, create a client following these steps:

In case of a yuuvis® Momentum system with multiple tenants, the authentication-service has to be registered as a Keycloak client in each corresponding realm.

Connecting yuuvis® authentication-service to SSL-secured Keycloak

Embedding the Login Page into an iframe

The Keycloak login page can be embedded as an iframe into a second web page if this web page is published on the same host as Keycloak. If the secondary web page is published on a different host, it has to be legitimized in every Keycloak tenant that will use this web page for the login process:

Impersonation

In order to allow users with a specific role to log in as any other user, impersonation can be activated in Keycloak. Thus, users with this specific role can use their own password to log in to the account of any other user within their tenant. In Keycloak, the feature is realized via impersonation by means of token exchange.

Activating Token Exchange

Configuring the User Account and Keycloak Clients

Testing Impersonation with cURL

The following commands use an administrative user root with the password changeme belonging to the tenant tenant1 with the impersonation authorization as configured before. This user requests access to the account of the user specified by the ID cc14e5d4-e8da-4108-92ad-c87066aed4c3.

Suppressing Duplicate Information on Roles

Per default, the access token generated by Keycloak contains the roles of the currently logged-in user. The AUTHENTICATION service creates an internal JSON Web Token (JWT) that includes the unchanged Keycloak access token. However, in order to allow a separate role management, the AUTHENTICATION service requests the roles of the corresponding in a separate request and adds them to the internal JWT in addition to the Keycloak access token. The roles stored in the original Keycloak access token are a duplicate of the information and are always ignored. In order to reduce the size of the JWT, their inclusion in the Keycloak access token can be suppressed by applying the configuration adjustment described below. Thus, for any request to the yuuvis® Momentum API, the request header size is reduced.

These configuration steps have to be applied to each realm in each Keycloak instance in which to suppress the inclusion of role information in the Keycloak access token.

Session Management

For each user session, HTTP client and browser set session cookies as described here:
>> Authentication against the Core API

Additionally, the following cookies are set by Keycloak. For more information, please refer to the official Keycloak documentation.

Summary

This article explained how to install and configure Keycloak as an identity provider and access management system for yuuvis® Momentum in a manual procedure.

Read on


Login to the Core API

 Keep reading


Authentication against the Core API

 Keep reading


Access Authorization and Permissions

 Keep reading