diff --git a/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/AzureCosmosProperties.java b/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/AzureCosmosProperties.java index bc5ef75b70ab9ac7f83c72b4c87ce1fcd5f36771..84ba639f515370bcbbefcab1816a77a5fd61d166 100644 --- a/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/AzureCosmosProperties.java +++ b/provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/AzureCosmosProperties.java @@ -21,13 +21,13 @@ public class AzureCosmosProperties { @Bean @Named("COSMOS_ENDPOINT") public String cosmosEndpoint(SecretClient kv) { - return getKeyVaultSecret(kv, "cosmos-endpoint"); + return getKeyVaultSecret(kv, "opendes-cosmos-endpoint"); } @Bean @Named("COSMOS_KEY") public String cosmosKey(SecretClient kv) { - return getKeyVaultSecret(kv, "cosmos-primary-key"); + return getKeyVaultSecret(kv, "opendes-cosmos-primary-key"); } @Bean diff --git a/provider/notification-azure/src/main/resources/application.properties b/provider/notification-azure/src/main/resources/application.properties index fa4ec0f92bebcde028de96d66d0e1cc9b5877bcc..0fbf96e4f6f9779f9bfb21665f5277f6a9a5bfac 100644 --- a/provider/notification-azure/src/main/resources/application.properties +++ b/provider/notification-azure/src/main/resources/application.properties @@ -32,7 +32,6 @@ aad.oboApi=${aad_client_id} azure.application-insights.instrumentation-key=${appinsights_key} # Azure CosmosDB configuration -azure.cosmosdb.uri=${cosmosdb_account} azure.cosmosdb.database=${cosmosdb_database} tenantInfo.container.name=TenantInfo diff --git a/provider/notification-azure/src/test/java/org/opengroup/osdu/notification/util/AzureCosmosPropertiesTest.java b/provider/notification-azure/src/test/java/org/opengroup/osdu/notification/util/AzureCosmosPropertiesTest.java index 4280d1d1b562ee1969d4a5e771d02fa86a591d5f..0bc49cd9abc94173d9937166049a837b715a2d6d 100644 --- a/provider/notification-azure/src/test/java/org/opengroup/osdu/notification/util/AzureCosmosPropertiesTest.java +++ b/provider/notification-azure/src/test/java/org/opengroup/osdu/notification/util/AzureCosmosPropertiesTest.java @@ -52,14 +52,14 @@ public class AzureCosmosPropertiesTest { IllegalStateException exception = assertThrows(IllegalStateException.class, () -> sut.cosmosKey(kv)); // Assert - assertEquals("No secret found with name cosmos-primary-key", exception.getMessage()); + assertEquals("No secret found with name opendes-cosmos-primary-key", exception.getMessage()); } @Test public void should_returnRightCosmosKey_getCosmosKey() { // Set-Up doReturn("cosmos-key-secret").when(secret).getValue(); - doReturn(secret).when(kv).getSecret("cosmos-primary-key"); + doReturn(secret).when(kv).getSecret("opendes-cosmos-primary-key"); // Act String secretValue = sut.cosmosKey(kv); @@ -72,7 +72,7 @@ public class AzureCosmosPropertiesTest { public void should_returnRightCosmosSecret_getCosmosKey() { // Set-Up doReturn("cosmos-endpoint-secret").when(secret).getValue(); - doReturn(secret).when(kv).getSecret("cosmos-endpoint"); + doReturn(secret).when(kv).getSecret("opendes-cosmos-endpoint"); // Act String secretValue = sut.cosmosEndpoint(kv);