allowedAttributes not being stored

Robert Lewis r.lewis at tamu.edu
Tue Jul 15 17:52:56 EDT 2008


Hi,

I tried Eric's bean, but had to modify it to get it to deploy. What I
have now for this bean is the below.

<bean id="attributeRepository"

class="org.jasig.services.persondir.support.jdbc.MultiRowJdbcPersonAttributeDao">
  <constructor-arg index="0" ref="dataSource"/>
  <constructor-arg index="1" value="%serviceId"/>
  <constructor-arg index="2" value="SELECT * FROM cas_registry WHERE {0}" />
  <property name="nameValueColumnMappings">
     <map>
<!-- Mapping between attributes (key) and Principal"s (value) -->
	<entry key="cn" value="Name"/>
	<entry key="tamuEduPersonUIN" value="uin"/>
	<entry key="tamuEduPersonNetID" value="user" />
	<entry key="mail" value="mail" />
	<entry key="telephoneNumber" value="telephoneNumber" />
     </map>
  </property>
</bean>

Now a problem is that on the services management view, adding a service,
there are no attributes listed for selection. The added service is
allowed to access cas, so the whitelist feature is working.

I am getting in the log the following.

Hibernate: insert into RegisteredServiceImpl (allowedAttributes,
allowedToProxy, anonymousAccess, description, enabled, name, serviceId,
ssoEnabled, theme) values (?, ?, ?, ?, ?, ?, ?, ?, ?)

So, it looks to me that nothing is being put into the attribute repository.

Questions I have are: Is there something else I have to do to get
Hibernate to insert the allowed attributes map in the database? And, in
the above bean, at constructor index='1' it seems like I would give it
the service url to retrieve the allowed attibutes for that service, but
how do I give it the service url inside deployerContextConfig.xml? I am
guessing %serviceId, but can anyone tell me if thats correct?

Thanks,

Robert Lewis


> Date: Mon, 14 Jul 2008 14:16:56 -0500
> From: Robert Lewis <r.lewis at tamu.edu>
> Subject: Re: allowedAttributes not being stored
> To: cas at tp.its.yale.edu
> Message-ID: <487BA628.603 at tamu.edu>
> Content-Type: text/plain; charset=ISO-8859-1

> Hi,

> I just saw some new docs Eric Dalquist put on the dashboard today.
> From a quick look at that it seems I should be doing something like
> the following.

<bean id="multiRowJdbcPersonAttributeDao"
class="org.jasig.services.persondir.support.jdbc.MultiRowJdbcPersonAttributeDao">
    <constructor-arg index="0" ref="dataSource" />
    <constructor-arg index="1" value="SELECT * FROM USER_DATA WHERE {0}" />
    <property name="nameValueColumnMappings">
        <map>
            <entry key="attr_name" value="attr_value" />
        </map>
    </property>
    <property name="queryAttributeMapping">
        <map>
            <entry key="username" value="uid" />
        </map>
    </property>
    <property name="resultAttributeMapping">
        <map>
            <entry key="uid" value="username" />
            <entry key="first_name" value="first_name" />
            <entry key="last_name" value="last_name" />
            <entry key="email" value="email" />
        </map>
    </property>
</bean>

> However, my attributes are stored per service id. I will modify the
> above for my case.




More information about the cas mailing list