-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyCloak: Realm creation automation #44
Comments
First version has been developed of Realm creation via script. We export a json file from Keycloak, customize it and re-import it. JSON file is customized via a script. |
When the model realm has groups defined -- the generated realm from the script has a conflict because the GroupIDs for the model and the new realm have the same GUID identifier.
See possible place of error in diff: Attached test JSON files: (new*.json is the generated file, model*.json is the export of the original model ) . So you can simulate the same by importing the model*.json, and then try importing the new*.json |
I can see the Role UUID identifiers are the same but the roles are independent and having the same UUID doesnt seem to be a factor in roles. I guess they use the Realm name as the key. |
Fixed it. Kindly check and close this issue |
@surajpt Thanks. Tested as working. |
The gawati implementation of KeyCloak expects a particular structure in a partner realm, with specific metadata fields, theme information, roles etc.
To make creation of realms easier, the approach we have taken is to setup a model realm with all the required fields and theme information and roles, and then export this structure to a directory or as json.
This output json is a serialized model of a realm and will be scripted; this exported file will be customized (i.e. metadata changed) and re-imported to create the new realm.
There are internal APIs that do the same thing, but they are more complex to implement and possibility of breakages with upgrades to keycloak versions are more likely.
The text was updated successfully, but these errors were encountered: