You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/02/01 14:02:02 UTC
(camel) 01/02: CAMEL-20281 - Camel-AWS Components: Make it possible to use AwsSessionCredentials to support temporary credentials - AWS S3, added check for presence of sessionToken
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 356d1026ba7d9fed3dddd1e9e5d16460a66a091e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 1 14:55:51 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 <an...@gmail.com>
---
.../component/aws2/s3/client/impl/AWS2S3ClientSessionTokenImpl.java | 2 +-
1 file changed, 1 insertion(+), 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 6e6b324c07f..6b0d6a4455a 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,7 @@ public class AWS2S3ClientSessionTokenImpl implements AWS2CamelS3InternalClient {
httpClientBuilder = ApacheHttpClient.builder().proxyConfiguration(proxyConfig.build());
isClientConfigFound = true;
}
- if (configuration.getAccessKey() != null && configuration.getSecretKey() != null) {
+ if (configuration.getAccessKey() != null && configuration.getSecretKey() != null && configuration.getSessionToken() != null) {
AwsSessionCredentials cred = AwsSessionCredentials.create(configuration.getAccessKey(),
configuration.getSecretKey(), configuration.getSessionToken());
if (isClientConfigFound) {