Robert,
This may seem like a completely dumb question but when you view the service
in the Services Management tool, before you save it, are you selecting the
attributes in the multi-valued dropdown and then pressing save?

AttributeRepository is used to display the list of potential attributes a
service could access, while the Services Management tool allows you to
select which ones it actually can access.

-Scott

-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia

On Tue, Jul 15, 2008 at 5:52 PM, Robert Lewis <[EMAIL PROTECTED]> wrote:

> 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 <[EMAIL PROTECTED]>
> > Subject: Re: allowedAttributes not being stored
> > To: [email protected]
> > Message-ID: <[EMAIL PROTECTED]>
> > 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.
>
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to