Review the TLS security policy on an ELB listener

Use TLS protocols and ciphers appropriate for the listener and client requirements.

Description

Set SslPolicy to an AWS security policy supported by the listener that terminates TLS. An ALB uses an HTTPS listener and an NLB uses a TLS listener.

Potential impact

Clients can still negotiate an obsolete version or cipher if the policy allows it.

Remediation

Choose the permitted versions and ciphers, configure a valid certificate and test TLS negotiation with the clients you support. If TLS terminates elsewhere, check the policy at that endpoint.

Examples

Supply the security group, subnets, app-tg target group and certificate_arn. When updating an existing ALB, list its other required listeners. The default purge_listeners: true removes listeners you omit.

Before

yaml
- name: Create an ALB
  community.aws.elb_application_lb:
    name: myelb
    security_groups:
      - sg-12345678
    subnets:
      - subnet-012345678
      - subnet-abcdef000
    listeners:
      - Protocol: HTTPS
        Port: 443
        SslPolicy: ELBSecurityPolicy-2016-08
        Certificates:
          - CertificateArn: "{{ certificate_arn }}"
        DefaultActions:
          - Type: forward
            TargetGroupName: app-tg
    state: present

After

yaml
- name: Create an ALB
  community.aws.elb_application_lb:
    name: myelb
    security_groups:
      - sg-12345678
    subnets:
      - subnet-012345678
      - subnet-abcdef000
    listeners:
      - Protocol: HTTPS
        Port: 443
        SslPolicy: ELBSecurityPolicy-TLS13-1-2-2021-06
        Certificates:
          - CertificateArn: "{{ certificate_arn }}"
        DefaultActions:
          - Type: forward
            TargetGroupName: app-tg
    state: present

ELBSecurityPolicy-2016-08 allows TLS 1.0 and 1.1. The replacement, ELBSecurityPolicy-TLS13-1-2-2021-06, allows only TLS 1.2 and 1.3.

References