Ensure Application Gateway is using Https protocol
Application Gateway allows to set network protocols Http and Https. It is highly recommended to use Https protocol for secure connections.
Risk Level: High
Cloud Entity: Azure Application Gateway
CloudGuard Rule ID: D9.AZU.NET.36
Covered by Spectral: Yes
Category: Networking & Content Delivery
GSL LOGIC
ApplicationGateway should have rules contain [ listener.protocol='Https' ]
REMEDIATION
From Portal
- Navigate to the Azure portal (https://portal.azure.com).
- Navigate to your Application Gateway resource.
- Click on the 'Listeners' blade.
- Click on the listener for which you want to enable HTTPS.
- In the 'Edit Listener' blade, under 'Protocol', select 'HTTPS'.
- In the 'Certificates' section, select the SSL certificate you want to use. If you don't have a certificate yet, you can create one or import one from a certificate authority.
- In the 'Backend HTTP settings' section, ensure that the 'HTTP settings' protocol is set to 'HTTPS' as well.
- Save your changes.
From TF
resource "azurerm_application_gateway" "example" {
http_listener {
protocol = "Https"
}
}
From Command Line
Use the below command to enable HTTPS for Application Gateway
Run
az network application-gateway create --name Name --resource-group RESOURCEGROUP --http-settings-protocol Https
References
- https://learn.microsoft.com/en-us/cli/azure/network/application-gateway?view=azure-cli-latest#az-network-application-gateway-create
- https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_gateway
- https://learn.microsoft.com/en-us/azure/application-gateway/end-to-end-ssl-portal?source=recommendations
Azure Application Gateway
Azure Application Gateway gives you application-level routing and load balancing services that let you build a scalable and highly-available web front end in Azure. You control the size of the gateway and scale your deployment based on your needs.
Compliance Frameworks
- AZU PCI-DSS 4.0
- Azure CloudGuard Best Practices
- Azure HITRUST v9.5.0
- Azure NIST 800-53 Rev 5
- CloudGuard Azure All Rules Ruleset
Updated about 1 year ago