A retail company is deploying a Python-based processing service to a V4 Azure Function App. The function is configured with a Service Bus queue trigger, where the trigger's Connection property is set to QueueConnection. Company security guidelines mandate that credentials must not be stored in configuration files or key vaults, and the connection must utilize the function's system-assigned managed identity. Which application setting must be added to the Function App to establish a successful connection?
- AQueueConnection set to a Key Vault reference using the @Microsoft.KeyVault syntax pointing to the Service Bus connection string.
- QueueConnection__fullyQualifiedNamespace set to the fully qualified domain name of the Service Bus namespace.Answer
- CQueueConnection__credential set to SystemAssigned inside the host.json file.
- DAn upgrade of the hosting plan to an App Service (Dedicated) plan to bypass the need for managed identity.
Answer
The correct approach is to set QueueConnection__fullyQualifiedNamespace to the fully qualified domain name of the Service Bus namespace in the Function App's application settings. This allows the V4 runtime to connect using the system-assigned managed identity.
Configuring QueueConnection__fullyQualifiedNamespace with the Service Bus namespace name allows the Azure Functions V4 runtime to connect to the Service Bus using the system-assigned managed identity. This complies with the security requirement to avoid using secrets or connection strings in settings.
Step-by-Step Solution
Key Concept
Configuring identity-based connections for Azure Function triggers
Estimated Time:1m 30s