SwitchYardRunner based unit tests fail when run with enabled security policies

Solution Unverified - Updated -


  • It has been observed that as soon as developers enable security policies on a SwitchYard component then all the SwitchYardRunner based unit tests in the SwitchYard project (e.g. quickstarts/switchyard/demos/policy-security quickstart) 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"/>
      <sca:service name="SimpleWebService" requires="clientAuthentication confidentiality">
        <sca:interface.wsdl interface="..."/>
      <sy:security rolesAllowed="NewAdmin"/>
  • What is the correct way to run a test in an authenticated, authorized and confidential fashion (without making a copy of the switchyard.xml for tests)?


  • 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.

Current Customers and Partners

Log in for full access

Log In