Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10621

Issue with Rest DSL, Jetty and Basic authentication

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.18.1
    • 2.21.0
    • camel-jetty
    • None
    • Unknown

    Description

      I'm trying to create an API with Rest DSL and Swagger Java components. For hosting the API I want to use Jetty and use Basic Authentication to secure it.

      With Jetty 8 the code below works, but with Camel 2.18.1 my code fails in Jetty 9 with this error:
      No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator

      It seems that when the security handler is re-added for the api-docs, the loginService is gone and can not be found anymore in the beans store of the server. I see in Jetty configuration examples that the loginService is also added as a bean to the Jetty server. If it has been added, it can be found when re-adding the security handler.

      Attachments

        1. camel-context.xml
          2 kB
          Remco Schoen
        2. HardcodedLoginService.java
          2 kB
          Remco Schoen
        3. log.camel.txt
          12 kB
          Remco Schoen

        Activity

          People

            davsclaus Claus Ibsen
            r.schoen@topdesk.com Remco Schoen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: