Soru

Zorluk: OrtaConfigure Azure App Service Web Apps

You are deploying an ASP.NET Core web application to an Azure App Service Web App named app-prod-01. The application requires a secret named DbConnectionString stored in an Azure Key Vault named kv-prod-01. The Web App has a system-assigned managed identity that is already configured with a GET access policy on the key vault. You must configure the application settings in the Web App to reference the Key Vault secret without modifying the code. Which configuration format must you use for the value of the DbConnectionString application setting?

  1. A
    @Microsoft.KeyVault(VaultUri=https://kv-prod-01.vault.azure.net/secrets/DbConnectionString)
  2. @Microsoft.KeyVault(VaultName=kv-prod-01;SecretName=DbConnectionString)Cevap
  3. C
    @Azure.KeyVault(SecretUri=https://kv-prod-01.vault.azure.net/secrets/DbConnectionString)
  4. D
    @Microsoft.KeyVault(VaultName=kv-prod-01,SecretName=DbConnectionString)

Cevap

The correct format is to use the key-value pair syntax with the @Microsoft.KeyVault prefix, specifying the VaultName and SecretName parameters separated by a semicolon.
The configuration syntax stating '@Microsoft.KeyVault(VaultName=kv-prod-01;SecretName=DbConnectionString)' is correct. App Service successfully parses this format, identifies the Key Vault resource by name, and fetches the secret using the web app's managed identity.

Adım Adım Çözüm

1
Identify the mandatory prefix for App Service Key Vault references.
The prefix must be @Microsoft.KeyVault.
Azure App Service parses application settings looking for this exact prefix to resolve secrets dynamically.
2
Select the correct parameters and delimiter for referencing the vault and secret name directly.
Use VaultName and SecretName parameters delimited by a semicolon.
The key-value pair syntax uses semicolons to separate parameters inside the parentheses.
3
Validate the final format structure.
The final structure is @Microsoft.KeyVault(VaultName=kv-prod-01;SecretName=DbConnectionString).
This matches the official syntax rules for referencing Key Vault secrets within App Service settings without relying on a full URI.

Anahtar Kavram

Azure App Service Key Vault references allow applications to securely access secrets from a key vault through environment variables without code modifications.
Tahmini Süre:1m 30s
Bu soruyu puanla