Azure Key Vault connected service in Visual Studio is now available. Visual Studio Connected Services enables developers to easily connect and integrate with several Cloud services. We have seen several Azure connected services including Application Insights, Azure Storage, Mobile services, Cosmos DB etc. Furthermore, we secure our application by moving secrets from the source code into Azure Key Vaults. With the recent update of Visual Studio, you can now connect Azure Key Vault using connected services from Visual Studio and easily access the Azure key vault rest API’s.
Azure Key Vault connected service in Visual Studio
If you have the recent updates to the Visual Studio (version 15.7 Preview 3), you will find the “Secure Secrets with Azure Key Vault” as a Connected Service.
Once you select the “Secure Secrets with Azure Key Vault” option from the connected services list, Visual Studio allows you to create a Key Vault under the logged in Azure Subscription. You can choose key vault name, resource group, location, and pricing tier using the Visual Studio tooling.
Post all the options section, click on “Add”. Visual Studio now will automatically add required configuration, NuGet packages to the project, and enable you to access secrets from the Key Vault in your application.
Visual Studio will also create the Azure Key Vault in the selected subscription. Once the Key Vault has been created, you will be able to manage secrets and permissions directly through the Azure portal.
Now you can use the API for key vaults and access the secrets and this is available for both ASP.NET and ASP.NET Core Application. With the help of Azure Connected Services for Key Vault, securing project’s secrets is now easier than ever.
Hope this helps.