Migrate from Red Hat Single Sign-On to Keycloak
This guide describes how to migrate identity data from Red Hat Single Sign-On (RH-SSO) 7.x running on OpenShift to Alauda Build of Keycloak running on Kubernetes.
TOC
OverviewMigration FlowPrerequisitesStep 1: Export Data from RH-SSOStep 2: Copy the Export FileStep 3: Import Data into KeycloakStep 4: Verify the MigrationNotesReference DocumentationOverview
Red Hat Single Sign-On (RH-SSO) 7.x is a commercial distribution developed by Red Hat based on the Keycloak Community Edition. The two are fully compatible in core data model and storage structure.
This migration uses the officially recommended export/import mechanism, which migrates the following data completely:
- Realm configurations
- Users (including credentials and status)
- Realm Roles and Client Roles
- Clients and their permission mappings
- Composite roles and built-in administrative permissions
Migration Flow
Prerequisites
- Access to the RH-SSO Pod on OpenShift with
oc rshpermissions. - A running Alauda Build of Keycloak instance on Kubernetes.
kubectlaccess to the target Kubernetes cluster.- Sufficient disk space on the local machine for the exported JSON file.
Step 1: Export Data from RH-SSO
The export command starts a secondary standalone server process on an offset port. It does not interrupt the running RH-SSO service, but plan the operation during a low-traffic window to minimize risk.
Connect to the RH-SSO Pod and run the export command:
Wait for the export to complete. The process prints log output and then exits. The exported file is saved to /tmp/sso-export.json inside the Pod.
Step 2: Copy the Export File
Copy the export file from the RH-SSO Pod to your local machine, then to the Keycloak Pod:
Step 3: Import Data into Keycloak
Connect to the Keycloak Pod and run the import command:
The --override true flag replaces any existing Realm with the same name in the target Keycloak instance. Remove this flag if you want the import to fail when a conflicting Realm exists, preserving the current data.
Step 4: Verify the Migration
After the import completes, verify that all data was migrated correctly:
- Log in to the Keycloak Admin Console.
- Confirm that the imported Realm(s) appear in the Realm dropdown.
- Verify the following in each imported Realm:
-
User count matches the source RH-SSO
-
Client configurations are intact
-
Role assignments are correct
-
Composite roles and permission mappings are preserved
-
Notes
- Import Success Indicator: After executing the import command, the log prints
Realm '<realm-name>' importedto confirm successful import. A finalERROR: Address already in usemessage is a port conflict from the import process and does not affect the data import result. - Credential Compatibility: RH-SSO 7.x and Keycloak 26.x use compatible credential storage formats. User passwords are migrated and remain valid after import.
- Client Secrets: Client secrets are included in the export file. Verify they are preserved after import.
- Override Mode: The
--override trueflag replaces any existing Realm with the same name. Remove this flag if you want the import to fail when a conflicting Realm exists.