Skip to content
Snippets Groups Projects
Commit 81b7af6b authored by Kishore Battula's avatar Kishore Battula
Browse files

Merge branch 'keyvalut_names_changed' into 'master'

Changing secret names and enabling mdc context for SLF4jLogger

See merge request !17
parents 34ba592b 42f93306
No related branches found
No related tags found
1 merge request!17Changing secret names and enabling mdc context for SLF4jLogger
Pipeline #7727 canceled
......@@ -90,7 +90,7 @@
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<version>0.0.21</version>
<version>0.0.23</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
......
......@@ -74,13 +74,13 @@ public class AzureBootstrapConfig {
@Bean
@Named("COSMOS_ENDPOINT")
public String cosmosEndpoint(SecretClient kv) {
return getKeyVaultSecret(kv, "cosmosdb-uri");
return getKeyVaultSecret(kv, "cosmos-endpoint");
}
@Bean
@Named("COSMOS_KEY")
public String cosmosKey(SecretClient kv) {
return getKeyVaultSecret(kv, "cosmos-db-key");
return getKeyVaultSecret(kv, "cosmos-primary-key");
}
@Bean
......@@ -125,4 +125,4 @@ public class AzureBootstrapConfig {
return secretValue;
}
}
}
\ No newline at end of file
#
# Copyright © Microsoft Corporation
# Copyright © Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -51,4 +51,5 @@ tenantInfo.container.name=TenantInfo
#logging configuration
logging.transaction.enabled=true
logging.slf4jlogger.enabled=true
logging.mdccontext.enabled=true
......@@ -51,7 +51,7 @@ public class AzureBootstrapConfigTest {
@Test
public void configReturnsCorrectSecretCosmosKey() {
doReturn("cosmos-key-secret").when(secret).getValue();
doReturn(secret).when(kv).getSecret("cosmos-db-key");
doReturn(secret).when(kv).getSecret("cosmos-primary-key");
String secretValue = bootstrapConfig.cosmosKey(kv);
assertEquals( "cosmos-key-secret", secretValue);
......@@ -60,7 +60,7 @@ public class AzureBootstrapConfigTest {
@Test
public void configReturnsCorrectSecretCosmosEndpoint() {
doReturn("cosmos-endpoint-secret").when(secret).getValue();
doReturn(secret).when(kv).getSecret("cosmosdb-uri");
doReturn(secret).when(kv).getSecret("cosmos-endpoint");
String secretValue = bootstrapConfig.cosmosEndpoint(kv);
assertEquals( "cosmos-endpoint-secret", secretValue);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment