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/04/05 15:21:38 UTC

[camel-spring-boot] branch camel-spring-boot-3.x updated (b4dfbadf192 -> 17683a3c4a8)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch camel-spring-boot-3.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


    from b4dfbadf192 Regen
     new 5974ab33d21 CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
     new 17683a3c4a8 CAMEL-18625 - Provide an option to pass specific AWS SAML Profile

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/docs/spring-boot.json                 | 13 +++++++++++
 .../boot/vault/AwsVaultAutoConfiguration.java      |  2 ++
 .../vault/AwsVaultConfigurationProperties.java     | 25 ++++++++++++++++++++++
 .../boot/vault/AwsVaultConfigurationTest.java      | 14 +++++++-----
 4 files changed, 49 insertions(+), 5 deletions(-)


[camel-spring-boot] 01/02: CAMEL-18625 - Provide an option to pass specific AWS SAML Profile

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-spring-boot-3.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 5974ab33d211af06969f8d9d2e39cecc42574200
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 5 16:55:48 2023 +0200

    CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../boot/vault/AwsVaultAutoConfiguration.java      |  2 ++
 .../vault/AwsVaultConfigurationProperties.java     | 25 ++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java
index 20d3eeac81a..d6fe69c10f1 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultAutoConfiguration.java
@@ -37,6 +37,8 @@ public class AwsVaultAutoConfiguration {
         answer.setSecretKey(config.getSecretKey());
         answer.setRegion(config.getRegion());
         answer.setDefaultCredentialsProvider(config.isDefaultCredentialsProvider());
+        answer.setProfileCredentialsProvider(config.isProfileCredentialsProvider());
+        answer.setProfileName(config.getProfileName());
         answer.setRefreshEnabled(config.isRefreshEnabled());
         answer.setRefreshPeriod(config.getRefreshPeriod());
         answer.setSecrets(config.getSecrets());
diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java
index 9657d044321..aaa40d8d589 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationProperties.java
@@ -41,6 +41,16 @@ public class AwsVaultConfigurationProperties {
      */
     private boolean defaultCredentialsProvider;
 
+    /**
+     * Define if we want to use the AWS Profile Credentials Provider or not
+     */
+    private boolean profileCredentialsProvider;
+
+    /**
+     * Define the profile name in case we are using profile credentials provider
+     */
+    private String profileName;
+
     /**
      * Define if we want to refresh the secrets on update
      */
@@ -87,6 +97,21 @@ public class AwsVaultConfigurationProperties {
     public void setDefaultCredentialsProvider(boolean defaultCredentialsProvider) {
         this.defaultCredentialsProvider = defaultCredentialsProvider;
     }
+    public boolean isProfileCredentialsProvider() {
+        return profileCredentialsProvider;
+    }
+
+    public void setProfileCredentialsProvider(boolean profileCredentialsProvider) {
+        this.profileCredentialsProvider = profileCredentialsProvider;
+    }
+
+    public String getProfileName() {
+        return profileName;
+    }
+
+    public void setProfileName(String profileName) {
+        this.profileName = profileName;
+    }
 
     public boolean isRefreshEnabled() {
         return refreshEnabled;


[camel-spring-boot] 02/02: CAMEL-18625 - Provide an option to pass specific AWS SAML Profile

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch camel-spring-boot-3.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 17683a3c4a8fd7c8ebdd6a5329c55db53783555d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Apr 5 17:17:11 2023 +0200

    CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 core/camel-spring-boot/src/main/docs/spring-boot.json      | 13 +++++++++++++
 .../camel/spring/boot/vault/AwsVaultConfigurationTest.java | 14 +++++++++-----
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json b/core/camel-spring-boot/src/main/docs/spring-boot.json
index f4c62426739..1d298324a89 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.json
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.json
@@ -1402,6 +1402,19 @@
       "sourceType": "org.apache.camel.spring.boot.vault.AwsVaultConfigurationProperties",
       "defaultValue": false
     },
+    {
+      "name": "camel.vault.aws.profile-credentials-provider",
+      "type": "java.lang.Boolean",
+      "description": "Define if we want to use the AWS Profile Credentials Provider or not",
+      "sourceType": "org.apache.camel.spring.boot.vault.AwsVaultConfigurationProperties",
+      "defaultValue": false
+    },
+    {
+      "name": "camel.vault.aws.profile-name",
+      "type": "java.lang.String",
+      "description": "Define the profile name in case we are using profile credentials provider",
+      "sourceType": "org.apache.camel.spring.boot.vault.AwsVaultConfigurationProperties"
+    },
     {
       "name": "camel.vault.aws.refresh-enabled",
       "type": "java.lang.Boolean",
diff --git a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java
index 8df230702a5..a0117804477 100644
--- a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java
+++ b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/vault/AwsVaultConfigurationTest.java
@@ -35,10 +35,12 @@ import org.springframework.test.annotation.DirtiesContext;
                 "camel.vault.aws.accessKey=myAccessKey",
                 "camel.vault.aws.secretKey=mySecretKey",
                 "camel.vault.aws.region=myRegion",
-                "camel.vault.aws.defaultCredentialsProvider=true",
+                "camel.vault.aws.defaultCredentialsProvider=false",
                 "camel.vault.aws.refreshPeriod=60000",
-                "camel.vault.aws.refreshEnabled=true",
-                "camel.vault.aws.secrets=supersecret"
+                "camel.vault.aws.refreshEnabled=false",
+                "camel.vault.aws.secrets=supersecret",
+                "camel.vault.aws.profile-credentials-provider=true",
+                "camel.vault.aws.profile-name=test"
         }
 )
 public class AwsVaultConfigurationTest {
@@ -51,9 +53,11 @@ public class AwsVaultConfigurationTest {
         Assertions.assertEquals("myAccessKey", camelContext.getVaultConfiguration().aws().getAccessKey());
         Assertions.assertEquals("mySecretKey", camelContext.getVaultConfiguration().aws().getSecretKey());
         Assertions.assertEquals("myRegion", camelContext.getVaultConfiguration().aws().getRegion());
-        Assertions.assertEquals(true, camelContext.getVaultConfiguration().aws().isDefaultCredentialsProvider());
-        Assertions.assertEquals(true, camelContext.getVaultConfiguration().aws().isRefreshEnabled());
+        Assertions.assertEquals(false, camelContext.getVaultConfiguration().aws().isDefaultCredentialsProvider());
+        Assertions.assertEquals(false, camelContext.getVaultConfiguration().aws().isRefreshEnabled());
         Assertions.assertEquals(60000, camelContext.getVaultConfiguration().aws().getRefreshPeriod());
         Assertions.assertEquals("supersecret", camelContext.getVaultConfiguration().aws().getSecrets());
+        Assertions.assertEquals("test", camelContext.getVaultConfiguration().aws().getProfileName());
+        Assertions.assertEquals(true, camelContext.getVaultConfiguration().aws().isProfileCredentialsProvider());
     }
 }