TLS Termination (or SSL Offloading) in Azure App Gateway — part 1

TLS Termination (or SSL Offloading) in Azure App Gateway — part 1 What is Azure Application Gateway? App Gateway is one of the Load Balance services that exist in Azure. In this case, we’re talking about web traffic load balancing at the la

Source comparison and review notes
  • Automated pair-review warning (AI bilingual content review): Both describe termination as an unencrypted backend leg and later say the gateway re-encrypts traffic; backend HTTP versus HTTPS is configuration-dependent, so these statements are not one universal TLS-termination flow.

What is Azure Application Gateway?

App Gateway is one of the Load Balance services that exist in Azure. In this case, we’re talking about web traffic load balancing at the layer 7 level (OSI Model Application layer). Unlike a Layer 4 (transport layer) balancer, which only routes traffic based on IP address and port, Azure App Gateway can generate routing rules from attributes of an HTTP request such as the URI path or host header. For example, we could generate a different rule for the /images/* and /video/* path of the domain contoso.com, as you can see in the image below.

Here you will find all the features that an App Gateway in Azure provides.

What is TLS/SSL Termination?

Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a security standard that secures encrypted traffic between a Web Server and the browser.

The Azure Application Gateway offers us the possibility to encrypt traffic from the internet to the Gateway and from the Gateway to the backend, thus providing end-to-end encryption with TLS/SSL (end-to-end TLS/SSL Encryption).

We can also choose to terminate encrypted traffic on the Gateway itself and keep communication between the App Gateway and the Backend unencrypted. The latter process is known as TLS/SSL Termination.

Azure App Gateway receives encrypted traffic from the internet. Then end the TLS/SSL session and uncrypt the information. This configuration is done at the Listener level.

When you route the traffic back to the backend, the gateway re-encrypts the traffic according to the configuration. This is specified at the Backend Settings level.

Why use TLS/SSL Termination?

  • Certificate handling: One of the biggest advantages that we will find in this type of configuration is the administrative burden. When we have a large number of publications and backend pools with different settings. Maintaining certificates not only on the gateway but on the backend servers is an arduous task. This will save us time and money.
  • Performance Improvement: The initial TLS/SSL decrypt of the handshake is the highest performance spike. If done on the backend servers, each server change requires re-authentication, avoiding this process will improve performance and allow better utilization of the backends.

Certificates that support TLS/SSL Termination are CA, EV, Wildard, and Self-signed.

In case the scenario does not allow TLS/SSL Termination for reasons of compliance, security, or compatibility with the Backend Application, Azure App Gateway has the capability of end-to-end encryption.

In the next post, we’ll set up TLS/SSL Termination in Azure App Gateway in a test scenario.

Mateo Di Loreto

Thanks for reading. The learning continues in the next article.