Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
Naohiro Fujie
PDF, PPTX
10,434 views
プロトコルから見るID連携
CLR/H Tokyo 2014/11/29資料 ID連携プロトコル(ws-federation/SAML2.0/OpenID Connect)の解説
Technology
◦
Read more
32
Save
Share
Embed
Embed presentation
Download
Download as PDF, PPTX
1
/ 62
2
/ 62
3
/ 62
4
/ 62
5
/ 62
6
/ 62
7
/ 62
8
/ 62
9
/ 62
10
/ 62
11
/ 62
12
/ 62
13
/ 62
14
/ 62
15
/ 62
16
/ 62
17
/ 62
18
/ 62
19
/ 62
20
/ 62
21
/ 62
22
/ 62
23
/ 62
24
/ 62
25
/ 62
26
/ 62
27
/ 62
28
/ 62
29
/ 62
30
/ 62
31
/ 62
32
/ 62
33
/ 62
34
/ 62
35
/ 62
36
/ 62
37
/ 62
38
/ 62
39
/ 62
40
/ 62
41
/ 62
42
/ 62
43
/ 62
44
/ 62
45
/ 62
46
/ 62
47
/ 62
48
/ 62
49
/ 62
50
/ 62
51
/ 62
52
/ 62
53
/ 62
54
/ 62
55
/ 62
56
/ 62
57
/ 62
58
/ 62
59
/ 62
60
/ 62
61
/ 62
62
/ 62
More Related Content
PDF
Azure ADとIdentity管理
by
Naohiro Fujie
PDF
今なら間に合う分散型IDとEntra Verified ID
by
Naohiro Fujie
PDF
実装して理解するLINE LoginとOpenID Connect入門
by
Naohiro Fujie
PDF
認証の課題とID連携の実装 〜ハンズオン〜
by
Masaru Kurahayashi
PDF
Keycloak拡張入門
by
Hiroyuki Wada
PDF
Azure ADと外部アプリのID連携/SSO - Deep Dive
by
Naohiro Fujie
PDF
MicrosoftのDID/VC実装概要
by
Naohiro Fujie
PDF
KeycloakのDevice Flow、CIBAについて
by
Hiroyuki Wada
Azure ADとIdentity管理
by
Naohiro Fujie
今なら間に合う分散型IDとEntra Verified ID
by
Naohiro Fujie
実装して理解するLINE LoginとOpenID Connect入門
by
Naohiro Fujie
認証の課題とID連携の実装 〜ハンズオン〜
by
Masaru Kurahayashi
Keycloak拡張入門
by
Hiroyuki Wada
Azure ADと外部アプリのID連携/SSO - Deep Dive
by
Naohiro Fujie
MicrosoftのDID/VC実装概要
by
Naohiro Fujie
KeycloakのDevice Flow、CIBAについて
by
Hiroyuki Wada
What's hot
PDF
統合ID管理入門
by
山田(YAMADA) 達司(Tatsushi)
PDF
ハイブリッド時代のID基盤構成の基礎
by
Naohiro Fujie
PDF
なぜOpenID Connectが必要となったのか、その歴史的背景
by
Tatsuo Kudo
PDF
FIDO認証によるパスワードレスログイン実装入門
by
Yahoo!デベロッパーネットワーク
PDF
マルチテナント化で知っておきたいデータベースのこと
by
Amazon Web Services Japan
PDF
SAML / OpenID Connect / OAuth / SCIM 技術解説 - ID&IT 2014 #idit2014
by
Nov Matake
PPTX
サポート エンジニアが Azure Networking をじっくりたっぷり語りつくす会
by
ShuheiUda
PDF
Amazon Cognito使って認証したい?それならSpring Security使いましょう!
by
Ryosuke Uchitate
PDF
Azure Monitor Logで実現するモダンな管理手法
by
Takeshi Fukuhara
PDF
分散トレーシング技術について(Open tracingやjaeger)
by
NTT Communications Technology Development
PPTX
Hybrid Azure AD Join 動作の仕組みを徹底解説
by
Yusuke Kodama
PPTX
KeycloakでAPI認可に入門する
by
Hitachi, Ltd. OSS Solution Center.
PDF
俺が考えた最強のID連携デザインパターン
by
Masaru Kurahayashi
PDF
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
by
Amazon Web Services Japan
PDF
イエラエセキュリティMeet up 20210820
by
GMOサイバーセキュリティ byイエラエ株式会社
PPTX
Azure AD による Web API の 保護
by
junichi anno
PDF
IT エンジニアのための 流し読み Microsoft 365 - 入門!Microsoft Defender for Endpoint クロスプラットフ...
by
TAKUYA OHTA
PDF
Swaggerでのapi開発よもやま話
by
KEISUKE KONISHI
PDF
SSIとDIDで何を解決したいのか?(β版)
by
Naohiro Fujie
PDF
Cognito、Azure ADと仲良くしてみた
by
Takafumi Kondo
統合ID管理入門
by
山田(YAMADA) 達司(Tatsushi)
ハイブリッド時代のID基盤構成の基礎
by
Naohiro Fujie
なぜOpenID Connectが必要となったのか、その歴史的背景
by
Tatsuo Kudo
FIDO認証によるパスワードレスログイン実装入門
by
Yahoo!デベロッパーネットワーク
マルチテナント化で知っておきたいデータベースのこと
by
Amazon Web Services Japan
SAML / OpenID Connect / OAuth / SCIM 技術解説 - ID&IT 2014 #idit2014
by
Nov Matake
サポート エンジニアが Azure Networking をじっくりたっぷり語りつくす会
by
ShuheiUda
Amazon Cognito使って認証したい?それならSpring Security使いましょう!
by
Ryosuke Uchitate
Azure Monitor Logで実現するモダンな管理手法
by
Takeshi Fukuhara
分散トレーシング技術について(Open tracingやjaeger)
by
NTT Communications Technology Development
Hybrid Azure AD Join 動作の仕組みを徹底解説
by
Yusuke Kodama
KeycloakでAPI認可に入門する
by
Hitachi, Ltd. OSS Solution Center.
俺が考えた最強のID連携デザインパターン
by
Masaru Kurahayashi
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
by
Amazon Web Services Japan
イエラエセキュリティMeet up 20210820
by
GMOサイバーセキュリティ byイエラエ株式会社
Azure AD による Web API の 保護
by
junichi anno
IT エンジニアのための 流し読み Microsoft 365 - 入門!Microsoft Defender for Endpoint クロスプラットフ...
by
TAKUYA OHTA
Swaggerでのapi開発よもやま話
by
KEISUKE KONISHI
SSIとDIDで何を解決したいのか?(β版)
by
Naohiro Fujie
Cognito、Azure ADと仲良くしてみた
by
Takafumi Kondo
Similar to プロトコルから見るID連携
PDF
Office365のIdentity管理
by
Naohiro Fujie
PDF
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
by
junichi anno
PDF
Share point における id管理と認証・認可
by
Naohiro Fujie
PDF
[SC04] あなたのサービスを "ID" で守る! Azure Active Directory の条件付きアクセスの基礎と実装
by
de:code 2017
PDF
Active Directory 最新情報 2012.8.31 暫定版
by
junichi anno
PDF
Azure ADとWindows 10によるドメイン環境の拡張
by
Naohiro Fujie
PPTX
AD FS 2 と ACS v2 による Windows azure_step_bystep_v2.2_update1_noanime.pptx.アニメ削除済
by
junichi anno
PDF
Sec020 アイデンティティ
by
Tech Summit 2016
PDF
20171011_ID-based Securityにおける中核サービスとしてのAzure Active Directory
by
ID-Based Security イニシアティブ
PDF
Sec019 30分で理解 !_初心者向
by
Tech Summit 2016
PDF
働き方改革を後押しする Office 365 + リモートワークソリューション ~Azure Active Directoryとの組み合わせで実現する~リ...
by
NHN テコラス株式会社
PDF
Openid technight 20110909_fujie
by
Naohiro Fujie
PDF
[SC07] Azure AD と Ruby で学ぶ OpenID Connect!
by
de:code 2017
PPTX
Azure AD の SaaS アプリケーション認証への活用
by
Yusuke Kodama
PDF
クラウドにおける Windows Azure Active Directory の役割
by
junichi anno
PDF
AAD authentication for azure app v0.1.20.0317
by
Ayumu Inaba
PPTX
Azure Active Directory 利用開始への第一歩
by
Yusuke Kodama
PDF
Sec004 cloud first、_mobile_first_におけるid
by
Tech Summit 2016
PDF
CLT-009_Windows 10 アプリとシングルサインオン ~Microsoft Passport の意義とその実装方法~
by
decode2016
PDF
[Japan Tech summit 2017] SEC 004
by
Microsoft Tech Summit 2017
Office365のIdentity管理
by
Naohiro Fujie
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
by
junichi anno
Share point における id管理と認証・認可
by
Naohiro Fujie
[SC04] あなたのサービスを "ID" で守る! Azure Active Directory の条件付きアクセスの基礎と実装
by
de:code 2017
Active Directory 最新情報 2012.8.31 暫定版
by
junichi anno
Azure ADとWindows 10によるドメイン環境の拡張
by
Naohiro Fujie
AD FS 2 と ACS v2 による Windows azure_step_bystep_v2.2_update1_noanime.pptx.アニメ削除済
by
junichi anno
Sec020 アイデンティティ
by
Tech Summit 2016
20171011_ID-based Securityにおける中核サービスとしてのAzure Active Directory
by
ID-Based Security イニシアティブ
Sec019 30分で理解 !_初心者向
by
Tech Summit 2016
働き方改革を後押しする Office 365 + リモートワークソリューション ~Azure Active Directoryとの組み合わせで実現する~リ...
by
NHN テコラス株式会社
Openid technight 20110909_fujie
by
Naohiro Fujie
[SC07] Azure AD と Ruby で学ぶ OpenID Connect!
by
de:code 2017
Azure AD の SaaS アプリケーション認証への活用
by
Yusuke Kodama
クラウドにおける Windows Azure Active Directory の役割
by
junichi anno
AAD authentication for azure app v0.1.20.0317
by
Ayumu Inaba
Azure Active Directory 利用開始への第一歩
by
Yusuke Kodama
Sec004 cloud first、_mobile_first_におけるid
by
Tech Summit 2016
CLT-009_Windows 10 アプリとシングルサインオン ~Microsoft Passport の意義とその実装方法~
by
decode2016
[Japan Tech summit 2017] SEC 004
by
Microsoft Tech Summit 2017
More from Naohiro Fujie
PDF
分散型IDと検証可能なアイデンティティ技術概要
by
Naohiro Fujie
PDF
LINE Login総復習
by
Naohiro Fujie
PDF
Azure AD B2CにIdPを色々と繋いでみる
by
Naohiro Fujie
PDF
LINEログインの最新アップデートとアプリ連携ウォークスルー
by
Naohiro Fujie
PDF
ざっくり解説 LINE ログイン
by
Naohiro Fujie
PDF
Azure AD x LINE x Auth0
by
Naohiro Fujie
PDF
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向
by
Naohiro Fujie
PDF
LIFFとの連携でさらに強力に。こんなに使えるLINEログイン
by
Naohiro Fujie
PDF
自己主権型IDと分散型ID
by
Naohiro Fujie
PDF
Azure ADの外部コラボレーションとBYOID
by
Naohiro Fujie
PDF
祝!公式サポート Auth0 + LINE Login
by
Naohiro Fujie
PDF
IDaaSにSign in with Appleをつないでみた
by
Naohiro Fujie
PDF
次世代KYCと自己主権型アイデンティティの動向
by
Naohiro Fujie
PDF
これからの KYC と Identity on Blockchain の動向
by
Naohiro Fujie
PDF
教育機関におけるBYOIDとKYC
by
Naohiro Fujie
PDF
組織におけるアイデンティティ管理の基本的な考え方
by
Naohiro Fujie
PDF
コンシューマIDのエンタープライズ領域での活用
by
Naohiro Fujie
PDF
大学等におけるAzure AD B2Cを使用したSNS認証の活用
by
Naohiro Fujie
PDF
Azure AD B2C + LINE 学校や企業における次世代 ID/ メッセージ基盤
by
Naohiro Fujie
PDF
Azure ADとLINE連携により実現する学校や企業における次世代ID/メッセージ基盤
by
Naohiro Fujie
分散型IDと検証可能なアイデンティティ技術概要
by
Naohiro Fujie
LINE Login総復習
by
Naohiro Fujie
Azure AD B2CにIdPを色々と繋いでみる
by
Naohiro Fujie
LINEログインの最新アップデートとアプリ連携ウォークスルー
by
Naohiro Fujie
ざっくり解説 LINE ログイン
by
Naohiro Fujie
Azure AD x LINE x Auth0
by
Naohiro Fujie
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向
by
Naohiro Fujie
LIFFとの連携でさらに強力に。こんなに使えるLINEログイン
by
Naohiro Fujie
自己主権型IDと分散型ID
by
Naohiro Fujie
Azure ADの外部コラボレーションとBYOID
by
Naohiro Fujie
祝!公式サポート Auth0 + LINE Login
by
Naohiro Fujie
IDaaSにSign in with Appleをつないでみた
by
Naohiro Fujie
次世代KYCと自己主権型アイデンティティの動向
by
Naohiro Fujie
これからの KYC と Identity on Blockchain の動向
by
Naohiro Fujie
教育機関におけるBYOIDとKYC
by
Naohiro Fujie
組織におけるアイデンティティ管理の基本的な考え方
by
Naohiro Fujie
コンシューマIDのエンタープライズ領域での活用
by
Naohiro Fujie
大学等におけるAzure AD B2Cを使用したSNS認証の活用
by
Naohiro Fujie
Azure AD B2C + LINE 学校や企業における次世代 ID/ メッセージ基盤
by
Naohiro Fujie
Azure ADとLINE連携により実現する学校や企業における次世代ID/メッセージ基盤
by
Naohiro Fujie
プロトコルから見るID連携
1.
プロトコルから見るID連携 2014/11/29 CRH/H
in Tokyo #6 MVP for Forefront Identity Manager Naohiro Fujie/ @phr_eidentity/ http://idmlab.eidentity.jp 1
2.
自己紹介 2 Blog
IdM実験室(Identityに関することを徒然と):http://idmlab.eidentity.p Social Facebook Page : eIdentity(Identityに関するFeed):https://www.facebook.com/eidentity 記事 Windowsで構築する、クラウド・サービスと社内システムのSSO環境 (http://www.atmarkit.co.jp/fwin2k/operation/adsf2sso01/adsf2sso01_01.html) クラウド・サービス連携の基本と最新トレンド (http://www.atmarkit.co.jp/fwin2k/operation/idftrend01/idftrend01_01.html) 開発者にとってのWindows Azure Active Directoryの役割と今後の展開 (http://www.buildinsider.net/enterprise/interviewvittorio/01) その他 日本ネットワークセキュリティ協会(JNSA)アイデンティティ管理WG(書籍:「クラウド環境におけるアイデ ンティティ管理ガイドライン」etc) OpenIDFoundation Japan 教育・翻訳WG(OAuth/OpenIDConnect仕様翻訳)、エンタープライズ・アイ デンティティWG
3.
Agenda はじめに ID連携プロトコルとは
AzureAD概要 デモ ID連携プロトコル解説 ws-federation SAML2.0 OpenIDConnect まとめ 3 【ご注意】 本セッションで紹介するID連携プロトコルのフローは あくまでデモシナリオを実行する際のフローなので、 各プロトコルのすべての動きやパラメータを解説す るものではありません。
4.
はじめに ~ID連携プロトコルとは 4
5.
事前信頼 指定 ID連携(フェデレーション)概要
5 認証サーバ Identity Provider/ IdP アプリケーション (Relying Party / RP) ①アクセス ②認証状態チェック ③リダイレクト ④認証指示 ⑤認証 ⑥トークン発行 ユーザ 信頼できるサーバから 発行されたトークンの 中のID情報を自前のID 情報と紐付ける ⇒SSOの実現
6.
ID連携(フェデレーション)をする理由 認証システムの分散を防ぐ クレデンシャル(パスワード等)を保持する箇所を極小化する
強度の高い認証システムで一括してアイデンティティ情報を保持・保 護する 利便性を高める Cookieドメインを跨いだシングルサインオンの実現 6 クラウド活用のシナリオではドメインやネッ トワークがセキュリティ境界ではなくなる ⇒Identity is the next perimeter
7.
Identity is the
next perimeter 7 FW 企業内ネットワーク(ドメイン) 企業内ネットワーク(ドメイン) SaaS アプリ FW 悪い人 外出中 中の人 協業先 安全 安全 安全
8.
単純なシングルサインオン 8 認証サーバ
アプリケーション アプリケーション パスワードの分散 システム毎に認証 アプリケーション パスワードの一元管理 認証Cookieの共有に よるSSO 分散管理状態(SSO不可) 認証サーバの外だし、パスワードの一元管理、 ドメイン内で認証Cookieを共有してSSO ドメイン境界
9.
ドメイン境界 ID連携(フェデレーション) 9
認証サーバ アプリケーション パスワードの一元管理 認証Cookieの共有に よるSSO 認証サーバの外だし、パスワードの一元管理、 ドメイン内で認証Cookieを共有してSSO 認証サーバ アプリケーション パスワードの一元管理 認証サーバの外だし、パスワードの一元管理、 ドメインを跨いだSSO アプリケーション ID連携 サーバ ID連携サーバを経由す ることによるドメイン 間で認証Cookie変換 ドメイン境界 このあたりのやり取り方法を規定したものが ws-federation/SAML/OpenIDConnect
10.
ポイント① ID連携をすると、、、 パスワードの分散を防ぐことが出来る
シングルサインオンを実現する ID連携プロトコルとは、、、 ID情報(認証結果、ユーザ属性など)を安全に伝えるための仕組み 認証そのものを行うためのプロトコルではない ws-federation / SAML / OpenIDConnectなど 以下の取決めをしたもの ID情報の表現方法(トークン形式):XMLやJSON やり取りの方法:HTTP/SOAPの使い方(GET/POSTなど)、パラメータ 10 守るべき個所を少なく出来る 利便性が向上する
11.
ポイント② 11 プロトコル
主な利用シーン 特徴 ws-federation 今となってはほぼMicrosoftワールド のみ? Office365⇒AzureAD、AD FS トークン形式はSAML(XML)を使う(場合が 多い) HTTP/SOAPベース ws-*に依存 SAML2.0 エンタープライズの主流 GoogleApps、salesforce.com、 Cybozu、BOX等、多数がサポート SAMLトークン(XML形式) HTTP/SOAPベース OpenIDConnect コンシューマを中心に拡大中 AzureADやMixi、Yahoo! Japanが サポート OAuth2.0ベース トークン形式はJWT(JSON Web Token) HTTPベース 軽量、実装が簡単
12.
Azure AD概要 ~最近いろいろとプロトコルを
サポートしているので実装環境 としてはとっても便利 12
13.
AzureActive Directory構成概要 13
14.
Azure ADの機能 Identity
Provider ディレクトリサービスとして: Users/Groups (sync with WSAD) プロトコル・サポート: SAML, ws-federation, OpenIDConnect 外部IdPのサポート: SAML, ws-federation その他機能: Multi-Factor AuthN, Self-Service Password Reset Authorization Server Register WebApps/API as protected resource 14
15.
Identity Provider Application
SAML-SP Application ws-fed RP Application OpenIDConnect RP Microsoft Account Azure AD Account https://login.windows.com 3rdParty SAML IdP SAML EndPoint ws-fed EndPoint Ext IdPs RPs Home Realm Discover OAuth2.0 AuthZ/Token EndPoint 15
16.
Identity Provider Application
SAML-SP Application ws-fed RP Application OpenIDConnect RP Microsoft Account Azure AD Account https://login.windows.com 3rdParty SAML IdP SAML EndPoint ws-fed EndPoint Ext IdPs RPs Home Realm Discover OAuth2.0 AuthZ/Token EndPoint ws- fed ws- fed ws- fed SAML ws res SAML SP 16
17.
Demo 17 Azure
ADを中心に各種プロトコルを使ったID 連携を実装したので、まずは動作を確認してみ ましょう。
18.
18 デモ環境(AzureVM上に構築) AD
DS AD FS AAD Sync改 OpenAM OpenDJ Azure AD Google Apps Office365 Office365 Google Apps UserDB UserDB UserDB UserDB Custom APL AzureAD/ADFSでSSO ws-fed SAML2.0 OpenID Connect SAML2.0 LDAP MA Google Apps MA AzureADMA ADDS MA ws-fed Sync Sync AAD Prov OpenAMでSSO ws-fed 【ご注意】 あくまでデモ用 の環境であり、 一部非サポート の構成を含んで います
19.
デモシナリオ ユーザ①(明智光秀/mitsuhidea@xxx.example.com) AD
DSで認証、AD FS経由でAzureADとID連携(ws-federation) Office365の利用:ws-federation GoogleAppsの利用:SAML2.0⇒ws-federation変換 ユーザ②(上杉謙信/kenshinu@yyy.example.com) OpenAMで認証(SAML2.0)でAzureADとID連携 Office365の利用:ws-federation⇒SAML2.0変換 GoogleAppの利用:SAML2.0 カスタムアプリの利用:OpenIDConnect⇒SAML2.0変換 19 ※AzureADを経由する際、一旦ws-federationに変換される (login.windows.net⇒login.microsoftonline.com)
20.
ID連携プロトコル解説 ~ws-federation 20
Office365 / Azure AD / AD FSの間でのID連携 はws-federationを使って行われます。 http://specs.xmlsoap.org/ws/2006/12/federation/ws-federation.pdf
21.
①AzureADアプリパネルへアクセス ⇒サインイン画面へリダイレクト 21
シーケンス アクション 通信内容 リクエスト アプリケーションポータル へアクセス GET https://account.activedirectory.windowsazure.com/applications/default.aspx HTTP/1.1 レスポンス AzureADのログイン画面へ リダイレクト HTTP/?.?302 Found Location: https://login.microsoftonline.com/login.srf?wa=wsignin1.0& rpsnv=4&ct=1417169558&rver=6.1.6206.0&wp=MCMBI&wreply=https:%2F%2Faccount.activedirectory.windowsazure.com%2Flanding.aspx%3Ftarget%3D%252fapplications%252fdefault.aspx&lc=1041&id=500633
22.
②AzureADのログイン画面へアクセス (サインイン要求) 22
シーケンス アクション 通信内容 リクエスト AzureADのログイン画面 GEThttps://login.microsoftonline.com/login.srf?wa=wsignin1.0& rpsnv=4&ct=1417169558&rver=6.1.6206.0&wp=MCMBI&wreply=https:%2F%2Faccount.activedirectory.windowsazure.com%2Flanding.aspx%3Ftarget%3D%252fapplications%252fdefault.aspx&lc=1041&id=500633 HTTP/1.1 パラメータ名 必須 意味 値 wa ○ 要求するアクション⇒サインイン wsignin1.0 wreply サインインした後、リダイレクト する先のURL⇒アプリパネルのURL https://account.activedirectory.windowsazure.com/landing.aspx?target=/applications/default.aspx 主要パラメータ⇒サインインして、アプリパネルへ戻す(リダイレクト)
23.
③ホームレルムディスカバリによりAD FS サーバへ(AJAX)
23 シーケンス アクション 通信内容 リクエスト 入力したユーザのドメイン 名よりレルムを取得 GET https://login.microsoftonline.com/GetUserRealm.srf?login= mitsuhidea%40xxx.example.com&handler=1&extended=1 HTTP/1.1 レスポンス BODYにあらかじめ登録さ れたIdPのURLが返される { "State":3, "UserState":2, "Login": "mitsuhidea@xxx.example.com", "FederationGlobalVersion": -1, "DomainName": “XXX.EXAMPLE.COM", "AuthURL": "https://adfs- aadsync.eidentity.local/adfs/ls/?cbcxt=&popupui=&vv=&username=&mkt=&lc=&wfresh=", "SiteGroup": "business", "NameSpaceType": "Federated", "FederationBrandName": "eIdentity", "AuthNForwardType": 0}
24.
④AD FSのログイン画面へアクセス (サインイン要求)
24 シーケンス アクション 通信内容 リクエスト AD FSのログイン画面 GET https://adfs- aadsync.eidentity.local/adfs/ls/?cbcxt=&popupui=&vv=& username=mitsuhidea%40xxx.example.com&mkt=&lc=1041&wfresh=&wa=wsignin1.0&wtrealm=urn:federation:MicrosoftOnline&wctx=wa%3Dwsignin1.0%26rpsnv%3D4%26ct%3D1417169558%26rver%3D6.1.6206.0%26wp%3DMCMBI%26wreply%3Dhttps:%252F%252Faccount.activedirectory.windowsazure.com%252Flanding.aspx%253Ftarget%253D%25252fapplications%25252fdefault.aspx%26lc%3D1041%26id%3D500633%26bk%3D1417169560%26LoginOptions%3D3HTTP/1.1
25.
④AD FSのログイン画面へアクセス (セキュリティトークン発行要求)
25 パラメータ名 必須 意味 値 wa ○ 要求するアクション⇒サインイン wsignin1.0 wtrealm ○ セキュリティトークンを発行する 対象のレルム(領域)⇒AzureAD(マイクロソフト・オンライン) wtrealm=urn:federation:MicrosoftOnline wctx セキュリティトークンと共に要求 基に返されるコンテキストの値⇒ オリジナルのサインイン要求パラ メータ wa%3Dwsignin1.0%26rpsnv%3D4%26ct%3D1417169558%26rver%3D6.1.6206.0%26wp%3DMCMBI%26wreply%3Dhttps:%252F%252Faccount.activedirectory.windowsazure.com%252Flanding.aspx%253Ftarget%253D%25252fapplications%25252fdefault.aspx%26lc%3D1041%26id%3D500633%26bk%3D1417169560%26LoginOptions%3D3 主要パラメータ⇒セキュリティトークンを発行して、AzureADへ戻す(リダイレクト)
26.
⑤AD FSへログイン(ID/PWDで認証) 26
シーケンス アクション 通信内容 リクエスト パスワードの入力 POST https://adfs- aadsync.eidentity.local/adfs/ls/?cbcxt=&popupui=&vv=& username=mitsuhidea%40xxx.example.com&mkt=&lc=1041&wfresh=&wa=wsignin1.0&wtrealm=urn:federation:MicrosoftOnline&wctx=wa%3Dwsignin1.0%26rpsnv%3D4%26ct%3D1417169558%26rver%3D6.1.6206.0%26wp%3DMCMBI%26wreply%3Dhttps:%252F%252Faccount.activedirectory.windowsazure.com%252Flanding.aspx%253Ftarget%253D%25252fapplications%25252fdefault.aspx%26lc%3D1041%26id%3D500633%26bk%3D1417169560%26LoginOptions%3D3 HTTP/1.1 レスポンス セキュリティトークンを自 動POSTするHTML 次ページ
27.
27 <html> <head>
<title>Working...</title> </head> <body> <form method="POST" name="hiddenform" action="https://login.microsoftonline.com:443/login.srf"> <input type="hidden" name="wa" value="wsignin1.0" /> <input type=“hidden” name=“wresult” value=“<SAMLトークン(次ページ)>" /> <input type="hidden" name="wctx“ value="wa=wsignin1.0&rpsnv=4&ct=1417169558&rver=6.1.6206.0&wp=MCMBI& amp;wreply=https:%2F%2Faccount.activedirectory.windowsazure.com%2Flanding.aspx%3Ftarget%3D%252fapplications%252fdefault.aspx&lc=1041&id=500633&bk=1417169560&LoginOptions=3" /> <noscript> <p>Script is disabled. Click Submit to continue.</p> <input type="submit" value="Submit" /> </noscript> </form> <script language="javascript"> window.setTimeout('document.forms[0].submit()', 0); </script> </body> </html> トークンを自動POSTするHTML JavaScriptで自動POST
28.
28 <t:RequestSecurityTokenResponsexmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust"> <t:Lifetime>
<wsu:Createdxmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 2014-11-28T10:13:27.035Z </wsu:Created> <wsu:Expiresxmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> 2014-11-28T11:13:27.035Z </wsu:Expires> </t:Lifetime> <wsp:AppliesToxmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <wsa:EndpointReferencexmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address>urn:federation:MicrosoftOnline</wsa:Address> </wsa:EndpointReference> </wsp:AppliesTo> <t:RequestedSecurityToken> <saml:AssertionMajorVersion="1" MinorVersion="1" AssertionID="_ba8f8aba-c402-4866-b01e-0a180754e0ef" Issuer="http://adfs-aadsync.eidentity.local/adfs/services/trust"IssueInstant="2014-11-28T10:13:27.035Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"> <saml:ConditionsNotBefore="2014-11-28T10:13:27.035Z" NotOnOrAfter="2014-11-28T11:13:27.035Z"> <saml:AudienceRestrictionCondition> <saml:Audience>urn:federation:MicrosoftOnline</saml:Audience> </saml:AudienceRestrictionCondition> </saml:Conditions> セキュリティトークン (メタ情報) トークンの適用先 【トークンの本体】 Issuer:発行元 Audience:発行先
29.
29 <saml:AttributeStatement> <saml:Subject>
<saml:NameIdentifierFormat="urn:oasis:names:tc:SAML:1.1:nameid- format:unspecified">mitsuhidea</saml:NameIdentifier> <saml:SubjectConfirmation> <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod> </saml:SubjectConfirmation> </saml:Subject> <saml:AttributeAttributeName="UPN" AttributeNamespace="http://schemas.xmlsoap.org/claims"> <saml:AttributeValue>mitsuhidea@xxx.example.com</saml:AttributeValue> </saml:Attribute> <saml:AttributeAttributeName="ImmutableID" AttributeNamespace="http://schemas.microsoft.com/LiveID/Federation/2008/05"> <saml:AttributeValue>mitsuhidea</saml:AttributeValue> </saml:Attribute> </saml:AttributeStatement> セキュリティトークン (属性ステートメント) 識別子 (NameIdentifier) その他属性 UPN、ImmutableID
30.
30 <saml:AuthenticationStatementAuthenticationMethod="urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport" AuthenticationInstant="2014-11-28T10:13:26.877Z">
<saml:Subject> <saml:NameIdentifierFormat="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"> mitsuhidea </saml:NameIdentifier> <saml:SubjectConfirmation> <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod> </saml:SubjectConfirmation> </saml:Subject> </saml:AuthenticationStatement> セキュリティトークン (認証ステートメント) 認証方式 (パスワード)
31.
31 <ds:Signaturexmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo>
<ds:CanonicalizationMethodAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> <ds:SignatureMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <ds:ReferenceURI="#_ba8f8aba-c402-4866-b01e-0a180754e0ef"> <ds:Transforms> <ds:TransformAlgorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /> <ds:TransformAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> </ds:Transforms> <ds:DigestMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> <ds:DigestValue>78mg4hvjLPXLB3M1A8z+7ondtFk=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>a6RWe0<署名情報>IbMOw==</ds:SignatureValue> <KeyInfoxmlns=“http://www.w3.org/2000/09/xmldsig#”> <X509Data> <X509Certificate>MIIC9DCC<証明書情報>t/A== </X509Certificate> </X509Data> </KeyInfo> </ds:Signature> セキュリティトークン (署名情報) トークン署名に 関する情報
32.
32 </saml:Assertion> </t:RequestedSecurityToken>
<t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType> <t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType> <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType> </t:RequestSecurityTokenResponse> セキュリティトークン (タグ閉じ)
33.
⑥AzureADへセキュリティトークンの POST 33
シーケンス アクション 通信内容 リクエスト セキュリティトークンの POST(⑤のHTML Formで 自動POST) POST https://login.microsoftonline.com/login.srf HTTP/1.1 レスポンス 認証Cookieのセットとア プリケーションへのトーク ン情報を自動POSTする HTML 次ページ
34.
34 <html> <head>
<noscript>サインインするにはJavaScript が必要です <meta http-equiv="Refresh" content="0; URL=https://login.microsoftonline.com/jsDisabled.srf?mkt=JA- JP&lc=1041"/> </noscript> <title>続行</title> <script type="text/javascript"> function OnBack(){}function DoSubmit(){varsubt=false;if(!subt){subt=true;document.fmHF.submit();}} </script> </head> <body onload="javascript:DoSubmit();"> <form name="fmHF" id="fmHF" action="https://account.activedirectory.windowsazure.com/landing.aspx?target=%2fapplications%2fdefault.aspx&wa=wsignin1.0" method="post" target="_top"> <input type=“hidden” name=“t” id=“t” value=“EgAgA<トークン情報>gAAA=="> </form> </body> </html> トークンを自動POSTするHTML JavaScriptで自動POST
35.
⑦アプリケーションへアクセス 35 シーケンス
アクション 通信内容 リクエスト トークンのPOST(⑥の HTML Formで自動POST) POST https://account.activedirectory.windowsazure.com/landing.aspx?target=%2fapplications%2fdefault.aspx&wa=wsignin1.0 HTTP/1.1 レスポンス アプリケーションドメイン での認証Cookieのセット とメインページの表示(リ ダイレクト) HTTP/?.? 302 Found Location: /applications/default.aspx
36.
ID連携プロトコル解説 ~SAML2.0 36
GoogleApps/ Azure AD / OpenAMの間での ID連携はSAML2.0を使って行われます。 http://saml.xml.org/saml-specifications
37.
①GoogleAppsへアクセス ⇒ログインサービスへリダイレクト 37
シーケンス アクション 通信内容 リクエスト Gmailへアクセス GET https://mail.google.com/a/yyy.example.com HTTP/1.1 レスポンス Googleのログインサービ スへリダイレクト HTTP/?.? 302 Moved Temporarily Location: https://www.google.com/a/yyy.example.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https:// mail.google.com/a/yyy.example.com/&ss=1<mpl=default<mplcache=2&emr=1
38.
②Googleログインサービスへアクセス ⇒OpenAMへリダイレクト 38
シーケンス アクション 通信内容 リクエスト Googleのログインサービ スへアクセス GET https://www.google.com/a/yyy.example.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https:// mail.google.com/a/yyy.example.com/&ss=1<mpl=default<mplcache=2&emr=1 HTTP/1.1 レスポンス OpenAMのログイン画面 へリダイレクト HTTP/?.? 302 Moved Temporarily Location: http://openam.example.com:8080/OpenAM- 11.0.0/SSORedirect/metaAlias/idp?SAMLRequest=fVJ <SAML認証要求> fQI%3D&RelayState=https%3A%2F%2Fwww.google.com%2Fa%2Fyyy.example.com%2FServiceLogin%3Fservice%3Dmail%26passive%3Dtrue%26r<省略>
39.
②Googleログインサービスへアクセス ⇒OpenAMへリダイレクト 39
パラメータ名 必須 意味 値 SAMLRequest ○ SAML認証要求 XMLをBase64エンコードしたもの (次ページ) RelayState サインインした後、リダイレクト する先のURL⇒GoogleAppsのロ グインサービスURL https://www.google.com/a/yyy.example.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google. com/a/yyy.example.com/&ss=1<mpl=default<mplcache=2&emr=1 主要パラメータ⇒サインインして、GoogleAppsへ戻す(リダイレクト)
40.
40 <samlp:AuthnRequestxmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="lmmhgnhkngjibpjfnefeiknjijjjannpjigoahkp"
Version="2.0" IssueInstant="2014-11-28T23:45:24Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" ProviderName="google.com" IsPassive="false" AssertionConsumerServiceURL="https://www.google.com/a/yyy.example.com/acs" > <saml:Issuerxmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> google.com/a/yyy.example.com </saml:Issuer> <samlp:NameIDPolicyAllowCreate="true" Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" /> </samlp:AuthnRequest> SAML認証要求 SAMLトークンの受け渡 しの方法(HTTP-POST) SAMLトークンを渡す先 のURL 認証要求の発行元 SAMLトークンの識別子 のフォーマット 対応する認証リクエスト のID
41.
③OpenAMへログイン (ID/PWDで認証) 41
シーケンス アクション 通信内容 リクエスト パスワードの入力 POST http://openam.example.com:8080/OpenAM- 11.0.0/UI/Login HTTP/1.1 レスポンス セキュリティトークンを自 動POSTするHTML 次ページ
42.
42 <html> <head>
<title>Access rights validated</title> </head> <body onload="document.forms[0].submit()"> <form method="post" action="https://www.google.com/a/yyy.example.com/acs"> <input type=“hidden” name=“SAMLResponse” value=“PHNh<SAMLトークン(base64エンコード/次ページ)> b25zZT4=" /> <input type="hidden" name="RelayState" value="https://www.google.com/a/yyy.example.com/ServiceLogin?service&# x3d;mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F&ss=1&ltmpl=default&ltmplcache=2&emr=1" /> <noscript> <center> <input type="submit" value="Submit SAMLResponsedata " /> </center> </noscript> </form> </body> </html> トークンを自動POSTするHTML JavaScriptで自動POST
43.
43 <samlp:Responsexmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="s2d0b3006aa34831878ee2772c0a9b38024e7a141e"
InResponseTo="lmmhgnhkngjibpjfnefeiknjijjjannpjigoahkp" Version="2.0" IssueInstant="2014-11-28T23:45:31Z" Destination="https://www.google.com/a/yyy.example.com/acs" > <saml:Issuerxmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> http://openam.example.com:8080/OpenAM-11.0.0 </saml:Issuer> <samlp:Statusxmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"> <samlp:StatusCodexmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" Value="urn:oasis:names:tc:SAML:2.0:status:Success" /> </samlp:Status> <saml:Assertionxmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="s251619d0b154c78e42c51b69ffd9a31af5a205691" IssueInstant="2014-11-28T23:45:31Z" Version="2.0" > <saml:Issuer>http://openam.example.com:8080/OpenAM-11.0.0</saml:Issuer> SAMLトークン (メタ情報) SAML認証要求のID SAMLトークンの適用先 SAMLトークンの発行元 【トークンの本体】 Issuer:発行元
44.
44 <ds:Signaturexmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo>
<ds:CanonicalizationMethodAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> <ds:SignatureMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <ds:ReferenceURI="#s251619d0b154c78e42c51b69ffd9a31af5a205691"> <ds:Transforms> <ds:TransformAlgorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /> <ds:TransformAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> </ds:Transforms> <ds:DigestMethodAlgorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> <ds:DigestValue>Mj7RG98iqvCjsWfU2yIC/aJMLAQ=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>fyjCy<署名>vYHe/Xmk2x+EQ55FdF6+M8ftfTGEBjKztzU+ </ds:SignatureValue> <ds:KeyInfo> <ds:X509Data> <ds:X509Certificate>MIICQD<証明書>gTCkNh</ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </ds:Signature> SAMLトークン (署名情報) トークン署名に 関する情報
45.
45 <saml:Subject> <saml:NameIDFormat="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
NameQualifier="http://openam.example.com:8080/OpenAM-11.0.0" >kenshinu@yyy.example.com</saml:NameID> <saml:SubjectConfirmationMethod="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <saml:SubjectConfirmationDataInResponseTo="lmmhgnhkngjibpjfnefeiknjijjjannpjigoahkp" NotOnOrAfter="2014-11-28T23:55:31Z" Recipient="https://www.google.com/a/yyy.example.com/acs" /> </saml:SubjectConfirmation> </saml:Subject> <saml:ConditionsNotBefore="2014-11-28T23:35:31Z" NotOnOrAfter="2014-11-28T23:55:31Z" > <saml:AudienceRestriction> <saml:Audience>google.com/a/yyy.example.com</saml:Audience> </saml:AudienceRestriction> </saml:Conditions> SAMLトークン (ID情報) 識別子 (NameIdentifier) トークンの発行先
46.
46 <saml:AuthnStatementAuthnInstant="2014-11-28T23:45:31Z" SessionIndex="s28312ea1a6d023c50e2898d231ad043dec4ac8e01"
> <saml:AuthnContext> <saml:AuthnContextClassRef> urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport </saml:AuthnContextClassRef> </saml:AuthnContext> </saml:AuthnStatement> </saml:Assertion> </samlp:Response> SAMLトークン (認証情報) 認証方式 (パスワード)
47.
④GoogleAppsのログインサービス へセキュリティトークンのPOST 47
シーケンス アクション 通信内容 リクエスト セキュリティトークンの POST(③のHTML Formで 自動POST) POST https://www.google.com/a/yyy.example.com/acs HTTP/1.1 レスポンス Googleアカウントの認証 セッション生成ページへの リダイレクト用HTML(自 動GET) 次ページ
48.
48 <html lang="ja">
<head> <meta charset="utf-8"> <meta name="robots" content="noindex"> <title>リダイレクト中...</title> <meta http-equiv=“refresh” content=“1;url=https://accounts.google.com/MergeSession?uberauth=Aph<認証情報> o&service=mail&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F" /> </head> <body > <noscript> <a href=“https://accounts.google.com/MergeSession?uberauth=APh<認証情報> o&service=mail&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F">続行</a> </noscript> <script> varurl= ‘https:¥x2F¥x2Faccounts.google.com¥x2FMergeSession?uberauth=Aph<認証情報> o¥x26service=mail¥x26continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F'; varparts = (window.location+ '').split('#'); if (parts.length== 2 && parts[1].length > 0) {url+= '#' + parts[1];} window.setTimeout(function() { window.location= url;}, 0); </script> </body> </html> 認証セッションの作成 自動リダイレクト JavaScriptが使えない 環境向け 念のためJavaScriptでも 自動リダイレクト
49.
⑤認証セッションの生成 49 シーケンス
アクション 通信内容 リクエスト 認証セッション生成ページ へアクセス GET https://accounts.google.com/MergeSession?uberauth=APh<認証情報> o&service=mail&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F HTTP/1.1 レスポンス CookieチェックURLへリダ イレクト(サービス側処 理) HTTP/?.? 302 Moved Temporarily Location: https://accounts.google.com/CheckCookie?chtml=LoginDoneHtml&service=mail&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F&gidl=CAA
50.
⑤認証セッションの生成 50 シーケンス
アクション 通信内容 リクエスト CookieチェックURLへアク セス GET https://accounts.google.com/CheckCookie?chtml=LoginDoneHtml&service=mail&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F&gidl=CAA HTTP/1.1 レスポンス SIDセットURLへリダイレク ト(サービス側処理) HTTP/?.? 302 Moved Temporarily Location: https://accounts.google.co.jp/accounts/SetSID?ssdc=1&sidt=ALW<省略> 3D&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F%3Fauth%3DDQ<省略>Nw
51.
⑥アプリケーションへアクセス 51 シーケンス
アクション 通信内容 リクエスト SIDセットURLへアクセス GET https://accounts.google.co.jp/accounts/SetSID?ssdc=1&sidt=ALW<省略> 3D&continue=https%3A%2F%2Fmail.google.com%2Fa%2Fyyy.example.com%2F%3Fauth%3DDQ<省略>NwHTTP/1.1 レスポンス サービス(Gmail)へリダ イレクト HTTP/?.? 302 Moved Temporarily Location: https://mail.google.com/a/yyy.example.com/?auth=DQ< 省略>Nw
52.
ID連携プロトコル解説 ~OpenIDConnect 52
OWIN Security Middlewareを使ってASP.NET アプリケーションをAzure ADとID連携します。 http://openid.net/connect/ 日本語訳)http://www.openid.or.jp/document/
53.
①外部ログインサービスへアクセス ⇒AzureADへリダイレクト 53
シーケンス アクション 通信内容 リクエスト 外部ログインサービスへア クセス POST https://localhost:44308/Account/ExternalLogin HTTP/1.1 レスポンス AzureADの認可エンドポイ ントへリダイレクト HTTP/?.? 302 Found Location: https://login.windows.net/2c62f1a6-<テナントID>ebb1bfff/oauth2/authorize?client_id=bb793<クライアン トID> 86f994e&response_mode=form_post&response_type=code+id_token&scope=openid+profile&state=OpenIdConnect. AuthenticationProperties%3dN<省略>w&nonce=63552819<省略>z
54.
②AzureADの認可エンドポイントへ アクセス(code/id_tokenの要求) 54
シーケンス アクション 通信内容 リクエスト AzureADの認可エンドポイ ントへアクセス GET https://login.windows.net/2c62f1<テナントID> 1bfff/oauth2/authorize?client_id=bb79<クライアントID> f994e&response_mode=form_post&response_type=code+id_token&scope=openid+profile&state=OpenIdConnect.AuthenticationProperties%3dN<省略>w&nonce=63552819<省略>z HTTP/1.1
55.
②AzureADの認可エンドポイントへ アクセス(code/id_tokenの要求) 55
パラメータ名 必須 意味 値 client_id ○ あらかじめAzureAD上に登録し たアプリケーションの識別子 bb73xxxxxxxxxxxxxxxxxxxx5f994e (AzureAD上に登録した際に取得した値) response_mode code/id_tokenをアプリケー ションに渡す方法 form_post (SAML等と同じくJavaScriptによるFormから の自動POST) response_type ○ 何を要求するか code+id_token (認可コードとIDトークン) scope ○ 発行されるトークンの利用範囲 openid+profile (認証および基本属性へのアクセス) 主要パラメータ
56.
③AzureADでの認証(ws-federation)、 認可コード、IDトークンの発行 56
シーケンス アクション 通信内容 リクエスト AzureADでのサインイン要 求 GET https://login.microsoftonline.com/login.srf?wa=wsignin1.0& wtrealm=https%3a%2f%2flogin.windows.net&wreply=https% 3a%2f%2flogin.windows.net%2f2c62<テナントID> bb1bfff%2fwsfederation&wctx=3<省略> 2&wp=MBI_FED_SSL&id= HTTP/1.1 ~~省略(ws-federationの流れ)~~ リクエスト セキュリティトークンの POST POST https://login.windows.net/2c62f<テナントID>- 0196ebb1bfff/wsfederation HTTP/1.1 レスポンス 認可コード、IDトークンを 自動POSTするHTML 次ページ
57.
57 <html> <head>
<title>Working...</title> </head> <body> <form method="POST" name="hiddenform" action="https://localhost:44308/"> <input type="hidden" name="code" value="AAABA<認可コード>AA" /> <input type="hidden" name="id_token" value="eyJ0eXAiOiJ<IDトークン(Base64/次ページ)>gcjQ0g" /> <input type="hidden" name="state" value="OpenIdConnect.AuthenticationProperties=N9m<省略>iZw" /> <input type="hidden" name="session_state" value="de773cb4-3168-43b1-801d-9d6d32e1bbdf" /> <noscript> <p>Script is disabled. Click Submit to continue.</p> <input type="submit" value="Submit" /> </noscript> </form> <script language="javascript">window.setTimeout('document.forms[0].submit()', 0);</script> </body> </html> code/id_tokenを自動POST するHTML JavaScriptで自動POST
58.
58 { "upn":
"nfujie@zzz.onmicrosoft.com", "family_name": "¥u5bcc¥u58eb¥u69ae", "unique_name": "nfujie@zzz.onmicrosoft.com", "ver": "1.0", "aud": "bb79xxxxxxxxxxxxxxxxxxxxxxxab86f994e", "pwd_exp": "4082249", "iss": "https://sts.windows.net/2c62xxxxxxxxxxxxxxxxxxxxbb1bfff/", "oid": "457ca53f-90ba-4ab9-ba22-b8be363dc73c", "nonce": "635528194010753013.NTlhNTUwMjYtOWQzOS00YTk3LTg1Y2QtZTVlNTcyOTgxNTM4NzAyY2YwNjAtZmJhZi00ZGE1LTg0ZjMtMDAwYjRlOTQxNzcz", "pwd_url": "https://portal.microsoftonline.com/ChangePassword.aspx", "given_name": "¥u5c1a¥u5bdb", "exp": 1417226211, "tid": "2c62f1axxxxxxxxxxxxxxxxxxxxxxb1bfff", "iat": 1417222311, "amr": [ "pwd" ], "c_hash": "J_Te2h_v7ogm61niooZxlg", "nbf": 1417222311, "sub": "1Nnp-jLjTaoc_K2xVHMiIVNqkCY4JRIN6-alXVC1lkI" } IDトークン 認証方式 (パスワード) 識別子 トークンの発行先(アプ リのclient_id) トークンの発行元 (AzureADテナント) ID情報
59.
④アプリケーションへ認可コード/IDトー クンをPOST 59
シーケンス アクション 通信内容 リクエスト code/id_tokenのPOST(③のHTML Formで自動 POST) POST https://localhost:44308/ HTTP/1.1 レスポンス 外部ログインサービスへリ ダイレクト HTTP/?.? 302 Found Location: /Account/ExternalLoginCallback リクエスト 外部ログインサービスへア クセス (認証Cookieセット) GET https://localhost:44308/Account/ExternalLoginCallback HTTP/1.1 レスポンス アプリケーションの画面 アプリケーションのHTML
60.
まとめ 60
61.
まとめ① ID連携は大事(特にクラウド環境では) パスワード分散のリスクを低減、利便性の向上
中身を知っておけばトラブルシューティングしやすい AD FSに関するトラブルの90%は設定のTYPO(by Laura E. Hunter / @adfskitteh) ID連携もアカウント管理もHTTPベースの通信なので通信フローをトレースすればだいたい 原因はわかる 61
62.
まとめ② ID連携は基本的に以下のフローで実施される セキュリティトークン発行要求
パラメータ どこ(アプリケーションのURI)向けか? 発行後、どこに戻すか(リダイレクト先) 認証 セキュリティトークンの発行 どこで、誰宛に発行されたトークンなのか? 誰に関するセキュリティトークンなのか? どうやって認証されたのか? アプリケーションへのセキュリティトークンの引き渡し 62 ws-federation SAML2.0 OpenIDConnect wtrealm audience aud wreply RelayState redirectUri issuer issuer iss audience audience aud NameIdentifier NameIdentifier sub AuthenticationMethod AuthnContextClassRef amr
Download