Hi all,

I'm trying to get authentication working in Cocoon 2.1.11. Everything
that I've been able to examine is working correctly, but instead of
letting certain people in, it just keeps everybody out (and shows the
redirect-to page).

Here's my handler configuration:

         <authentication-manager>
            <handlers>
               <handler name="ethnopubhandler">
                  <redirect-to
uri="cocoon://mount/ethnologue-17-pub/forbidden.html"/>
                  <!-- <redirect-to
uri="cocoon:/../../../../forbidden.html"/> works, but depends on how
deep current URL is. -->
                  <authentication
uri="cocoon:raw://mount/ethnologue-17-pub/authorize"/>
               </handler>
            </handlers>
         </authentication-manager>

This is in a subsitemap that's in the subfolder mount/ethnologue-17-pub/
under the main Cocoon sitemap.

The authorize pipeline, in the same sitemap, is defined as:

         <map:match pattern="authorize">
            <map:generate src="process/access-list.xml" />
            <map:transform src="process/authorize.xsl" type="xslt-saxon">
               <map:parameter name="username"
value="{request-header:osso_user_dn}" />
            </map:transform>
            <map:serialize type="xml-utf8" />
         </map:match>

This part works fine: if I go to "/authorize" in a browser, I get this
XML response:

<?xml version="1.0" 
encoding="UTF-8"?><authentication><ID>lars_huttar</ID><role>...</role></authentication>

According to this page:
http://cocoon.apache.org/2.1/developing/webapps/authentication/authenticating_user.html
the XML response just has to include the <authentication> and <ID>
elements to indicate successful authentication. Which it does.

But if I go to a URL that's protected by that authentication handler,
such as

         <map:match pattern="dataset/*/*/*/source">
            <map:act type="auth-protect">
               <map:parameter name="handler" value="ethnopubhandler"
/>              
               <map:generate src="datasets/query/{1}.xml"/>
            <map:serialize type="xml"/>
            </map:act>
         </map:match>

I get the "forbidden.html" page.

How can I trace what's going wrong?

Thanks,
Lars



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to