-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
import-export
Describe the bug
I am encountering an issue with Keycloak versions 26.0.0 and 26.0.1 when attempting to import multiple realms through the file-based import method. Specifically, I am mounting a directory with multiple realm configuration files at /opt/keycloak/data/import/. However, instead of all realms being imported, only one realm is imported repeatedly, overwriting the others.
Version
26.0.1, 26.0.0
Regression
- The issue is a regression
Expected behavior
All provided realms should be imported.
Actual behavior
Only one realm is imported multiple times, overwriting any other realms. There seems to be no pattern based on the alphabetical order or file structure of the realms in the directory.
How to Reproduce?
- Create multiple realm files (e.g., realm1.json, realm2.json, realm3.json).
- Mount these realm files to /opt/keycloak/data/import/.
- Start Keycloak and check the imported realms.
Anything else?
In the logs, I repeatedly see messages like:
[org.keycloak.exportimport.util.ImportUtils] (main) Realm 'realm2' already exists. Removing it before import
[org.keycloak.exportimport.util.ImportUtils] (main) Realm 'realm2' imported
Additional Details:
When attempting to create a new realm through the Admin GUI after encountering this issue, I receive the following error:
409 Conflict: "Client id 'account-console' already exists"