Spring SecurityPage added by willem jiangSpring SecurityAvailable as of Camel 2.3 Spring Security is a poplar security framework to provides the authentication and authorization for the Spring application. It allows together with Camel to provide authorization support for the camel process by configuring the authorizationPolicy. Using SpringSecurityAuthorizationPolicycamel-spring-security component can take the authentication token which is set by Spring Security or other security framework, and check authentication token with the access information which is configured by SpringSecurityAuthorizationPolicy. If the authentication token is authorized, the camel exchange will be passed to the next processor, otherwise CamelAuthorizationException will be thrown with the exchange. You can configure the SpringSecurityAuthorizationPolicy with normal Spring bean's configuration, and you can also configure it with the customer authorizationPolicy element. authorizationPolicy element has below attributes:
Using SpringSecurityAuthorizationPolicy in Spring XMLIn this example we want to make sure exchange send to mock:end should be authenticated with the role of admin. The spring security configure looks like this DependenciesTo use Spring Security in your camel routes you need to add the a dependency on camel-spring-security. If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions). See Also
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Camel > Spring Security confluence
- [CONF] Apache Camel > Spring Security confluence
- [CONF] Apache Camel > Spring Security confluence