Facing Issues with Mutual TLS Configuration for Specific Routes in Azure Application Gateway

Ganesh Chowdhary 0 Reputation points
2024-12-30T15:56:54.7966667+00:00

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

image (8) bootStrap Rule

bootstrap_rule

handshake listener

image (9)

handshake rule

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

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,102 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
467 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.