Open col-panic opened 1 month ago
In the test examples https://github.com/adorsys/keycloak-config-cli/blob/main/src/test/resources/import-files/groups/01_update_realm_add_group.json no path
attribute was used. Thus I removed the path
values, yet the error stays the same.
--import.managed.group=full
also does not solve the problem
Debug info shows, that for some reason, GroupImportService fails to correctly find the existing group, and tries to add it again?
ee-config-1 | Caused by: jakarta.ws.rs.WebApplicationException: Create method returned status Conflict (Code: 409); expected status: Created (201)
ee-config-1 | at org.keycloak.admin.client.CreatedResponseUtil.getCreatedId(CreatedResponseUtil.java:43)
ee-config-1 | at de.adorsys.keycloak.config.repository.GroupRepository.createGroup(GroupRepository.java:102)
ee-config-1 | at de.adorsys.keycloak.config.service.GroupImportService.createGroup(GroupImportService.java:144)
ee-config-1 | at de.adorsys.keycloak.config.service.GroupImportService.createOrUpdateRealmGroup(GroupImportService.java:139)
ee-config-1 | at de.adorsys.keycloak.config.service.GroupImportService.lambda$createOrUpdateGroups$0(GroupImportService.java:77)
ee-config-1 | at java.base/java.util.ArrayList.forEach(Unknown Source)
ee-config-1 | at de.adorsys.keycloak.config.service.GroupImportService.createOrUpdateGroups(GroupImportService.java:81)
ee-config-1 | at de.adorsys.keycloak.config.service.GroupImportService.importGroups(GroupImportService.java:69)
ee-config-1 | at de.adorsys.keycloak.config.service.RealmImportService.configureRealm(RealmImportService.java:203)
ee-config-1 | at de.adorsys.keycloak.config.service.RealmImportService.updateRealm(RealmImportService.java:195)
ee-config-1 | at de.adorsys.keycloak.config.service.RealmImportService.updateRealmIfNecessary(RealmImportService.java:153)
ee-config-1 | at de.adorsys.keycloak.config.service.RealmImportService.doImport(RealmImportService.java:144)
ee-config-1 | at de.adorsys.keycloak.config.KeycloakConfigRunner.run(KeycloakConfigRunner.java:79)
ee-config-1 | at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:768)
ee-config-1 | ... 13 common frames omitted
ee-config-1 |
I manually renamed the group entries GroupMpa
-> GroupMPA
and GroupMpk
to GroupMPK
in the
database. After this the problem does NOT occur anymore.
It seems that while the code is case sensitive in finding the group, the database is case-insensitive in accepting group names!
Current Behavior
I have a realm in json format, where multiple groups are defined, such as
On executing like
I started to receive messages like
with the respective keycloak message
The database entry is
Expected Behavior
There should not be an ERROR happening.
Steps To Reproduce
Environment
Anything else?
No response