You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "johbossle (via GitHub)" <gi...@apache.org> on 2023/06/26 15:37:24 UTC

[GitHub] [camel] johbossle opened a new pull request, #10498: Add possibility to override LRAClient & LRARoutes

johbossle opened a new pull request, #10498:
URL: https://github.com/apache/camel/pull/10498

   # Description
   
   The Saga EIP pattern is using rest based communication for interaction with the lra-coordinator (e.g. narayana). Although there are ways to secure the communication with the coordinator, this is not supported by the underlying code. Also, it is not possible to easily override some implementations, since they are created by intenral constructors.
   
   This change is targeting, that one can override (influence) the creation of the LRAClient and LRASagaRoutes in the LRASagaService. With those "extensions", it is then possible to override some default behavior and for example you can set the HttpClient and use your own adjusted instance with an Authenticator.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (note that Camel 3 uses `camel-3.x`, whereas Camel 4 uses the `main` branch)
   
   # Tracking
   - [x] ~~If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).~~
   I do consider this change as a small change, since the default behavior is not touched.
   
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful subject line and body.
   
   - [x] I have run `mvn clean install -DskipTests` locally and I have committed all auto-generated changes
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] zhfeng commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1608960963

   From my own point of view, `LRASagaRoutes` is an internal implementation and can not be override. And I'm open to the discussion, so feel free to raise another PR for the LRASagaRoutes.
   
   Also +1 for override `LRAClient` but I'm not sure narayana-lra-coordinator supports SSL  right now?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] zhfeng commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1609319159

   Thanks @mmusgrov for the clarifying - Is there any example or document about these server configuration? I think it could be very helpful.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] johbossle closed pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "johbossle (via GitHub)" <gi...@apache.org>.
johbossle closed pull request #10498: Add possibility to override LRAClient & LRARoutes
URL: https://github.com/apache/camel/pull/10498


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] zhfeng commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1609019303

   Yeah, that would be nice to have a new PR and definely a JIRA ticket is needed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1607861980

   ### Components test results:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 1 | 1 | 0 | 1 |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1607862025

   :no_entry_sign: There are (likely) no changes in core core to be tested in this PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] johbossle commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "johbossle (via GitHub)" <gi...@apache.org>.
johbossle commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1608868149

   @zhfeng For me, there were two reasons to allow the override of LRARoutes:
   
   - keep it in analogy with the creation process of LRAClient (I'm personally not a big fan of hard-coded constructor calls without possibility to influence anything. It makes it harder to test, less open for other use-cases, ...)
   - Get at least a a possibility to influence the verification of the requests.
   Nevertheless, I do understand the risk of missing the routes and the importance of those. But if you are overriding, you hopefully know what you are doing. You could also manipulate the CamelContext and remove the routes etc.
   
   To continue, I do see now the following possibilities:
   - In general, we do not want to allow to override the LRASagaRoutes creation
   - We simply do it as proposed right now
   - We split this aspect into an extra PR and realize the topic here - maybe in consequence also with having a protected method for verifyRequest.
   
   What way should we follow?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] johbossle commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "johbossle (via GitHub)" <gi...@apache.org>.
johbossle commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1609008002

   Then let us keep the LRARoutes internal and kick it out of the PR. 
   As far as I know, there is the possibility to secure narayana. See also https://github.com/jbosstm/quickstart/blob/main/rts/lra-examples/lra-jwt/wildfly/README.md
   
   Should I open a new PR for only allowing to override the LRAClient?
   To support the use-case end-to-end, I would also suggest to allow a more easy way to add authentication header without overriding/delegating the HttpClient-Implementation. But for that extension, I would open an extra jira ticket to work on.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] mmusgrov commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "mmusgrov (via GitHub)" <gi...@apache.org>.
mmusgrov commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1609215501

   > Also +1 for override `LRAClient` but I'm not sure narayana-lra-coordinator supports SSL right now?
   
   Configuring JAX-RS to use SSL is done at the server level (WildFly, Quarkus or wherever you're deploying your JAX-RS resources to), ie the coordinator doesn't have to do anything special (it uses jakarta.ws.rs.client.ClientBuilder.newClient() which is supplied by the JAX-RS server).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] johbossle commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "johbossle (via GitHub)" <gi...@apache.org>.
johbossle commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1609039831

   As agreed we will close this PR and open a new one, containing the agreed changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #10498: Add possibility to override LRAClient & LRARoutes

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #10498:
URL: https://github.com/apache/camel/pull/10498#issuecomment-1607736796

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :warning: Please note that the changes on this PR may be **tested automatically**. 
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org