I thought that this would be simple, but am having a problem making it happen:
CAS 3.5.0 I am currently pulling attributes from LDAP (was pulling from two
different LDAP servers, but now using just one). I want to add an attribute
that could be released to services which does not come from LDAP, but is simply
a fixed value, like user_role="regular".
So, I tried this in attributes-configuration.xml:
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.MergingPersonAttributeDaoImpl">
<property name="personAttributeDaos">
<list>
<ref bean="bindLdapAttributeRepository" />
<!-- Next line removed by tffishe June 3,2014 no longer used
-->
<ref bean="StubbAttributeRepository" />
</list>
</property>
</bean>
<bean id="bindLdapAttributeRepository"
class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
My LDAP attributes ...
</bean>
<bean id="StubbAttributeRepository"
class="org.jasig.services.persondir.support.StubPersonAttributeDao">
<property name="backingMap">
<map>
<entry key="user_role" value="test" />
</map>
</property>
</bean>
But, debug logging does not show the attribute user_role getting set:
DEBUG 2015-08-21 13:43:04,820 [http-8080-2][]
org.jasig.cas.authentication.AuthenticationManagerImpl - Attribute map for
shibboleth_test_account: {uid=shibboleth_test_account, FirstName=Shibboleth,
LastName=Test Account}
Shouldn't I be able to use StubPersonAttributeDao to set a fixed value
attribute or am I doing something wrong?
Ted F. Fisher
Information Technology Services
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user