Keeping Secrets Safe in ASP.NET Core with Azure Key Vault and Managed Service Identity
Monday, October 9, 2017
In Azure, the recommended place to store application secrets is Azure Key Vault. ASP.NET Core makes it easy for an application to read secrets from Key Vault, but the application needs to be given valid credentials to do so. These credentials are often stored in plain text in an app setting, allowing anyone with access to the application to see them.
Managed Service Identity (MSI) was created to solve this problem. We can use it to access Key Vault without storing any secrets or credentials information in our web application.
Today, we'll take a look at how to use ASP.NET Core with MSI and Key Vault to properly secure and access secrets.
In Azure, the recommended place to store application secrets is Azure Key Vault. ASP.NET Core makes it easy for an application to read secrets from Key Vault, but the application needs to be given valid credentials to do so. These credentials are often stored in plain text in an app setting, allowing anyone with access to the application to see them.
Managed Service Identity (MSI) was created to solve this problem. We can use it to access Key Vault without storing any secrets or credentials information in our web application.
Today, we'll take a look at how to use ASP.NET Core with MSI and Key Vault to properly secure and access secrets.