This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit f2cd2a893f4315534f44ff6b2200783bc4498998 Author: Andrea Cosentino <[email protected]> AuthorDate: Thu Jun 15 14:06:18 2023 +0200 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS IAM Signed-off-by: Andrea Cosentino <[email protected]> --- .../main/java/org/apache/camel/component/aws2/iam/IAM2Component.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Component.java b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Component.java index 38161ed9570..b8b6f3654cc 100644 --- a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Component.java +++ b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Component.java @@ -45,10 +45,10 @@ public class IAM2Component extends DefaultComponent { IAM2Configuration configuration = this.configuration != null ? this.configuration.copy() : new IAM2Configuration(); IAM2Endpoint endpoint = new IAM2Endpoint(uri, this, configuration); setProperties(endpoint, parameters); - if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider()) && configuration.getIamClient() == null + if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider()) && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider()) && configuration.getIamClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) { throw new IllegalArgumentException( - "seDefaultCredentialsProvider is set to false, Amazon IAM client or accessKey and secretKey must be specified"); + "seDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, Amazon IAM client or accessKey and secretKey must be specified"); } return endpoint;
