You are deploying a containerized application to Azure Container Instances (ACI). The container needs to retrieve secrets from an Azure Key Vault at runtime. You have successfully enabled a system-assigned managed identity for the ACI container group. Which of the following actions must you perform to allow the container group to retrieve the secrets from the key vault?
- Grant the system-assigned managed identity GET permission to secrets in the Azure Key Vault access policies or Azure RBAC.Answer
- BReplace the system-assigned managed identity with a user-assigned managed identity because Azure Key Vault only supports user-assigned managed identities.
- CConfigure the container group to authenticate to Azure Key Vault using the Azure Container Registry credentials.
- DReference the secrets in the container group configuration using the @Microsoft.KeyVault syntax within the container's environment variables.
Answer
Grant the system-assigned managed identity GET permission to secrets in the Azure Key Vault access policies or Azure RBAC.
To retrieve secrets from Azure Key Vault, the container's managed identity must be granted the necessary permissions (such as GET/LIST) in the Key Vault access policies or via Azure RBAC. Enabling the identity only registers it with Microsoft Entra ID; it does not grant permissions by default.
Step-by-Step Solution
Key Concept
Configuring access policies or RBAC roles to grant an ACI managed identity access to Azure Key Vault secrets.
Estimated Time:1m 0s