Johannes Boßle created CAMEL-19508:
--------------------------------------

             Summary: Add possibility to supply custom headers in LRAClient 
requests
                 Key: CAMEL-19508
                 URL: https://issues.apache.org/jira/browse/CAMEL-19508
             Project: Camel
          Issue Type: Improvement
          Components: camel-lra
    Affects Versions: 3.x, Future
            Reporter: Johannes Boßle


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|https://github.com/jbosstm/quickstart/blob/main/rts/lra-examples/lra-jwt/wildfly/README.md]
 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to