MSK clusters should be encrypted in transit among broker nodes¶
This controls checks if an Amazon MSK cluster is encrypted in transit with HTTPS (TLS) among the broker nodes of the cluster. The control fails if plain text communication is enabled for a cluster broker node connection.
How to fix¶
Attribute encryption_info[0].encryption_in_transit[0].in_cluster of aws_msk_cluster must be true.
Implementation options¶
Choose the option that matches how you manage Terraform. All options satisfy this control.
Option 1: Compliance.tf module (recommended)¶
Use the compliance.tf registry module to get this control enforced by default. This control is mapped to the frameworks shown in the tabs above. To begin, see get started with compliance.tf.
module "msk_kafka_cluster" {
source = "nistcsf.compliance.tf/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
}
Option 2: 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
encryption_in_transit_in_cluster = true
}
Option 3: 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
encryption_info {
encryption_in_transit {
in_cluster = true
}
}
}
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_encryption_in_transit_with_tls_enabledAWS Config Managed Rule:
MSK_IN_CLUSTER_NODE_REQUIRE_TLSCheckov Check:
CKV_AWS_81Powerpipe Control:
aws_compliance.control.msk_cluster_encryption_in_transit_with_tls_enabled