Hi,
I have a CAS instance for 7.2.0 RC4 in which I have trying to reformat the membership data that is returned from LDAP. This is the configuration:
cas:
auth:
attribute-repository:
attribute-definition-store:
json:
location: file:/etc/cas/config/attrib-definitions.json
core:
default-attributes-to-release: displayName,givenName,mail,mailNickname,memberOf,groups
merger: MULTIVALUED
ldap:
- id: LdapAttributeRepository
ldap-url: ldap://
example.com base-dn: cn=Users,dc=example,dc=com
bind-dn: cn=Manage DN,cn=Users,dc=example,dc=com
bind-credential: Test-credential
search-filter: mailNickname={user}
attributes:
displayName: displayName
givenName: givenName
mail: mail
memberOf: memberOf
mailNickname: mailNickname
The attrib-definitions.json file is as below:
{
"groups": {
"@class": "org.apereo.cas.authentication.attribute.DefaultAttributeDefinition",
"key": "groups",
"name": "groups",
"script": "groovy { return attributes['memberOf'].collect {group -> return group.split(',')[0].replace('CN=', '').replace(' ', '_') } }"
}
}
When hitting the actuator endpoint: /cas/actuator/resolveAttributes/testUser
I am getting the following attributes returned displayName,givenName,mail,mailNickname,memberOf i.e. the ones defined in cas.auth.attribute-repository.ldap[0].attributes.* properties.
The attribute I define in attribute-definition-store is not released. I even tried with a simple remapping in the definition store still that was not being released.
Can someone guide what is the issue in the configuration?
Thanks,
Aniket