> 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/storage/appsec-aws-351.md).

# AWS EMR cluster is not enabled with data encryption in transit misconfiguration detected in code

## Rule Details

|                        |                                      |
| ---------------------- | ------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC\_AWS\_351                     |
| Category - Subcategory | Storage - Encryption                 |
| Provider               | AWS                                  |
| Severity               | LOW                                  |
| Framework              | Terraform, Terraform Plan            |
| Mapped CSPM/KSPM Rule  | 4abb8f29-af45-4fbb-885c-a2f7039dfc88 |

## Impact

This rule is checking for whether the security configuration of an Elastic Map Reduce (EMR) Cluster in AWS is set up to encrypt data 'InTransit'.

InTransit encryption is important for data security, especially when data is moving between nodes or between a node and the client. If this feature is not enabled, it leaves potential vulnerabilities for cyber attackers to intercept sensitive information during the transmission process. Hence, having data unencrypted 'InTransit' is considered a bad or risky practice that could potentially lead to data breaches or unauthorized data access. This rule helps ensure the security and privacy of the transmitted data.

## How to Fix

*Resource:* aws\_emr\_security\_configuration

* *Arguments:* configuration.EncryptionConfiguration.EnableInTransitEncryption

## To fix the issue, you need to provide the security configuration details with encryption settings. In the security configuration, include the `"EnableInTransitEncryption": true` setting under `aws_emr_security_configuration` resource. Here is what that might look like: \[source,go]

resource "aws\_emr\_security\_configuration" "tf\_emr\_security\_config" { name = "emr\_security\_config"

## configuration = <\<EOH { "EncryptionConfiguration": { "AtRestEncryptionConfiguration": { "S3EncryptionConfiguration": { "EncryptionMode": "SSE-S3" }, "LocalDiskEncryptionConfiguration": { "EncryptionKeyProviderType": "AwsKms", "AwsKmsKey": "${aws\_kms\_key.tf\_emr.key\_id}" } }, "EnableInTransitEncryption": true, "InTransitEncryptionConfiguration": { "TLSCertificateConfiguration": { "CertificateProviderType": "PEM", "AwsKmsKey": "${aws\_kms\_key.tf\_emr.key\_id}" } } } } EOH }


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/storage/appsec-aws-351.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
