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 a5858df4ed8f3f4f75780247cb0e2f7a2401aa95 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Sat Feb 19 07:29:49 2022 +0100 CAMEL-17644 - Support ability to load properties from Vault/Secrets cloud services - aws secrets manager --- .../aws/secretsmanager/SecretsManagerPropertiesFunction.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java index f70786d..1197878 100644 --- a/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java +++ b/components/camel-aws/camel-aws-secrets-manager/src/main/java/org/apache/camel/component/aws/secretsmanager/SecretsManagerPropertiesFunction.java @@ -74,10 +74,9 @@ public class SecretsManagerPropertiesFunction extends ServiceSupport implements String region = System.getenv(CAMEL_AWS_VAULT_REGION_ENV); if (ObjectHelper.isEmpty(accessKey) && ObjectHelper.isEmpty(secretKey) && ObjectHelper.isEmpty(region)) { PropertiesComponent pc = getCamelContext().getPropertiesComponent(); - Properties p = pc.loadProperties(); - accessKey = p.getProperty(CAMEL_AWS_VAULT_ACCESS_KEY_PROP); - secretKey = p.getProperty(CAMEL_AWS_VAULT_SECRET_KEY_PROP); - region = p.getProperty(CAMEL_AWS_VAULT_REGION_PROP); + accessKey = String.valueOf(pc.resolveProperty(CAMEL_AWS_VAULT_ACCESS_KEY_PROP)); + secretKey = String.valueOf(pc.resolveProperty(CAMEL_AWS_VAULT_SECRET_KEY_PROP)); + region = String.valueOf(pc.resolveProperty(CAMEL_AWS_VAULT_REGION_PROP)); } SecretsManagerClientBuilder clientBuilder = SecretsManagerClient.builder(); AwsBasicCredentials cred = AwsBasicCredentials.create(accessKey, secretKey);