You can do it by implement your custom security policy[1].
Please take a look at the camel-sprint-security[2], you can find some code 
example such as SpringSecurityAuthorizationPolicy.java[3]

[1]http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/Policy.html
[2]https://github.com/apache/camel/tree/master/components/camel-spring-security
[3]https://github.com/apache/camel/blob/master/components/camel-spring-security/src/main/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicy.java
--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On March 8, 2015 at 2:52:59 PM, Milli ([email protected]) wrote:
> Hi everyone,
>  
> In our web application, we are using camel as the central piece to
> orchestrate/route the webservices, which will be connecting to several
> other local resources.
>  
> Can some one suggest, what is the best way to write context level (global /
> one-time) layers.
>  
> For example, we want to write a global security layer, which does a basic
> signature based auth check, which is going to be the first step for any
> route in the application.
> We want this logic to be configured at camel context level, so that we
> don't need to write this in every route we build.
>  
> Also, in case of multiple such layers ( say security, validation, etc.. ),
> is it possible to set the order in which they need to be executed.
>  
> Any sort of examples or reading pointers are very appreciated.
>  
> Thanks in advance.
> -Gowri Shankar
>  

Reply via email to