Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Transparent and continuous migration from one keycloak to another

NotificationsYou must be signed in to change notification settings

cloud-iam/external-keycloak-user-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Keycloak to Keycloak User Federation.Import users, roles and groups stored in external Keycloak servers without downtime.

Note: this Keycloak extension is provided as anpaid option for every managed keycloak subscriptions onCloud-IAM.

Getting Started

This tutorial will talk about two Keycloak cluster deployments:

  • Destination Deployment: a fresh new deployment, without realms, users, roles and groups.

  • Source Deployment: a deployment with production workload, contains all the customer current users, roles, groups that we would like to import toDestination Deployment.

source deployment userssource deployment roles

Upload Keycloak custom extension

Once connected to Cloud-IAM dashboard, select theDestination Deployment that will import all users and upload theimport-keycloak-user-storage.jar custom extension.

Cloud-IAM will then automatically update theDestination Deployment Keycloak nodes.

Import the realm

Export the realm configuration (groups, roles and clients) from theSource Deployment.

partial realm export

InsideDestination Deployment Keycloak console, create a new realm (realms list -> new) and specify in the realm creation form the previously exported realm file.

realm import

Destination Deployment now has new realm with the imported groups, roles and clients andno users.

destination-deployment custom roles

destination-deployment no users

It's now time to setup the continuous import of users fromSource Deployment to ourDestination Deployment.

Setup User Federation

InDestination Deployment realm, create a new User Federation with ourexternal-keycloak-user-storage provider.

destination-deployment no users

Set database credentials

First double check thatSource Deployment database can be accessed fromCloud-IAM Destination Deployment servers.

Contact [Cloud-IAM support](mailto:support@cloud-iam.com) to receive your Keycloak cluster deployment IP addresses list and add them to the database connection allowlist.

Then type theSource Deployment database connection string using the following format:

jdbc:postgresql://{database_ip_address}:{database_port}/{database_name}

Don't forget to also check the realm name to import fromSource Deployment in theOriginal realm input.

destination deployment user federation database configuration

TheUser Federation extension is now fully configured and ready to import users fromSource Deployment.

keycloak user federation list

Import our first user

OurSource Deployment has two users in the realm we wish to import, each one has a custom rolemy-role-* attached:

  • usernameproduction-user-1 (emailproduction-user-1@plop.com)

    • assigned roles:my-role-1offline_accessuma_authorization
  • usernameproduction-user-2 (emailproduction-user-2@plop.com)

    • assigned roles:my-role-2offline_accessuma_authorization

Logging in intoDestination Deploymentproduction realm withproduction-user-1 credentials will automatically import it — along with its assigned groups and roles — fromSource Deployment toDestination Deployment.

keycloak import user login

Each new user logged will be automatically imported intoDestination Deployment destination realm.

keycloak imported user

Each user is imported with its roles and groups automatically assigned.

keycloak imported user

🎉 Congrats, your first user was imported!

Known limitations

  • Each new roles and groups created onSource Deploymentafter the realm creation and import onDestination Deployment won't be imported nor assigned to imported users.

About

Transparent and continuous migration from one keycloak to another

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp