[keycloak-user] No LDAP Group Attribute mapper in Keycloak?

Edgar Vonk - Info.nl Edgar at info.nl
Wed Feb 3 09:36:30 EST 2016


Hi Marek,

Somewhat related: we would like to have certain LDAP group attributes end up in the user’s JWT tokens as well so that we can use this data in our client.

The Group Membership Mapper places the name of the (LDAP) group in the token but what would we need to do to get group attributes in there as well? I guess we would then need to extend the Group Membership Mapper and add a mapping of group attributes there?

Or for now I guess we could use the Keycloak REST API from our client to retrieve all the group information for a user using the 'GET /admin/realms/{realm}/users/{id}/groups’ endpoint.

cheers

> On 03 Feb 2016, at 14:55, Edgar Vonk - Info.nl <Edgar at info.nl> wrote:
> 
> Ah, you are right. Sorry, overlooked that completely. Seems fine for us at the moment. Thanks.
> 
>> On 03 Feb 2016, at 14:06, Marek Posolda <mposolda at redhat.com> wrote:
>> 
>> This is actually supported. If you look at LDAP Group mapper, you can see field "Mapped Group Attribues" . Here you can specify list of attributes, which will be mapped from LDAP group to Keycloak group and viceversa.
>> 
>> There is one limitation, that name of attribute needs to be same on both places (ie. you can map LDAP attribute "description" to Keycloak attribute "description" . But you can't map LDAP attribute "description" to Keycloak attribute "foo" ). Feel free to create JIRA if this is limiting you. I've actually go simple way, but it can be improved if there is additional demand.
>> 
>> Marek
>> 
>> On 02/02/16 17:45, Edgar Vonk - Info.nl wrote:
>>> Hi,
>>> 
>>> If I am correct there is no LDAP Group Attribute mapper in Keycloak right? There is a User Attribute mapper and there is a Group Mapper but group attributes in LDAP cannot be synched to and from Keycloak at the moment?
>>> 
>>> I guess it should not be too hard to write an LDAP Group Attribute mapper should we want to?
>>> 
>>> cheers
>>> _______________________________________________
>>> keycloak-user mailing list
>>> keycloak-user at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>> 
> 
> 
> _______________________________________________
> 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