For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/cloudformation-aws-elb-using-weak-ciphers.md.
A documentation index is available at /llms.txt.
ELB security policies must not include weak TLS cipher suites because weak ciphers can be exploited to downgrade or break the confidentiality and integrity of TLS connections to the load balancer.
Check AWS::ElasticLoadBalancing::LoadBalancer resources and verify the Policies[].Attributes[].Name values (the cipher identifiers or referenced policy names) do not match any known weak ciphers in the IANA, OpenSSL, or GnuTLS lists. Resources with Attributes that match a weak-cipher identifier will be flagged. Instead, use AWS predefined strong ELB security policy names or an SSLNegotiationPolicyType policy that explicitly references modern cipher suites (TLS 1.2+ with ECDHE and AES-GCM).
Secure configuration example using a modern predefined policy:
#this code is a correct code for which the query should not find any resultResources:MyLoadBalancer:Type:AWS::ElasticLoadBalancing::LoadBalancerProperties:AvailabilityZones:- "us-east-2a"CrossZone:trueListeners:- InstancePort:'80'InstanceProtocol:HTTPLoadBalancerPort:'443'Protocol:HTTPSPolicyNames:- My-SSLNegotiation-PolicySSLCertificateId:arn:aws:iam::123456789012:server-certificate/my-server-certificateHealthCheck:Target:HTTP:80/HealthyThreshold:'2'UnhealthyThreshold:'3'Interval:'10'Timeout:'5'Policies:- PolicyName:My-SSLNegotiation-PolicyPolicyType:SSLNegotiationPolicyTypeAttributes:- Name:Reference-Security-PolicyValue:ELBSecurityPolicy-TLS-1-2-2017-01
#this is a problematic code where the query should report a result(s)Resources:MyLoadBalancer:Type:AWS::ElasticLoadBalancing::LoadBalancerProperties:AvailabilityZones:- "us-east-2a"CrossZone:trueListeners:- InstancePort:'80'InstanceProtocol:HTTPLoadBalancerPort:'443'Protocol:HTTPSPolicyNames:- My-SSLNegotiation-PolicySSLCertificateId:arn:aws:iam::123456789012:server-certificate/my-server-certificateHealthCheck:Target:HTTP:80/HealthyThreshold:'2'UnhealthyThreshold:'3'Interval:'10'Timeout:'5'Policies:- PolicyName:My-SSLNegotiation-PolicyPolicyType:SSLNegotiationPolicyTypeAttributes:- Name:TLS_RSA_NULL_SHA1Value:ELBSecurityPolicy-TLS-1-2-2017-01- Name:DHE-DSS-DES-CBC3-SHAValue:ELBSecurityPolicy-TLS-1-2-2017-01- PolicyName:My-SSLNegotiation-Policy2PolicyType:SSLNegotiationPolicyTypeAttributes:- Name:TLS_DHE_PSK_WITH_NULL_SHA256Value:ELBSecurityPolicy-TLS-1-2-2017-01