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 <anco...@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 <anco...@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;