brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Sep 25. 2023

37탄-8. AWS 보안 아키텍처 labs : 100

목표

버킷에 대한 접근 제한을 하자.  

Cloudfront를 통해서만  버킷에 접속 되도록 하자.



<1> AWS Account Setup and Root User : 자격증명 보고, 암호 설정 정책

<2> CloudFront  with S3 Bucket Origin = 접근 제한 버킷을 Cloudfront를 통해 접속 -실습

<3> Enable Security Hub : AWS 보안 검사 자동화 및 보안 경고 중앙 집중화 - 링크 소개   




<1> AWS Account Setup and Root User : 자격증명 보고, 암호 설정 정책


1

Generate and Review the AWS Account Credential Report : 자격증명 보고서(csv) 다운로드 및 정기적으로 점검


2

Configure a Strong Password Policy for Your Users : 암호 설정 정책 사용



3

다음은 참조만 하세요.


AWS Organizations 이나 Control Tower 사용 권고

https://wellarchitectedlabs.com/security/100_labs/100_basic_identity_and_access_management_user_group_role/   




<2> CloudFront  with S3 Bucket Origin = 접근 제한 버킷을 Cloudfront를 통해 접속 -실습


1

현재 OAI는 권장하지 않습니다 → OAC로 구성을 적극 권장, 오리진 액세스 제어.

https://aws.amazon.com/ko/blogs/korea/amazon-cloudfront-introduces-origin-access-control-oac/ 

https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html  


구성 ?

User ----- Cloudfront -----------S3  



2

S3  버킷 생성

Topasvga-web

Bucket setting for Block Plublic Access

 체크 유지 = Block all public access

버저닝  enable  



3

<!DOCTYPE html>

<html>

  <head>

    <title>Example</title>

  </head>

  <body>

    <h1>CloudNet@ - Example Heading</h1>

    <p>CloudNet@ - Example paragraph.</p>

  </body>

</html>  



4

S3 접속 확인

접속 안된다.

Block all public access 차단되어 있으니 접속 안된다.  



5

CloudFront 설정 : 프라이빗 S3 버킷에 CloudFront를 통해서만 접속 가능하게 설정

OAI 설정 + 기본 루트 개체(index.html)


원본 도메인

Topasvga-web--amazon.com 선택


이름

Topasvga-web


원복 액세스

Legacy access identities

CloudFront  원본 액세스 ID(OAI)를 사용하여 S3 버킷에 액세스 합니다.


원본 액세스 ID

새 OAI 생성

버킷정책

예, 버킷 정책 업데이트  


웹 애플리케이션 방화벽(WAF)


보안 보호 비활성화

여기선 아직  WAF를 사용하진 않는다.


기본값  루트 객체 - 선택 사항

Index.html

북미로 선택.

생성  



5

S3 에서 권한 확인.

퍼블릭은 차단 되어 있다.

자동으로 설정되는 S3 버킷 정책 확인

Cloudfront arn 들어가 있음. = Cloudfront만 접속 할수 있음.

S3:getobject가 들어가 있음.     


6

S3로 접속 확인

여전히 안된다.

Cloudfront 도메인 접속  확인.

잘 된다.

Cloudfront를 통해서는 된다.  


7

삭제 : CloudFront(Disable → Delete) , S3 버킷(비우기 → 삭제)   




<3> Enable Security Hub : AWS 보안 검사 자동화 및 보안 경고 중앙 집중화 - 링크 소개 


https://wellarchitectedlabs.com/security/100_labs/100_enable_security_hub/   





다음은 보안 모범사례 200

https://brunch.co.kr/@topasvga/3449



주말 CloudNet  스터디 내용 참고하여  정리한 부분입니다.

https://gasidaseo.notion.site/gasidaseo/CloudNet-Blog-c9dfa44a27ff431dafdd2edacc8a1863  



감사합니다.

keyword
매거진의 이전글 37탄-7. AWS - 웹 공격의 방어 환경 구축

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari