Claus Ibsen created CAMEL-27787:
-----------------------------------

             Summary: camel-aws2-ec2, camel-aws2-iam, camel-aws2-msk, 
camel-aws2-ses: the producer health check is DOWN when the region option is not 
set
                 Key: CAMEL-27787
                 URL: https://issues.apache.org/jira/browse/CAMEL-27787
             Project: Camel
          Issue Type: Bug
          Components: camel-aws2
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Found while improving the option descriptions of camel-aws2-ec2, 
camel-aws2-iam, camel-aws2-msk and camel-aws2-ses for CAMEL-23832 (pull request 
https://github.com/apache/camel/pull/31134).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. Region.of(null) in the health check
{{AWS2EC2ProducerHealthCheck}}, {{IAM2ProducerHealthCheck}}, 
{{MSK2ProducerHealthCheck}} and {{Ses2ProducerHealthCheck}} call 
{{Region.of(configuration.getRegion())}} without checking that the region is 
set. With no region option, {{Region.of(null)}} throws, the catch-all marks the 
check DOWN, and the client is never tried, although the client works (the AWS 
SDK finds the region from AWS_REGION, the profile, or a client that is set or 
autowired).
The other 21 aws2 health checks (for example {{Sns2ProducerHealthCheck}}, 
{{Lambda2ProducerHealthCheck}}) guard it with 
{{ObjectHelper.isNotEmpty(configuration.getRegion())}}.
Proposed change: the same guard in these 4.

h4. 2. camel-aws2-msk: useSessionCredentials without the keys fails only at 
start
{{MSK2Component.createEndpoint}} accepts useSessionCredentials=true without 
accessKey/secretKey/sessionToken; the error comes when the client is built at 
start, and the component's error message does not mention 
useSessionCredentials. Minor.


_Claude Code on behalf of davsclaus_



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

Reply via email to