SlideShare a Scribd company logo
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Seon Yong Park
Developer Specialist SA, APAC
서버리스 개발에서의 인증
완벽 가이드
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
본 강연에서는
AWS 는 어플리케이션이 작동하는 시스템에 따라 다양한
형태의 인증 방식을 지원합니다.
여러분에 모바일이나 자신이 서버의 어플리케이션에서
서버리스 서비스를 호출하는 경우 어떤 방식의 인증 방식이
적용될 수 있는지 살펴보고, 패스워드 보안을 위한
Cognito의 SRP 지원을 자세히 살펴봅니다.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
인증의 형태
서버리스 API 에서 인증
제 3자 인증 제공자와의 연동
NSRP와 SRP
정리
데모
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
인증의 형태
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
인증을 받아서 AWS 서비스 기능을 실행해야 하는 주체
온프림 서버
EC2 on AWS
모바일
Role
Configure credentials
SAML 2.0
MS AD
Role
Configure credentials
SAML 2.0
MS AD Amazon Cognito
Amazon Cognito
어플리케이션
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SAML 2.0 연동
janedoe@Ubuntu64:/tmp$ ./samlapi.py
Username: ADjanedoe
Password: ****************
Please choose the role you would like to assume:
[ 0 ]: arn:aws:iam::012345678987:role/ADFS-Administrators
[ 1 ]: arn:aws:iam::012345678987:role/ADFS-Operators
Selection: 1
---------------------------------------------------------------
Your new access key pair has been stored in the aws configuration
file /home/janedoe/.aws/credentials under the saml profile.
Note that it will expire at 2015-05-26T17:16:20Z.
---------------------------------------------------------------
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
서버리스 API에서 인증
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Public API
POST /locations
GET /locations
GET /locations/{locationId}
DELETE /locations/{locationId}
GET /locations/{locationId}/resources
POST /locations/{locationId}/resources
DELETE /locations/{locationId}/resources/{resourceId}
GET /locations/{locationId}/resources/{resourceId}/bookings
GET /users/{userId}/bookings
POST /users/{userId}/bookings
DELETE /users/{userId}/bookings/{bookingId}
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Public API
Admin only
Admin only
Admin only
Admin only
POST /locations
GET /locations
GET /locations/{locationId}
DELETE /locations/{locationId}
GET /locations/{locationId}/resources
POST /locations/{locationId}/resources
DELETE /locations/{locationId}/resources/{resourceId}
GET /locations/{locationId}/resources/{resourceId}/bookings
GET /users/{userId}/bookings
POST /users/{userId}/bookings
DELETE /users/{userId}/bookings/{bookingId}
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
API 게이트웨이 : 3가지 인증 형태
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
Custom Identity Providers
AWS IAM authorization
Custom Authorizers
User Pools Authorizers
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
API Gateway: 3가지 인증 형태
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
Custom Identity Providers
AWS IAM authorization
Custom Authorizers
User Pools Authorizers
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저 풀 기반 인가
Mobile app
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon
DynamoDB
Lambda
function
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저 풀 기반 인가
Mobile app
1. Authenticate
Amazon Cognito
User Pools
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저 풀 기반 인가
Mobile app
2. JWT tokens
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon
DynamoDB
Lambda
function
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저 풀 기반 인가
Mobile app
3. Call API Gateway resource
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저 풀 기반 인가
4. Validate
Identity token
Mobile app
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저 풀 기반 인가
Mobile app
5. Invoke API Call
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저 풀 기반 인가
Mobile app
6. Access
AWS Resources
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
API 게이트웨이: 3가지 인증 형태
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
Custom Identity Providers
AWS IAM authorization
Custom Authorizers
User Pools Authorizers
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
1. Authenticate
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
2. JWT tokens
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
3. Request AWS credentials
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
4. Validate Id token
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
5. Temp AWS credentials
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
6. Call API Gateway resource
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
7. Check IAM policy
Amazon
DynamoDB
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 기반 인가
Mobile app
8. Invoke Lambda
Lambda
function
Amazon API
Gateway
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
AWS Identity &
Access Management
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
IAM 정책 상세
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "execute-api:Invoke",
"Effect": ”Allow",
"Resource": "arn:aws:execute-api:*:*:ff5h9tpwfh/*”
},
{
"Action": "execute-api:Invoke",
"Effect": "Deny",
"Resource": "arn:aws:execute-api:*:*:ff5h9tpwfh/*/POST/locations/*"
}
]
}
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
API 게이트웨이: 3가지 인증 형태
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
Custom Identity Providers
AWS IAM authorization
Custom Authorizers
User Pools Authorizers
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Custom Authorizer
Lambda function
Mobile app
Lambda
function
Amazon API
Gateway
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Custom Authorizer
Lambda function
Mobile app
Lambda
function
Amazon
DynamoDB
1. Authenticate
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Custom Authorizer
Lambda function
Mobile app
Amazon API
Gateway
2. Custom
IdP Token(s)
Lambda
function
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Custom Authorizer
Lambda function
Mobile app
Amazon API
Gateway
3. Call API Gateway resource
Lambda
function
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Mobile app
Amazon API
Gateway
4. Check
policy
cache
Custom Authorizer
Lambda function
Lambda
function
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Mobile app
Amazon API
Gateway
5.Validatetoken
AWS Identity &
Access Management
Custom Authorizer
Lambda function
Lambda
function
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Custom Authorizer
Lambda function
Mobile app
Amazon API
Gateway
6.Generateandreturn
userIAMpolicy
Lambda
function
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Custom Authorizer
Lambda function
Mobile app
Amazon API
Gateway
7. Validate IAM
permissions
AWS Identity &
Access Management
Lambda
function
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀
인가
Custom Authorizer
Lambda function
Mobile app
Amazon API
Gateway
8. Invoke
Lambda
function
Amazon
DynamoDB
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
커스텀 인가 람다 함수
예제 코드
var testPolicy = new AuthPolicy(”userIdentifier", "XXXXXXXXXXXX", apiOptions);
testPolicy.allowMethod(AuthPolicy.HttpVerb.POST, "/locations/*");
testPolicy.allowMethod(AuthPolicy.HttpVerb.DELETE, "/locations/*");
callback(null, testPolicy.getPolicy());
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
API 게이트웨이: 3가지 인증 형태
Amazon Cognito
User Pools
Amazon Cognito
Federated Identities
Custom Identity Providers
AWS IAM authorization
Custom Authorizers
User Pools Authorizers
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
제 3자 인증제공자와의 연동
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
어플리케이션 제3자 인증제공자 연동
Built-in, Customizable
User Interface for Sign up
/ Sign in
OAuth 2.0 SupportFederation with Facebook,
Login with Amazon, Google,
and SAML2 providers
1 2 3
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
소셜 인증제공자와의 연동
1. Initiate sign-in
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
소셜 인증제공자와의 연동
1. Initiate sign-in
2. Sign-in with 3rd party IdP
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
소셜 인증제공자와의 연동
1. Initiate sign-in
Amazon Cognito
User Pools
2. Sign-in with 3rd party IdP
3. Get user tokens
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
기업의 인증제공자와의 연동
1. Initiate sign-in
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
기업의 인증제공자와의 연동
1. Initiate sign-in
2. Sign-in with 3rd party IdP
SAML
Endpoint
e.g. ADFS
or Shibboleth
Corporate Directory
e.g. Active Directory
or OpenLDAP
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
기업의 인증제공자와의 연동
1. Initiate sign-in
Amazon Cognito
User Pools
2. Sign-in with 3rd party IdP
3. Get user tokens
SAML
Endpoint
e.g. ADFS
or Shibboleth
Corporate Directory
e.g. Active Directory
or OpenLDAP
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
기업의 인증제공자와의 연동
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
NSRP 와 SRP
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP가 요구되는 이유
Username Email Password
beverly123 beverly123@example.com Password$123
pilotjane pilotjane@example.com a##eroplan3
sudhir1977 sudhir197@example.com mmd414997a
2. Sign-in
1. Sign-up
평범한 문자로 패스워드 저장하기
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP가 요구되는 이유
• Never store passwords in plaintext!
• Vulnerable to rogue employees
• A hacked DB results in
all passwords being compromised
Username Email Password
beverly123 beverly123@example.com Password$123
pilotjane pilotjane@example.com a##eroplan3
sudhir1977 sudhir197@example.com mmd414997a
2. Sign-in
1. Sign-up
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP가 요구되는 이유
Username Email Hashed Password
beverly123 beverly123@example.com 21a730e7d6cc9d715efcc0514ed69a1f
pilotjane pilotjane@example.com fea74fde863cd38f88b3393f590ae883
sudhir1977 sudhir197@example.com 6ce6be14f0c775cc9b3dbe4e18d9fc7d
2. Sign-in
1. Sign-up
패스워드 해쉬 값으로 저장하기
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP가 요구되는 이유
• MD5/SHA1 collisions
• Reverse Lookup Tables
• Rainbow Tables
• Dictionary attacks, brute-force (GPUs can compute
billions of hashes/sec)
Username Email Hashed Password
beverly123 beverly123@example.com 21a730e7d6cc9d715efcc0514ed69a1f
pilotjane pilotjane@example.com fea74fde863cd38f88b3393f590ae883
sudhir1977 sudhir197@example.com 6ce6be14f0c775cc9b3dbe4e18d9fc7d
2. Sign-in
1. Sign-up
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP가 요구되는 이유
Username Email Salted Hash
beverly123 beverly123@example.com 1e66f9358530620b2bcae79dada717c…
pilotjane pilotjane@example.com 88fccd9cf82377d11d2fede177457d47…
sudhir1977 sudhir197@example.com 08a5981de4fecf04b1359a179962a48...
2. Sign-in
1. Sign-up
• Incorporate app-specific salt +
random user-specific salt
• Use algorithm with configurable # of iterations (e.g.
bcrypt, PBKDF2), to slow down brute force attacks
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP가 요구되는 이유
Username Email SRP Verifier function
beverly123 beverly123@example.com <password-specific verifier>
pilotjane pilotjane@example.com <password-specific verifier>
sudhir1977 sudhir197@example.com <password-specific verifier>
2. Sign-in
1. Sign-up
• Secure Remote Password (SRP) Protocol
• Verifier-based protocol
• Passwords never travel over the wire
• Resistant to several attack vectors
• Perfect Forward Secrecy
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP 처리과정
Client Server
임시 비밀값 ‘a’생성
공개 A 생성 : A = ( g ^ a ) % N
N = 아주 큰 소수값
g = 2
K = hash(N, g)
LoginRequest (Username, A)
1. 유저DB 로부터 salt ’s’ verifier ‘v’가져옴
2. 임시 비밀 값 ‘b’를 생성
3. 공개 임시값 ‘B’를 생성
B = [ k * v + ( (g ^ b ) %N)] % N
4. 스크램블 값 ’u’ 생성
u = hash (A, B)
5. 세션 키 K 생성
S = [ ( A * (( v ^ u) % N)) ^b] % N
K= hash(S)
6. 다음 사용을 위해 [ A, B, K, s] 저장
LoginResponse(s, B)
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
SRP 처리과정
Client Server
1. 스크램블 값 ’u’ 생성
u = hash (A, B)
2. 유저 개인 값 ‘x’생성
x= hash(s, password)
3. 세션 키 ‘K ‘계산
S = [ B - k * (g ^x % N)) ^ ( a + u * x)] % N
K = hash (S)
LoginResponse(s, B)
4. K 값 전달
M1 = hash (A, B, K)
1. M1 계산
M1 = hash(A, B, K)
2. 받은 M1과 계산한 M1이 같으면
유저는 인증
이후 통신은 암호화
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
유저 풀
NoSRP client SRP client
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Cognito 유저풀 인가
Mobile app
Amazon Cognito
User Pools
server app
SRP
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
정리
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
인증/인가
• 인증이 필요한 어플리케이션이 동작하는 기기에 따라 인증 방식 구분
• Role for EC2
• Cognito 를 사용할 것
- UserPools
- OpenidConnect
- Synchronize
- Federated Identity
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
AWS Summit 모바일 앱과 QR코드를
통해 강연 평가 및 설문 조사에 참여해
주시기 바랍니다.
내년 Summit을 만들 여러분의 소중한
의견 부탁 드립니다.
#AWSSummit 해시태그로 소셜 미디어에 여러분의 행사
소감을 올려주세요.
발표 자료 및 녹화 동영상은 AWS Korea 공식 소셜 채널로
공유될 예정입니다.
여러분의 피드백을 기다립니다!
Serverless 개발에서의 인증 완벽 가이드::박선용::AWS Summit Seoul 2018

More Related Content

PDF
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
PDF
게임서비스를 위한 ElastiCache 활용 전략 :: 구승모 솔루션즈 아키텍트 :: Gaming on AWS 2016
PDF
Java null survival guide
PDF
CloudWatch 성능 모니터링과 신속한 대응을 위한 노하우 - 박선용 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
PDF
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
PDF
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
PDF
MongoDB WiredTiger Internals
PDF
AWS를 활용해서 글로벌 게임 런칭하기 - 박진성 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
AWS SAM으로 서버리스 아키텍쳐 운영하기 - 이재면(마이뮤직테이스트) :: AWS Community Day 2020
게임서비스를 위한 ElastiCache 활용 전략 :: 구승모 솔루션즈 아키텍트 :: Gaming on AWS 2016
Java null survival guide
CloudWatch 성능 모니터링과 신속한 대응을 위한 노하우 - 박선용 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
AWS Transit Gateway를 통한 Multi-VPC 아키텍처 패턴 - 강동환 솔루션즈 아키텍트, AWS :: AWS Summit ...
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
MongoDB WiredTiger Internals
AWS를 활용해서 글로벌 게임 런칭하기 - 박진성 AWS 솔루션즈 아키텍트 :: AWS Summit Seoul 2021

What's hot (20)

PDF
AWS CLOUD 2018- Amazon DynamoDB기반 글로벌 서비스 개발 방법 (김준형 솔루션즈 아키텍트)
PPTX
AWS로 게임 기반 다지기 - 김병수, 박진성 :: AWS Game Master 온라인 세미나 #3
PPTX
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
PDF
Fargate 를 이용한 ECS with VPC 1부
PDF
[AWS Dev Day] 앱 현대화 | DevOps 개발자가 되기 위한 쿠버네티스 핵심 활용 예제 알아보기 - 정영준 AWS 솔루션즈 아키...
PDF
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
PDF
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
PDF
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...
PDF
Amazon Dynamo DB 활용하기 - 강민석 :: AWS Database Modernization Day 온라인
PDF
AWS Lambda를 기반으로한 실시간 빅테이터 처리하기
PDF
AWS Backup을 이용한 데이터베이스의 백업 자동화와 편리한 복구방법
PDF
AWS 클라우드 서비스 소개 및 사례 (방희란) - AWS 101 세미나
PDF
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
PDF
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
PDF
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
PPTX
IBM JVM 소개 - Oracle JVM 과 비교
PDF
MongoDB WiredTiger Internals: Journey To Transactions
PDF
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
PDF
Introduction to Spring WebFlux #jsug #sf_a1
PDF
AWS Elastic Beanstalk 활용하여 수 분만에 코드 배포하기 (최원근, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
AWS CLOUD 2018- Amazon DynamoDB기반 글로벌 서비스 개발 방법 (김준형 솔루션즈 아키텍트)
AWS로 게임 기반 다지기 - 김병수, 박진성 :: AWS Game Master 온라인 세미나 #3
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
Fargate 를 이용한 ECS with VPC 1부
[AWS Dev Day] 앱 현대화 | DevOps 개발자가 되기 위한 쿠버네티스 핵심 활용 예제 알아보기 - 정영준 AWS 솔루션즈 아키...
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
효과적인 NoSQL (Elasticahe / DynamoDB) 디자인 및 활용 방안 (최유정 & 최홍식, AWS 솔루션즈 아키텍트) :: ...
Amazon Dynamo DB 활용하기 - 강민석 :: AWS Database Modernization Day 온라인
AWS Lambda를 기반으로한 실시간 빅테이터 처리하기
AWS Backup을 이용한 데이터베이스의 백업 자동화와 편리한 복구방법
AWS 클라우드 서비스 소개 및 사례 (방희란) - AWS 101 세미나
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
다양한 솔루션으로 만들어가는 AWS 네트워크 보안::이경수::AWS Summit Seoul 2018
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
IBM JVM 소개 - Oracle JVM 과 비교
MongoDB WiredTiger Internals: Journey To Transactions
AWS Black Belt Online Seminar 2017 Amazon DynamoDB
Introduction to Spring WebFlux #jsug #sf_a1
AWS Elastic Beanstalk 활용하여 수 분만에 코드 배포하기 (최원근, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Ad

Similar to Serverless 개발에서의 인증 완벽 가이드::박선용::AWS Summit Seoul 2018 (20)

PDF
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬, AWS 테크에반젤리스트
PPTX
Amplify로 Neptune 그래프 DB 기반 모바일 앱 만들기 :: 김현민 - AWS Community Day 2019
PPTX
MSA를 넘어 Function의 로의 진화::주경호 수석::AWS Summit Seoul 2018
PDF
AWS Cloud Development Kit (CDK)를 이용한 코드 기반 인프라 개발 및 배포 - 공찬호(리얼리티매직) :: AWS C...
PDF
AWS Lambda 내부 동작 방식 및 활용 방법 자세히 살펴 보기 - 김일호 솔루션즈 아키텍트 매니저, AWS :: AWS Summit ...
PDF
스크립트로 Aws 서비스 자동화 하기 20161121 slideshare
PDF
아름답고 유연한 데이터 파이프라인 구축을 위한 Amazon Managed Workflow for Apache Airflow - 유다니엘 A...
PDF
Why your next serverless project should use AWS AppSync
PDF
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)
PDF
Telus의 AWS활용 사례: AWS 서버리스 기반 3GPP 코어 및 BSS 구축 – 조경준 AWS 솔루션즈 아키텍트:: AWS Cloud...
PDF
[AWS Builders] 실 적용 사례로 알아보는, AWS를 활용한 WAF 보안의 장점 - 삼성SDS 천준호 프로, 컨설팅그룹 (보안기획팀)
PDF
e커머스 통합운영 자동화 사례 및 보안강화 방안 - 양수연 상무, 삼성SDS / 임선진 팀장, 삼성SDS :: AWS Summit Seou...
PDF
Lambda@Edge를통한멀티리전기반글로벌트래픽길들이기::이상현::AWS Summit Seoul 2018
PDF
백오피스 워크로드 클라우드 이전하기 - 박동국 매니저, AWS / 유승국 차장, 하림그룹 :: AWS Summit Seoul 2019
PDF
AWS Serverless 활용 네트워크 보안 아키텍처::함인용 실장, 이성현 매니저, 솔트웨어::AWS Summit Seoul 2018
PDF
2018 AWS DevDay Seoul community track - 데이터센터 1도 모르는 개발자가 MSA를 만났을 때
PDF
더욱 진화하는 AWS 네트워크 보안 - 신은수 AWS 시큐리티 스페셜리스트 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
PDF
Amazon Polly와 Cloud9을 활용한 서버리스 웹 애플리케이션 및 CI/CD 배포 프로세스 구축 (김현수, AWS 솔루션즈 아키텍...
PDF
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...
PPTX
AWS Summit Seoul 2015 - 모바일 및 IoT 환경을 위한 AWS 클라우드 플랫폼의 진화 (윤석찬, Markku Lepisto)
AWS 클라우드를 통해 최소기능제품(MVP) 빠르게 개발하기 - 윤석찬, AWS 테크에반젤리스트
Amplify로 Neptune 그래프 DB 기반 모바일 앱 만들기 :: 김현민 - AWS Community Day 2019
MSA를 넘어 Function의 로의 진화::주경호 수석::AWS Summit Seoul 2018
AWS Cloud Development Kit (CDK)를 이용한 코드 기반 인프라 개발 및 배포 - 공찬호(리얼리티매직) :: AWS C...
AWS Lambda 내부 동작 방식 및 활용 방법 자세히 살펴 보기 - 김일호 솔루션즈 아키텍트 매니저, AWS :: AWS Summit ...
스크립트로 Aws 서비스 자동화 하기 20161121 slideshare
아름답고 유연한 데이터 파이프라인 구축을 위한 Amazon Managed Workflow for Apache Airflow - 유다니엘 A...
Why your next serverless project should use AWS AppSync
서버리스 IoT 백엔드 개발 및 구현 사례 : 윤석찬 (AWS 테크에반젤리스트)
Telus의 AWS활용 사례: AWS 서버리스 기반 3GPP 코어 및 BSS 구축 – 조경준 AWS 솔루션즈 아키텍트:: AWS Cloud...
[AWS Builders] 실 적용 사례로 알아보는, AWS를 활용한 WAF 보안의 장점 - 삼성SDS 천준호 프로, 컨설팅그룹 (보안기획팀)
e커머스 통합운영 자동화 사례 및 보안강화 방안 - 양수연 상무, 삼성SDS / 임선진 팀장, 삼성SDS :: AWS Summit Seou...
Lambda@Edge를통한멀티리전기반글로벌트래픽길들이기::이상현::AWS Summit Seoul 2018
백오피스 워크로드 클라우드 이전하기 - 박동국 매니저, AWS / 유승국 차장, 하림그룹 :: AWS Summit Seoul 2019
AWS Serverless 활용 네트워크 보안 아키텍처::함인용 실장, 이성현 매니저, 솔트웨어::AWS Summit Seoul 2018
2018 AWS DevDay Seoul community track - 데이터센터 1도 모르는 개발자가 MSA를 만났을 때
더욱 진화하는 AWS 네트워크 보안 - 신은수 AWS 시큐리티 스페셜리스트 솔루션즈 아키텍트 :: AWS Summit Seoul 2021
Amazon Polly와 Cloud9을 활용한 서버리스 웹 애플리케이션 및 CI/CD 배포 프로세스 구축 (김현수, AWS 솔루션즈 아키텍...
개발자를 위한 Alexa - 나만의 음성 비서 앱 만들기, Peter Moon, Senior Developer Manager, Amazon...
AWS Summit Seoul 2015 - 모바일 및 IoT 환경을 위한 AWS 클라우드 플랫폼의 진화 (윤석찬, Markku Lepisto)
Ad

More from Amazon Web Services Korea (20)

PDF
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
PDF
[D3T1S06] Neptune Analytics with Vector Similarity Search
PDF
[D3T1S03] Amazon DynamoDB design puzzlers
PDF
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
PDF
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
PDF
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
PDF
[D3T1S02] Aurora Limitless Database Introduction
PDF
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
PDF
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 2
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 1
PDF
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
PDF
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
PDF
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
PDF
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
PDF
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
PDF
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
PDF
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
PDF
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
PDF
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S02] Aurora Limitless Database Introduction
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 1
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PDF
cuic standard and advanced reporting.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
A Presentation on Artificial Intelligence
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MIND Revenue Release Quarter 2 2025 Press Release
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
cuic standard and advanced reporting.pdf
Machine learning based COVID-19 study performance prediction
A comparative analysis of optical character recognition models for extracting...
Spectral efficient network and resource selection model in 5G networks
Assigned Numbers - 2025 - Bluetooth® Document
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding

Serverless 개발에서의 인증 완벽 가이드::박선용::AWS Summit Seoul 2018

  • 1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Seon Yong Park Developer Specialist SA, APAC 서버리스 개발에서의 인증 완벽 가이드
  • 2. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 본 강연에서는 AWS 는 어플리케이션이 작동하는 시스템에 따라 다양한 형태의 인증 방식을 지원합니다. 여러분에 모바일이나 자신이 서버의 어플리케이션에서 서버리스 서비스를 호출하는 경우 어떤 방식의 인증 방식이 적용될 수 있는지 살펴보고, 패스워드 보안을 위한 Cognito의 SRP 지원을 자세히 살펴봅니다.
  • 3. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 인증의 형태 서버리스 API 에서 인증 제 3자 인증 제공자와의 연동 NSRP와 SRP 정리 데모
  • 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 인증의 형태
  • 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 인증을 받아서 AWS 서비스 기능을 실행해야 하는 주체 온프림 서버 EC2 on AWS 모바일 Role Configure credentials SAML 2.0 MS AD Role Configure credentials SAML 2.0 MS AD Amazon Cognito Amazon Cognito 어플리케이션
  • 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SAML 2.0 연동 janedoe@Ubuntu64:/tmp$ ./samlapi.py Username: ADjanedoe Password: **************** Please choose the role you would like to assume: [ 0 ]: arn:aws:iam::012345678987:role/ADFS-Administrators [ 1 ]: arn:aws:iam::012345678987:role/ADFS-Operators Selection: 1 --------------------------------------------------------------- Your new access key pair has been stored in the aws configuration file /home/janedoe/.aws/credentials under the saml profile. Note that it will expire at 2015-05-26T17:16:20Z. ---------------------------------------------------------------
  • 7. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 서버리스 API에서 인증
  • 8. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Public API POST /locations GET /locations GET /locations/{locationId} DELETE /locations/{locationId} GET /locations/{locationId}/resources POST /locations/{locationId}/resources DELETE /locations/{locationId}/resources/{resourceId} GET /locations/{locationId}/resources/{resourceId}/bookings GET /users/{userId}/bookings POST /users/{userId}/bookings DELETE /users/{userId}/bookings/{bookingId}
  • 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Public API Admin only Admin only Admin only Admin only POST /locations GET /locations GET /locations/{locationId} DELETE /locations/{locationId} GET /locations/{locationId}/resources POST /locations/{locationId}/resources DELETE /locations/{locationId}/resources/{resourceId} GET /locations/{locationId}/resources/{resourceId}/bookings GET /users/{userId}/bookings POST /users/{userId}/bookings DELETE /users/{userId}/bookings/{bookingId}
  • 10. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. API 게이트웨이 : 3가지 인증 형태 Amazon Cognito User Pools Amazon Cognito Federated Identities Custom Identity Providers AWS IAM authorization Custom Authorizers User Pools Authorizers
  • 11. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. API Gateway: 3가지 인증 형태 Amazon Cognito User Pools Amazon Cognito Federated Identities Custom Identity Providers AWS IAM authorization Custom Authorizers User Pools Authorizers
  • 12. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저 풀 기반 인가 Mobile app Amazon API Gateway Amazon Cognito User Pools Amazon DynamoDB Lambda function
  • 13. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저 풀 기반 인가 Mobile app 1. Authenticate Amazon Cognito User Pools
  • 14. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저 풀 기반 인가 Mobile app 2. JWT tokens Amazon API Gateway Amazon Cognito User Pools Amazon DynamoDB Lambda function
  • 15. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저 풀 기반 인가 Mobile app 3. Call API Gateway resource Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools
  • 16. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저 풀 기반 인가 4. Validate Identity token Mobile app Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools
  • 17. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저 풀 기반 인가 Mobile app 5. Invoke API Call Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools
  • 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저 풀 기반 인가 Mobile app 6. Access AWS Resources Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools
  • 19. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. API 게이트웨이: 3가지 인증 형태 Amazon Cognito User Pools Amazon Cognito Federated Identities Custom Identity Providers AWS IAM authorization Custom Authorizers User Pools Authorizers
  • 20. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management
  • 21. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management 1. Authenticate
  • 22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app 2. JWT tokens Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management
  • 23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app 3. Request AWS credentials Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management
  • 24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app 4. Validate Id token Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management
  • 25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app 5. Temp AWS credentials Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management
  • 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app 6. Call API Gateway resource Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management
  • 27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app 7. Check IAM policy Amazon DynamoDB Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management
  • 28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 기반 인가 Mobile app 8. Invoke Lambda Lambda function Amazon API Gateway Amazon Cognito User Pools Amazon Cognito Federated Identities AWS Identity & Access Management Amazon DynamoDB
  • 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. IAM 정책 상세 { "Version": "2012-10-17", "Statement": [ { "Action": "execute-api:Invoke", "Effect": ”Allow", "Resource": "arn:aws:execute-api:*:*:ff5h9tpwfh/*” }, { "Action": "execute-api:Invoke", "Effect": "Deny", "Resource": "arn:aws:execute-api:*:*:ff5h9tpwfh/*/POST/locations/*" } ] }
  • 30. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. API 게이트웨이: 3가지 인증 형태 Amazon Cognito User Pools Amazon Cognito Federated Identities Custom Identity Providers AWS IAM authorization Custom Authorizers User Pools Authorizers
  • 31. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Custom Authorizer Lambda function Mobile app Lambda function Amazon API Gateway Amazon DynamoDB
  • 32. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Custom Authorizer Lambda function Mobile app Lambda function Amazon DynamoDB 1. Authenticate
  • 33. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Custom Authorizer Lambda function Mobile app Amazon API Gateway 2. Custom IdP Token(s) Lambda function Amazon DynamoDB
  • 34. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Custom Authorizer Lambda function Mobile app Amazon API Gateway 3. Call API Gateway resource Lambda function Amazon DynamoDB
  • 35. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Mobile app Amazon API Gateway 4. Check policy cache Custom Authorizer Lambda function Lambda function Amazon DynamoDB
  • 36. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Mobile app Amazon API Gateway 5.Validatetoken AWS Identity & Access Management Custom Authorizer Lambda function Lambda function Amazon DynamoDB
  • 37. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Custom Authorizer Lambda function Mobile app Amazon API Gateway 6.Generateandreturn userIAMpolicy Lambda function Amazon DynamoDB
  • 38. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Custom Authorizer Lambda function Mobile app Amazon API Gateway 7. Validate IAM permissions AWS Identity & Access Management Lambda function Amazon DynamoDB
  • 39. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 Custom Authorizer Lambda function Mobile app Amazon API Gateway 8. Invoke Lambda function Amazon DynamoDB
  • 40. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 커스텀 인가 람다 함수 예제 코드 var testPolicy = new AuthPolicy(”userIdentifier", "XXXXXXXXXXXX", apiOptions); testPolicy.allowMethod(AuthPolicy.HttpVerb.POST, "/locations/*"); testPolicy.allowMethod(AuthPolicy.HttpVerb.DELETE, "/locations/*"); callback(null, testPolicy.getPolicy());
  • 41. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. API 게이트웨이: 3가지 인증 형태 Amazon Cognito User Pools Amazon Cognito Federated Identities Custom Identity Providers AWS IAM authorization Custom Authorizers User Pools Authorizers
  • 42. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 제 3자 인증제공자와의 연동
  • 43. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 어플리케이션 제3자 인증제공자 연동 Built-in, Customizable User Interface for Sign up / Sign in OAuth 2.0 SupportFederation with Facebook, Login with Amazon, Google, and SAML2 providers 1 2 3
  • 44. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 소셜 인증제공자와의 연동 1. Initiate sign-in
  • 45. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 소셜 인증제공자와의 연동 1. Initiate sign-in 2. Sign-in with 3rd party IdP
  • 46. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 소셜 인증제공자와의 연동 1. Initiate sign-in Amazon Cognito User Pools 2. Sign-in with 3rd party IdP 3. Get user tokens
  • 47. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 기업의 인증제공자와의 연동 1. Initiate sign-in
  • 48. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 기업의 인증제공자와의 연동 1. Initiate sign-in 2. Sign-in with 3rd party IdP SAML Endpoint e.g. ADFS or Shibboleth Corporate Directory e.g. Active Directory or OpenLDAP
  • 49. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 기업의 인증제공자와의 연동 1. Initiate sign-in Amazon Cognito User Pools 2. Sign-in with 3rd party IdP 3. Get user tokens SAML Endpoint e.g. ADFS or Shibboleth Corporate Directory e.g. Active Directory or OpenLDAP
  • 50. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 기업의 인증제공자와의 연동
  • 51. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. NSRP 와 SRP
  • 52. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP가 요구되는 이유 Username Email Password beverly123 beverly123@example.com Password$123 pilotjane pilotjane@example.com a##eroplan3 sudhir1977 sudhir197@example.com mmd414997a 2. Sign-in 1. Sign-up 평범한 문자로 패스워드 저장하기
  • 53. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP가 요구되는 이유 • Never store passwords in plaintext! • Vulnerable to rogue employees • A hacked DB results in all passwords being compromised Username Email Password beverly123 beverly123@example.com Password$123 pilotjane pilotjane@example.com a##eroplan3 sudhir1977 sudhir197@example.com mmd414997a 2. Sign-in 1. Sign-up
  • 54. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP가 요구되는 이유 Username Email Hashed Password beverly123 beverly123@example.com 21a730e7d6cc9d715efcc0514ed69a1f pilotjane pilotjane@example.com fea74fde863cd38f88b3393f590ae883 sudhir1977 sudhir197@example.com 6ce6be14f0c775cc9b3dbe4e18d9fc7d 2. Sign-in 1. Sign-up 패스워드 해쉬 값으로 저장하기
  • 55. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP가 요구되는 이유 • MD5/SHA1 collisions • Reverse Lookup Tables • Rainbow Tables • Dictionary attacks, brute-force (GPUs can compute billions of hashes/sec) Username Email Hashed Password beverly123 beverly123@example.com 21a730e7d6cc9d715efcc0514ed69a1f pilotjane pilotjane@example.com fea74fde863cd38f88b3393f590ae883 sudhir1977 sudhir197@example.com 6ce6be14f0c775cc9b3dbe4e18d9fc7d 2. Sign-in 1. Sign-up
  • 56. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP가 요구되는 이유 Username Email Salted Hash beverly123 beverly123@example.com 1e66f9358530620b2bcae79dada717c… pilotjane pilotjane@example.com 88fccd9cf82377d11d2fede177457d47… sudhir1977 sudhir197@example.com 08a5981de4fecf04b1359a179962a48... 2. Sign-in 1. Sign-up • Incorporate app-specific salt + random user-specific salt • Use algorithm with configurable # of iterations (e.g. bcrypt, PBKDF2), to slow down brute force attacks
  • 57. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP가 요구되는 이유 Username Email SRP Verifier function beverly123 beverly123@example.com <password-specific verifier> pilotjane pilotjane@example.com <password-specific verifier> sudhir1977 sudhir197@example.com <password-specific verifier> 2. Sign-in 1. Sign-up • Secure Remote Password (SRP) Protocol • Verifier-based protocol • Passwords never travel over the wire • Resistant to several attack vectors • Perfect Forward Secrecy
  • 58. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP 처리과정 Client Server 임시 비밀값 ‘a’생성 공개 A 생성 : A = ( g ^ a ) % N N = 아주 큰 소수값 g = 2 K = hash(N, g) LoginRequest (Username, A) 1. 유저DB 로부터 salt ’s’ verifier ‘v’가져옴 2. 임시 비밀 값 ‘b’를 생성 3. 공개 임시값 ‘B’를 생성 B = [ k * v + ( (g ^ b ) %N)] % N 4. 스크램블 값 ’u’ 생성 u = hash (A, B) 5. 세션 키 K 생성 S = [ ( A * (( v ^ u) % N)) ^b] % N K= hash(S) 6. 다음 사용을 위해 [ A, B, K, s] 저장 LoginResponse(s, B)
  • 59. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. SRP 처리과정 Client Server 1. 스크램블 값 ’u’ 생성 u = hash (A, B) 2. 유저 개인 값 ‘x’생성 x= hash(s, password) 3. 세션 키 ‘K ‘계산 S = [ B - k * (g ^x % N)) ^ ( a + u * x)] % N K = hash (S) LoginResponse(s, B) 4. K 값 전달 M1 = hash (A, B, K) 1. M1 계산 M1 = hash(A, B, K) 2. 받은 M1과 계산한 M1이 같으면 유저는 인증 이후 통신은 암호화
  • 60. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 유저 풀 NoSRP client SRP client
  • 61. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Cognito 유저풀 인가 Mobile app Amazon Cognito User Pools server app SRP
  • 62. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 정리
  • 63. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 인증/인가 • 인증이 필요한 어플리케이션이 동작하는 기기에 따라 인증 방식 구분 • Role for EC2 • Cognito 를 사용할 것 - UserPools - OpenidConnect - Synchronize - Federated Identity
  • 64. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS Summit 모바일 앱과 QR코드를 통해 강연 평가 및 설문 조사에 참여해 주시기 바랍니다. 내년 Summit을 만들 여러분의 소중한 의견 부탁 드립니다. #AWSSummit 해시태그로 소셜 미디어에 여러분의 행사 소감을 올려주세요. 발표 자료 및 녹화 동영상은 AWS Korea 공식 소셜 채널로 공유될 예정입니다. 여러분의 피드백을 기다립니다!