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/15 13:00:56 UTC

[camel] 01/07: CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS IAM

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 a4b927205de6a1711c64bf5093147d20e6040393
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jun 15 14:02:38 2023 +0200

    CAMEL-19159 - Camel-AWS: Support Profile Credential provider as configuration - AWS IAM
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../component/aws2/iam/IAM2Configuration.java      | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Configuration.java b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Configuration.java
index fb6c8b16c39..d853e23a6ea 100644
--- a/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Configuration.java
+++ b/components/camel-aws/camel-aws2-iam/src/main/java/org/apache/camel/component/aws2/iam/IAM2Configuration.java
@@ -58,6 +58,10 @@ public class IAM2Configuration implements Cloneable {
     private String uriEndpointOverride;
     @UriParam(defaultValue = "false")
     private boolean useDefaultCredentialsProvider;
+    @UriParam(defaultValue = "false")
+    private boolean useProfileCredentialsProvider;
+    @UriParam
+    private String profileCredentialsName;
 
     public IamClient getIamClient() {
         return iamClient;
@@ -207,6 +211,28 @@ public class IAM2Configuration implements Cloneable {
     public Boolean isUseDefaultCredentialsProvider() {
         return useDefaultCredentialsProvider;
     }
+
+    public boolean isUseProfileCredentialsProvider() {
+        return useProfileCredentialsProvider;
+    }
+
+    /**
+     * Set whether the IAM client should expect to load credentials through a profile credentials provider.
+     */
+    public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) {
+        this.useProfileCredentialsProvider = useProfileCredentialsProvider;
+    }
+
+    public String getProfileCredentialsName() {
+        return profileCredentialsName;
+    }
+
+    /**
+     * If using a profile credentials provider this parameter will set the profile name
+     */
+    public void setProfileCredentialsName(String profileCredentialsName) {
+        this.profileCredentialsName = profileCredentialsName;
+    }
     // *************************************************
     //
     // *************************************************