AWS Summit Seoul 2023 | 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기

Amazon Web Services Korea
Amazon Web Services KoreaAmazon Web Services Korea
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
S E O U L | M A Y 4 , 2 0 2 3
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
다중 계정 및 하이브리드 환경에서
안전한 IAM 체계 만들기
이민우
솔루션즈 아키텍트
AWS
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
다중 계정 및 하이브리드 환경
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
확장하는 AWS 환경
현대적인 보안 접근 방식에서 IAM은 더욱 집중해야 할 영역
AWS Cloud
AWS account
Virtual
private cloud
(VPC)
AWS
account
AWS
account
AWS
account
• • •
Corporate
data center
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IAM 의 주요 구성 요소
IAM 보안 주체 (PRINCIPAL) IAM 정책 (POLICY)
! & ?
ID 기반 정책
• 서비스 제어 정책 (SCP)
> 조직 및 계정의 권한 제어
• 권한 정책
> 보안 주체에 할당되는 권한
• 권한 경계 정책
> 사용 가능한 권한 경계 설정
• 세션 정책
> 역할 수임 세션내 권한 제한
Resource 기반 정책
• 리소스 정책
> 리소스에 접근하는 권한 제한
• VPC 엔드포인트 정책
> 엔드포인트에서 서비스 접근 제어
루트 (Root)
> AWS Account 자격증명
IAM 사용자
> IAM User 자격증명
IAM 역할
• AssumedRoleUser
> STS AssumeRole*임시 자격증명
• FederatedUser
> STS GetFederationToken임시 자격증명
AWS 서비스
> AWS 서비스 자체의 보안 주체
다양한 보안 주체와 정책을 제공하는 IAM, 좀더 쉬운 활용 방법은?
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
제어 목표를 단순화 해보자
워크로드
AWS 서비스 및 AWS 상의
어플리케이션, AWS 에 접근
하는 On-Prem 어플리케이션
사용자
개발자 및 빌더, 관리자 및
운영자 등 AWS 환경에 접근
하는 작업자
경계
의도하지 않은 접근 및 사용을
제한하기 위한 물리적/논리적
경계
아이덴티티 및 접근 관리 목표의 논리적 구분
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Organizations 서비스로 시작하기
조직과 계정을
관리하고 정의
중앙에서 비용과
청구서를 관리
접근 및 권한을
제어
규정 준수를 위한
환경을 감사,
모니터링, 보호
계정 간에
리소스를 공유
통합적인 다중 계정 AWS 환경을 위한 AWS 계정 전반에 걸친 중앙 거버넌스 및 관리
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
사용자 접근 관리
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
클라우드의 다중 계정 작업 환경
Account
Account
Account
Permissions
Credential
운영자
사용자 Credential
Credential
Permissions
Permissions
사용자는 각 AWS 계정의 로그인 ID 관리와
일관되지 않은 권한을 가짐
운영자는 확장되는 환경에서 여러 AWS 계정의
접근 및 권한 관리 어려움
AWS ManagementConsole
Account
Account
Account
Permissions
Credential 운영자
사용자
사용자는 1인 1 아이디를 가지고 일관된
권한으로 여러 AWS 계정에 접근
운영자는 확장되는 환경에서 여러 AWS 계정의
접근 및 권한 관리 어려움
SAML
federation
Role
Permissions Role
Permissions Role
ID Provider
IAM 기반페더레이션
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
작업 관문으로서의 IAM Identity Center
여러 AWS 계정에 사용하기 위한 ID 를
연결하거나 AWS에서 생성
한 곳에서 여러 AWS 계정에 접근 하는
사용자 관리
사용자에게 할당된 계정 및 클라우드
애플리케이션에 대한 Single Sign-On 액세스 제공
AWS IAM IDENTITY CENTER 는 조직내 다중 계정의 인증 및 권한 관리를 단순화
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IAM Identity Center 구조 및 동작 방식
Identity Center directory
AWS Managed
Microsoft AD
Identity Platform
Other AWS-supported SAML 2.0–
and SCIM 2.0–compatible IdP
인증
동기화 권한 (Permissions)
관리의 단일 위치
접근
AWS 계정
(IAM)
Multi-account
permissions
어플리케이션 접근
관리의 단일 위치
접근
AWS integrated apps
SAML 2.0 apps
Application
assignments
ID 소스의 선택
IAM Identity Center
Azure Active Directory 사용자 ID 의
단일 위치
Active Directory
M icrosoft
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
[profile srvuser-sso-profile]
sso_session = srvuser-sso
sso_account_id = 123456781234
sso_role_name = SystemAdministrator
region = ap-northeast-2
output = json
[sso-session srvuser-sso]
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_region = ap-northeast-2
sso_registration_scopes = sso:account:access
CLI에서 안전한 자격증명 사용하기
Account
ID Provider
2) 로그인
AWS IAM
Identity Center
3) 디바이스 Authorization
5) Temporary access key
and secret key
4) 웹 브라우저 Redirect
AWS CLI 버전 2와 통합된 IAM IDENTITY CENTER 전용 CLI 에서 SHORT-TERM CREDENTIAL 사용
aws sso login --profile srvuser-sso-profile
AWS CLI v2
1) 웹 브라우저 Open
6) 계정 접근 w/ 임시 자격증명
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
역할 기반 권한 모델 한눈에 보기
AWS IAM IDENTITY CENTER는 AWS 관리형 정책, 고객 관리형 정책, 인라인 정책, 권한 경계 정책을 모두 지원
AWS IAM
Identity Center
ID 소스
AdministratorAccess
Billing
DatabaseAdministrator
DataScientist
NetworkAdministrator
PowerUserAccess
ReadOnlyAccess
SecurityAudit
SupportUser
SystemAdministrator
ViewOnlyAccess
Predefined 권한 세트
AWS 관리형 정책: A, B
고객 관리형 정책: C, D
인라인 정책: E
권한 경계: F
Custom 권한 세트
Account Account Account
Organizational
unit
• • •
사용자/그룹
계정
권한 세트
할당 (Assignment)
IAM Identity Center
Reserved Role
AWS 관리형 정책
A B
고객 관리형 정책
C D
인라인 정책
E
권한 경계 정책
F
Provisioning
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
확장되는 환경을 위한 ABAC 활용
CUSTOM 권한 세트의 고객 관리형 정책 및 인라인 정책은 속성 (TAG) 기반의 접근 제어를 지원
사용자 권한 리소스 aws:PrincipalTag
사용자에게 부여된 태그 Key-
Value 를 비교하는 용도
(IAM Identity Center 또는 외부 ID
공급자의 SAML 어트리뷰트)
사용자가 리소스에 새로운 태그를
부여할 때 사용될 Key-Value를
지정하는 용도
사용자가 요청하는 리소스가
가지고 있는 태그 Key-Value 를
비교하는 용도
aws:RequestTag
aws:ResourceTag
IAM 정책 TAG 조건 키
Custom 권한세트
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
PrincipalTag 를 활용 한 ABAC 예시
{
"Effect": "Allow",
"Action": [
"ec2:CreateVolume",
"ec2:RunInstances"
],
"Resource": [
"arn:aws:ec2:*:*:volume/*",
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:network-interface/*"
],
"Condition": {
"StringEquals": {
"aws:RequestTag/Department":
"${aws:PrincipalTag/Department}"
},
"ForAllValues:StringEquals": {
"aws:TagKeys": [
"Department"
]
}
}
}
{
"Effect": "Allow",
"Action": [
"ec2:StartInstances",
"ec2:TerminateInstances",
"ec2:StopInstances"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"ec2:ResourceTag/Department": "${aws:PrincipalTag/Department}"
}
}
}
EC2 생성 시 동일 Tagging 강제 EC2 실행시 동일 Tag의 인스턴스만 허용
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
워크로드 접근 관리
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
자격증명을 필요로 하는 On-Premise 워크로드
Long-term Credential
장기 자격 증명이 필요한 경우 Access Key 를
정기적으로 교체
워크로드가 AWS 에 접근 하기 위해 IAM 역할로
임시 자격증명 사용 권장
Short-term Credential
IAM 자격증명 사용 베스트 프랙티스
Corporate
data center
AWS Cloud
리소스
장기 자격 증명 IAM User
Application
임시 자격 증명
Role
Application
IAM User
장기 자격 증명
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IAM Roles Anywhere 로 모범 사례 구축
IAM 역할과 임시 자격증명의 사용을 AWS 외부의 워크로드로 확장
IAM Roles Anywhere
AWS 외부에서 실행되는 워크로드가 AWS
리소스에 액세스하도록 허용
AWS 워크로드에 대해 구성한 것과 동일한
IAM 역할 및 정책을 사용하여 AWS
리소스에 대한 액세스
워크로드는 임시 AWS 자격 증명을 얻기
위한 신뢰 루트로 X.509 인증서를 사용
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IAM Roles Anywhere 구조 및 동작 방식
On-Prem
어플리케이션
AWS
리소스
AWS STS
프로파일
CA 인증서 신뢰 정책
Trust anchor Roles 구성
PKI 와 IAM Roles Anywhere
간에 신뢰관계 설정
IAM Roles Anywhere
2
IAM Roles
Anywhere
임시 자격증명
4
임시 자격증명
3
assumeRole
Leaf certificate
1
PKI
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
다중 계정 환경으로 PKI 확장
다중 계정 / ACM PRIVATE CA 다중 계정 / CORPORATE CA
TRUST ANCHOR 로 단일 및 다른 계정의 AWS PRIVATE CA, 또는 ON-PREMISE의 CA 를 구성 가능
Workload
IAM Roles
Anywhere
Trust
Anchor
Security Tooling
ACM Private CA
(Root CA)
ACM Private CA
(Subordinate CA)
ACM Private CA
(Subordinate CA)
AWS Resource
Access Manager
Workload
ACM Private CA
(Subordinate CA)
Security Tooling
ACM Private CA
(Subordinate CA)
Corporate
data center
Root CA
AWS Resource
Access Manager
IAM Roles
Anywhere
Trust
Anchor
리소스
공유
리소스
공유
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
On-Premise 워크로드의 Role 수임 제어 하기
eventsrv1 인증서 A
Role
eventsrv2 인증서 B
vocsrv1 인증서 D
Role
eventsrv3 인증서 C
ROLE 수임 제어를 통해 자격증명 획득 및 권한 할당을 위한 워크로드 세분화/그룹핑
forecast1 인증서 E
Role
AWS 리소스
AWS 리소스
AWS 리소스
ROLE 의 신뢰 정책
{
"Effect": "Allow",
…,
"Condition": {
"StringEquals": {
"aws:PrincipalTag/x509Subject/CN":“eventsrv1@myco
mpany.com",
"aws:PrincipalTag/x509Subject/OU":“Marketing"
}
}
On-Premise Marketing
Sales
R&D
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Signing Helper 도구로 호출
[default]
credential_process = ./aws_signing_helpercredential-process
--certificate /path/to/certificate.pem
--private-key /path/to/private-key.pem
--trust-anchor-arn <TRUST_ANCHOR_ARN>
--profile-arn <PROFILE_ARN>
--role-arn <Role_ARN>
~/.aws/config 내용
Corporate
data center
AWS CLI 를 활용함으로써 CODE 에 관계 없이 ON-PREM 서버에서 임시 자격증명을 사용
AWS Cloud
AWS CLI
VPN / DX (TGW)
On-Prem 서버
config 파일
서버 인증서 개인키
AWS Signing Helper
유틸리티
Virtual private cloud (VPC)
IAM Roles
Anywhere
VPC Endpoint
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
경계 제어 구축
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
경계 제어의 필요성
Corporate data
center
AWS Cloud
VPC
Corporate AWS accounts
The rest of the
internet
Non-corporate AWS accounts
VPC
신뢰할 수 있는 아이덴티티만 의도된 네트워크로 부터 신뢰할 수 있는 리소스에 접근 하도록 AWS 환경에
데이터 경계를 위한 예방 가드레일 세트 필요
클라우드 보안의 확장성을 지원하는 IAM 예방 가드레일 필요
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
경계 제어를 위한 Tools
Service 제어 정책
(SCP)
Resource 기반 정책
IAM 보안 주체에 대한 최대
권한 제어
VPC 엔드포인트 정책
VPC 엔드포인트 를 통한
리소스로의 접근을 제어
Resource 에 접근하는 IAM 보안
주체에 대한 접근 제어
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
접근 패턴에 따른 경계 제어 만들기
출발지 목적지
VPC 내부, ON-PREMISE, REGIONAL 보안 주체로 패턴 구분
하이브리드 환경의 접근 PATTERN
Pattern
B On-Premise 보안 주체 AWS 리소스
Regional 보안 주체 AWS 리소스
VPC 내부 보안 주체 AWS 리소스
C
A
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pattern A - VPC 내부 > AWS 리소스
AWS Cloud
Virtual private cloud (VPC)
S3 VPC Endpoints my-bucket-a
EC2
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "s3:*",
"Resource": "*",
"Condition": {
"StringNotEqualsIfExists": {
"aws:ResourceOrgId": "${aws:PrincipalOrgId}"
}
}
},
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "*",
"Condition": {
"StringNotEqualsIfExists": {
"aws:SourceVpc":"vpc-012abc01"
}
}
}
]
}
SCP
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pattern A - VPC 내부 > AWS 리소스
AWS Cloud
Virtual private cloud (VPC)
S3 VPC Endpoints my-bucket-a
EC2
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:PrincipalOrgID": "o-4tkekae453",
"aws:ResourceOrgID": "o-4tkekae453"
}
}
}
]
}
VPC Endpoint
Policy
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pattern A - VPC 내부 > AWS 리소스
AWS Cloud
Virtual private cloud (VPC)
S3 VPC Endpoints my-bucket-a
EC2
…
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-bucket-a",
"arn:aws:s3:::my-bucket-a/*"
],
"Condition": {
"StringNotEqualsIfExists": {
"aws:PrincipalOrgID": "o-4tkekae453"
}
}
},
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-bucket-a",
"arn:aws:s3:::my-bucket-a/*"
],
"Condition": {
"StringNotEqualsIfExists": {
"aws:SourceVpc":"vpc-012abc01"
}
}
}
…
Resource
-based
Policy
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pattern B - On-Prem (업무망) > AWS 리소스
AWS Cloud
Virtual private cloud (VPC)
Corporate
data center
S3 VPC Endpoints my-bucket-a
인터넷망
VPN / DX (TGW)
업무망
…
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-bucket-a",
"arn:aws:s3:::my-bucket-a/*"
],
"Condition": {
"StringNotEqualsIfExists": {
"aws:PrincipalOrgID": "o-4tkekae453"
}
}
},
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-bucket-a",
"arn:aws:s3:::my-bucket-a/*"
],
"Condition": {
"StringNotEqualsIfExists": {
"aws:SourceVpc":"vpc-012abc01"
}
}
}
…
Resource
-based
Policy
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pattern B - On-Prem (인터넷망) > AWS 리소스
AWS Cloud
Corporate
data center
my-bucket-a
인터넷망
…
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-bucket-a",
"arn:aws:s3:::my-bucket-a/*"
],
"Condition": {
"StringNotEqualsIfExists": {
"aws:PrincipalOrgID": "o-4tkekae453"
}
}
},
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-bucket-a",
"arn:aws:s3:::my-bucket-a/*"
],
"Condition": {
"NotIpAddressIfExists": {
"aws:SourceIp": "203.0.113.0/24"
}
}
}
…
Resource
-based
Policy
업무망
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pattern C - Regional > AWS 리소스
AWS Cloud
my-bucket-a
AWS CloudTrail
Amazon Athena
Amazon Translate
Service Role
Federation Role Service Principal
Amazon Macie
Service-Linked
Role
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::my-bucket-a",
"arn:aws:s3:::my-bucket-a/*"
],
"Condition": {
"StringNotEqualsIfExists": {
"aws:PrincipalArn":"arn:aws:iam::123456781234:role/service-
role/my-translate-jobs"
},
"BoolIfExists": {
"aws:PrincipalIsAWSService": "false",
"aws:ViaAWSService": "false",
},
"ArnNotLikeIfExists": {
"aws:PrincipalArn": "arn:aws:iam:123456781234:role/aws-
service-role/*"
}
}
}
]
}
Resource
-based
Policy
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
경계 제어 정책 Matrix
구분 설명 정책 조건 키
패턴 A VPC 내 보안 주체 > AWS 리소스
SCP
aws:ResourceOrgId
aws:SourceVpc/SourceVpce
VPC 엔드포인트 정책
aws:PrincipalOrgID
aws:ResourceOrgId
Resource 기반 정책
aws:PrincipalOrgID
aws:SourceVpc/SourceVpce
패턴 B
On-Prem (사설망) > AWS 리소스
On-Prem (인터넷망) > AWS 리소스
SCP
aws:ResourceOrgId
aws:SourceVpc/SourceVpce
aws:SourceIp
VPC 엔드포인트 정책
aws:PrincipalOrgID
aws:ResourceOrgId
Resource 기반 정책
aws:PrincipalOrgID
aws:SourceVpc/SourceVpce
aws:SourceIp
패턴 C Regional 보안 주체 > AWS 리소스
SCP aws:ResourceOrgId
Resource 기반 정책
aws:PrincipalArn
aws:PrincipalIsAWSService
aws:ViaAWSService
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
내용 돌아보기
• 사용자, 워크로드, 경계 의 접근 제어 관리 전략
• AWS Organizations 로 AWS 계정과 리소스의 중앙 집중식 관리 및 제어
• IAM Identity Center 로 사용자 인증 및 권한 관리 창구 단일화
• IAM Roles Anywhere 로 PKI 기반 임시 자격증명 모범 사례 구축
• 다양한 접근 패턴 별 데이터 경계 제어를 돕는 IAM 도구와 정책
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
더 알아보기
Organizing Your AWS Environment
Using Multiple Accounts
Building a Data Perimeter on AWS
IAM Identity Center workshops
AWS Security Reference Architecture
(AWS SRA)
IAM Roles Anywhere blogs
AWS IAM Permissions Guardrails
sample
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
감사합니다
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1 sur 36

Contenu connexe

Tendances(20)

Similaire à AWS Summit Seoul 2023 | 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기(20)

202003 AWS ISV/DNB IAM_webinar202003 AWS ISV/DNB IAM_webinar
202003 AWS ISV/DNB IAM_webinar
Yijeong Cho564 vues
20150109 - AWS BlackBelt - IAM (Korean)20150109 - AWS BlackBelt - IAM (Korean)
20150109 - AWS BlackBelt - IAM (Korean)
Amazon Web Services Korea4.4K vues
강의 3:  AWS 보안:: AWSome Day Online Conference강의 3:  AWS 보안:: AWSome Day Online Conference
강의 3: AWS 보안:: AWSome Day Online Conference
Amazon Web Services Korea686 vues

Plus de Amazon Web Services Korea(20)

AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2
Amazon Web Services Korea171 vues
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1
Amazon Web Services Korea102 vues

AWS Summit Seoul 2023 | 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기

  • 1. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. S E O U L | M A Y 4 , 2 0 2 3
  • 2. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 다중 계정 및 하이브리드 환경에서 안전한 IAM 체계 만들기 이민우 솔루션즈 아키텍트 AWS
  • 3. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 다중 계정 및 하이브리드 환경
  • 4. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 확장하는 AWS 환경 현대적인 보안 접근 방식에서 IAM은 더욱 집중해야 할 영역 AWS Cloud AWS account Virtual private cloud (VPC) AWS account AWS account AWS account • • • Corporate data center
  • 5. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. IAM 의 주요 구성 요소 IAM 보안 주체 (PRINCIPAL) IAM 정책 (POLICY) ! & ? ID 기반 정책 • 서비스 제어 정책 (SCP) > 조직 및 계정의 권한 제어 • 권한 정책 > 보안 주체에 할당되는 권한 • 권한 경계 정책 > 사용 가능한 권한 경계 설정 • 세션 정책 > 역할 수임 세션내 권한 제한 Resource 기반 정책 • 리소스 정책 > 리소스에 접근하는 권한 제한 • VPC 엔드포인트 정책 > 엔드포인트에서 서비스 접근 제어 루트 (Root) > AWS Account 자격증명 IAM 사용자 > IAM User 자격증명 IAM 역할 • AssumedRoleUser > STS AssumeRole*임시 자격증명 • FederatedUser > STS GetFederationToken임시 자격증명 AWS 서비스 > AWS 서비스 자체의 보안 주체 다양한 보안 주체와 정책을 제공하는 IAM, 좀더 쉬운 활용 방법은?
  • 6. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 제어 목표를 단순화 해보자 워크로드 AWS 서비스 및 AWS 상의 어플리케이션, AWS 에 접근 하는 On-Prem 어플리케이션 사용자 개발자 및 빌더, 관리자 및 운영자 등 AWS 환경에 접근 하는 작업자 경계 의도하지 않은 접근 및 사용을 제한하기 위한 물리적/논리적 경계 아이덴티티 및 접근 관리 목표의 논리적 구분
  • 7. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Organizations 서비스로 시작하기 조직과 계정을 관리하고 정의 중앙에서 비용과 청구서를 관리 접근 및 권한을 제어 규정 준수를 위한 환경을 감사, 모니터링, 보호 계정 간에 리소스를 공유 통합적인 다중 계정 AWS 환경을 위한 AWS 계정 전반에 걸친 중앙 거버넌스 및 관리
  • 8. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 사용자 접근 관리
  • 9. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 클라우드의 다중 계정 작업 환경 Account Account Account Permissions Credential 운영자 사용자 Credential Credential Permissions Permissions 사용자는 각 AWS 계정의 로그인 ID 관리와 일관되지 않은 권한을 가짐 운영자는 확장되는 환경에서 여러 AWS 계정의 접근 및 권한 관리 어려움 AWS ManagementConsole Account Account Account Permissions Credential 운영자 사용자 사용자는 1인 1 아이디를 가지고 일관된 권한으로 여러 AWS 계정에 접근 운영자는 확장되는 환경에서 여러 AWS 계정의 접근 및 권한 관리 어려움 SAML federation Role Permissions Role Permissions Role ID Provider IAM 기반페더레이션
  • 10. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 작업 관문으로서의 IAM Identity Center 여러 AWS 계정에 사용하기 위한 ID 를 연결하거나 AWS에서 생성 한 곳에서 여러 AWS 계정에 접근 하는 사용자 관리 사용자에게 할당된 계정 및 클라우드 애플리케이션에 대한 Single Sign-On 액세스 제공 AWS IAM IDENTITY CENTER 는 조직내 다중 계정의 인증 및 권한 관리를 단순화
  • 11. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. IAM Identity Center 구조 및 동작 방식 Identity Center directory AWS Managed Microsoft AD Identity Platform Other AWS-supported SAML 2.0– and SCIM 2.0–compatible IdP 인증 동기화 권한 (Permissions) 관리의 단일 위치 접근 AWS 계정 (IAM) Multi-account permissions 어플리케이션 접근 관리의 단일 위치 접근 AWS integrated apps SAML 2.0 apps Application assignments ID 소스의 선택 IAM Identity Center Azure Active Directory 사용자 ID 의 단일 위치 Active Directory M icrosoft
  • 12. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. [profile srvuser-sso-profile] sso_session = srvuser-sso sso_account_id = 123456781234 sso_role_name = SystemAdministrator region = ap-northeast-2 output = json [sso-session srvuser-sso] sso_start_url = https://my-sso-portal.awsapps.com/start sso_region = ap-northeast-2 sso_registration_scopes = sso:account:access CLI에서 안전한 자격증명 사용하기 Account ID Provider 2) 로그인 AWS IAM Identity Center 3) 디바이스 Authorization 5) Temporary access key and secret key 4) 웹 브라우저 Redirect AWS CLI 버전 2와 통합된 IAM IDENTITY CENTER 전용 CLI 에서 SHORT-TERM CREDENTIAL 사용 aws sso login --profile srvuser-sso-profile AWS CLI v2 1) 웹 브라우저 Open 6) 계정 접근 w/ 임시 자격증명
  • 13. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 역할 기반 권한 모델 한눈에 보기 AWS IAM IDENTITY CENTER는 AWS 관리형 정책, 고객 관리형 정책, 인라인 정책, 권한 경계 정책을 모두 지원 AWS IAM Identity Center ID 소스 AdministratorAccess Billing DatabaseAdministrator DataScientist NetworkAdministrator PowerUserAccess ReadOnlyAccess SecurityAudit SupportUser SystemAdministrator ViewOnlyAccess Predefined 권한 세트 AWS 관리형 정책: A, B 고객 관리형 정책: C, D 인라인 정책: E 권한 경계: F Custom 권한 세트 Account Account Account Organizational unit • • • 사용자/그룹 계정 권한 세트 할당 (Assignment) IAM Identity Center Reserved Role AWS 관리형 정책 A B 고객 관리형 정책 C D 인라인 정책 E 권한 경계 정책 F Provisioning
  • 14. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 확장되는 환경을 위한 ABAC 활용 CUSTOM 권한 세트의 고객 관리형 정책 및 인라인 정책은 속성 (TAG) 기반의 접근 제어를 지원 사용자 권한 리소스 aws:PrincipalTag 사용자에게 부여된 태그 Key- Value 를 비교하는 용도 (IAM Identity Center 또는 외부 ID 공급자의 SAML 어트리뷰트) 사용자가 리소스에 새로운 태그를 부여할 때 사용될 Key-Value를 지정하는 용도 사용자가 요청하는 리소스가 가지고 있는 태그 Key-Value 를 비교하는 용도 aws:RequestTag aws:ResourceTag IAM 정책 TAG 조건 키 Custom 권한세트
  • 15. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. PrincipalTag 를 활용 한 ABAC 예시 { "Effect": "Allow", "Action": [ "ec2:CreateVolume", "ec2:RunInstances" ], "Resource": [ "arn:aws:ec2:*:*:volume/*", "arn:aws:ec2:*:*:instance/*", "arn:aws:ec2:*:*:network-interface/*" ], "Condition": { "StringEquals": { "aws:RequestTag/Department": "${aws:PrincipalTag/Department}" }, "ForAllValues:StringEquals": { "aws:TagKeys": [ "Department" ] } } } { "Effect": "Allow", "Action": [ "ec2:StartInstances", "ec2:TerminateInstances", "ec2:StopInstances" ], "Resource": "*", "Condition": { "StringEquals": { "ec2:ResourceTag/Department": "${aws:PrincipalTag/Department}" } } } EC2 생성 시 동일 Tagging 강제 EC2 실행시 동일 Tag의 인스턴스만 허용
  • 16. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 워크로드 접근 관리
  • 17. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 자격증명을 필요로 하는 On-Premise 워크로드 Long-term Credential 장기 자격 증명이 필요한 경우 Access Key 를 정기적으로 교체 워크로드가 AWS 에 접근 하기 위해 IAM 역할로 임시 자격증명 사용 권장 Short-term Credential IAM 자격증명 사용 베스트 프랙티스 Corporate data center AWS Cloud 리소스 장기 자격 증명 IAM User Application 임시 자격 증명 Role Application IAM User 장기 자격 증명
  • 18. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. IAM Roles Anywhere 로 모범 사례 구축 IAM 역할과 임시 자격증명의 사용을 AWS 외부의 워크로드로 확장 IAM Roles Anywhere AWS 외부에서 실행되는 워크로드가 AWS 리소스에 액세스하도록 허용 AWS 워크로드에 대해 구성한 것과 동일한 IAM 역할 및 정책을 사용하여 AWS 리소스에 대한 액세스 워크로드는 임시 AWS 자격 증명을 얻기 위한 신뢰 루트로 X.509 인증서를 사용
  • 19. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. IAM Roles Anywhere 구조 및 동작 방식 On-Prem 어플리케이션 AWS 리소스 AWS STS 프로파일 CA 인증서 신뢰 정책 Trust anchor Roles 구성 PKI 와 IAM Roles Anywhere 간에 신뢰관계 설정 IAM Roles Anywhere 2 IAM Roles Anywhere 임시 자격증명 4 임시 자격증명 3 assumeRole Leaf certificate 1 PKI
  • 20. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 다중 계정 환경으로 PKI 확장 다중 계정 / ACM PRIVATE CA 다중 계정 / CORPORATE CA TRUST ANCHOR 로 단일 및 다른 계정의 AWS PRIVATE CA, 또는 ON-PREMISE의 CA 를 구성 가능 Workload IAM Roles Anywhere Trust Anchor Security Tooling ACM Private CA (Root CA) ACM Private CA (Subordinate CA) ACM Private CA (Subordinate CA) AWS Resource Access Manager Workload ACM Private CA (Subordinate CA) Security Tooling ACM Private CA (Subordinate CA) Corporate data center Root CA AWS Resource Access Manager IAM Roles Anywhere Trust Anchor 리소스 공유 리소스 공유
  • 21. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. On-Premise 워크로드의 Role 수임 제어 하기 eventsrv1 인증서 A Role eventsrv2 인증서 B vocsrv1 인증서 D Role eventsrv3 인증서 C ROLE 수임 제어를 통해 자격증명 획득 및 권한 할당을 위한 워크로드 세분화/그룹핑 forecast1 인증서 E Role AWS 리소스 AWS 리소스 AWS 리소스 ROLE 의 신뢰 정책 { "Effect": "Allow", …, "Condition": { "StringEquals": { "aws:PrincipalTag/x509Subject/CN":“eventsrv1@myco mpany.com", "aws:PrincipalTag/x509Subject/OU":“Marketing" } } On-Premise Marketing Sales R&D
  • 22. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Signing Helper 도구로 호출 [default] credential_process = ./aws_signing_helpercredential-process --certificate /path/to/certificate.pem --private-key /path/to/private-key.pem --trust-anchor-arn <TRUST_ANCHOR_ARN> --profile-arn <PROFILE_ARN> --role-arn <Role_ARN> ~/.aws/config 내용 Corporate data center AWS CLI 를 활용함으로써 CODE 에 관계 없이 ON-PREM 서버에서 임시 자격증명을 사용 AWS Cloud AWS CLI VPN / DX (TGW) On-Prem 서버 config 파일 서버 인증서 개인키 AWS Signing Helper 유틸리티 Virtual private cloud (VPC) IAM Roles Anywhere VPC Endpoint
  • 23. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 경계 제어 구축
  • 24. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 경계 제어의 필요성 Corporate data center AWS Cloud VPC Corporate AWS accounts The rest of the internet Non-corporate AWS accounts VPC 신뢰할 수 있는 아이덴티티만 의도된 네트워크로 부터 신뢰할 수 있는 리소스에 접근 하도록 AWS 환경에 데이터 경계를 위한 예방 가드레일 세트 필요 클라우드 보안의 확장성을 지원하는 IAM 예방 가드레일 필요
  • 25. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 경계 제어를 위한 Tools Service 제어 정책 (SCP) Resource 기반 정책 IAM 보안 주체에 대한 최대 권한 제어 VPC 엔드포인트 정책 VPC 엔드포인트 를 통한 리소스로의 접근을 제어 Resource 에 접근하는 IAM 보안 주체에 대한 접근 제어
  • 26. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 접근 패턴에 따른 경계 제어 만들기 출발지 목적지 VPC 내부, ON-PREMISE, REGIONAL 보안 주체로 패턴 구분 하이브리드 환경의 접근 PATTERN Pattern B On-Premise 보안 주체 AWS 리소스 Regional 보안 주체 AWS 리소스 VPC 내부 보안 주체 AWS 리소스 C A
  • 27. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pattern A - VPC 내부 > AWS 리소스 AWS Cloud Virtual private cloud (VPC) S3 VPC Endpoints my-bucket-a EC2 { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": "s3:*", "Resource": "*", "Condition": { "StringNotEqualsIfExists": { "aws:ResourceOrgId": "${aws:PrincipalOrgId}" } } }, { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": "*", "Condition": { "StringNotEqualsIfExists": { "aws:SourceVpc":"vpc-012abc01" } } } ] } SCP
  • 28. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pattern A - VPC 내부 > AWS 리소스 AWS Cloud Virtual private cloud (VPC) S3 VPC Endpoints my-bucket-a EC2 { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": "*", "Action": "s3:*", "Resource": "*", "Condition": { "StringEquals": { "aws:PrincipalOrgID": "o-4tkekae453", "aws:ResourceOrgID": "o-4tkekae453" } } } ] } VPC Endpoint Policy
  • 29. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pattern A - VPC 내부 > AWS 리소스 AWS Cloud Virtual private cloud (VPC) S3 VPC Endpoints my-bucket-a EC2 … { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket-a", "arn:aws:s3:::my-bucket-a/*" ], "Condition": { "StringNotEqualsIfExists": { "aws:PrincipalOrgID": "o-4tkekae453" } } }, { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket-a", "arn:aws:s3:::my-bucket-a/*" ], "Condition": { "StringNotEqualsIfExists": { "aws:SourceVpc":"vpc-012abc01" } } } … Resource -based Policy
  • 30. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pattern B - On-Prem (업무망) > AWS 리소스 AWS Cloud Virtual private cloud (VPC) Corporate data center S3 VPC Endpoints my-bucket-a 인터넷망 VPN / DX (TGW) 업무망 … { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket-a", "arn:aws:s3:::my-bucket-a/*" ], "Condition": { "StringNotEqualsIfExists": { "aws:PrincipalOrgID": "o-4tkekae453" } } }, { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket-a", "arn:aws:s3:::my-bucket-a/*" ], "Condition": { "StringNotEqualsIfExists": { "aws:SourceVpc":"vpc-012abc01" } } } … Resource -based Policy
  • 31. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pattern B - On-Prem (인터넷망) > AWS 리소스 AWS Cloud Corporate data center my-bucket-a 인터넷망 … { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket-a", "arn:aws:s3:::my-bucket-a/*" ], "Condition": { "StringNotEqualsIfExists": { "aws:PrincipalOrgID": "o-4tkekae453" } } }, { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket-a", "arn:aws:s3:::my-bucket-a/*" ], "Condition": { "NotIpAddressIfExists": { "aws:SourceIp": "203.0.113.0/24" } } } … Resource -based Policy 업무망
  • 32. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Pattern C - Regional > AWS 리소스 AWS Cloud my-bucket-a AWS CloudTrail Amazon Athena Amazon Translate Service Role Federation Role Service Principal Amazon Macie Service-Linked Role { "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::my-bucket-a", "arn:aws:s3:::my-bucket-a/*" ], "Condition": { "StringNotEqualsIfExists": { "aws:PrincipalArn":"arn:aws:iam::123456781234:role/service- role/my-translate-jobs" }, "BoolIfExists": { "aws:PrincipalIsAWSService": "false", "aws:ViaAWSService": "false", }, "ArnNotLikeIfExists": { "aws:PrincipalArn": "arn:aws:iam:123456781234:role/aws- service-role/*" } } } ] } Resource -based Policy
  • 33. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 경계 제어 정책 Matrix 구분 설명 정책 조건 키 패턴 A VPC 내 보안 주체 > AWS 리소스 SCP aws:ResourceOrgId aws:SourceVpc/SourceVpce VPC 엔드포인트 정책 aws:PrincipalOrgID aws:ResourceOrgId Resource 기반 정책 aws:PrincipalOrgID aws:SourceVpc/SourceVpce 패턴 B On-Prem (사설망) > AWS 리소스 On-Prem (인터넷망) > AWS 리소스 SCP aws:ResourceOrgId aws:SourceVpc/SourceVpce aws:SourceIp VPC 엔드포인트 정책 aws:PrincipalOrgID aws:ResourceOrgId Resource 기반 정책 aws:PrincipalOrgID aws:SourceVpc/SourceVpce aws:SourceIp 패턴 C Regional 보안 주체 > AWS 리소스 SCP aws:ResourceOrgId Resource 기반 정책 aws:PrincipalArn aws:PrincipalIsAWSService aws:ViaAWSService
  • 34. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 내용 돌아보기 • 사용자, 워크로드, 경계 의 접근 제어 관리 전략 • AWS Organizations 로 AWS 계정과 리소스의 중앙 집중식 관리 및 제어 • IAM Identity Center 로 사용자 인증 및 권한 관리 창구 단일화 • IAM Roles Anywhere 로 PKI 기반 임시 자격증명 모범 사례 구축 • 다양한 접근 패턴 별 데이터 경계 제어를 돕는 IAM 도구와 정책
  • 35. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 더 알아보기 Organizing Your AWS Environment Using Multiple Accounts Building a Data Perimeter on AWS IAM Identity Center workshops AWS Security Reference Architecture (AWS SRA) IAM Roles Anywhere blogs AWS IAM Permissions Guardrails sample
  • 36. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 감사합니다 © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.