Integrating Spring Security with Apache Camel
Apache Camel can be used to define rules for routing and mediating applications. Spring Security can be used with Apache Camel to authenticate the router. Spring Security authentication policy object controls the access to the router. The Spring Security authentication policy object contains the role information and has reference to the Spring authentication manager. You can download the source code from the website.
Getting ready
Create Camel context
Add routing rules using the XML configurations
In Spring XML file configure the following:
Access decision manager
Role voter
Authentication manager
User details service
Configure the authentication policy object with authorities
Add the
camel-spring-security
dependency
How to do it...
The following are the steps to integrate Apache Camel with Spring Security:
Create the
Camel–context.xml
file and also define the routing rules with Spring Security.<spring-security:http realm="User Access Realm"> ...