Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sync Users between different Keycloak instances

I work for a multi company group. Each company has its own Network its own IT Admins and therfore its own Active-Directory. There is no possibility to connect the different Networks via VPN for e.g. The users of the companies can be identified from their email domain for e.g. [email protected] and [email protected]

My goal is to develop a global application for the whole company group.

I want to use Keycloak as Identity and Access Management.

The problem is that every user, which is member of defined groups, from all companies must have access / login / authorized to the centralized frontend and the decentralized backend (self programmed API proxy/gateway).

Here is a drawing of the current situation:

Draw.io Feel free to edit

Network draft

Suggestion:

  1. I would use a shared DB for the keycloak instances, but since there is no VPN it cant be done
  2. keycloak to keycloak user federation ?
  3. Use the other companies as idP and script a switch to the main keycloak?

Thanks in advance for your help :)

like image 654
Stefan Höltker Avatar asked Apr 28 '20 13:04

Stefan Höltker


People also ask

Where are users stored in Keycloak?

The way it works is that when a user logs in, Keycloak will look into its own internal user store to find the user. If it can't find it there it will iterate over every User Storage provider you have configured for the realm until it finds a match.


1 Answers

I would recommend dedicated "local" Keycloak in each company (with configured user federation to Active Directory). And one "global" Keycloak instance, which will have configured Identity Brokering to all "local" Keycloak instances. "local" admins will have still full power to manage their users and customize login theme. Users will have to select identity provider from the "global" Keycloak login page or apps may use client-suggested identity provider with kc_idp_hint query parameter.

like image 133
Jan Garaj Avatar answered Sep 27 '22 22:09

Jan Garaj