> 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/appsec2-aws-54.md).

# AWS CloudFront distribution is using insecure SSL protocols for HTTPS communication misconfiguration

## AWS CloudFront distribution is using insecure SSL protocols for HTTPS communication misconfiguration detected in code

### Rule Details

|                        |                                            |
| ---------------------- | ------------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC2\_AWS\_54                           |
| Category - Subcategory | Public Exposure - Encryption And Protocols |
| Provider               | AWS                                        |
| Severity               | MEDIUM                                     |
| Framework              | Terraform, Terraform Plan                  |
| Mapped CSPM/KSPM Rule  | 90b66466-c8e7-4cc0-a49d-104ae5451e52       |

### Impact

This rule detects AWS CloudFront distributions that are not configured to use secure SSL protocols for HTTPS communication.

### How to Fix

*Resource:* aws\_cloudfront\_distribution

* *Arguments:* origin.custom\_origin\_config.origin\_ssl\_protocols

### In the provided Terraform example, the aws\_cloudfront\_distribution resource is configured to exclude SSLv3 from the origin\_ssl\_protocols, adhering to the Cortex Cloud AppSec rule by specifying only secure TLS versions such as TLSv1, TLSv1.1, and TLSv1.2. To further enhance security, the viewer\_certificate is set with a minimum protocol version of TLSv1.2\_2019, aligning with best security practices and ensuring that both the origin communication and the viewer connection utilize secure SSL protocols. It is important to tailor additional Terraform configurations to your specific requirements and to always prefer the latest supported TLS versions for optimal security. \[source,go]

resource "aws\_cloudfront\_distribution" "example" {

## ... other configuration ...

origin { domain\_name = "my-origin.example.com" origin\_id = "myOriginID"

custom\_origin\_config { http\_port = 80 https\_port = 443 origin\_protocol\_policy = "https-only"

* origin\_ssl\_protocols = \["TLSv1", "TLSv1.1", "TLSv1.2"]

## ... other configuration ...

} }

## ... other configuration ...

***


---

# 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/appsec2-aws-54.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.
