Yep, as I said it's the SQL that is never used, the map of attributes is used because I can add and remove them for each application.I can't find the my SELECT in the logs, even in debug mode, that's why I think the problem come from that.
2008/10/31 Scott Battaglia <[EMAIL PROTECTED]> > Did you authorize the application to see those attributes? > > -Scott Battaglia > PGP Public Key Id: 0x383733AA > LinkedIn: http://www.linkedin.com/in/scottbattaglia > > > On Fri, Oct 31, 2008 at 12:32 PM, Deneve Edouard <[EMAIL PROTECTED]>wrote: > >> Thanks Dale, I added the loop from the the second link, it may prove >> useful.However, it still doesn't work. >> The attributes appear correctly while i'm in the manager, but not in the >> serviceResponse. I added them and checked the database to see if CAS had >> save my modification, and it did. >> I don't see my SQL statement in the log, and I don't see any errors when i >> mess up the SQL. It looks like >> <constructor-arg> >> <value>SELECT team, authorities FROM user WHERE name = ?</value> >> </constructor-arg> >> is never used. Should I explicitly ask CAS to do that SELECT ? >> >> >> >> 2008/10/30 Dale Ogilvie <[EMAIL PROTECTED]> >> >> I don't think you need to modify the principal. I believe all you need >>> to do is modify the file >>> >>> >>> \cas-server-webapp\src\main\webapp\WEB-INF\view\jsp\protocol\2.0\casServiceValidationSuccess.jsp >>> >>> to add something like the following code, assuming you have injected your >>> attribute repository with the "team" attribute for the principal: >>> >>> ... >>> <c:set var="auth" >>> value="${assertion.chainedAuthentications[fn:length(assertion.chainedAuthentications)-1]}"/> >>> <cas:user>${fn:escapeXml(auth.principal.id)}</cas:user> >>> <c:if test="${not empty auth.principal.attributes.team}"> >>> <cas:team>${fn:escapeXml(auth.principal.attributes.team)}</cas:team> >>> </c:if> >>> ... >>> >>> Check also here for notes on the Service Management application and how >>> it effects attributes: >>> >>> >>> http://www.nabble.com/How-to-store-data-from-the-Authentication-in-the-Principal-tp13906113p13906933.html >>> >>> And here for a generic approach to showing all attributes: >>> >>> >>> http://www.nabble.com/Directory-Person-and-Attributes-in-CAS-tp17151256p17159007.html >>> >>> >>> ------------------------------ >>> *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >>> *On Behalf Of *Deneve Edouard >>> *Sent:* Friday, 31 October 2008 5:55 a.m. >>> *To:* Yale CAS mailing list >>> *Subject:* Re: attribute repository - newbie question >>> >>> Okay, I think I understand where I was wrong : I >>> thought attributeRepository was about what could be sent to a service, but >>> it's about what a service can send to the CAS. >>> I have to extend (or rewrite) the SimplePrincipal class to handle teams. >>> Can you correct me if I'm wrong ? >>> >>> Thanks for your help ;) I probably should have use this mailing list >>> sooner :D >>> >>> 2008/10/30 Scott Battaglia <[EMAIL PROTECTED]> >>> >>>> In the WEB-INF/jsp/protocol/2.0/ directory (or something similar) there >>>> should be a cas2 successful response JSP page. >>>> >>>> You'd make the changes in there. >>>> >>>> -Scott >>>> >>>> -Scott Battaglia >>>> PGP Public Key Id: 0x383733AA >>>> LinkedIn: http://www.linkedin.com/in/scottbattaglia >>>> >>>> >>>> On Thu, Oct 30, 2008 at 12:26 PM, Deneve Edouard <[EMAIL >>>> PROTECTED]>wrote: >>>> >>>>> Argh, I was sure it was something like that. However I've not been able >>>>> to find information about what to write. I suppose there is an >>>>> Interface somewhere that could tell me that, but I've not found a lot of >>>>> information about how to configure a CAS past login a user. >>>>> Where can I find the default response writer ? I should be able to >>>>> continue with this information. >>>>> >>>>> Thank you :) >>>>> >>>>> 2008/10/30 Scott Battaglia <[EMAIL PROTECTED]> >>>>> >>>>> Let me rephrase that... the default response doesn't display >>>>>> attributes. You need to write the snippit of code that will represent >>>>>> them >>>>>> in XML (or use the SAML1.1 response). >>>>>> >>>>>> -Scott >>>>>> >>>>>> -Scott Battaglia >>>>>> PGP Public Key Id: 0x383733AA >>>>>> LinkedIn: http://www.linkedin.com/in/scottbattaglia >>>>>> >>>>>> >>>>>> On Thu, Oct 30, 2008 at 12:02 PM, Scott Battaglia < >>>>>> [EMAIL PROTECTED]> wrote: >>>>>> >>>>>>> Have you modified the response to retrieve those additional >>>>>>> attributes? >>>>>>> >>>>>>> -Scott >>>>>>> >>>>>>> -Scott Battaglia >>>>>>> PGP Public Key Id: 0x383733AA >>>>>>> LinkedIn: http://www.linkedin.com/in/scottbattaglia >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Thu, Oct 30, 2008 at 11:51 AM, Ulys <[EMAIL PROTECTED]> wrote: >>>>>>> >>>>>>>> >>>>>>>> Hello all, >>>>>>>> >>>>>>>> I'm trying to configure a CAS for my internship, and I'm having some >>>>>>>> trouble >>>>>>>> to get the user's team in the the cas:serviceResponse. >>>>>>>> >>>>>>>> This is what I use to get them : >>>>>>>> >>>>>>>> <bean id="attributeRepository" >>>>>>>> >>>>>>>> >>>>>>>> class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao"> >>>>>>>> >>>>>>>> <constructor-arg ref="dataSource"/> >>>>>>>> <constructor-arg> >>>>>>>> <value>username</value> >>>>>>>> </constructor-arg> >>>>>>>> <constructor-arg> >>>>>>>> <value>SELECT team FROM user WHERE name = >>>>>>>> ?</value> >>>>>>>> </constructor-arg> >>>>>>>> >>>>>>>> <property name="columnsToAttributes"> >>>>>>>> <map> >>>>>>>> <entry key="team"> >>>>>>>> <value>team</value> >>>>>>>> </entry> >>>>>>>> </map> >>>>>>>> </property> >>>>>>>> </bean> >>>>>>>> >>>>>>>> I don't understand why the xml only contains my name and not my team >>>>>>>> : >>>>>>>> >>>>>>>> <cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'> >>>>>>>> <cas:authenticationSuccess> >>>>>>>> <cas:user>edouard</cas:user> >>>>>>>> >>>>>>>> >>>>>>>> </cas:authenticationSuccess> >>>>>>>> </cas:serviceResponse> >>>>>>>> >>>>>>>> -- >>>>>>>> View this message in context: >>>>>>>> http://www.nabble.com/attribute-repository---newbie-question-tp20249160p20249160.html >>>>>>>> Sent from the CAS Users mailing list archive at Nabble.com. >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Deneve Edouard >>>>> aka Ulys >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>> >>> >>> -- >>> Deneve Edouard >>> aka Ulys >>> >>> _______________________________________________ >>> Yale CAS mailing list >>> [email protected] >>> http://tp.its.yale.edu/mailman/listinfo/cas >>> >>> >> >> >> -- >> Deneve Edouard >> aka Ulys >> >> _______________________________________________ >> 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 > > -- Deneve Edouard aka Ulys
_______________________________________________ Yale CAS mailing list [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
