Saravanakumar Selvaraj created CAMEL-27761:
----------------------------------------------

             Summary: camel-alibaba-eventbridge: the client that the component 
creates sends every call over HTTP, and no option sets the protocol
                 Key: CAMEL-27761
                 URL: https://issues.apache.org/jira/browse/CAMEL-27761
             Project: Camel
          Issue Type: Improvement
    Affects Versions: 4.23.0
            Reporter: Saravanakumar Selvaraj


I checked the code of main at e785ba78ad52 and of eventbridge-client 1.3.14.

- AlibabaEventBridgeUtils.createClient builds the Config of the 
EventBridgeClient and sets no protocol.
- In EventBridgeClient, each of the 35 calls of doRequest passes the protocol 
HTTP. The calls for putEvents, listEventBuses and listRules are among them.
- doRequest takes the protocol of the Config if it has one, and the HTTP of the 
call otherwise. So the client that createClient builds sends every call over 
HTTP.
- The component has no option for the protocol. The endpoint option takes a 
host name, and the EventBridgeClient constructor rejects a value that starts 
with http.
- Only a custom EventBridgeClient in the eventBridgeClient option uses HTTPS, 
when the protocol of its Config is HTTPS.

On 2026-11-28 I sent one GET request to 
https://1234567890.eventbridge.cn-hangzhou.aliyuncs.com/, with a made-up 
account ID and without credentials. The TLS handshake succeeded, and curl 
verified the certificate. The service answered 400 Bad Request, with the header 
x-eventbridge-error-code InvalidRequestURL. So the endpoint accepts HTTPS.

The other Alibaba components:

- fc, kms, sms and sls set no protocol either. Each operation of 
fc_open20210406 2.1.0, kms20160120 2.3.2, dysmsapi20170525 4.6.0 and 
sls20201230 5.18.1 passes HTTPS to tea-openapi 0.3.20. So the clients that 
these components create use HTTPS.
- oss uses alibabacloud-oss-v2 0.6.1, which adds https:// to an endpoint 
without a scheme and to the endpoint of a region.
- mns takes the scheme from its accountEndpoint option, and ots from its 
endpoint option. Their SDKs, aliyun-sdk-mns 2.0.0 and tablestore 5.17.14, 
reject a value that does not start with http:// or https://.

Proposed change:

- An option for the protocol of the EventBridge client, with HTTPS as its 
default.
- An entry in the upgrade guide, as the default changes from HTTP to HTTPS.

_Claude Code on behalf of saravanakumar1987_




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to