Review WAF policy associations for Azure Front Door

Associate required WAF policies with request-handling endpoints.

Description

Check that each domain you want Front Door to protect is associated with an enabled WAF policy. Requests to an unassociated domain bypass that policy’s rules.

Potential impact

A request that should have been blocked can reach the origin application.

Remediation

Review rules and exclusions. Detection logs matches. For blocking, select Prevention and verify that legitimate requests still reach the application.

Examples

The Front Door Classic excerpt adds web_application_firewall_policy_link_id to an existing frontend endpoint. Supply the origins, routes and WAF policy separately. For a new Standard or Premium deployment, use a security policy to associate the domain. Managed rules require Premium.

Before

hcl
resource "azurerm_frontdoor" "example" {
  name                                         = "example-frontdoor"
  resource_group_name                          = azurerm_resource_group.example.name
  backend_pool_settings {
    enforce_backend_pools_certificate_name_check = true
  }

  frontend_endpoint {
    name      = "exampleFrontendEndpoint1"
    host_name = "example-frontdoor.azurefd.net"
  }
}

After

hcl
resource "azurerm_frontdoor" "example" {
  name                                         = "example-frontdoor"
  resource_group_name                          = azurerm_resource_group.example.name
  backend_pool_settings {
    enforce_backend_pools_certificate_name_check = true
  }

  frontend_endpoint {
    name                                   = "exampleFrontendEndpoint1"
    host_name                              = "example-frontdoor.azurefd.net"
    web_application_firewall_policy_link_id = azurerm_frontdoor_firewall_policy.example.id
  }
}

References