Storing secrets with Azure Key Vault
To get secret configuration values, the Azure Key Vault service can be used. The Key Vault service can be used to store secrets such as passwords, certificates, and keys. This service adds hardware-level encryption, automatic certificate renewals, and granular access control. With predefined roles, the service decides who is allowed to read secrets (Key Vault Secrets User, the application), who is allowed to create and update secrets but not read secrets (Key Vault Contributor), and who is allowed to monitor which users use secrets but not to create and read secrets (Key Vault Secrets Officer).
With .NET applications, the Key Vault service can be added as a configuration provider, as with Azure App Configuration. Another way to use this service is to link secrets stored with Key Vault to an Azure App Configuration instance. We will use the second option.
When you add a key to App Configuration, instead of just supplying a key and value, the...