Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 3.97 KB

keycloak.md

File metadata and controls

85 lines (57 loc) · 3.97 KB

Setting up Keycloak (user authentication)

This document describes how to configure Keycloak, for development, production on a Red Hat platform, and production with federated users from a Windows Active Directory. On development, Keycloak runs in a Docker container, see build.gradle for the available commands. For production, the directory scripts contains some convenient scripts for starting Keycloak.

Setting up Keycloak for development

The Keycloak container for development has the following set-up (as loaded upon creation of the Keycloak Docker container by loading ANET-Realm-export.json):

To access the container

Access Keycloak container

URL http://localhost:9080/
username admin
password admin

Realm definition

Realm definition

Confidential client definition (used by the server-side)

Confidential client definition

The credentials (to be used in application.yml): Confidential client credentials

Public client definition (used by the client-side)

Public client definition

Authentication settings of the realm

Realm definition

Users defined locally in the realm

Realm definition

Setting up Keycloak for production on Red Hat

A Keycloak container running on e.g. a Red Hat platform (where you would define the users locally in Keycloak) can use the following set-up:

Realm definition

Realm definition

Confidential client definition (used by the server-side)

Confidential client definition

The credentials to be used in application.yml can be found under the Credentials tab.

Public client definition (used by the client-side)

Public client definition

Authentication settings of the realm

Realm definition

Users defined locally in the realm

Define your users under the Users section of the realm.

Setting up Keycloak for with federated users from a Windows Active Directory

See Kerberos set-up on how to integrate the Keycloak server with the AD.

A Keycloak container running on e.g. a Red Hat platform that gets its users from a Windows Active Directory (and can support SSO/Single Sign-On) can use the following set-up:

Realm definition

Realm definition

Mapping first name from AD to the realm

To get newly on-boarded user's first names correctly mapped from AD to the realm, you may want to add a mapper first name to the realm: Realm mappers Realm first name mapper

Confidential client definition (used by the server-side)

Confidential client definition

The credentials to be used in application.yml can be found under the Credentials tab.

Public client definition (used by the client-side)

Public client definition

User federation settings of the realm

This is an example configuration to connect to an Active Directory; see Keycloak documentation for additional hints on how to configure it: Federation definition

Authentication settings of the realm

Take note of the Kerberos setting here (necessary if you want to support SSO): Realm definition