i've got some problems with CAS in conjunction with LDAP now. I want to implement an SSO solution for multiple applications. Authentication works great so far. We want to authorize the users on the base of their roles which are configured in LDAP. The problem is that CAS does not deliver the user roles.
I am now so far that I know that the deployerConfigContext.xml
needs to be configured. I have also found various tutorials, most work with either the wrong version of CAS or do not do what I want.
Our users lie in cn=admin,cn=users,dc=manager,dc=local
, groups reside in cn=admins,ou=groups,dc=manager,dc=local
. The CAS version is 3.5.2
I have tried insertig something like this:
<bean id="attributeRepository" class="org.jasig.services.persondir.support.StubPersonAttributeDao">
<property name="backingMap">
<map>
<entry key="uid" value="uid" />
<entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
<entry key="groupMembership" value="groupMembership" />
</map>
</property>
<property name="query" value="(uid={0})" />
<property name="contextSource" ref="contextSource" />
<property name="ldapAttributesToPortalAttributes">
<map>
<entry key="cn" value="Name" />
<entry key="home" value="homeDirectory" />
</map>
</property>
</bean>
CAS told me that he doesn't like the properties query
, contextSource
and ldapAttributesToPortalAttributes
. I wanted to fetch the "simple" attribute homeDirectory.
Can anyone of you give me tips for how to configure that wicked xml file? If you wish, I can also provide the complete xml file.
UPDATE
After some fiddling, I tried configuring an attributeRepository
as on this site: https://wiki.jasig.org/display/CASUM/Attributes in chapter Populate Principal's attributes with LDAP repository
. The result is that CAS doesn't start but instead gives me the message
Bean property 'ldapAttributesToPortalAttributes' is not writable or has an invalid setter method.
My attributeRepository
looks like this:
<bean id="attributeRepository" class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
<property name="ldapAttributesToPortalAttributes">
<map>
<entry key="cn" value="Name" />
<entry key="home" value="homeDirectory" />
</map>
</property>
</bean>