Front Door should redirect HTTP to HTTPS
High
Azure
General
frontdoors-front-door-redirect-http
Applies to
Microsoft.Network/frontDoors
What CGPulse checks
A resource passes this rule when routingRules.hasHttpsRedirect must equal true. Anything else is reported as a finding with the evaluated property value attached as evidence.
How to fix it
Configure HTTP-to-HTTPS redirect to encrypt all user traffic in transit. In Azure Portal: Front Door/App Gateway > Routing rules > add HTTP-to-HTTPS redirect. See: https://learn.microsoft.com/en-us/azure/frontdoor/front-door-how-to-redirect-https
CLI
az afd route list --profile-name "{name}" -g "{rg}" --query "[].{name:name,httpsRedirect:httpsRedirect}" -o tableBicep
// TODO: Add an HTTP-to-HTTPS redirect rule in Front Door routing rules
// This requires creating a rule set with a URL redirect actionTerraform
resource "azurerm_frontdoor" "{name}" {
name = "{name}"
resource_group_name = "{rg}"
routing_rule {
name = "http-to-https-redirect"
accepted_protocols = ["Http"]
patterns_to_match = ["/*"]
frontend_endpoints = ["{name}-frontend"]
redirect_configuration {
redirect_protocol = "HttpsOnly"
redirect_type = "Found"
}
}
# Additional routing rules for HTTPS traffic needed
}
Compliance frameworks
Is your environment compliant with this rule?
CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.
Related Azure rules
- Action Group should be enabled
- Activity Log Alert should be enabled
- AKS cluster logs should be sent to Log Analytics
- AKS cluster must enable RBAC
- AKS cluster must enable RBAC
- AKS cluster should be a private cluster
- AKS cluster should disable local accounts
- AKS cluster should enable Azure RBAC for Kubernetes