An organization has a web application deployed to Azure App Service named app-payment-prod. The application needs to retrieve a database connection string stored as a secret in an Azure Key Vault named kv-payment-prod. The Key Vault is configured to use the Azure Role-Based Access Control (Azure RBAC) authorization model. You must implement access using the principle of least privilege. Which set of configuration steps should you perform to grant the web application access to the Key Vault secret?
- Enable a system-assigned managed identity on the App Service. Assign the 'Key Vault Secrets User' Azure RBAC role to the identity's service principal at the scope of the Key Vault. Reference the secret in the App Service settings using the syntax: @Microsoft.KeyVault(SecretUri=https://kv-payment-prod.vault.azure.net/secrets/db-conn-string/)Cevap
- BEnable a system-assigned managed identity on the App Service. Create a Key Vault access policy on kv-payment-prod that grants 'Get' secrets permission to the identity. Reference the secret in the App Service settings using the syntax: @Microsoft.KeyVault(SecretUri=https://kv-payment-prod.vault.azure.net/secrets/db-conn-string/)
- CEnable a system-assigned managed identity on the App Service. Assign the 'Key Vault Reader' Azure RBAC role to the identity's service principal at the scope of the Key Vault. Reference the secret in the App Service settings using the syntax: @KeyVault(SecretUri=https://kv-payment-prod.vault.azure.net/secrets/db-conn-string/)
- DEnable a user-assigned managed identity on the App Service. Assign the 'Key Vault Secrets User' Azure RBAC role to the identity's service principal at the scope of the Key Vault. Reference the secret in the App Service settings using the syntax: @Microsoft.KeyVault(SecretUri=https://kv-payment-prod.vault.azure.net/secrets/db-conn-string/)
Cevap
Enable a system-assigned managed identity on the App Service, assign the 'Key Vault Secrets User' Azure RBAC role to the identity at the Key Vault scope, and reference the secret using the '@Microsoft.KeyVault(SecretUri=...)' syntax.
The correct configuration enables the system-assigned managed identity on the App Service, grants it the 'Key Vault Secrets User' role under the Azure RBAC model, and references the secret using the correct '@Microsoft.KeyVault(SecretUri=...)' syntax. This satisfies the requirement of using the Azure RBAC model, enforces least privilege (by avoiding administrative roles like 'Secrets Officer' or 'Administrator'), and uses valid parsing syntax.
Adım Adım Çözüm
Anahtar Kavram
Configuring App Service Key Vault references with Azure RBAC and Managed Identities
Tahmini Süre:2m 30s