INFRA-1896 | Harinder | Bug fix: Fetching env vars from paths causing issues in OKTA_GROUP_MAPPING
This commit is contained in:
@@ -97,6 +97,10 @@
|
||||
{
|
||||
"name": "JWT_SECRET_KEY",
|
||||
"value": "$JWT_SECRET_KEY"
|
||||
},
|
||||
{
|
||||
"name": "TEAMS_LIST_VAULT",
|
||||
"value": "$TEAMS_LIST_VAULT"
|
||||
}
|
||||
],
|
||||
"namespace": "$NAMESPACE",
|
||||
|
||||
@@ -19,8 +19,8 @@ public class TeamConfiguration {
|
||||
|
||||
private final TeamRepository teamRepository;
|
||||
|
||||
@Value("${slack.teams.mapping}")
|
||||
private String[] slackTeamMappings;
|
||||
@Value("${teams.list.vault}")
|
||||
private String[] teamsListVault;
|
||||
|
||||
@Bean
|
||||
public boolean consolidateTeamListInDBFromVault() {
|
||||
@@ -42,8 +42,8 @@ public class TeamConfiguration {
|
||||
|
||||
// Find diff of team list from Vault and DB
|
||||
List<String> newTeamList = new ArrayList<>();
|
||||
log.info("Teams list from Vault: {}", (Object) slackTeamMappings);
|
||||
for (String team: slackTeamMappings){
|
||||
log.info("Teams list from Vault: {}", (Object) teamsListVault);
|
||||
for (String team: teamsListVault){
|
||||
if(!teamDbMap.containsKey(team)){
|
||||
newTeamList.add(team);
|
||||
if (!newTeamsSynced){
|
||||
|
||||
@@ -23,5 +23,5 @@ spring.main.allow-bean-definition-overriding=true
|
||||
#JWT token generation
|
||||
jwt.secret.key=${JWT_SECRET_KEY}
|
||||
|
||||
#Slack teams mapping - Single source of truth for teams
|
||||
slack.teams.mapping=${SLACK_TEAMS_MAPPING_ARRAY:InsurancePlatform,Co-Lending,IT}
|
||||
#Teams List from Vault - Single source of truth for teams in vault
|
||||
teams.list.vault=${TEAMS_LIST_VAULT:InsurancePlatform,Co-Lending,IT}
|
||||
|
||||
@@ -60,5 +60,5 @@ manifest.limit.config.path=classpath:changerequest
|
||||
#JWT token generation
|
||||
jwt.secret.key=${JWT_SECRET_KEY:'something'}
|
||||
|
||||
#Slack teams mapping - Single source of truth for teams
|
||||
slack.teams.mapping=${SLACK_TEAMS_MAPPING_ARRAY:InsurancePlatform,Co-Lending,IT}
|
||||
#Teams List from Vault - Single source of truth for teams in vault
|
||||
teams.list.vault=${TEAMS_LIST_VAULT:InsurancePlatform,Co-Lending,IT}
|
||||
|
||||
@@ -38,7 +38,7 @@ class TeamConfigurationTest {
|
||||
teamList[0] = "IP";
|
||||
teamList[1] = "Hifi";
|
||||
ReflectionTestUtils.setField(teamConfiguration,
|
||||
"slackTeamMappings",
|
||||
"teamsListVault",
|
||||
teamList);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,5 +46,5 @@ spring.main.allow-bean-definition-overriding=true
|
||||
manifest.limit.config.path=classpath:changerequest
|
||||
jwt.secret.key=${JWT_SECRET_KEY:test-secret-key}
|
||||
|
||||
#Slack teams mapping - Single source of truth for teams
|
||||
slack.teams.mapping=${SLACK_TEAMS_MAPPING_ARRAY:InsurancePlatform,Co-Lending,IT}
|
||||
#Teams List from Vault - Single source of truth for teams in vault
|
||||
teams.list.vault=${TEAMS_LIST_VAULT:InsurancePlatform,Co-Lending,IT}
|
||||
|
||||
Reference in New Issue
Block a user