S3 Security
User based
-IAM policies - which API calls should be allowed for a specific user from IAM console
Resource Based
-Bucket Policies - bucket wide rules from the S3 console - allow cross account
-Object Access Control List (ACL) - finer grain
-Bucket Access Control List (ACL) - less common
Note : an IAM principal can access an S3 object if
the user IAMm permissions allow it OR the resource policy ALLOWS it
AND there's no explicit DENY
S3 보안
사용자 기반 보안
-IAM 정책 : 어떤 API 호출이 허용될지 결정함
만약 유저가 IAM 정책을 통해 S3 버킷으로의 액세스 방법을 승인받게 되면 실행 가능해짐
리소스 기반 보안
버킷 정책 : S3 콘솔에서 설정 가능한 버킷 전반의 규칙, S3 버킷으로의 교차 계정 액세스 활성화가 가능함
객체 ACL
버킷 ACL - 이 둘은 시험에 잘 나오지 않음
참고
-IAM 보안 주체인 유저나 역할은 IAM 권한이 허용할 경우, S3 객체에 액세스 할 수 있다.
->IAM 정책이 S3 버킷에 액세스를 허용하는 보안 주체와 연결돼 있는 경우 or S3 버킷 정책이 허용하는 경우에도 액세스 가능함
동시에 버킷 정책이 사용자 액세스의 명시적 거부가 없어야 함.
S3 Bucket Policies
JSON based policies
-Resources : bucekts and objects
-Actouons : Set of API to Allow or Deny
-Effect : Allow / Deny
-Principal : The account or user to apply the policy to
Use S3 bucket for policy to :
-Grant public access to the bucket
-Force objects to be encrypted at upload
-Grant access to another account(Cross Account)
-버킷 정책은 사용자의 버킷이나 객체 둘 다 적용 할 수 있다.
-Action은 API 허가/거부 설정
-Effect 허용/거부 설정
-Principal : 해당 S3 버킷의 정책을 적용할 계정(유저)
S3 버킷 정책 사용하는 경우
-버킷에 퍼블릭 액세스 권한을 승인
-업로드 시점에 객체 암호화 할 경우
-교차 계정 S3 버킷 정책 사용하여 다른 계정에 액세스 권한 주는 경우
Bucket settings for Block Public Access
Block public access to buckets and objects granted through
-new access control list (ACLs)
-any access control list (ACLs)
-new public bucket or access point policies
Block public and cross-account access to buckets and objects through any public bucket or access point policies
These settings were created to prevent compnay data leaks
If you know your bucket should never be public, leave these on
블록 퍼블릭 액세스 (버킷 설정)
객체가 퍼블릭으로 노출 되는 것을 차단하는 설정
네 가지 종류의 액세스 차단 설정이 있으니 참고
퍼블릭으로 두고 싶지 않다면 해당 설정을 활성화시켜야 한다.
S3 Security - Other (기타 보안)
Networking :
-Support VPC Endpoints (for instances in VPC without www internet)
Logging and Audit :
-S3 Access Logs can be stored in other S3 bucket
-API calls be logged in AWS CloudTrail
User Security :
-MFA Delete : MFA can be required in versioned buckets to delete objects
-Pre-Signed URLs : URLs that are valid only for a limited time
네트워킹 :
VPC 엔드포인트로 S3에 비공개 액세스 가능하다.
(VPC에 EC2 인스턴스가 있고 인터넷 액세스가 없는 경우 VPC 엔드포인트를 통해 비공개로 S3에 액세스)
로깅 및 감사 :
S3 액세스 로그를 사용하면 다른 S3 버킷에 해당 로그가 저장됨
API 호출은 CloudTrail에 저장된다.
사용자 보안 :
MFA 삭제 : MFA로 인증이 되어야만 객체 삭제 가능
사전 서명된 URL : AWS의 자격증명으로 서명된 URL, 한정된 시간 동안만 유효하다.
'Cloud > AWS' 카테고리의 다른 글
S3 CORS (교차 오리진 리소스 공유) (0) | 2022.11.13 |
---|---|
S3 Websites (S3 웹사이트) (0) | 2022.11.13 |
S3 Encryption for Objects (S3 객체 암호화) (0) | 2022.11.13 |
Amazon S3 - Versioning (버전 관리) (0) | 2022.11.13 |
AWS : S3 overview - buckets (S3 buckets 개요) (0) | 2022.11.13 |