SwitchYardRunner based unit tests fail when run with enabled security policies
Issue
- It has been observed that as soon as developers enable security policies on a
SwitchYardcomponent then all theSwitchYardRunnerbased unit tests in theSwitchYard project(e.g.quickstarts/switchyard/demos/policy-securityquickstart) start failing with this exception.
...
09:31:10,118 INFO [org.switchyard.common.camel.SwitchYardCamelContext] Route: direct:{urn:com.sample.service:fast-order-service:1.0}TestBeanService started and consuming from: Endpoint[direct://%7Burn:com.sample.service:fast-order-service:1.0%7DTestBeanService]
09:31:10,119 ERROR [org.switchyard.security] SWITCHYARD014200: authenticate LoginException: No LoginModules configured for other
javax.security.auth.login.LoginException: No LoginModules configured for other
...
- These are the security policies which were enabled inside
switchyard.xml.
...
<sca:component name="TestBeanService">
<camel:implementation.camel requires="authorization">
<camel:java class="com.sample.service.TestBeanServiceRoute"/>
</camel:implementation.camel>
<sca:service name="SimpleWebService" requires="clientAuthentication confidentiality">
<sca:interface.wsdl interface="..."/>
</sca:service>
</sca:component>
...
<sy:securities>
<sy:security rolesAllowed="NewAdmin"/>
</sy:securities>
....
- What is the correct way to run a test in an authenticated, authorized and confidential fashion (without making a copy of the
switchyard.xmlfor tests)?
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.0.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
