SlideShare uma empresa Scribd logo
1 de 62
Baixar para ler offline
プロトコルから見るID連携 
2014/11/29 CRH/H in Tokyo #6 
MVP for Forefront Identity Manager 
Naohiro Fujie/ @phr_eidentity/ http://idmlab.eidentity.jp 
1
自己紹介 
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
Agenda 
はじめに 
ID連携プロトコルとは 
AzureAD概要 
デモ 
ID連携プロトコル解説 
ws-federation 
SAML2.0 
OpenIDConnect 
まとめ 
3 
【ご注意】 
本セッションで紹介するID連携プロトコルのフローは あくまでデモシナリオを実行する際のフローなので、 各プロトコルのすべての動きやパラメータを解説す るものではありません。
はじめに ~ID連携プロトコルとは 
4
事前信頼 
指定 
ID連携(フェデレーション)概要 
5 
認証サーバ 
Identity Provider/ IdP 
アプリケーション 
(Relying Party / RP) 
①アクセス 
②認証状態チェック 
③リダイレクト 
④認証指示 
⑤認証 
⑥トークン発行 
ユーザ 
信頼できるサーバから 発行されたトークンの 中のID情報を自前のID 情報と紐付ける 
⇒SSOの実現
ID連携(フェデレーション)をする理由 
認証システムの分散を防ぐ 
クレデンシャル(パスワード等)を保持する箇所を極小化する 
強度の高い認証システムで一括してアイデンティティ情報を保持・保 護する 
利便性を高める 
Cookieドメインを跨いだシングルサインオンの実現 
6 
クラウド活用のシナリオではドメインやネッ トワークがセキュリティ境界ではなくなる 
⇒Identity is the next perimeter
Identity is the next perimeter 
7 
FW 
企業内ネットワーク(ドメイン) 
企業内ネットワーク(ドメイン) 
SaaS 
アプリ 
FW 
悪い人 
外出中 
中の人 
協業先 
安全 
安全 
安全
単純なシングルサインオン 
8 
認証サーバ 
アプリケーション 
アプリケーション 
パスワードの分散 
システム毎に認証 
アプリケーション 
パスワードの一元管理 
認証Cookieの共有に よるSSO 
分散管理状態(SSO不可) 
認証サーバの外だし、パスワードの一元管理、 ドメイン内で認証Cookieを共有してSSO 
ドメイン境界
ドメイン境界 
ID連携(フェデレーション) 
9 
認証サーバ 
アプリケーション 
パスワードの一元管理 
認証Cookieの共有に よるSSO 
認証サーバの外だし、パスワードの一元管理、 ドメイン内で認証Cookieを共有してSSO 
認証サーバ 
アプリケーション 
パスワードの一元管理 
認証サーバの外だし、パスワードの一元管理、 ドメインを跨いだSSO 
アプリケーション 
ID連携 
サーバ 
ID連携サーバを経由す ることによるドメイン 間で認証Cookie変換 
ドメイン境界 
このあたりのやり取り方法を規定したものが ws-federation/SAML/OpenIDConnect
ポイント① 
ID連携をすると、、、 
パスワードの分散を防ぐことが出来る 
シングルサインオンを実現する 
ID連携プロトコルとは、、、 
ID情報(認証結果、ユーザ属性など)を安全に伝えるための仕組み 
認証そのものを行うためのプロトコルではない 
ws-federation / SAML / OpenIDConnectなど 
以下の取決めをしたもの 
ID情報の表現方法(トークン形式):XMLやJSON 
やり取りの方法:HTTP/SOAPの使い方(GET/POSTなど)、パラメータ 
10 
守るべき個所を少なく出来る 
利便性が向上する
ポイント② 
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ベース 
軽量、実装が簡単
Azure AD概要 ~最近いろいろとプロトコルを サポートしているので実装環境 としてはとっても便利 
12
AzureActive Directory構成概要 
13
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
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
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
Demo 
17 
Azure ADを中心に各種プロトコルを使ったID 連携を実装したので、まずは動作を確認してみ ましょう。
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 
【ご注意】 
あくまでデモ用 の環境であり、 一部非サポート の構成を含んで います
デモシナリオ 
ユーザ①(明智光秀/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)
ID連携プロトコル解説 ~ws-federation 
20 
Office365 / Azure AD / AD FSの間でのID連携 はws-federationを使って行われます。 
http://specs.xmlsoap.org/ws/2006/12/federation/ws-federation.pdf
①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
②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 
主要パラメータ⇒サインインして、アプリパネルへ戻す(リダイレクト)
③ホームレルムディスカバリにより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}
④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
④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へ戻す(リダイレクト)
⑤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 
<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&amp;rpsnv=4&amp;ct=1417169558&amp;rver=6.1.6206.0&amp;wp=MCMBI& amp;wreply=https:%2F%2Faccount.activedirectory.windowsazure.com%2Flanding.aspx%3Ftarget%3D%252fapplications%252fdefault.aspx&amp;lc=1041&amp;id=500633&amp;bk=1417169560&amp;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 
<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 
<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 
<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 
<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 
</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> 
セキュリティトークン 
(タグ閉じ)
⑥AzureADへセキュリティトークンの POST 
33 
シーケンス 
アクション 
通信内容 
リクエスト 
セキュリティトークンの POST(⑤のHTML Formで 自動POST) 
POST https://login.microsoftonline.com/login.srf HTTP/1.1 
レスポンス 
認証Cookieのセットとア プリケーションへのトーク ン情報を自動POSTする HTML 
次ページ
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 
シーケンス 
アクション 
通信内容 
リクエスト 
トークンの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
ID連携プロトコル解説 ~SAML2.0 
36 
GoogleApps/ Azure AD / OpenAMの間での ID連携はSAML2.0を使って行われます。 
http://saml.xml.org/saml-specifications
①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&ltmpl=default&ltmplcache=2&emr=1
②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&ltmpl=default&ltmplcache=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<省略>
②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 
<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
③OpenAMへログイン (ID/PWDで認証) 
41 
シーケンス 
アクション 
通信内容 
リクエスト 
パスワードの入力 
POST http://openam.example.com:8080/OpenAM- 11.0.0/UI/Login HTTP/1.1 
レスポンス 
セキュリティトークンを自 動POSTするHTML 
次ページ
42 
<html> 
<head> 
<title>Access rights validated</title> 
</head> 
<body onload="document.forms[0].submit()"> 
<form method="post" action="https&#x3a;&#x2f;&#x2f;www.google.com&#x2f;a&#x2f;yyy.example.com&#x2f;acs"> 
<input type=“hidden” name=“SAMLResponse” value=“PHNh<SAMLトークン(base64エンコード/次ページ)> b25zZT4&#x3d;" /> 
<input type="hidden" name="RelayState" value="https&#x3a;&#x2f;&#x2f;www.google.com&#x2f;a&#x2f;yyy.example.com&#x2f;ServiceLogin&#x3f;service&# x3d;mail&amp;passive&#x3d;true&amp;rm&#x3d;false&amp;continue&#x3d;https&#x25;3A&#x25;2F&#x25;2Fmail.google.com&#x25;2Fa&#x25;2Fyyy.example.com&#x25;2F&amp;ss&#x3d;1&amp;ltmpl&#x3d;default&amp;ltmplcache&#x3d;2&amp;emr&#x3d;1" /> 
<noscript> 
<center> 
<input type="submit" value="Submit SAMLResponsedata " /> 
</center> 
</noscript> 
</form> 
</body> 
</html> 
トークンを自動POSTするHTML 
JavaScriptで自動POST
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 
<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 
<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 
<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トークン 
(認証情報) 
認証方式 
(パスワード)
④GoogleAppsのログインサービス へセキュリティトークンのPOST 
47 
シーケンス 
アクション 
通信内容 
リクエスト 
セキュリティトークンの POST(③のHTML Formで 自動POST) 
POST https://www.google.com/a/yyy.example.com/acs HTTP/1.1 
レスポンス 
Googleアカウントの認証 セッション生成ページへの リダイレクト用HTML(自 動GET) 
次ページ
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&amp;service=mail&amp;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&amp;service=mail&amp;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 
シーケンス 
アクション 
通信内容 
リクエスト 
認証セッション生成ページ へアクセス 
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 
シーケンス 
アクション 
通信内容 
リクエスト 
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 
シーケンス 
アクション 
通信内容 
リクエスト 
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
ID連携プロトコル解説 ~OpenIDConnect 
52 
OWIN Security Middlewareを使ってASP.NET アプリケーションをAzure ADとID連携します。 
http://openid.net/connect/ 
日本語訳)http://www.openid.or.jp/document/
①外部ログインサービスへアクセス ⇒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
②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
②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 
(認証および基本属性へのアクセス) 
主要パラメータ
③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 
<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 
{ 
"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情報
④アプリケーションへ認可コード/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
まとめ① 
ID連携は大事(特にクラウド環境では) 
パスワード分散のリスクを低減、利便性の向上 
中身を知っておけばトラブルシューティングしやすい 
AD FSに関するトラブルの90%は設定のTYPO(by Laura E. Hunter / @adfskitteh) 
ID連携もアカウント管理もHTTPベースの通信なので通信フローをトレースすればだいたい 原因はわかる 
61
まとめ② 
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

Mais conteúdo relacionado

Mais procurados

詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編
詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編
詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編Yusuke Kodama
 
Fido認証概要説明
Fido認証概要説明Fido認証概要説明
Fido認証概要説明FIDO Alliance
 
なぜOpenID Connectが必要となったのか、その歴史的背景
なぜOpenID Connectが必要となったのか、その歴史的背景なぜOpenID Connectが必要となったのか、その歴史的背景
なぜOpenID Connectが必要となったのか、その歴史的背景Tatsuo Kudo
 
S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]
S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]
S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]日本マイクロソフト株式会社
 
認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜Masaru Kurahayashi
 
KeycloakのDevice Flow、CIBAについて
KeycloakのDevice Flow、CIBAについてKeycloakのDevice Flow、CIBAについて
KeycloakのDevice Flow、CIBAについてHiroyuki Wada
 
IT エンジニアのための 流し読み Windows 10 - Windows Hello for Business
IT エンジニアのための 流し読み Windows 10 - Windows Hello for BusinessIT エンジニアのための 流し読み Windows 10 - Windows Hello for Business
IT エンジニアのための 流し読み Windows 10 - Windows Hello for BusinessTAKUYA OHTA
 
これからのネイティブアプリにおけるOpenID Connectの活用
これからのネイティブアプリにおけるOpenID Connectの活用これからのネイティブアプリにおけるOpenID Connectの活用
これからのネイティブアプリにおけるOpenID Connectの活用Masaru Kurahayashi
 
SSIとDIDで何を解決したいのか?(β版)
SSIとDIDで何を解決したいのか?(β版)SSIとDIDで何を解決したいのか?(β版)
SSIとDIDで何を解決したいのか?(β版)Naohiro Fujie
 
IDaaS を正しく活用するための認証基盤設計
IDaaS を正しく活用するための認証基盤設計IDaaS を正しく活用するための認証基盤設計
IDaaS を正しく活用するための認証基盤設計Trainocate Japan, Ltd.
 
Azure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれAzure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれDevTakas
 
Active Directory 侵害と推奨対策
Active Directory 侵害と推奨対策Active Directory 侵害と推奨対策
Active Directory 侵害と推奨対策Yurika Kakiuchi
 
第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~
第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~
第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~Genki WATANABE
 
3分でわかるAzureでのService Principal
3分でわかるAzureでのService Principal3分でわかるAzureでのService Principal
3分でわかるAzureでのService PrincipalToru Makabe
 
Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)
Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)
Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)Genki WATANABE
 
ID管理/認証システム導入の理想と現実
ID管理/認証システム導入の理想と現実ID管理/認証システム導入の理想と現実
ID管理/認証システム導入の理想と現実Naohiro Fujie
 
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜Masaru Kurahayashi
 
俺が考えた最強のID連携デザインパターン
俺が考えた最強のID連携デザインパターン俺が考えた最強のID連携デザインパターン
俺が考えた最強のID連携デザインパターンMasaru Kurahayashi
 
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!Yusuke Kodama
 

Mais procurados (20)

詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編
詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編
詳説!Azure AD 条件付きアクセス - 動作の仕組みを理解する編
 
Fido認証概要説明
Fido認証概要説明Fido認証概要説明
Fido認証概要説明
 
なぜOpenID Connectが必要となったのか、その歴史的背景
なぜOpenID Connectが必要となったのか、その歴史的背景なぜOpenID Connectが必要となったのか、その歴史的背景
なぜOpenID Connectが必要となったのか、その歴史的背景
 
S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]
S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]
S08_Microsoft 365 E5 Compliance による内部不正対策の実践 [Microsoft Japan Digital Days]
 
認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜
 
KeycloakでAPI認可に入門する
KeycloakでAPI認可に入門するKeycloakでAPI認可に入門する
KeycloakでAPI認可に入門する
 
KeycloakのDevice Flow、CIBAについて
KeycloakのDevice Flow、CIBAについてKeycloakのDevice Flow、CIBAについて
KeycloakのDevice Flow、CIBAについて
 
IT エンジニアのための 流し読み Windows 10 - Windows Hello for Business
IT エンジニアのための 流し読み Windows 10 - Windows Hello for BusinessIT エンジニアのための 流し読み Windows 10 - Windows Hello for Business
IT エンジニアのための 流し読み Windows 10 - Windows Hello for Business
 
これからのネイティブアプリにおけるOpenID Connectの活用
これからのネイティブアプリにおけるOpenID Connectの活用これからのネイティブアプリにおけるOpenID Connectの活用
これからのネイティブアプリにおけるOpenID Connectの活用
 
SSIとDIDで何を解決したいのか?(β版)
SSIとDIDで何を解決したいのか?(β版)SSIとDIDで何を解決したいのか?(β版)
SSIとDIDで何を解決したいのか?(β版)
 
IDaaS を正しく活用するための認証基盤設計
IDaaS を正しく活用するための認証基盤設計IDaaS を正しく活用するための認証基盤設計
IDaaS を正しく活用するための認証基盤設計
 
Azure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれAzure ADアプリケーションを使用した認証のあれやこれ
Azure ADアプリケーションを使用した認証のあれやこれ
 
Active Directory 侵害と推奨対策
Active Directory 侵害と推奨対策Active Directory 侵害と推奨対策
Active Directory 侵害と推奨対策
 
第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~
第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~
第34回Office 365勉強会 : Microsoftサポート活用術 ~ Microsoft Azureを中心に ~
 
3分でわかるAzureでのService Principal
3分でわかるAzureでのService Principal3分でわかるAzureでのService Principal
3分でわかるAzureでのService Principal
 
Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)
Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)
Office365勉強会 #23 Azure AD のテナント設計(Office365管理者向け)
 
ID管理/認証システム導入の理想と現実
ID管理/認証システム導入の理想と現実ID管理/認証システム導入の理想と現実
ID管理/認証システム導入の理想と現実
 
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜
OpenID Connect 入門 〜コンシューマーにおけるID連携のトレンド〜
 
俺が考えた最強のID連携デザインパターン
俺が考えた最強のID連携デザインパターン俺が考えた最強のID連携デザインパターン
俺が考えた最強のID連携デザインパターン
 
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
GoodBye AD FS - Azure Active Directory Only の認証方式へ切り替えよう!
 

Semelhante a プロトコルから見るID連携

Office365のIdentity管理
Office365のIdentity管理Office365のIdentity管理
Office365のIdentity管理Naohiro Fujie
 
INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~
INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~
INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~decode2016
 
Microsoftの認証システムの歴史と 過渡期におけるWAPの活用 +Next Generation Credentials
Microsoftの認証システムの歴史と過渡期におけるWAPの活用+Next Generation CredentialsMicrosoftの認証システムの歴史と過渡期におけるWAPの活用+Next Generation Credentials
Microsoftの認証システムの歴史と 過渡期におけるWAPの活用 +Next Generation CredentialsNaohiro Fujie
 
Logic Apps/Flow Update Summary
Logic Apps/Flow Update SummaryLogic Apps/Flow Update Summary
Logic Apps/Flow Update SummaryTomoyuki Obi
 
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践真吾 吉田
 
build 2012 Windows Azure 的まとめ
build 2012 Windows Azure 的まとめbuild 2012 Windows Azure 的まとめ
build 2012 Windows Azure 的まとめSunao Tomita
 
BoF-09 Silverlight and WIF /TechEd Japan 2010
BoF-09 Silverlight and WIF /TechEd Japan 2010BoF-09 Silverlight and WIF /TechEd Japan 2010
BoF-09 Silverlight and WIF /TechEd Japan 2010Naohiro Fujie
 
インフラ観点で運用を考える!Windows 10 VDI on Azure
インフラ観点で運用を考える!Windows 10 VDI on Azure インフラ観点で運用を考える!Windows 10 VDI on Azure
インフラ観点で運用を考える!Windows 10 VDI on Azure Miho Yamamoto
 
[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践
[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践
[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践de:code 2017
 
Windows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site RecoveryWindows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site RecoveryNorio Sashizaki
 
Cloud で Active Directory を活用するには
Cloud で Active Directory を活用するにはCloud で Active Directory を活用するには
Cloud で Active Directory を活用するにはjunichi anno
 
jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発Akira Inoue
 
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現junichi anno
 
SharePoint Business Connectivity Services を使用した外部アプリケーション連携
SharePoint Business Connectivity Services を使用した外部アプリケーション連携SharePoint Business Connectivity Services を使用した外部アプリケーション連携
SharePoint Business Connectivity Services を使用した外部アプリケーション連携Atsuo Yamasaki
 
AAD authentication for azure app v0.1.20.0317
AAD authentication for azure app v0.1.20.0317AAD authentication for azure app v0.1.20.0317
AAD authentication for azure app v0.1.20.0317Ayumu Inaba
 
20110924 shizuoka azure-forsharing
20110924 shizuoka azure-forsharing20110924 shizuoka azure-forsharing
20110924 shizuoka azure-forsharingKazuki Aranami
 
Interactive connection2
Interactive connection2Interactive connection2
Interactive connection2Takao Tetsuro
 
Tech talk salesforce mobile sdk
Tech talk   salesforce mobile sdkTech talk   salesforce mobile sdk
Tech talk salesforce mobile sdkKazuki Nakajima
 
勉強会force#3 iOSアプリ開発
勉強会force#3 iOSアプリ開発勉強会force#3 iOSアプリ開発
勉強会force#3 iOSアプリ開発Kazuki Nakajima
 

Semelhante a プロトコルから見るID連携 (20)

Office365のIdentity管理
Office365のIdentity管理Office365のIdentity管理
Office365のIdentity管理
 
FIDO in Windows10
FIDO in Windows10FIDO in Windows10
FIDO in Windows10
 
INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~
INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~
INF-008_Azure Active Directory 最新動向 ~今後の Active Directory はどうあるべきか~
 
Microsoftの認証システムの歴史と 過渡期におけるWAPの活用 +Next Generation Credentials
Microsoftの認証システムの歴史と過渡期におけるWAPの活用+Next Generation CredentialsMicrosoftの認証システムの歴史と過渡期におけるWAPの活用+Next Generation Credentials
Microsoftの認証システムの歴史と 過渡期におけるWAPの活用 +Next Generation Credentials
 
Logic Apps/Flow Update Summary
Logic Apps/Flow Update SummaryLogic Apps/Flow Update Summary
Logic Apps/Flow Update Summary
 
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
サーバー管理よ、サヨウナラ。サーバーレス アーキテクチャの意義と実践
 
build 2012 Windows Azure 的まとめ
build 2012 Windows Azure 的まとめbuild 2012 Windows Azure 的まとめ
build 2012 Windows Azure 的まとめ
 
BoF-09 Silverlight and WIF /TechEd Japan 2010
BoF-09 Silverlight and WIF /TechEd Japan 2010BoF-09 Silverlight and WIF /TechEd Japan 2010
BoF-09 Silverlight and WIF /TechEd Japan 2010
 
インフラ観点で運用を考える!Windows 10 VDI on Azure
インフラ観点で運用を考える!Windows 10 VDI on Azure インフラ観点で運用を考える!Windows 10 VDI on Azure
インフラ観点で運用を考える!Windows 10 VDI on Azure
 
[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践
[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践
[AC11] サーバー管理よ、サヨウナラ。サーバーレスアーキテクチャの意義と実践
 
Windows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site RecoveryWindows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
Windows Server 2008 / R2とWindows Admin CenterとAzure Site Recovery
 
Cloud で Active Directory を活用するには
Cloud で Active Directory を活用するにはCloud で Active Directory を活用するには
Cloud で Active Directory を活用するには
 
jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発
 
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
 
SharePoint Business Connectivity Services を使用した外部アプリケーション連携
SharePoint Business Connectivity Services を使用した外部アプリケーション連携SharePoint Business Connectivity Services を使用した外部アプリケーション連携
SharePoint Business Connectivity Services を使用した外部アプリケーション連携
 
AAD authentication for azure app v0.1.20.0317
AAD authentication for azure app v0.1.20.0317AAD authentication for azure app v0.1.20.0317
AAD authentication for azure app v0.1.20.0317
 
20110924 shizuoka azure-forsharing
20110924 shizuoka azure-forsharing20110924 shizuoka azure-forsharing
20110924 shizuoka azure-forsharing
 
Interactive connection2
Interactive connection2Interactive connection2
Interactive connection2
 
Tech talk salesforce mobile sdk
Tech talk   salesforce mobile sdkTech talk   salesforce mobile sdk
Tech talk salesforce mobile sdk
 
勉強会force#3 iOSアプリ開発
勉強会force#3 iOSアプリ開発勉強会force#3 iOSアプリ開発
勉強会force#3 iOSアプリ開発
 

Mais de Naohiro Fujie

分散型IDと検証可能なアイデンティティ技術概要
分散型IDと検証可能なアイデンティティ技術概要分散型IDと検証可能なアイデンティティ技術概要
分散型IDと検証可能なアイデンティティ技術概要Naohiro Fujie
 
今なら間に合う分散型IDとEntra Verified ID
今なら間に合う分散型IDとEntra Verified ID今なら間に合う分散型IDとEntra Verified ID
今なら間に合う分散型IDとEntra Verified IDNaohiro Fujie
 
LINEログインの最新アップデートとアプリ連携ウォークスルー
LINEログインの最新アップデートとアプリ連携ウォークスルーLINEログインの最新アップデートとアプリ連携ウォークスルー
LINEログインの最新アップデートとアプリ連携ウォークスルーNaohiro Fujie
 
ざっくり解説 LINE ログイン
ざっくり解説 LINE ログインざっくり解説 LINE ログイン
ざっくり解説 LINE ログインNaohiro Fujie
 
Azure AD x LINE x Auth0
Azure AD x LINE x Auth0Azure AD x LINE x Auth0
Azure AD x LINE x Auth0Naohiro Fujie
 
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向Naohiro Fujie
 
MicrosoftのDID/VC実装概要
MicrosoftのDID/VC実装概要MicrosoftのDID/VC実装概要
MicrosoftのDID/VC実装概要Naohiro Fujie
 
LIFFとの連携でさらに強力に。こんなに使えるLINEログイン
LIFFとの連携でさらに強力に。こんなに使えるLINEログインLIFFとの連携でさらに強力に。こんなに使えるLINEログイン
LIFFとの連携でさらに強力に。こんなに使えるLINEログインNaohiro Fujie
 
自己主権型IDと分散型ID
自己主権型IDと分散型ID自己主権型IDと分散型ID
自己主権型IDと分散型IDNaohiro Fujie
 
Azure ADの外部コラボレーションとBYOID
Azure ADの外部コラボレーションとBYOIDAzure ADの外部コラボレーションとBYOID
Azure ADの外部コラボレーションとBYOIDNaohiro Fujie
 
祝!公式サポート Auth0 + LINE Login
祝!公式サポート Auth0 + LINE Login祝!公式サポート Auth0 + LINE Login
祝!公式サポート Auth0 + LINE LoginNaohiro Fujie
 
IDaaSにSign in with Appleをつないでみた
IDaaSにSign in with AppleをつないでみたIDaaSにSign in with Appleをつないでみた
IDaaSにSign in with AppleをつないでみたNaohiro Fujie
 
次世代KYCと自己主権型アイデンティティの動向
次世代KYCと自己主権型アイデンティティの動向次世代KYCと自己主権型アイデンティティの動向
次世代KYCと自己主権型アイデンティティの動向Naohiro Fujie
 
これからの KYC と Identity on Blockchain の動向
これからの KYC と Identity on Blockchain の動向これからの KYC と Identity on Blockchain の動向
これからの KYC と Identity on Blockchain の動向Naohiro Fujie
 
教育機関におけるBYOIDとKYC
教育機関におけるBYOIDとKYC教育機関におけるBYOIDとKYC
教育機関におけるBYOIDとKYCNaohiro Fujie
 
実装して理解するLINE LoginとOpenID Connect入門
実装して理解するLINE LoginとOpenID Connect入門実装して理解するLINE LoginとOpenID Connect入門
実装して理解するLINE LoginとOpenID Connect入門Naohiro Fujie
 
組織におけるアイデンティティ管理の基本的な考え方
組織におけるアイデンティティ管理の基本的な考え方組織におけるアイデンティティ管理の基本的な考え方
組織におけるアイデンティティ管理の基本的な考え方Naohiro Fujie
 
コンシューマIDのエンタープライズ領域での活用
コンシューマIDのエンタープライズ領域での活用コンシューマIDのエンタープライズ領域での活用
コンシューマIDのエンタープライズ領域での活用Naohiro Fujie
 
大学等におけるAzure AD B2Cを使用したSNS認証の活用
大学等におけるAzure AD B2Cを使用したSNS認証の活用大学等におけるAzure AD B2Cを使用したSNS認証の活用
大学等におけるAzure AD B2Cを使用したSNS認証の活用Naohiro Fujie
 

Mais de Naohiro Fujie (20)

分散型IDと検証可能なアイデンティティ技術概要
分散型IDと検証可能なアイデンティティ技術概要分散型IDと検証可能なアイデンティティ技術概要
分散型IDと検証可能なアイデンティティ技術概要
 
今なら間に合う分散型IDとEntra Verified ID
今なら間に合う分散型IDとEntra Verified ID今なら間に合う分散型IDとEntra Verified ID
今なら間に合う分散型IDとEntra Verified ID
 
LINE Login総復習
LINE Login総復習LINE Login総復習
LINE Login総復習
 
LINEログインの最新アップデートとアプリ連携ウォークスルー
LINEログインの最新アップデートとアプリ連携ウォークスルーLINEログインの最新アップデートとアプリ連携ウォークスルー
LINEログインの最新アップデートとアプリ連携ウォークスルー
 
ざっくり解説 LINE ログイン
ざっくり解説 LINE ログインざっくり解説 LINE ログイン
ざっくり解説 LINE ログイン
 
Azure AD x LINE x Auth0
Azure AD x LINE x Auth0Azure AD x LINE x Auth0
Azure AD x LINE x Auth0
 
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向
LINE Payも取り組んでいるKYCってなんだろう?KYCの基本と最近の動向
 
MicrosoftのDID/VC実装概要
MicrosoftのDID/VC実装概要MicrosoftのDID/VC実装概要
MicrosoftのDID/VC実装概要
 
LIFFとの連携でさらに強力に。こんなに使えるLINEログイン
LIFFとの連携でさらに強力に。こんなに使えるLINEログインLIFFとの連携でさらに強力に。こんなに使えるLINEログイン
LIFFとの連携でさらに強力に。こんなに使えるLINEログイン
 
自己主権型IDと分散型ID
自己主権型IDと分散型ID自己主権型IDと分散型ID
自己主権型IDと分散型ID
 
Azure ADの外部コラボレーションとBYOID
Azure ADの外部コラボレーションとBYOIDAzure ADの外部コラボレーションとBYOID
Azure ADの外部コラボレーションとBYOID
 
祝!公式サポート Auth0 + LINE Login
祝!公式サポート Auth0 + LINE Login祝!公式サポート Auth0 + LINE Login
祝!公式サポート Auth0 + LINE Login
 
IDaaSにSign in with Appleをつないでみた
IDaaSにSign in with AppleをつないでみたIDaaSにSign in with Appleをつないでみた
IDaaSにSign in with Appleをつないでみた
 
次世代KYCと自己主権型アイデンティティの動向
次世代KYCと自己主権型アイデンティティの動向次世代KYCと自己主権型アイデンティティの動向
次世代KYCと自己主権型アイデンティティの動向
 
これからの KYC と Identity on Blockchain の動向
これからの KYC と Identity on Blockchain の動向これからの KYC と Identity on Blockchain の動向
これからの KYC と Identity on Blockchain の動向
 
教育機関におけるBYOIDとKYC
教育機関におけるBYOIDとKYC教育機関におけるBYOIDとKYC
教育機関におけるBYOIDとKYC
 
実装して理解するLINE LoginとOpenID Connect入門
実装して理解するLINE LoginとOpenID Connect入門実装して理解するLINE LoginとOpenID Connect入門
実装して理解するLINE LoginとOpenID Connect入門
 
組織におけるアイデンティティ管理の基本的な考え方
組織におけるアイデンティティ管理の基本的な考え方組織におけるアイデンティティ管理の基本的な考え方
組織におけるアイデンティティ管理の基本的な考え方
 
コンシューマIDのエンタープライズ領域での活用
コンシューマIDのエンタープライズ領域での活用コンシューマIDのエンタープライズ領域での活用
コンシューマIDのエンタープライズ領域での活用
 
大学等におけるAzure AD B2Cを使用したSNS認証の活用
大学等におけるAzure AD B2Cを使用したSNS認証の活用大学等におけるAzure AD B2Cを使用したSNS認証の活用
大学等におけるAzure AD B2Cを使用したSNS認証の活用
 

プロトコルから見る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連携プロトコルのフローは あくまでデモシナリオを実行する際のフローなので、 各プロトコルのすべての動きやパラメータを解説す るものではありません。
  • 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
  • 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&amp;rpsnv=4&amp;ct=1417169558&amp;rver=6.1.6206.0&amp;wp=MCMBI& amp;wreply=https:%2F%2Faccount.activedirectory.windowsazure.com%2Flanding.aspx%3Ftarget%3D%252fapplications%252fdefault.aspx&amp;lc=1041&amp;id=500633&amp;bk=1417169560&amp;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&ltmpl=default&ltmplcache=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&ltmpl=default&ltmplcache=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&#x3a;&#x2f;&#x2f;www.google.com&#x2f;a&#x2f;yyy.example.com&#x2f;acs"> <input type=“hidden” name=“SAMLResponse” value=“PHNh<SAMLトークン(base64エンコード/次ページ)> b25zZT4&#x3d;" /> <input type="hidden" name="RelayState" value="https&#x3a;&#x2f;&#x2f;www.google.com&#x2f;a&#x2f;yyy.example.com&#x2f;ServiceLogin&#x3f;service&# x3d;mail&amp;passive&#x3d;true&amp;rm&#x3d;false&amp;continue&#x3d;https&#x25;3A&#x25;2F&#x25;2Fmail.google.com&#x25;2Fa&#x25;2Fyyy.example.com&#x25;2F&amp;ss&#x3d;1&amp;ltmpl&#x3d;default&amp;ltmplcache&#x3d;2&amp;emr&#x3d;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&amp;service=mail&amp;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&amp;service=mail&amp;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
  • 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