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 2023/06/19 12:56:28 UTC
[camel] 04/06: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
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 fd8e8e50e742429de2df7d69f8bb52330d3f72d0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 19 14:34:16 2023 +0200
CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS STS
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../main/java/org/apache/camel/component/aws2/sts/STS2Component.java | 3 ++-
.../component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
index 59c9293c815..a1a874c2acb 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/STS2Component.java
@@ -47,7 +47,8 @@ public class STS2Component extends DefaultComponent {
STS2Configuration configurationClone = this.configuration != null ? this.configuration.copy() : new STS2Configuration();
STS2Endpoint endpoint = new STS2Endpoint(uri, this, configurationClone);
setProperties(endpoint, parameters);
- if (Boolean.FALSE.equals(configurationClone.isUseDefaultCredentialsProvider()) && Boolean.FALSE.equals(configurationClone.isUseProfileCredentialsProvider())
+ if (Boolean.FALSE.equals(configurationClone.isUseDefaultCredentialsProvider())
+ && Boolean.FALSE.equals(configurationClone.isUseProfileCredentialsProvider())
&& configurationClone.getStsClient() == null
&& (configurationClone.getAccessKey() == null || configurationClone.getSecretKey() == null)) {
throw new IllegalArgumentException(
diff --git a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
index a7b6d0b5711..9ffc1b26e90 100644
--- a/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
+++ b/components/camel-aws/camel-aws2-sts/src/main/java/org/apache/camel/component/aws2/sts/client/impl/STS2ClientIAMProfileOptimized.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.aws2.sts.client.impl;
+import java.net.URI;
+
import org.apache.camel.component.aws2.sts.STS2Configuration;
import org.apache.camel.component.aws2.sts.client.STS2InternalClient;
import org.apache.camel.util.ObjectHelper;
@@ -31,8 +33,6 @@ import software.amazon.awssdk.services.sts.StsClient;
import software.amazon.awssdk.services.sts.StsClientBuilder;
import software.amazon.awssdk.utils.AttributeMap;
-import java.net.URI;
-
/**
* Manage an AWS STS client for all users to use. This implementation is for remote instances to manage the credentials
* on their own (eliminating credential rotations)