Mutual TLS Authentication on Application Load Balancer

Git Repository

This ALB demo contain ALB which has 4 Listeners and Lambda as Targets. All port 80 traffic get redirected to port 443 by ALB. Lambda Functions served as Front end for our applications running on port 443. We have also configured ALB to perform the mTLS authentication on port 8443 in verify mode and port 8444 in passthrough mode.Following is the ALB set up we are using for this demo.

ALB Flow

mTLS in Verify Mode

Step1: Lets first send a request to ALB on port 8443 without any client certficate and we will notice mTLS is failed to establish.

Step2:Now Lets create Certficate Signing Request(CSR) which we can then pass to Certificate authority to request a certficate. You can use the following command to generate CSR.

openssl req -out client-csr.csr -new -newkey rsa:2048 -nodes -keyout client-key.pem

You should have 2 files now: client.csr and client-key.pem. In the next step you have an option upload client.csr file. Keep the client-key.pem secure and do not share with anyone.

Windows users who do not have OpenSSL installed may follow the steps mentioned here to generate CSR.

Step 3: Click on Request Certficate which should return presigned URL for you to securely upload the CSR file to the S3 bucket. Browse the client.csr and click upload. if the Upload successful you should get a message saying CSR file uploaded succesfully.