You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug:
Spring Cloud Config Server serves as centralised config server to supply the properties to multiple Spring Boot micro services(i.e clients). It should load non critical properties from native(i.e classpath) and critical properties from secrets manager.
In short, the responsibility of fetching the secrets from AWS Secret Manager should still remain with the Config server only.
This was working, I could finally see my secret being loaded from 'AWS Secrets Manager'.
I tested it with @Value, and my service successfully printed the loaded value.
Issue: The issue is that the placeholders in app.yml or app-dev.yml located in the resources (i.e., path: config/${my-app}/application-dev.yml) are not being replaced. At any given time, it only loads from a single EnvironmentRepository (i.e., EnvironmentRepository.findOne). What I want is for it to load properties from multiple environments, including both native (i.e.,class path) and AWS Secrets Manager.
Issue: I get an issue when i tried to use aws-secretsmanager as one of the composite's type (i.e no issue with native type). I don't see AwsSecretsManagerEnvironmentRepositoryFactory loaded. Please see the attached images for more reference.
Code:
I expect the placeholders to be replaced with the values fetched from AWS Secrets Manager.
Secrets Manager Config:
Note:
Confirmed that AWS Secrets Manager is retrieving data correctly by logging the output during startup.
Please note that, I have upgraded my spring-boot version to 3.4.* and spring-cloud to 4.2.* and spring-cloud-aws-starter-secrets-manager to 3.3.*, but the issue remains unresolved.
The text was updated successfully, but these errors were encountered:
Type: Bug
Component: Secrets Manager
Describe the bug:
Spring Cloud Config Server serves as centralised config server to supply the properties to multiple Spring Boot micro services(i.e clients). It should load non critical properties from native(i.e classpath) and critical properties from secrets manager.
In short, the responsibility of fetching the secrets from AWS Secret Manager should still remain with the Config server only.
Approach -1:
Using AWS Secrets Manager as a backend, As suggested here https://docs.spring.io/spring-cloud-config/reference/server/environment-repository/aws-secrets-manager.html
Issue: This is not at all working. Meaning, I don't see Loading secrets from AWS Secret Manager secret with name:**** in the startup logs.
Approach -2:
Used spring.config.import as suggested here https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-SNAPSHOT/reference/html/index.html#spring-cloud-aws-secrets-manager
This was working, I could finally see my secret being loaded from 'AWS Secrets Manager'.
I tested it with
@Value
, and my service successfully printed the loaded value.Issue: The issue is that the placeholders in app.yml or app-dev.yml located in the resources (i.e., path: config/${my-app}/application-dev.yml) are not being replaced. At any given time, it only loads from a single EnvironmentRepository (i.e., EnvironmentRepository.findOne). What I want is for it to load properties from multiple environments, including both native (i.e.,class path) and AWS Secrets Manager.
Approach -3:
I tried by enabling 'composite' profile as suggested here https://docs.spring.io/spring-cloud-config/reference/server/environment-repository/composite-repositories.html
Issue: I get an issue when i tried to use aws-secretsmanager as one of the composite's type (i.e no issue with native type). I don't see AwsSecretsManagerEnvironmentRepositoryFactory loaded. Please see the attached images for more reference.
Code:
I expect the placeholders to be replaced with the values fetched from AWS Secrets Manager.
Secrets Manager Config:
Note:
@Bean ApplicationRunner myRunner(@Value("${username}")String username){ return args -> { System.out.println(username); }; }
The text was updated successfully, but these errors were encountered: