A development team is deploying a web application to Azure App Service named webapp-orders-prod. The application requires a connection string to a database. The connection string is stored in an Azure Key Vault named kv-orders-prod as a secret named DbConnectionString.
A system-assigned managed identity has been enabled for webapp-orders-prod.
The developer configures an application setting named ConnectionStrings:DefaultConnection on the web app with the value:
@Microsoft.KeyVault(SecretUri=https://kv-orders-prod.vault.azure.net/secrets/DbConnectionString)
However, when the application starts, it fails to connect to the database. Upon checking the Azure portal, the Key Vault reference for ConnectionStrings:DefaultConnection shows a status of 'Access Denied'.
Which configuration step must be performed to resolve this issue?
- Grant the system-assigned managed identity of the web app the 'Get' secret permission in the Key Vault's access policies or Azure role-based access control (RBAC).Cevap
- BConfigure a user-assigned managed identity for the web app, as system-assigned managed identities are not supported for Key Vault references.
- CChange the application setting value prefix to @Microsoft.Azure.KeyVault instead of @Microsoft.KeyVault.
- DConfigure an autoscale rule where the scale-in threshold is set higher than the scale-out threshold to prevent throttling from the Key Vault.