# Ensure Kafka Cluster Has Unrestricted Access Disabled

- Source: https://support.icompaas.com/support/solutions/articles/62000233559-ensure-kafka-cluster-has-unrestricted-access-disabled
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [AWS Checks New Version](https://support.icompaas.com/support/solutions/62000112673) › [AWS New Checks](https://support.icompaas.com/support/solutions/folders/62000169206)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

### **Profile Applicability**

-   **Level 2**

#### **Description**

Unrestricted access to Kafka clusters, allowing connections from 0.0.0.0/0 (IPv4) or ::/0 (IPv6), poses a significant security risk. This configuration exposes clusters to unauthorized access, brute-force attacks, and potential misuse. To safeguard sensitive data and ensure only trusted clients connect, Kafka clusters must have unrestricted access disabled, restricting access to specific trusted IP ranges or private networks.

#### **Rationale**

-   Enhanced Security: Prevents unauthorized connections to Kafka clusters.
    
-   Risk Mitigation: Protects against malicious activities, including brute-force attacks and data breaches.
    
-   Compliance: Aligns with security best practices and regulatory requirements.
    

#### **Impact**

**Pros:**

-   Safeguards Kafka clusters from unauthorized access.
    
-   Reduces the risk of data theft and exploits.
    
-   Enhances security posture by limiting public exposure.
    

**Cons:**

-   May require configuration changes for secure access methods, such as private networks or VPNs.
    
-   Could temporarily disrupt workflows if public access was previously used.
    

#### **Default Value**

By default, Kafka clusters may permit unrestricted access if not explicitly configured.

#### **Pre-Requisite**

**IAM Permissions:**

-   kafka:DescribeCluster
    
-   kafka:UpdateClusterConfiguration
    
-   AWS CLI installed and configured.
    

#### **Remediation**

#### **Test Plan:** 

**Using AWS Console:**

1.  Sign in to the AWS Management Console.
    
2.  Navigate to the MSK Dashboard.
    
3.  Select Clusters from the left-hand menu.
    
4.  Verify the access control configurations for each cluster and ensure unrestricted access (0.0.0.0/0 or ::/0) is disabled.
    

**Using AWS CLI:**

1.  Identify Unrestricted Access:  
    
    aws kafka describe-cluster --cluster-arn <cluster-arn> --query "ClusterInfo.BrokerNodeGroupInfo.SecurityGroups"
    
2.  Verify that security groups associated with the cluster do not allow unrestricted access.
    

#### **Implementation Steps:** 

**Using AWS Console:**

1.  Sign in to the AWS Management Console.
    
2.  Navigate to the MSK Dashboard.  
    ![](https://support.icompaas.com/assets/kb/aefd90a67c8b3386.png)
    
3.  Select the Kafka cluster to update.  
    ![](https://support.icompaas.com/assets/kb/858e1f1712a56727.png)
    
4.  Edit the network configuration to restrict access to trusted IP ranges or private subnets.
    
5.  Save the changes.
    

**Using AWS CLI:**

1.  Update the Security Group to Restrict Access:  
    
    aws ec2 revoke-security-group-ingress --group-id <security-group-id> --protocol tcp --port <kafka-port> --cidr 0.0.0.0/0
    aws ec2 revoke-security-group-ingress --group-id <security-group-id> --protocol tcp --port <kafka-port> --cidr ::/0
    

2.  Add Secure Rules for Trusted IP Ranges (if necessary):  
    
    aws ec2 authorize-security-group-ingress --group-id <security-group-id> --protocol tcp --port <kafka-port> --cidr <trusted-cidr>
    

#### **Backout Plan**

**Using AWS Console:**

1.  If restricting access causes issues, sign in to the AWS Management Console.
    
2.  Navigate to Amazon MSK, select the cluster, and review the security group and network settings.  
    ![](https://support.icompaas.com/assets/kb/b0b0642029a85788.png)![](https://support.icompaas.com/assets/kb/b034b369af21c0a5.png)  
    
3.  Revert the security group or VPC settings to their previous configuration (allowing broader access) to restore functionality, though this is not recommended from a security standpoint.
    
4.  Save the changes and monitor the Kafka cluster to ensure access is restored as expected.
    

**Using AWS CLI:**

1.  If access restrictions cause issues, revert the security group changes by allowing broader access (e.g., opening up the IP range):  
    
    aws ec2 authorize-security-group-ingress --region <REGION> --group-id <SECURITY\_GROUP\_ID> --protocol tcp --port 9092 --cidr 0.0.0.0/0
    
2.  Verify that the cluster is accessible again and troubleshoot as necessary:  
    
    aws ec2 describe-security-groups --group-ids <SECURITY\_GROUP\_ID> --region <REGION>
    

**References**

-   [Amazon MSK Security Best Practices](https://docs.aws.amazon.com/msk/latest/developerguide/security.html)
    
-   [AWS Config Rule for Public Access Restrictions](https://docs.aws.amazon.com/config/latest/developerguide/msk-public-access-disabled.html)
    
-   [Restricting Public Access in AWS](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
