Question

Difficulty: MediumCreate and Configure Azure Functions

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?

  1. A
    QueueConnection set to a Key Vault reference using the @Microsoft.KeyVault syntax pointing to the Service Bus connection string.
  2. QueueConnection__fullyQualifiedNamespace set to the fully qualified domain name of the Service Bus namespace.Answer
  3. C
    QueueConnection__credential set to SystemAssigned inside the host.json file.
  4. D
    An 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

1
Identify the requirement to connect to Azure Service Bus using managed identity rather than storing credentials.
Confirm that an identity-based connection is required.
The scenario prohibits storing credentials or connection strings in configuration settings or Key Vault.
2
Determine the application setting suffix used by the V4 runtime for Service Bus identity-based connections.
Identify the '__fullyQualifiedNamespace' suffix.
Azure Functions uses specific setting suffixes to configure connection metadata, and Service Bus trigger connections require the fully qualified namespace.
3
Configure the application setting combining the connection name and the suffix.
Add 'QueueConnection__fullyQualifiedNamespace' to the application settings.
This tells the runtime to connect to the specified namespace using the app's managed identity.

Key Concept

Configuring identity-based connections for Azure Function triggers
Estimated Time:1m 30s
Rate this question