Authentification

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Authentication

Alessandro Vernet
Administrator
Stephane,

On 10/27/07, Stephane Ruchet <[hidden email]> wrote:
>  Could it be possible that it's because files like *.css, *.xml, etc... go
> also through my authentification processor and then are redirected to the
> login page (which of course is not the goal here). In page flow, we add
> theses lines (<files path-info="*.gif"/>, ...) for the files to be served
> directly. What do you think ? I would have to add checks in my processor no
> ? Is all this really a good idea finally?

I doubt this is the case. If you require the user to be authenticated
to load the CSS, GIF, etc, then the browser will load the page and
just won't be able to load those resources. So you shouldn't have a
loop because of that.

I thought you had a setup where the web.xml sends the request to an
XPL first, which then delegates to a page flow. If this is the case,
then your XPL needs to make sure users can get images, CSS and other
resource even when they are not authenticated.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication

StephR
For once, I was write :)!

I installed Firebug under Firefox to see more in details what was received by firefox. The fact that everything goes through the authentification processor is a problem for files that muss be handed without authentification checkups !

So I added this :

    <p:processor name="oxf:request">
        <p:input name="config">
            <config>
                <include>/request/request-path</include>
            </config>
        </p:input>
        <p:output name="data" id="request" />
    </p:processor>

    <p:choose href="#request">
        <p:when test="(string-length(/request/request-path) > number(1) and not(   
                                    ends-with(/request/request-path, '.gif') or
                                    ends-with(/request/request-path, '.css') or
                                    ends-with(/request/request-path, '.js') or
                                    ends-with(/request/request-path, '.png') or
                                    ends-with(/request/request-path, '.jpg') or
                                    ends-with(/request/request-path, '.xsd')))
">

             [...]

I think that now everything works as I wished :)! But if you feel that you still want to help me, please do on other topics :)!

++
Steph



Alessandro Vernet a écrit :
Stephane,

On 10/27/07, Stephane Ruchet [hidden email] wrote:
  
 Could it be possible that it's because files like *.css, *.xml, etc... go
also through my authentification processor and then are redirected to the
login page (which of course is not the goal here). In page flow, we add
theses lines (<files path-info="*.gif"/>, ...) for the files to be served
directly. What do you think ? I would have to add checks in my processor no
? Is all this really a good idea finally?
    

I doubt this is the case. If you require the user to be authenticated
to load the CSS, GIF, etc, then the browser will load the page and
just won't be able to load those resources. So you shouldn't have a
loop because of that.

I thought you had a setup where the web.xml sends the request to an
XPL first, which then delegates to a page flow. If this is the case,
then your XPL needs to make sure users can get images, CSS and other
resource even when they are not authenticated.

Alex
  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Authentication

Alessandro Vernet
Administrator
Stephane,

On 10/30/07, Stephane Ruchet <[hidden email]> wrote:

>
>  For once, I was write :)!
>
>  I installed Firebug under Firefox to see more in details what was received
> by firefox. The fact that everything goes through the authentification
> processor is a problem for files that muss be handed without
> authentification checkups !
>
>  So I added this :
>
>      <p:processor name="oxf:request">
>          <p:input name="config">
>              <config>
>                  <include>/request/request-path</include>
>              </config>
>          </p:input>
>          <p:output name="data" id="request" />
>      </p:processor>
>
>      <p:choose href="#request">
>          <p:when
> test="(string-length(/request/request-path) > number(1) and
> not(
>
> ends-with(/request/request-path, '.gif') or
>
> ends-with(/request/request-path, '.css') or
>
> ends-with(/request/request-path, '.js') or
>
> ends-with(/request/request-path, '.png') or
>
> ends-with(/request/request-path, '.jpg') or
>
> ends-with(/request/request-path, '.xsd')))">
>
>               [...]
Great to see that this issue is now resolved. I didn't expect that the
browser would consider that after you are redirected to a login page,
that login page loading resources that require authentication (and
hence can't be loaded at this point) constitutes a loop. I would have
thought that the browser would just have "skipped" those resources :).
But I'm glad to see you found a solution for this.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Autenthification

cheney zhao
In reply to this post by Erik Bruchez
Hi, Erik,
I have a problem here in my application.
The definition of web.xml as follows:
-----------

        <init-param>
            <param-name>oxf.main-processor.name</param-name>
            <param-value>{http://www.orbeon.com/oxf/processors}pipeline</param-value>
        </init-param>
        <init-param>
            <param-name>oxf.main-processor.input.controller</param-name>
            <param-value>oxf:/filter-request.xpl</param-value>
        </init-param>
----------
filter-request.xpl is located in the root folder with the same level as page-flow.xml
Here is the content of filter-request.xpl:
-----------------
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"           xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xi="http://www.w3.org/2001/XInclude"
          xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
          xmlns:uuid="java:org.orbeon.oxf.util.UUIDUtils"
          >
    <p:processor name="oxf:page-flow">
        <p:input name="controller" href="page-flow.xml"/>
    </p:processor>
</p:config>
--------------------
I get the error message when I try to access the URL of my app.

------------------------------------------------------------------------------------------------
Orbeon Forms - An Error has Occurred
An error has occurred in Orbeon Forms. You may want to try one of the following:

If this error occurred when you followed a link, press your browser's Back button.
If the above does not work, try reloading the page:
With Firefox and Safari: hold down the shift key and click the Reload button in your browser toolbar.
With Internet Explorer: hold down the control key and click the Reload button in your browser toolbar.
Return home.
Error Message
Cannot find input "config"

Show details

Hide details

Call Stack
Resource URL Line Column Description XML Element
There is no Orbeon Forms call stack available for this error.

Java Exceptions (2 total)
Java Exceptions are the native mechanism by which Orbeon Forms reports errors. More than one exception may be provided below but usually the first exception along with the Orbeon Forms Stack Trace above provide enough information to track down an issue.

 org.orbeon.oxf.common.ValidationException  
Exception Class org.orbeon.oxf.common.ValidationException
Message Cannot find input "config"
Servlet Stack Trace
(18 method calls)  Class Name Method Name File Name Line Number
org.orbeon.oxf.processor.ProcessorImpl getInputByName ProcessorImpl.java 111
org.orbeon.oxf.processor.pipeline.PipelineProcessor start PipelineProcessor.java 614
org.orbeon.oxf.pipeline.InitUtils runProcessor InitUtils.java 95
org.orbeon.oxf.webapp.ProcessorService service ProcessorService.java 96
org.orbeon.oxf.servlet.OPSServletDelegate service OPSServletDelegate.java 148
javax.servlet.http.HttpServlet service HttpServlet.java 820
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run StubSecurityHelper.java 226
weblogic.servlet.internal.StubSecurityHelper invokeServlet StubSecurityHelper.java 124
weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 283
weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 175
 More...  
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction run WebAppServletContext.java 3392
weblogic.security.acl.internal.AuthenticatedSubject doAs AuthenticatedSubject.java 321
weblogic.security.service.SecurityManager runAs  N/A  
weblogic.servlet.internal.WebAppServletContext securedExecute WebAppServletContext.java 2140
weblogic.servlet.internal.WebAppServletContext execute WebAppServletContext.java 2046
weblogic.servlet.internal.ServletRequestImpl run ServletRequestImpl.java 1366
weblogic.work.ExecuteThread execute ExecuteThread.java 200
weblogic.work.ExecuteThread run ExecuteThread.java 172
 
 org.orbeon.oxf.common.OXFException  
Exception Class org.orbeon.oxf.common.OXFException
Message Cannot find input "config": Cannot find input "config"
Servlet Stack Trace
(16 method calls)  Class Name Method Name File Name Line Number
org.orbeon.oxf.pipeline.InitUtils runProcessor InitUtils.java 112
org.orbeon.oxf.webapp.ProcessorService service ProcessorService.java 96
org.orbeon.oxf.servlet.OPSServletDelegate service OPSServletDelegate.java 148
javax.servlet.http.HttpServlet service HttpServlet.java 820
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run StubSecurityHelper.java 226
weblogic.servlet.internal.StubSecurityHelper invokeServlet StubSecurityHelper.java 124
weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 283
weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 175
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction run WebAppServletContext.java 3392
weblogic.security.acl.internal.AuthenticatedSubject doAs AuthenticatedSubject.java 321
 More...  
weblogic.security.service.SecurityManager runAs  N/A  
weblogic.servlet.internal.WebAppServletContext securedExecute WebAppServletContext.java 2140
weblogic.servlet.internal.WebAppServletContext execute WebAppServletContext.java 2046
weblogic.servlet.internal.ServletRequestImpl run ServletRequestImpl.java 1366
weblogic.work.ExecuteThread execute ExecuteThread.java 200
weblogic.work.ExecuteThread run ExecuteThread.java 172
 

Orbeon Forms 3.7.0alpha.200808120110
--------------------------------------------------------------------------------

I add Weblogic J2EE Authentication config in web.xml. I'm not sure if this is the reason why the configration can't work. Can you give me some instruction about this?
Thanks for your help!

       
cheney



Erik Bruchez wrote
You have to use a different processor name in this other parameter:

<init-param>
<param-name>oxf.main-processor.name</param-name>
<param-value>{http://www.orbeon.com/oxf/processors}pipeline</param-value>
</init-param>

This way, the processor will be the oxf:pipeline processor, and not the
oxf:controller processor.

-Erik

StephR wrote:
> As I mentionned before, I have a system that works : a first page-flow.xml
> either redirects to the login page or the an xpl processor. The xpl
> processor will check if the user is authenticated, and if so, will redirect
> to a "second" real page-flow. If not, the user is redirected to the login
> page.
>
> Now, Alex proposed a better solution : modify the web.xml so that it is not
> the page-flow that is called first, but the xpl processor.
>
> So, in the web.xml, we have these lines :
>
>         <init-param>
>             <param-name>oxf.main-processor.input.controller</param-name>
>             <param-value>oxf:/page-flow.xml</param-value>
>         </init-param>
>
> I believe that I have to modify this. If I remove all of it, I will have an
> error that the controller is not found. If I replace page-flow.xml with
> incoming-request.xpl, I will have an other error. What do I have to modify
> in web.xml so that a xpl processor is called... and no page-flow ?
>


--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Autenthification

Alessandro Vernet
Administrator
On Mon, Aug 18, 2008 at 1:04 AM, cheney zhao <[hidden email]> wrote:
> I add Weblogic J2EE Authentication config in web.xml. I'm not sure if this
> is the reason why the configration can't work. Can you give me some
> instruction about this?

Issues that involve more complex configurations are always hard to
tackle in the mailing list. Can you reproduce this just with Tomcat?
Maybe you can post here a minimal example that reproduces the problem
that we can run locally?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
12