> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/public-exposure/appsec-azure-217.md).

# Azure Application gateways listener that allow connection requests over HTTP misconfiguration detect

## Rule Details

|                        |                                      |
| ---------------------- | ------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC\_AZURE\_217                   |
| Category - Subcategory | Public Exposure - Ingress Controls   |
| Provider               | AZURE                                |
| Severity               | MEDIUM                               |
| Framework              | Terraform, Terraform Plan            |
| Mapped CSPM/KSPM Rule  | 864d0191-9e8f-46d0-9b3d-f76680579ff6 |

## Impact

This rule is checking to ensure that Azure Application Gateways do not allow connection requests over HTTP. HTTP is inherently insecure as it does not encrypt the data being transmitted between clients and servers. This means that data like user credentials, payment details, and other sensitive information can be intercepted and exploited by attackers. Therefore, it's important to only allow connections over HTTPS, which is a secure version of HTTP. HTTPS encrypts all data in transit, protecting it from being viewed by third parties.

## How to Fix

*Resource:* azurerm\_application\_gateway

* *Arguments:* http\_listener.protocol

## To fix this issue, you need to enforce HTTPS-only listener on your Azure Application Gateway. This can be achieved by changing the `protocol` field from `Http` to `Https` in your `azurerm_application_gateway` terraform configuration. \[source,go]

resource "azurerm\_application\_gateway" "example" { ... frontend\_port { name = "example" port = 443 }

http\_listener { name = "example" frontend\_ip\_configuration\_name = azurerm\_public\_ip.example.name frontend\_port\_name = azurerm\_application\_gateway.example.frontend\_port.name

* protocol = "Https" } ... }

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/public-exposure/appsec-azure-217.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
