Search code examples
amazon-web-serviceskubernetesamazon-elbtls1.0

Kubernetes ELB service: How to disable TLS 1.0 and 1.1?


I am running Kubernetes on AWS, and exposing services using a Service with type: LoadBalancer, which provisions an ELB. Is there any way to control the ELB cipher configuration with annotations on this service? I need to disable TLS 1.0 and 1.1.

I am aware that I can do this by hand, but I would like for Kubernetes to do this for me, otherwise I'll have to remember to do it again the next time a new ELB is provisioned (Kubernetes upgrade, config change, etc).


Solution

  • If I understood you right, you would like to adjust security policies directly from Service.yml file.

    From what I see, here you can find a list of all the annotations that are supported at the moment.

    There is one called "aws-load-balancer-ssl-negotiation-policy". For me it looks exactly as the one you are looking for.

    // ServiceAnnotationLoadBalancerSSLNegotiationPolicy is the annotation used on
    // the service to specify a SSL negotiation settings for the HTTPS/SSL listeners
    // of your load balancer. Defaults to AWS's default
    
    const ServiceAnnotationLoadBalancerSSLNegotiationPolicy = "service.beta.kubernetes.io/aws-load-balancer-ssl-negotiation-policy"
    

    The link to that file is listed under official documentation on K8s.

    Additionally, there is a predefined policy ELBSecurityPolicy-TLS-1-2-2017-01 that uses only TLS v1.2 ( with 1.0 and 1.1 disabled).

    Hope that helps.