Hi,
I would like to generate a UUID (such as “597ae2f6-16a6-1027-98f4-d28b5365dc14” for example) or better use the existing user id in Keycloak to synchronize it as a separate attribute into my OpenLDAP server. Idea is to have another unique identifier in order to not rely on email addresses or nicknames in LDAP. (We don’t use Keycloak usernames at all.)
When using “id” as “User Model Attribute” in the LDAP Mapper configuration, it results in the following error:
13:55:57,974 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-27) Uncaught server error: java.lang.UnsupportedOperationException: Property interface org.keycloak.models.UserModel.id is read only, as there is no setter method.
Since I am not so experienced with developing or reading Java code: Is there another way to synchronize the user ID into Keycloak or is there somehow a helper function like “${RANDOM}” like for hardcoded-ldap-attribute-mapper types for creating random UUIDs?
Thanks in advance!
Greets,
Daniel