MSK clusters should disable unauthenticated access¶
This control checks whether unauthenticated access is enabled for an Amazon MSK cluster. The control fails if unauthenticated access is enabled for the MSK cluster.
How to fix¶
Attribute client_authentication[0].unauthenticated of aws_msk_cluster must be false.
Implementation options¶
Choose the option that matches how you manage Terraform. All options satisfy this control.
Option 1: Open source module (terraform-aws-modules)¶
If you use terraform-aws-modules/msk-kafka-cluster/aws, configure the required module inputs to satisfy this control. You can later migrate to the compliance.tf module with minimal changes because it is compatible by design.
module "msk_kafka_cluster" {
source = "terraform-aws-modules/msk-kafka-cluster/aws"
version = ">=3.0.0"
broker_node_client_subnets = ["subnet-abc123", "subnet-def456"]
broker_node_instance_type = "kafka.t3.small"
broker_node_security_groups = ["sg-abc12345"]
kafka_version = "3.6.0"
name = "abc123"
number_of_broker_nodes = 3
client_authentication = {
unauthenticated = false
}
}
Option 2: Terraform AWS provider resources¶
If you manage resources directly, configure the relevant Terraform AWS provider resources to meet this control. See docs for the resources involved: aws_msk_cluster.
resource "aws_msk_cluster" "this" {
broker_node_group_info {
client_subnets = [element(["subnet-abc123", "subnet-def456"], 0)]
instance_type = "kafka.m5.large"
security_groups = ["sg-abc12345"]
}
cluster_name = "pofix-example-cluster"
kafka_version = "3.5.1"
number_of_broker_nodes = 1
client_authentication {
unauthenticated = false
}
}
Which option should I choose?
- Compliance.tf module (recommended): controls enforced by default and mapped to frameworks.
- Open source module (
terraform-aws-modules): compatible by design with compliance.tf. Same variable names for an easy, low-change migration path when you are ready. - Terraform AWS provider resources: manage Terraform resources directly.
Tool mappings¶
Use these identifiers to cross-reference this control across tools, reports, and evidence.
Compliance.tf (CTF) Control:
msk_cluster_unauthenticated_access_disabledAWS Config Managed Rule:
MSK_UNRESTRICTED_ACCESS_CHECKPowerpipe Control:
aws_compliance.control.msk_cluster_unauthenticated_access_disabled