A developer needs to secure an API hosted in Azure API Management (APIM) by validating JSON Web Tokens (JWT) issued by Microsoft Entra ID. The validation process must ensure that the token signature is verified against Microsoft Entra ID's keys, and that expired or unauthorized requests are rejected before reaching the backend. Which two configuration steps should the developer perform? (Select TWO.)
- Place the <validate-jwt> policy in the <inbound> section of the API policy configuration.Answer
- Define the openid-config endpoint URL pointing to the Microsoft Entra ID metadata endpoint in the <validate-jwt> policy.Answer
- CPlace the <validate-jwt> policy in the <outbound> section of the API policy configuration.
- DEnable a system-assigned managed identity on the APIM instance to sign the incoming client tokens.
- EConfigure the <validate-jwt> policy to reference a signature key in Azure Key Vault without setting a Key Vault access policy for the APIM identity.
Answer
To secure the API endpoints, place the <validate-jwt> policy within the <inbound> processing block and configure the policy to use the Microsoft Entra ID OpenID Connect metadata endpoint for key validation.
The correct options state that the <validate-jwt> policy must be placed in the <inbound> section and configured with the Microsoft Entra ID OpenID Connect metadata endpoint. Inbound policies filter requests before they reach the backend service, which is required for security. The OpenID Connect metadata endpoint configuration ensures that the gateway can fetch and verify the signing keys of the tokens dynamically.
Step-by-Step Solution
Key Concept
Securing API Management endpoints using inbound JWT validation and OpenID Connect configuration.