This rule ensures ELB application load balancers properly redirect HTTP requests to HTTPS for enhanced security.
Rule | ELB application load balancers should redirect HTTP requests to HTTPS |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ Medium |
ELB Application Load Balancers HTTP to HTTPS Redirection for NIST 800-53 Rev 5
Under NIST 800-53 Revision 5 for secure communication protocols, it's recommended to enforce encrypted sessions for all web traffic by redirecting HTTP requests to HTTPS. This increases security by ensuring data in transit is encrypted and protects against eavesdropping and man-in-the-middle attacks. This guide provides details on implementing mandatory HTTP to HTTPS redirection on AWS Elastic Load Balancing (ELB) using Application Load Balancers (ALBs).
Rule Description
AWS ELB Application Load Balancers should be configured to redirect all incoming HTTP (port 80) requests to HTTPS (port 443) to ensure secure communication. This not only aligns with industry standards for security but also complies with NIST 800-53 Rev 5 requirements for maintaining the confidentiality and integrity of information.
Troubleshooting Steps
If your Application Load Balancer is not redirecting HTTP requests to HTTPS as expected, follow these troubleshooting steps:
Necessary Codes and CLI Commands
To implement the redirection via AWS Management Console or AWS CLI, follow these steps:
AWS Management Console Steps:
Create HTTPS Listener:
Set Up Redirection:
AWS CLI Commands:
You can create a redirect rule using the AWS CLI with the following command:
aws elb create-load-balancer-listeners --load-balancer-name my-load-balancer --listeners "Protocol=HTTP,LoadBalancerPort=80,InstanceProtocol=HTTP,InstancePort=80" --default-actions Type=redirect,TargetGroupArn=<Your Target Group ARN>,Protocol=HTTPS,Port=443,Query=action=redirect&redirect_uri=#{protocol}://#{host}:#{port}/#{path}?#{query}
Replace
with your actual Target Group Amazon Resource Name.<Your Target Group ARN>
Make sure to configure the AWS CLI with the appropriate credentials and default region.
Step by Step Guide for Remediation
To enforce HTTP to HTTPS redirection, there are specific steps you should take:
/*
) to HTTPS (port 443).By following these guidelines, you’ll ensure that your Application Load Balancer is aligned with NIST 800-53 Revision 5 recommendations and has improved security by redirecting all HTTP traffic to HTTPS. This configuration not only helps in SEO improvements by signaling search engines that your website uses secure connections but also provides a better user experience by automatically directing users to a secure protocol.