Lesson 2 of 3 App Service Domains, TLS and Networking

Securing App Service with Certificates and TLS

This lesson explains certificate sources, TLS bindings and the settings that enforce secure connections.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish between managed certificates, App Service certificates, Key Vault certificates and uploaded certificates.
  • Distinguish between SNI and IP based TLS bindings.
  • Describe HTTPS Only, minimum TLS version and related settings.

Certificate sources

Certificates are managed on the app's Certificates page and require the Basic tier or higher for TLS bindings. The following comparison summarizes the options.

Managed certificate
CostFree
RenewalAutomatic
WildcardsNo
ExportableNo
Choose when Simple sites with named host names
App Service certificate
CostPurchased yearly
RenewalAutomatic
WildcardsYes
ExportableYes
Choose when Buy and manage a certificate in Azure
Imported from Key Vault
CostDepends on the issuer
RenewalSynced from Key Vault
WildcardsYes
ExportableYes
Choose when Central certificate management
Uploaded PFX
CostDepends on the issuer
RenewalManual
WildcardsYes
ExportableYes
Choose when Existing certificate files

An App Service managed certificate is issued by DigiCert for a specific custom domain that is already mapped to the app, renewed automatically about every six months, and cannot be exported; it does not support wildcard domains or apps that are not publicly accessible. An App Service certificate is bought in Azure (Standard or Wildcard), stored in a Key Vault that you own, and can be used by several apps. Certificates imported from Key Vault require that App Service can read the vault; an uploaded certificate must be a password-protected PFX file with the full chain and a private key.

The following diagram compares certificate options for a single automatically renewed certificate that covers all subdomains.

One automatically renewed certificate for all current and future subdomains, stored in the company's Key Vault. An App Service certificate of type Wildcard for *.contoso.com fits, imported into each app with SNI SSL bindings. Free managed certificates do not support wildcards, so they would need one per host name.
The scenario is illustrative.
Scenario questions

Choosing a certificate

Exam skills 3.4.4

Choose the certificate source that fits each requirement.

Log in to try this activity Interactive activities are free with an account.

TLS bindings

A TLS/SSL binding associates a certificate with a custom domain on the Custom domains page. SNI SSL bindings use Server Name Indication, so several domains share the app's IP address; they are free and supported by all modern clients. An IP based SSL binding gives the domain a dedicated IP address, which changes the app's inbound IP (and therefore the A record) and incurs an hourly charge after any included IP SSL connection.

Sort into groups

SNI SSL or IP based SSL?

Exam skills 3.4.4

Decide which TLS binding type each statement describes.

Log in to try this activity Interactive activities are free with an account.

Enforcing secure connections

On the app's Configuration or TLS/SSL settings, HTTPS Only redirects all HTTP requests to HTTPS (enabled by default for new apps). Minimum inbound TLS version rejects clients using older protocols; the default is TLS 1.2, and TLS 1.3 can be required. A minimum TLS cipher suite can also be set in higher tiers. End-to-end TLS encryption encrypts traffic between the front ends and the workers, and client certificates (incoming client certificates) require clients to present a certificate for mutual TLS. Apps that call other services can load certificates with the WEBSITE_LOAD_CERTIFICATES setting.

Match the pairs

Securing connections

Exam skills 3.4.4

Match each requirement with the App Service setting that meets it.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing a certificate

A company hosts api.contoso.com, app.contoso.com and portal.contoso.com on three App Service apps and plans to add more subdomains each quarter. The security team wants one certificate covering all subdomains, renewed automatically and stored in the company's Key Vault. What should you use?

Buy an App Service certificate of type Wildcard for *.contoso.com, store it in the company's Key Vault, import it into each app and create SNI SSL bindings. Managed certificates are free but do not support wildcards and would need one certificate per host name. Uploading a PFX would require manual renewal.

Check yourself

Can an App Service managed certificate secure *.contoso.com?

Show answer

No. Managed certificates do not support wildcard domains.

Exam Tips

Remember for the exam

  • Managed certificates are free and auto-renewed but do not support wildcards and are not exportable.
  • SNI SSL is free; IP based SSL gives a dedicated IP and changes the inbound address.
  • HTTPS Only redirects HTTP to HTTPS; minimum TLS version rejects old clients.
  • TLS bindings need Basic tier or higher.