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 5aece05018bc0482cf81f5edd01b818bbca4b355 Author: Andrea Cosentino <[email protected]> AuthorDate: Mon Jun 19 11:34:01 2023 +0200 CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS MSK Signed-off-by: Andrea Cosentino <[email protected]> --- .../main/java/org/apache/camel/component/aws2/msk/MSK2Component.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java b/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java index 5bab2e55dee..944b0476d41 100644 --- a/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java +++ b/components/camel-aws/camel-aws2-msk/src/main/java/org/apache/camel/component/aws2/msk/MSK2Component.java @@ -45,10 +45,10 @@ public class MSK2Component extends DefaultComponent { MSK2Configuration configuration = this.configuration != null ? this.configuration.copy() : new MSK2Configuration(); MSK2Endpoint endpoint = new MSK2Endpoint(uri, this, configuration); setProperties(endpoint, parameters); - if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider()) && configuration.getMskClient() == null + if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider()) && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider()) && configuration.getMskClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) { throw new IllegalArgumentException( - "useDefaultCredentialsProvider is set to false, Amazon msk client or accessKey and secretKey must be specified"); + "useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, Amazon msk client or accessKey and secretKey must be specified"); } return endpoint; }
