Question

Difficulty: EasySecure API Management Endpoints

You are securing an Azure API Management (APIM) gateway endpoint. You need to ensure that the APIM gateway validates the JSON Web Token (JWT) provided in the authorization header of incoming requests before forwarding the requests to the backend service. In which section of the APIM policy XML configuration must you place the validate-jwt policy?

  1. inboundAnswer
  2. B
    outbound
  3. C
    backend
  4. D
    on-error

Answer

inbound
Placing the validate-jwt policy in the inbound section ensures that the JSON Web Token is validated before the request is processed further or forwarded to the backend service.

Step-by-Step Solution

1
Analyze the request lifecycle in Azure API Management policies.
The phases execute in order: inbound, backend, outbound, and on-error (if a failure occurs).
To validate credentials before the backend is touched, the validation must occur in the earliest phase.
2
Determine where validation policies like validate-jwt must reside.
The validate-jwt policy is an inbound processing policy.
Placing validate-jwt in the inbound section blocks unauthorized requests at the gateway level before they consume backend resources.

Key Concept

Azure API Management policies are executed in specific sections based on the request flow, and token validation must occur in the inbound section to protect backend resources.
Estimated Time:45s
Rate this question