You are developing an Azure Function App (V4 runtime) that processes messages from an Azure Storage Queue. The processing logic for some messages can take up to 15 minutes to complete. The security policy requires that the Queue connection string must be stored securely in Azure Key Vault and must not be exposed in the application source code or settings files.
Which two configurations or actions should you implement to meet these requirements? (Select TWO.)
- Change the hosting plan of the Function App to a Premium or Dedicated (App Service) plan.Cevap
- Add an application setting in the Function App that references the Key Vault secret using the `@Microsoft.KeyVault(SecretUri=...)` syntax.Cevap
- CKeep the Consumption plan and configure the `functionTimeout` property in the `host.json` file to `00:15:00`.
- DAdd a setting to the `host.json` file that references the Key Vault secret using the `@KeyVault(SecretUri=...)` syntax.
Cevap
To meet the requirements, you must change the hosting plan of the Function App to a Premium or Dedicated (App Service) plan, and add an application setting in the Function App that references the Key Vault secret using the `@Microsoft.KeyVault(SecretUri=...)` syntax.
Changing the hosting plan to a Premium or Dedicated plan is necessary because the Consumption plan has a maximum execution limit of 10 minutes, meaning a 15-minute execution would be terminated early. Furthermore, using a Key Vault reference in the Application Settings with the `@Microsoft.KeyVault(SecretUri=...)` syntax is the standard and secure way to inject secrets into the function configuration without exposing them in clear text.
Adım Adım Çözüm
Anahtar Kavram
Hosting plans, timeout configurations, and Key Vault integration for Azure Functions.