Facing Issues with Mutual TLS Configuration for Specific Routes in Azure Application Gateway
We need to support two APIs accessible through the domain device-api-server.com using Azure Application Gateway:
Bootstrap API
Path: /api/bootStrap Request Method: POST Authentication: No authentication required.
Handshake API
Path: /api/v2/handshake Request Method: POST Authentication: Requires mutual TLS (SSL validation). Current Setup:
We created two listeners in the API Gateway configuration:
Bootstrap-Listener: Listens on device-api-server.com. No certificate validation is required. Path Forwarding Rules: Requests to /api/bootStrap are forwarded to the backend pool onboarding-service. Requests to /api/v2/handshake are routed to the Handshake Listener.
BootStrap-Listener
bootStrap Rule
handshake listener
handshake rule
Issue: When a request is sent to the Handshake API via the Handshake Listener, the response is:
<h2>Length Required</h2>
<hr>
<p>HTTP Error 411. The request must be chunked or have a content length.</p>
It looks like Content-length header is getting dropped when Path Rule "/api/v2/handshake" is forwarding the request to Handshake-Listener"
Requirement:
How can we configure Azure Application Gateway to ensure:
The Bootstrap API remains accessible without authentication?
The Handshake API performs mutual TLS validation while avoiding the HTTP 411 "Length Required" error