You are configuring policies in Azure API Management (APIM) for a weather forecasting API. The API must satisfy the following requirements:
1. Strip a sensitive query parameter named `internal-token` from the request before it is forwarded to the backend.
2. Authenticate to the backend service using the APIM instance's system-assigned managed identity.
Which two of the following XML policy configurations should you apply to meet these requirements? (Select two)
- xml
<inbound>
<base />
<set-query-parameter name="internal-token" action="delete" />
</inbound>
Cevap - xml
<inbound>
<base />
<authentication-managed-identity resource="https://management.azure.com/" />
</inbound>
Cevap - Cxml
<outbound>
<base />
<set-query-parameter name="internal-token" action="delete" />
</outbound> - Dxml
<inbound>
<base />
<authentication-managed-identity resource="https://management.azure.com/" client-id="system" />
</inbound>
Cevap
Apply the inbound policy to delete the query parameter and the inbound policy using the authentication-managed-identity tag without a client-id attribute.
The inbound policy block executes before the request is forwarded to the backend. Deleting query parameters must be performed here using the set-query-parameter policy. Additionally, acquiring an access token using the system-assigned managed identity is configured in the inbound block via the authentication-managed-identity policy, which must omit the client-id attribute to indicate system-assigned identity utilization.
Adım Adım Çözüm
Anahtar Kavram
Azure API Management policies are executed sequentially within specific blocks (inbound, backend, outbound, on-error). Inbound policies modify requests before forwarding, including credential acquisition and parameter sanitization.