awsを活用した ユーザー認証実装パターン解説 · 2020-06-07 ·...
Post on 13-Jul-2020
2 Views
Preview:
TRANSCRIPT
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWSを活用したユーザー認証実装パターン解説
堀場 隆文コンサルタントアマゾン ウェブ サービス ジャパン株式会社プロフェッショナルサービス本部
B 2 - 0 6
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
自己紹介
名前: 堀場 隆文(ほりば たかふみ)
所属: プロフェッショナルサービス本部
職種: コンサルタント
業務: 技術的な課題を中心にお客様をご支援
・マスマイグレーションに向けたクラウド標準化
・サーバレスアプリ構築
好きなAWSサービス:
AWS Lambda
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
セッションの概要
• ユーザー認証の概要• AWSの認証関連のマネージドサービスのご紹介• ユーザー認証の実装パターン解説
• AWSのマネージドサービスを活用したユーザー認証の構成検討ができる
SUMM I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
あらゆる箇所で実施される認証
AWS マネジメントコンソール/AWS API
AWSアプリケーション
カスタムアプリ
AWS管理者
消費者
セキュリティ担当
従業員
開発者 パートナー
AWSリソース
Amazon QuickSight
AmazonConnect
Amazon EC2
Amazon Aurora
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
本セッションにおける「ユーザー」と「認証」
AWS マネジメントコンソール/AWS API
AWSアプリケーション
カスタムアプリ
AWS管理者
消費者
セキュリティ担当
従業員
開発者 パートナー
AWSリソース
Amazon QuickSight
AmazonConnect
Amazon EC2
Amazon Aurora
「エンドユーザー」が直接利用する「Webアプリの認証」
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例(1/3)
Amazon EC2
HTML
全体更新
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
HTML JavaScript
• APIにアクセス
部分更新
Webアプリケーションの実装例(2/3)
Amazon S3*
Amazon APIGateway
*Amazon Simple Storage Service (S3)
Amazon S3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例(3/3)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
ユーザー認証に関連する関心事
強固な認証 ユーザビリティ ガバナンス/コンプライアンス
構築/運用性
マネージドサービスを活用しイノベーションに投資を
SUMM I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWSのセキュリティ関連サービスポートフォリオ
• AWS Identity & Access Management (IAM)
• AWS Single Sign-On (SSO)
• Amazon Cognito
• AWS Directory Service
• Amazon Cloud Directory
• AWS Secrets Manager
• AWS Organizations
• AWS Resource Access Manager (RAM)
• AWS Security Hub
• Amazon GuardDuty
• AWS CloudTrail
• AWS Config
• AmazonCloudWatch
• VPC Flow Logs
• Amazon Virtual Private Cloud (VPC)
• AWS Shield
• AWS Web Application Firewall (AWS WAF)
• Amazon Inspector
• AWS Systems Manager
• Amazon Macie
• AWS Key Management Service (KMS)
• AWS CloudHSM
• AWS Certificate Manager
• AWS Config Rules
• AWS Lambda
ID管理/認証/認可 発見的統制インフラ保護 訂正的統制データ保護
https://aws.amazon.com/jp/products/security/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
ID管理/認証/認可に関連するサービス
AWS SecretsManager
パスワードのライフサイクル管理
AWS Organizations
複数のAWSアカウントのリソースをポリシーで制御
認可 リソース管理ID管理 & 認証
AWS Resource Access Manager複数のAWSアカウントへのリソース共有を制御
AWS Identity and Access ManagementAWS APIに対するアクセス制御
AWS Single Sign-On(SSO)
複数のAWSアカウントやビジネスアプリへのシングルサインオンを実現
AWS DirectoryService
マネージド型Microsoft Active Directory
Amazon Cognito
カスタムアプリやAWS APIの認証・認可を提供
Amazon Cloud Directory
様々なユースケースに対応するディレクトリ機能を提供
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWS SSO Amazon Cognito
Webアプリケーションで利用する認証サービス
https://aws.amazon.com/jp/single-sign-on/ https://aws.amazon.com/jp/cognito/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWS SSOの特徴
強固な認証 ユーザビリティ
ガバナンスコンプライアンス
・Active Directory対応・CloudTrail対応(監査)
・シングルサインオン・多要素認証・パスワードポリシー
構築/運用
・プログラミング不要・マネージドで負荷軽減
AWS SSO
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWS SSO Amazon Cognito
Webアプリケーションで利用する認証サービス
https://aws.amazon.com/jp/single-sign-on/ https://aws.amazon.com/jp/cognito/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Amazon Cognitoの特徴
強固な認証 ユーザビリティ
ガバナンスコンプライアンス
・外部IDプロバイダ連携・CloudTrail対応(監査)
・ソーシャル連携・多要素認証・パスワードポリシー・AWS Credentials
構築/運用
・プログラミング不要・マネージドで負荷軽減
Amazon Cognito
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
ユーザープールとIDプールAmazon Cognito
Amazon S3 Amazon DynamoDB
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWS SSO Amazon Cognito
Webアプリケーションで利用する認証サービス
https://aws.amazon.com/jp/single-sign-on/ https://aws.amazon.com/jp/cognito/
SUMM I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例(1/3)
Amazon EC2
HTML
全体更新
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
主な実装パターン~従来型~(1/2)
ユーザープールALB ALB
https://aws.amazon.com/jp/blogs/news/built-in-authentication-in-alb/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I TALB
Amazon Cognito
ユーザー
AWS Lambda
Amazon EC2
Amazon ECS**Amazon Elastic Container Service
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
主な実装パターン~従来型~(2/2)
Amazon EC2NLB Amazon RDS Amazon EC2NLB 既存DB
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例
Amazon Cognito(ユーザープール)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
HTML JavaScript
• APIにアクセス
部分更新
Webアプリケーションの実装例(2/3)
Amazon S3
Amazon API Gateway
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
主な実装パターン~APIベース~(1/3)
AWS IAMAmazon Cognito(ユーザープール)
AWS Lambda
https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/apigateway-control-access-to-api.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Amazon API Gateway
ユーザープール
ユーザー
AmazonS3
AWS Lambda
Amazon EC2
Amazon ECS
Amazon Cognito活用時のフロー
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
主な実装パターン~APIベース~(2/3)
Amazon EC2NLB Amazon RDS Amazon EC2NLB 既存DB
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
HTML JavaScript
• APIにアクセス
部分更新
Webアプリケーションの実装例(2/3)
Amazon S3*
Amazon API Gateway
*Amazon Simple Storage Service (S3)
Amazon S3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
主な実装パターン~APIベース~(3/3)
ユーザープール IDプール
外部IDプロバイダ
IDプール
https://docs.aws.amazon.com/ja_jp/cognito/latest/developerguide/cognito-identity.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWS API利用時のフロー
Amazon S3
Amazon DynamoDB
Amazon API Gateway
ユーザープール
ユーザー
IDプール
AmazonS3
AWS Lambda
Amazon EC2
Amazon ECS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
IDプールによるAWS Credentials発行
事前にIAMロールの割当ルールを設定
IAM Role AWS Security TokenService(STS)
割当てられたIAMロールを利用してAWS Credentialsを生成
https://docs.aws.amazon.com/ja_jp/cognito/latest/developerguide/role-based-access-control.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
【参考】クライアントとAmazon Cognitoの通信
Amazon S3
Amazon DynamoDB
AmazonAPI Gateway
ユーザープール
ユーザー
IDプール
AmazonS3
AWS Lambda
AmazonEC2
Amazon ECS
AWS Amplify
モバイルアプリおよびウェブアプリの作成、設定、実装を容易化
https://aws.amazon.com/jp/amplify/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例
Amazon Cognito(ユーザープール)
Amazon Cognito(ユーザープール/IDプール)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例(3/3)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
主な実装パターン~クラウドアプリ~(1/2)
AWS SSO
https://docs.aws.amazon.com/singlesignon/latest/userguide/saasapps.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWS SSO利用時のフロー
ユーザー
AWS SSO
Amazon Connect
Amazon QuickSight
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
主な実装パターン~クラウドアプリ~(2/2)
• ADFS*を利用することなく
AWS SSO
https://docs.aws.amazon.com/ja_jp/singlesignon/latest/userguide/manage-your-directory-connected.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
【参考】利用可能ディレクトリ• AWS SSOのディレクトリ
• Microsoft Active Directory• AWS SSOと同一リージョンにあるAWS Microsoft AD(AWS Directory Service)
• AD Connector(AWS Directory Service)経由のオンプレや別リージョンのActive Directory
AWS Cloud(東京) AWS Cloud(バージニア北部)
VPC VPC
Peering
AWS SSO
AD ConnectorAWS Microsoft AD
ユーザー
https://docs.aws.amazon.com/ja_jp/singlesignon/latest/userguide/manage-your-directory.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Webアプリケーションの実装例
Amazon Cognito(ユーザープール)
Amazon Cognito(ユーザープール/IDプール)
AWS SSO
SUMM I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
セッションの概要
• ユーザー認証の概要• AWSの認証関連のマネージドサービスのご紹介• ユーザー認証の実装パターン解説
• AWSのマネージドサービスを活用したユーザー認証の構成検討ができる
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
まとめ(1/2)
AWS SecretsManager
パスワードのライフサイクル管理
AWS Organizations
複数のAWSアカウントのリソースをポリシーで制御
認可 リソース管理ID管理 & 認証
AWS Resource Access Manager複数のAWSアカウントへのリソース共有を制御
AWS Identity and Access ManagementAWS APIに対するアクセス制御
AWS Single Sign-On(SSO)
複数のAWSアカウントやビジネスアプリへのシングルサインオンを実現
AWS DirectoryService
マネージド型Microsoft Active Directory
Amazon Cognito
カスタムアプリやAWS APIの認証・認可を提供
Amazon Cloud Directory
様々なユースケースに対応するディレクトリ機能を提供
マネージドサービスを活用しイノベーションに投資を
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
まとめ(2/2)
Amazon Cognito(ユーザープール)
Amazon Cognito(ユーザープール/IDプール)
AWS SSO
カスタム実装
ユースケースに適した実装方法の選択をリソースの上限緩和申請もお忘れなく
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
関連セッション
6/13 16:00-16:40 B2-07
マルチアカウント運用での権限移譲と統制の両立山辺 真行
6/14 12:00-12:40 H3-01
AWS アイデンティティサービス : クラウドジャーニーをセキュアに進めるために
Quint Van Deman
6/14 15:00-15:40 H3-04
サーバーレスアプリケーションのためのセキュリティアーキテクチャ桐山 隼人
SUMM I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
認証と認可
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
IAMの認可が不要なケースの例
IAMの認可が不要なケース
Amazon EC2
AmazonAPI Gateway
ユーザー
IAMの認可が必要なケース
管理者・開発者
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
ユーザープールの構成画面Amazon Cognito
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
Cognito利用時のログイン画面例Amazon Cognito
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.SUMM I T
AWS Single Sign-Onのポータル画面例AWS Single Sign-On
top related