Using BASIC Authentication with camel-jetty for two different bundles

Solution Verified - Updated -

Issue

  • We have configured two bundles using the same port to provide web services via camel-jetty to use BASIC authentication using the instructions found at https://access.redhat.com/documentation/en-US/Fuse_ESB_Enterprise/7.1/html/Security_Guide/files/CamelJetty-BasicAuth.html.
  • When we use the instructions as presented, security for both bundles works correctly.
  • We would like to be able to configure each bundle to use a different role for authentication. To accomplish that, we changed the roles property of <bean id="constraint" class="org.eclipse.jetty.http.security.Constraint"> to be different in each bundle, and set the pathSpec of <bean id="constraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"> to identify the url path of each bundle.

  • The hope was that by setting the pathspec for each bundle, we would be able to use a separate role for each bundle. What we found was that one of the bundles would work, and the other would function as if BASIC auth was disabled and let any login in.

  • The question is, what is the appropriate way to use BASIC auth to secure two camel-jetty web service providing bundles using the same port with different role values?

Environment

  • Red Hat JBoss Fuse
    • 6.x
  • camel-jetty

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content