Traffic between ALB and backend EC2 Instance needs to be encrypted

0

Hi, Currently we have ALB fronting our backend Amazon Linux2 EC2 Instances. The traffic between client to ALB is encrypted using SSL Certificate which is applied on the ALB. ALB is configured to off-load SSL i.e. the ALB decrypts the data before it is forwarded to the backend instances (https-->http). We have a requirement to encrypt the traffic between ALB and backend EC2 instance. I understand generating self-signed certificates on EC2 can be a good starting point. But, the trivial issue is whenever the application stack is installed/updated, it would provision new EC2 instance with its different local dnsname/ip address. Hence, not sure if the self-signed certificates generated with CN say 'a' for the EC2 instance1 can work with new EC2 instance is provisioned with name 'b' whenever the stack is installed/updated. We feel Network LB may help us to address the requirement but we are using path based routing which is only supported by ALB. Hence, please help with steps to be followed to accomplish the requirement.

HemalM
질문됨 10달 전739회 조회
2개 답변
5
수락된 답변

Load balancer establishes connection with the target using certificates that are installed on target. It doesn't validate those certificates.

Refer Routing Configuration section of this AWS documentation.

        If a target group is configured with the HTTPS protocol or uses HTTPS health checks, the TLS connections to the targets use the security settings from the ELBSecurityPolicy-2016-08 policy. The load balancer establishes TLS connections with the targets using certificates that you install on the targets. The load balancer does not validate these certificates. Therefore, you can use self-signed certificates or certificates that have expired. Because the load balancer is in a virtual private cloud (VPC), traffic between the load balancer and the targets is authenticated at the packet level, so it is not at risk of man-in-the-middle attacks or spoofing even if the certificates on the targets are not valid.

As long as you have self signed certificate, you should be good.

To your other point, yes, network LB can help you to address the requirement but ALB has lot of benefits over NLB so you should keep using ALB with self signed certificates on EC2.

profile pictureAWS
전문가
답변함 10달 전
profile picture
전문가
검토됨 한 달 전
profile pictureAWS
전문가
iBehr
검토됨 10달 전
profile pictureAWS
전문가
검토됨 10달 전
1

When mod_ssl is installed with the following command, a self-certificate is also set up with it.
It is possible to use https with a certificate even if the IP address etc. is changed.

sudo yum install mod_ssl
profile picture
전문가
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠