camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <willem.ji...@gmail.com>
Subject Re: Jetty proxy routes confused behavior.
Date Wed, 17 Oct 2012 03:19:40 GMT
Hi,

I don't think camel-jetty can leverage the spring-security out of box, as the security filter
doesn't load by it.
If you have a chance to check out the camel spring security example[1], you can find you can
use camel-servlet to do kind of work.

[1]http://camel.apache.org/spring-security-example.html 

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Tuesday, October 16, 2012 at 4:38 AM, dvsridhar wrote:

> Hi,
> 
> Our exchange layer contains several of public facing REST full proxy routes
> for our actual rest service providers and we use Camel Jetty component to
> define these http proxy routes. 
> 
> However, the exchange layer also contains a GUI for user login and
> enterprise user mapping functionality. We want to use the same application
> context for our Jetty URL's as well. 
> 
> For example we use http://0.0.0.0:6080/fdx-web-1.0 to log into the
> application and the following are some of the jetty routes that I am
> experimenting with.
> 
> *Spring Http Configuration*
> <http auto-config='true' use-expressions="true"
> access-denied-page="/login.jsp">
> <intercept-url pattern="/fdx-web-1.0/**" access="hasRole('ROLE_USER')"
> />
> <intercept-url pattern="/oauth/**" access="hasRole('ROLE_USER')" />
> <intercept-url pattern="/request_token_authorized.jsp"
> access="hasRole('ROLE_USER')" />
> <form-login authentication-failure-url="/login.jsp"
> default-target-url="/index.jsp" login-page="/login.jsp"
> login-processing-url="/login.do"/>
> <logout logout-success-url="/index.jsp" logout-url="/logout.do"/>
> </http>
> 
> 
> *Jetty Route Config:*
> 
> from("jetty:http://0.0.0.0:6080/fdx-web-1.0/Mom/Vendor/?matchOnUriPrefix=true&disableStreamCache=true&traceEnabled=true")
> .process(new UserPwdAuthProcessor())
> .policy("admin")
> 
> .to("jetty:http://myhost:7001/FDX/Momentum/Vendor/?bridgeEndpoint=true&throwExceptionOnFailure=false");
> 
> The issue i am having with this kind of configuration is ..when i try to
> access the jetty route i am get the following ..
> *The requested resource (/fdx-web-1.0/Momentum/Vendor/query) is not
> available.*
> 
> However, my webapp (http://localh:6080/fdx-web-1.0/index.jsp) works.
> 
> *Note: *Some times with the same configuration we also noticed... webapp
> works but not the rest proxy URL. We are totally confused with this
> behavior.
> 
> *Alternatively...*
> *So just to test, we tried different configuration....and introduced DX url
> pattern for our jetty URL's...*
> 
> <http auto-config='true' use-expressions="true"
> access-denied-page="/login.jsp">
> <intercept-url pattern="/fdx-web-1.0/**" access="hasRole('ROLE_USER')"
> />
> <intercept-url pattern="/DX/**" access="hasRole('ROLE_USER')" /> 
> <intercept-url pattern="/oauth/**" access="hasRole('ROLE_USER')" />
> <intercept-url pattern="/request_token_authorized.jsp"
> access="hasRole('ROLE_USER')" />
> 
> <form-login authentication-failure-url="/login.jsp"
> default-target-url="/index.jsp" login-page="/login.jsp"
> login-processing-url="/login.do"/>
> <logout logout-success-url="/index.jsp" logout-url="/logout.do"/>
> </http>
> 
> */with this change, when the application starts only the DX based Jetty
> routes works but not the actual web application./*
> 
> FYI, I have also attached web.xml (http://web.xml) web.xml (http://web.xml)
> <http://camel.465427.n5.nabble.com/file/n5721076/web.xml> and application
> .xml application.xml
> <http://camel.465427.n5.nabble.com/file/n5721076/application.xml> 
> 
> *Note:* We are also trying integrate spring security Oauth provider .. into
> our exchange app and also to our camel jetty routes, we haven't had much
> success with that.. but we are trying. You will see references of that in
> the example configuration.
> 
> Any help highly appreciated.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jetty-proxy-routes-confused-behavior-tp5721076.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Mime
View raw message