I am working on a Spring Boot application that should be deployed to Azure. Using the following dependency I managed to use secrets from the KeyVault for sensitive application properties:
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-keyvault-secrets-spring-boot-starter</artifactId>
<version>2.1.6</version>
</dependency>
With setting the poperty azure.keyvault.uri=https://my-vault.vault.azure.net and configuring Managed Service Identity I just inject the secret name from the KeyVault like this:
@Value("${ServerPassphrase}")
String serverPassphrase;
Now I have a database connection and the password has the usual key spring.datasource.password. Unfortunately dots are not allowed in secret names in Azure KeyVault. :-(
Is there a simple way to replace the dots with dashes which are allowed characters in KeyVault or do I have to write a custom property resolver as a wrapper?
