[keycloak-user] User registration flow - Can UID mapped into SN and CN ?

Marek Posolda mposolda at redhat.com
Thu Feb 1 03:51:51 EST 2018


If you go to "Mappers" tab of your LDAP Federation Provider and go to 
UserAttributes mappers for "firstName" and "lastName" and change switch 
"Is Mandatory In LDAP" to On, then Keycloak will send some "temporary" 
values (Just space by default) for CN and SN during user registration. 
Those are then changed to real firstName and lastName of user in next 
request (assuming firstName and lastName are provided). You can enable 
TRACE logging for LDAP in standalone.xml (Category 
org.keycloak.storage.ldap) to see the requests to LDAP and when they pass.

Marek

On 31/01/18 20:50, Min Han Lee wrote:
> Hello guys,,
>
> Our LDAP environment have a schema which required sn and cn to be stated
> when creating a new user, therefore the User Registration in the KC will
> not work as the KC can only use UID as the main attribute to register a new
> user,
>
> I'm thinking if anyone able to work this around by changing the UID to
> another attribute?
>
> Kind Regards
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list