Your company is migrating an Azure App Service web application to a new security model. The web application must retrieve database connection strings stored as secrets in an Azure Key Vault. The Key Vault is configured to use the Azure role-based access control (Azure RBAC) authorization model. You need to configure the minimum permissions required for the web application's system-assigned managed identity to read the secrets. Which configuration should you apply?
- AAssign the Key Vault Reader role to the system-assigned managed identity.
- Assign the Key Vault Secrets User role to the system-assigned managed identity.Answer
- CCreate a Key Vault access policy with Secret Get permissions and assign it to the system-assigned managed identity.
- DAssign the Key Vault Secrets User role to a new user-assigned managed identity and configure the web application to use it.
Answer
Assign the Key Vault Secrets User role to the system-assigned managed identity.
The correct answer is to assign the Key Vault Secrets User role to the system-assigned managed identity. Under the Azure RBAC authorization model, this specific role provides the minimum privilege necessary to read secret values (such as database connection strings) without granting administrative permissions to create or delete secrets. Furthermore, because the vault uses Azure RBAC, legacy access policies are disabled, and the Web App's existing system-assigned managed identity should be used directly rather than creating a new identity.
Step-by-Step Solution
Key Concept
Azure Key Vault RBAC permission model and built-in roles
Estimated Time:1m 30s