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

-- 
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/7f000ba3-f434-4e71-a7f7-f1b832d620c8n%40apereo.org.

Reply via email to