camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Vottner <>
Subject Add ServletFilter to invoked Jetty component
Date Thu, 31 Aug 2017 11:55:31 GMT
I’ve pushed a sample test application onto github (
<>) where I want to integrate
AWS XRay servlet filter for any inbound or outbound traffic. Spring Security offers the WebSecurityConfigurerAdapter
as web.xml replacement where you can define security policies on certain endpoints using the
configure(HttpSecurity) method. This also allows to add custom servlet filters via addFilterBefore
or addFilterAfter.

However, the current approach Camel uses ist to declare security on routes via SpringSecurityAuthrizationPolicy,
which also requires a bean prior to the declared policy which actually sets the Authentication
object in the headers (i.e.
This approach does not use a web.xml (or its Java based configuration) and thus does not invoke
any of the filters defined in the web.xml/WebSecurityConfigurerAdapter if a Jetty endpoint
exposed via the REST DSL is invoked, even though the beans and filters are initialised at

Is there a way to add a custom servlet filters to Camel routes exposed via REST DSL/Jetty
or define the security policies via the Spring Security approach similar to
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message