Ldap Custom Attribute Resolution

38 views
Skip to first unread message

craab

unread,
Jan 20, 2020, 2:56:50 AM1/20/20
to CAS Community
Hi,

I am using CAS 6.1.3 with Ldap. I have configured Ldap for Authtication and as attribute repository. Additionally I have a jdbc attribute repository. Merging rule is configered to "MULTIVALUED".

Now I want to map the users ldap groups to roles and add those to the users attributes. The roles are saved in a separate database table "GROUPS_TO_ROLES", where one group can have one or more roles. Additionally the user gets assigned roles from the jdbc attribute repo.

For example:
There is a ldap group "Users" that should be mapped to the roles "MODULE_A_USER" and "MODULE_B_USER".

A user authenticates with his ldap credentials. Authentication succeeds and his attributes are resolved via cas via ldap and jdbc. From ldap the user gets the attribute groups="Users" and from jdbc he gets the attribute roles="MODULE_C_USER".

Now some mapping takes place (and my question is, how to do this).

The final profile would have the attributes:
groups=Users
roules="MODULE_A_USER", "MODULE_B_USER", "MODULE_C_USER"

Does anyone know how to do this?

craab

unread,
Jan 20, 2020, 11:03:16 AM1/20/20
to CAS Community
I was able to create a custom "RegisteredServiceAttributeFilter", where fetch the mapped group/roles from the database and add them to the profiles attributes.
Reply all
Reply to author
Forward
0 new messages