This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch CAMEL-20281-s3-refine in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4da37de7ee2de3321a41f84a69df20d6e1b691b6 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Feb 1 15:01:48 2024 +0100 CAMEL-20281 - Camel-AWS Components: Make it possible to use AwsSessionCredentials to support temporary credentials - AWS S3, added check for presence of sessionToken Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../component/aws2/s3/client/impl/AWS2S3ClientSessionTokenImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientSessionTokenImpl.java b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientSessionTokenImpl.java index 6b0d6a4455a..610231ef48c 100644 --- a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientSessionTokenImpl.java +++ b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/client/impl/AWS2S3ClientSessionTokenImpl.java @@ -70,7 +70,8 @@ public class AWS2S3ClientSessionTokenImpl implements AWS2CamelS3InternalClient { httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build()); isClientConfigFound = true; } - if (configuration.getAccessKey() != null && configuration.getSecretKey() != null && configuration.getSessionToken() != null) { + if (configuration.getAccessKey() != null && configuration.getSecretKey() != null + && configuration.getSessionToken() != null) { AwsSessionCredentials cred = AwsSessionCredentials.create(configuration.getAccessKey(), configuration.getSecretKey(), configuration.getSessionToken()); if (isClientConfigFound) {