[keycloak-user] Principal name is showing different after switching to KC

valsaraj pv valsarajpv at gmail.com
Mon May 7 09:23:22 EDT 2018


Hi Luis,

Thanks for reply. U am using OpenIDConnect for my client  and there is
nothing like this shown:
https://www.keycloak.org/docs/latest/securing_apps/index.html#_jboss_adapter
.
I am getting principal name as ID field that shows when you search in KC
admin page. Is there any way to get name instead of id ( cb3634be-e0e1-479e-
aec9-0cb38c8a0468 )?

Thanks!

On Mon, May 7, 2018 at 5:20 PM, Luis Rodríguez Fernández <uo67113 at gmail.com>
wrote:

> Hello Valsaraj,
>
> I am not sure what your scenario is. Me, I am using a client java adapter
> [1] for my tomcat applications. In my keycloak configuration file I have
> something like:
>
> <PrincipalNameMapping policy="FROM_ATTRIBUTE" attribute="
> http://schemas.xmlsoap.org/claims/CommonName"/>
>
> This tells keycloak which attribute use for the Principal.getName(). I
> guess that for your scenario must be something equivalent.
>
> Hope it helps,
>
> Luis
>
>
>
> [1]
> https://www.keycloak.org/docs/latest/securing_apps/index.
> html#java-adapters-2
>
>
>
>
>
>
> 2018-05-07 9:19 GMT+02:00 valsaraj pv <valsarajpv at gmail.com>:
>
> > Hi,
> >
> > UserPrincipal.getName showing cb3634be-e0e1-479e-aec9-0cb38c8a0468 like
> > this after switching to Keyclock. LDAP uid was showing when we were using
> > LDAP. After syncing users from LDAP to KC, when the application code
> checks
> > user principal name, it shows this.
> >
> > Any thoughts?
> >
> > Thanks,
> >
> > Valsaraj Viswanathan
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
> >
>
>
>
> --
>
> "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."
>
> - Samuel Beckett
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>



-- 
Life is like this: "Just when we get all the answers of life.... God
changes the question paper....

Valsaraj Viswanathan


More information about the keycloak-user mailing list