Scenario
In the previous post, we use a shared key to establish a connection to an Azure storage account (including Table storage and Blob storage) and SQL Database. This method can lead security vulnerabilities. To enhance the security of our application, we can leverage App Configuration along with Azure Key Vault. This post will illustrate how to integrate these services to our current application.
Let's started.
Overview architecture
If you're unsure how to set up Azure App Configuration and Azure Key Vault, you can refer to these Microsoft articles:
Quickstart: Create an Azure App Configuration store | Microsoft Learn
You need to have all below information prior to proceeding to the next step.
Key Vault and new secrets
App configuration
Activate Managed Identity for the API
Grant access to your API/ local dev to Key Vault
Azure role-based access control: "Key Vault Secrets User"/"Key Vault Administrator"
Modify code
You can use code sample from previous post.
Add one more extension class to add Azure App Configuration to provided configuration builder.
Modify "Program.cs" file
Run locally




0 nhận xét:
Đăng nhận xét