Ensure HTTPS is allowed for Azure CDN Endpoint

MEDIUM

Description

Keeping HTTPS endpoints disabled may leave application vulnerable to MiTM and other attacks.

Remediation

Certain endpoint settings cannot be updated in the Azure Console, so to disable HTTP, a new endpoint will need to be created. Be sure to stop and/or delete the existing endpoint.

In Azure Console -

  1. Open the Azure Portal and go to Front Door and CDN profiles.
  2. Select the CDN you wish to edit.
  3. Under Overview, create a new Endpoint.
  4. Uncheck the box for HTTP Port and make sure the box is check for HTTPS Port.
  5. Configure the rest as needed.

In Terraform -

  1. In the azurerm_cdn_endpoint resource, set is_http_allowed to false.
  2. Set is_https_allowed to true.

References:
https://learn.microsoft.com/en-us/azure/cdn/cdn-create-a-storage-account-with-cdn
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cdn_endpoint

Policy Details

Rule Reference ID: AC_AZURE_0199
CSP: Azure
Remediation Available: Yes
Resource Category: Virtual Network
Resource Type: CDN Endpoint

Frameworks