You are designing a security architecture for three Azure Function apps that must retrieve database connection secrets from a single Azure Key Vault. The solution must use managed identities, minimize administrative overhead, and grant only the minimum permissions required to read the secrets.
Which two configuration steps should you perform?
- Create a single user-assigned managed identity and associate its resource ID with all three Function apps using the userAssignedIdentities configuration property.Answer
- BEnable a system-assigned managed identity on each of the three Function apps by setting the identity type property to SystemAssigned.
- Assign the Key Vault Secrets User role to the user-assigned managed identity at the Key Vault scope.Answer
- DAssign the Key Vault Reader role to the user-assigned managed identity at the Key Vault scope.
Answer
To implement the solution, you should create a single user-assigned managed identity, associate its resource ID with all three Function apps, and assign the Key Vault Secrets User role to this identity at the Key Vault scope.
A user-assigned managed identity is a standalone Azure resource with its own lifecycle. Because it is independent, it can be shared across multiple resources like the three Function apps. This reduces overhead since we only need to manage a single identity and configure permissions once on the Key Vault. The Key Vault Secrets User role is the minimum role required to retrieve the secret values.
Step-by-Step Solution
Key Concept
User-Assigned Managed Identities and Least-Privilege RBAC Roles