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:20:50 UTC
[camel-spring-boot] 02/03: CAMEL-18625 - Provide an option to pass specific AWS SAML Profile
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-spring-boot.git
commit c14d26b8aa4decad01e52a126d11f2a111feaa41
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 cd558d83b47..c72338f9f84 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());
}
}