You are configuring an Azure API Management (APIM) instance to route requests to a backend microservice deployed on an Azure Virtual Machine. The backend microservice uses a self-signed SSL/TLS certificate for secure communication. When testing the API in APIM, you receive a HTTP 500 Bad Gateway error because the APIM instance cannot validate the trust chain of the self-signed certificate. You need to configure APIM to successfully communicate with the backend service. Which of the following actions should you perform to resolve this issue?
- AConfigure a user-assigned managed identity on the backend Azure Virtual Machine to sign the certificate, and update the API Management gateway to bypass client certificate authentication.
- BAdd a cors policy inside the outbound section of the API configuration to bypass the certificate validation check for backend origins.
- Create a custom Backend resource in the API Management instance for the backend service, and disable backend certificate chain validation (for example, by setting the skipCertificateChainValidation parameter to true).Answer
- DReference the self-signed certificate using an Azure Key Vault secret identifier in the API's inbound policy, without granting the API Management instance's system-assigned managed identity a secret GET permission on the Key Vault.
Answer
Create a custom Backend resource in the API Management instance for the backend service, and disable backend certificate chain validation (for example, by setting the skipCertificateChainValidation parameter to true).
Creating a custom Backend resource in the API Management instance and setting its skipCertificateChainValidation property to true allows API Management to establish a secure TLS connection with the backend even if it uses a self-signed certificate, bypassing the default trust chain validation.
Step-by-Step Solution
Key Concept
Bypassing certificate validation for custom backends in Azure API Management
Estimated Time:2m 0s