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

Add possibility to supply custom headers in LRAClient requests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • 3.x, Future
    • 3.x, 4.0.0
    • camel-lra
    • None
    • Unknown

    Description

      Within the apache camel Saga EIP, there is currently no obvious possibility to supply headers like "Authentication", when you are using a lra-coordinator with the LRASagaService. If you want to use e.g. Narayana in a secure way with authentication enabled (the Narayana LRA coordinator supports JSON Web Tokens and there's even a quickstart to help users get started), there is currently no easy possibility to pass on authentication information.

      As general extension, this can be even extended to supply (additional) headers in any form to the requests.

      The implementation class LRAClient is taking care of making the calls to the coordinator and uses a java.net.http.HttpClient for it. So the solution could be, to override the default behavior of the LRAClient and to give developers/users the possibility to hook into creating the HttpRequest and supply additional values.

      Intentional use-case: add a header `Authorization` to every request agains the lra-coordinator

      Generic use-case: allow to add custom headers to requests against the lra-coordinator

      Attachments

        Activity

          People

            Unassigned Unassigned
            johbossle Johannes Boßle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: