Q60. AWS Application Load Balancer를 활용한 HTTP에서 HTTPS로의 안전한 리디렉션

AWS 자격증을 준비하는 여러분, 안녕하세요. 오늘은 웹 애플리케이션의 보안을 강화하는 중요한 기술인 HTTP에서 HTTPS로의 리디렉션에 대해 알아보겠습니다. 이는 AWS Certified Solutions Architect - Associate 자격증 시험에서 자주 다루는 주제이며, 실제 업무 환경에서도 매우 중요한 기술입니다.

문제 상황

Q1:
회사에 AWS에서 호스팅되는 웹 사이트가 있습니다. 웹 사이트는 HTTP와 HTTPS를 별도로 처리하도록 구성된 ALB(Application Load Balancer) 뒤에 있습니다. 회사는 요청이 HTTPS를 사용하도록 모든 요청을 웹사이트로 전달하려고 합니다. 솔루션 설계자는 이 요구 사항을 충족하기 위해 무엇을 해야 합니까?

<small>A company has a website hosted on AWS. The website is behind an Application Load Balancer (ALB) that is configured to handle HTTP and HTTPS separately. The company wants to forward all requests to the website using HTTPS. What should a solutions architect do to meet this requirement?</small>

선택지

A. HTTPS 트래픽만 허용하도록 ALB의 네트워크 ACL을 업데이트합니다.
<small>Update the network ACL of the ALB to allow only HTTPS traffic.</small>

B. URL의 HTTP를 HTTPS로 바꾸는 규칙을 만듭니다.
<small>Create a rule to replace HTTP with HTTPS in the URL.</small>

C. ALB에서 리스너 규칙을 생성하여 HTTP 트래픽을 HTTPS로 리디렉션합니다.
<small>Create a listener rule on the ALB to redirect HTTP traffic to HTTPS.</small>

D. ALB를 SNI(서버 이름 표시)를 사용하도록 구성된 Network Load Balancer로 교체합니다.
<small>Replace the ALB with a Network Load Balancer configured to use Server Name Indication (SNI).</small>

정답 및 해설

정답은 C입니다.

Application Load Balancer(ALB)에서 리스너 규칙을 생성하여 HTTP 트래픽을 HTTPS로 리디렉션하는 것이 이 요구 사항을 충족하는 가장 효과적인 방법입니다. 이 방법은 다음과 같은 이점을 제공합니다:

  1. 사용자 경험: 사용자가 HTTP로 접속하더라도 자동으로 HTTPS로 리디렉션되어 안전한 연결을 보장받습니다.
  2. 보안: 모든 트래픽이 암호화되어 데이터의 기밀성과 무결성이 보장됩니다.
  3. SEO: 검색 엔진은 HTTPS 웹사이트를 선호하므로 검색 순위에 긍정적인 영향을 미칩니다.
  4. 구현의 용이성: ALB의 기본 기능을 사용하므로 추가 리소스 없이 구현 가능합니다.

구현 단계:

  1. ALB에서 HTTP(80) 및 HTTPS(443) 리스너를 생성합니다.
  2. HTTP 리스너에 리디렉션 규칙을 추가하여 모든 HTTP 트래픽을 HTTPS로 리디렉션합니다.
  3. HTTPS 리스너는 정상적으로 백엔드 서버로 트래픽을 라우팅합니다.

<small>The correct answer is C. Creating a listener rule on the Application Load Balancer (ALB) to redirect HTTP traffic to HTTPS is the most effective way to meet this requirement. This approach offers several benefits:

  1. User Experience: Users accessing via HTTP are automatically redirected to HTTPS, ensuring a secure connection.
  2. Security: All traffic is encrypted, guaranteeing data confidentiality and integrity.
  3. SEO: Search engines prefer HTTPS websites, positively impacting search rankings.
  4. Ease of Implementation: Utilizes ALB's built-in functionality, requiring no additional resources.

Implementation steps:

  1. Create HTTP (80) and HTTPS (443) listeners on the ALB.
  2. Add a redirection rule to the HTTP listener to redirect all HTTP traffic to HTTPS.
  3. The HTTPS listener routes traffic normally to backend servers.</small>

오답 설명

A. HTTPS 트래픽만 허용하도록 ALB의 네트워크 ACL을 업데이트하는 것은 HTTP 요청을 차단할 뿐, HTTPS로 리디렉션하지 않습니다. 이는 사용자 경험을 저하시킬 수 있습니다.

<small>A. Updating the network ACL of the ALB to allow only HTTPS traffic would block HTTP requests rather than redirecting them to HTTPS. This could negatively impact user experience.</small>

B. URL의 HTTP를 HTTPS로 바꾸는 규칙을 만드는 것은 ALB 수준에서 직접 지원되지 않습니다. 이는 애플리케이션 레벨에서 구현해야 하며, ALB의 기능을 최대한 활용하지 못합니다.

<small>B. Creating a rule to replace HTTP with HTTPS in the URL is not directly supported at the ALB level. This would need to be implemented at the application level and doesn't leverage ALB's capabilities.</small>

D. ALB를 SNI를 사용하도록 구성된 Network Load Balancer로 교체하는 것은 과도한 변경이며, 요구사항을 충족하지 않습니다. NLB는 Layer 4에서 작동하므로 HTTP에서 HTTPS로의 리디렉션을 직접 처리할 수 없습니다.

<small>D. Replacing the ALB with a Network Load Balancer configured to use SNI is an excessive change and doesn't meet the requirement. NLB operates at Layer 4 and can't directly handle HTTP to HTTPS redirection.</small>

결론

이 문제는 AWS의 Application Load Balancer를 사용하여 웹 애플리케이션의 보안을 강화하는 방법을 테스트합니다. HTTP에서 HTTPS로의 리디렉션은 현대 웹 애플리케이션에서 필수적인 보안 조치입니다. ALB의 리스너 규칙을 사용하면 간단하고 효과적으로 이를 구현할 수 있으며, 사용자 경험을 해치지 않으면서도 모든 트래픽을 암호화할 수 있습니다. 이는 AWS 솔루션 아키텍트로서 알아야 할 중요한 기술 중 하나입니다.

<small>This question tests your understanding of using AWS Application Load Balancer to enhance web application security. Redirecting from HTTP to HTTPS is an essential security measure in modern web applications. Using ALB listener rules provides a simple and effective way to implement this, allowing all traffic to be encrypted without compromising user experience. This is a crucial skill to know as an AWS Solutions Architect.</small>

원본 문제 링크

댓글

이 블로그의 인기 게시물

Anaconda-Python 환경 VSCode에서 사용하기

Python 웹 크롤링 - Scrapy 활용 파워볼 번호 수집(파일)