Web Apps Settings: Combining Plain Text and Key Vault Secrets
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
Hi, I am trying to combine a Key Vault secret value with plain text in the connection strings section of an Azure Web App. For instance, I have removed the username from the connection string and stored this value in Key Vault. Now I'd like to be able to use the Key Vault value in the connection string. However, the secret reference is not recognized and the application reads the connection string as a single string.
Example
With a secret stored in a Key Vault with the value MyUser.
Connection String:
```
{
"name": "ConnString1",
"value": "Data Source=MyServer; Initial Catalog=MyDatabase; user id=@Microsoft.KeyVault(SecretUri=SECRETURL);"
}
```
Should read in the application as:
`Data Source=MyServer;Initial Catalog=MyDatabase;user id=MyUser;
`
However it remains as:
`Data Source=MyServer; Initial Catalog=MyDatabase; user id=@Microsoft.KeyVault(SecretUri=SECRETURL);
`
I have creating a separate setting for the Key Vault secret value and using string interpolation in the application to create the connection string but that requires a lot of code changes. Would be nice to be able to integrate Key Vault values with plain text.
Contributor guide
Assessment
This issue has not been assessed yet.