> 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/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-msk-cluster-public-access-is-enabled.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS MSK cluster public access is enabled

### Synopsis

| Field               | Value                                        |
| ------------------- | -------------------------------------------- |
| Rule Type           | Detection                                    |
| Finding Type        | AWS MSK cluster public access is enabled     |
| Finding ID          | 60001486                                     |
| Generates a Finding | This detection rule also generates a finding |
| Severity            | High                                         |
| Category            | CONFIGURATION                                |
| Cloud Providers     | AWS                                          |
| Platform Module     | CSPM                                         |
| Asset Types         | AMAZON\_MSK\_CLUSTER                         |
| ATT\&CK Tactic      | TA0001 (TA0001)                              |
| ATT\&CK Technique   | T1190 (T1190)                                |

### Description

Publicly accessible Amazon Managed Streaming for Kafka (MSK) clusters risk unauthorized data access.

Amazon MSK clusters offer a setting to enable public access to their brokers. Enabling this exposes the cluster to public, potentially leading to data breaches, unauthorized modifications, or denial-of-service attacks. Attackers could leverage this misconfiguration to exfiltrate sensitive data or disrupt operations.

The impact of this misconfiguration is significant, exposing sensitive data stored within the MSK cluster to unauthorized access and potential compromise. Maintaining private network access ensures only authorized systems can connect, protecting data confidentiality and integrity.

To mitigate this, disable public access for all MSK clusters. Restrict access to authorized IP addresses or VPCs only, using security groups and network ACLs to control inbound and outbound traffic.

### Remediation

**Manual steps:**

Amazon MSK Cluster - This remediation plan addresses the security issue where an Amazon Managed Streaming for Apache Kafka (Amazon MSK) cluster is configured with public access enabled. This configuration exposes the cluster's brokers to the public internet, increasing the risk of unauthorized access and data breaches. Disabling public access restricts access to the cluster to authorized users and networks, enhancing security and compliance:

1. **Access the Amazon MSK Console:** Sign in to the AWS Management Console and navigate to the Amazon MSK console at <https://console.aws.amazon.com/msk/home>.
2. **Locate the Cluster:** In the navigation panel, select 'Clusters' under the 'MSK Clusters' section. Click on the specific cluster that requires remediation.
3. **Access Cluster Properties:** Choose the 'Properties' tab to view the cluster's configuration details.
4. **Edit Network Settings:** In the 'Network settings' section, click on the 'Edit' dropdown menu.
5. **Disable Public Access:** Select 'Edit public access' from the dropdown. In the 'Edit public access' dialog, uncheck the 'Public access' checkbox to disable public access to the cluster.
6. **Save Changes:** Click 'Save changes' to apply the modifications and disable public access for the Amazon MSK cluster.

**Note:** Carefully review and test the changes before implementing them in a production environment. Disabling public access may impact applications or services that rely on public access to the cluster. Ensure that any necessary adjustments are made to maintain application functionality.

**Terraform code:**

Amazon MSK Cluster - This Terraform code snippet modifies the existing 'aws\_msk\_cluster' resource to disable public access for the MSK cluster. It sets the 'type' attribute of the 'public\_access' block within the 'connectivity\_info' block to 'DISABLED', preventing the cluster from being accessible from the public internet:

```hcl
# Disable public access for the MSK cluster
resource "aws_msk_cluster" "example" {
 # ... other configurations ...
 broker_node_group_info {
 # ... other configurations ...
 connectivity_info {
 public_access {
 type = "DISABLED"
 }
 }
 }
}
```


---

# 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/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-msk-cluster-public-access-is-enabled.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.
