You are deploying a .NET web application to an Azure App Service. The application is configured to retrieve its configuration settings from an Azure App Configuration store named appconf-prod. Some settings, such as database credentials, are stored as Key Vault references pointing to secrets in an Azure Key Vault named kv-prod. The App Service has a system-assigned managed identity enabled. At runtime, the application loads configuration values from appconf-prod but receives the raw JSON metadata of the Key Vault references instead of the actual secret values. Which of the following actions must you perform to resolve this issue and successfully retrieve the secret values? (Select THREE correct actions.)
- Grant the App Service's system-assigned managed identity the App Configuration Data Reader role on the appconf-prod store.Cevap
- Grant the App Service's system-assigned managed identity the Key Vault Secrets User role on the kv-prod Key Vault.Cevap
- Configure the application's configuration builder to call ConfigureKeyVault and pass a token credential such as DefaultAzureCredential.Cevap
- DGrant the App Configuration instance a system-assigned managed identity and assign that identity the Key Vault Secrets User role on the kv-prod Key Vault.
- EChange the value of the key-value pairs in the App Configuration store to use the App Service reference syntax: @Microsoft.KeyVault(SecretUri=https://...).
Cevap
To resolve the raw JSON metadata issue and retrieve the actual secret values, you must grant the App Service's managed identity the App Configuration Data Reader role on the configuration store, grant the same managed identity the Key Vault Secrets User role on the Key Vault, and configure the application code using ConfigureKeyVault with an appropriate credential like DefaultAzureCredential.
The system-assigned managed identity of the App Service must have read permissions for both the App Configuration store (App Configuration Data Reader) and the Key Vault (Key Vault Secrets User). In addition, the application's startup code must be updated to call ConfigureKeyVault on the configuration builder, passing a credential like DefaultAzureCredential so the SDK can resolve the references at startup.
Adım Adım Çözüm
Anahtar Kavram
Key Vault references in Azure App Configuration are resolved client-side by the application's SDK. This requires that the application's identity has read permissions to both the App Configuration store and the target Key Vault, and that the SDK is configured to resolve the references.