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

   # Description
   
   Fixes [CAMEL-27761](https://issues.apache.org/jira/browse/CAMEL-27761).
   
   ## Summary
   
   The client that the Camel endpoint created sent every request to EventBridge 
over HTTP, and no option set the protocol. It now sends them over HTTPS by 
default. With the new `tls` option set to `false`, it sends them over HTTP.
   
   - `AlibabaEventBridgeUtils.createClient` sets the protocol of the `Config` 
to `HTTPS`, or to `HTTP` with `tls=false`.
   - `tls` has the label security and the security category `insecure:ssl`, 
with the insecure value `false`.
   - `tls` does not change a client that is set or autowired in 
`eventBridgeClient`, as both option texts say.
   - The doc page says which protocol the client uses.
   - The upgrade guide needs a section on it, which follows here once the guide 
of 4.25 is on main.
   
   ### Why tls and not protocol
   
   `SecurityUtils` also matches a marked option by its bare name, which the 
security scan of the Camel MCP server uses. A marked `protocol` option could 
then also report the value `http` of the `protocol` option of camel-netty-http. 
`SecurityUtils` already knows `tls`, from camel-pinecone, with the insecure 
value `false`.
   
   ## Tests
   
   - `theCreatedClientUsesHttpsByDefault` checks that the client that 
`createClient` builds has the protocol `HTTPS`.
   - `tlsFalseCreatesAClientThatUsesHttp` sets `tls=false` in the endpoint URI 
and checks the protocol `HTTP`.
   - Both failed before the change: the `_protocol` field was null, and the 
endpoint rejected `tls` as an unknown parameter.
   - The module tests of camel-alibaba-eventbridge ran 53 tests, 
CamelCatalogTest 156 and the tests of camel-util 362, with no failure.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (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).
   
   # 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 ran `mvn clean install -Dquickly -DskipTests` in the root folder on 
the parent commit. Then I ran the builds of camel-alibaba-eventbridge, 
camel-catalog with CamelCatalogTest, camel-componentdsl, camel-endpointdsl and 
camel-util, and committed all generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of saravanakumar1987_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to