Attribute definition not reflecting in release CAS 7.2.0 RC4

60 views
Skip to first unread message

Aniket Gangadharan

unread,
Feb 19, 2025, 8:08:59 AM2/19/25
to CAS Community
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
Reply all
Reply to author
Forward
0 new messages