Soru

Zorluk: OrtaCreate and Configure Azure Functions

You are developing a web API using Azure Functions. The API contains two HTTP-triggered functions: a function named GetProducts that retrieves public product catalog data, and a function named UpdateInventory that performs administrative inventory modifications. You must deploy these functions to a single Azure Function App. The security requirements are as follows: clients must be able to call GetProducts without providing any credentials or API keys; clients calling UpdateInventory must provide an API key, but you must minimize permissions and avoid using the master host key. Which configuration should you apply to the HTTP triggers to meet these requirements?

  1. Set the authorization level of GetProducts to Anonymous, and set the authorization level of UpdateInventory to Function.Cevap
  2. B
    Set the authorization level of GetProducts to Anonymous, and set the authorization level of UpdateInventory to Admin.
  3. C
    Set the authorization level of GetProducts to Function, and set the authorization level of UpdateInventory to Function.
  4. D
    Set the authorization level of GetProducts to Anonymous, and set the authorization level of UpdateInventory to Anonymous.

Cevap

Configure the HTTP trigger authorization level for the GetProducts function to Anonymous and the UpdateInventory function to Function.
The correct configuration sets the authorization level of the public function to Anonymous (allowing access without any key validation) and sets the administrative function to Function (requiring a function-specific API key, which restricts access and avoids exposing the broader master host key).

Adım Adım Çözüm

1
Analyze the access requirement for the public product catalog retrieve endpoint.
The GetProducts function must allow public clients to access it without API keys or credentials.
This points to the Anonymous authorization level, which bypasses key validation.
2
Analyze the access requirement for the administrative inventory modification endpoint.
The UpdateInventory function must be secured using a key, but must avoid using the master host key.
The Function authorization level utilizes function-specific keys. The Admin authorization level requires the master host key, which has root-level access and should be avoided here.
3
Combine the configurations into a single deployment profile.
Select the option that configures GetProducts as Anonymous and UpdateInventory as Function.
This is the only configuration that simultaneously allows public access to GetProducts and secured, restricted key-based access to UpdateInventory.

Anahtar Kavram

HTTP Trigger Authorization Levels in Azure Functions
Tahmini Süre:1m 30s
Bu soruyu puanla