Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page12 ① OpenID入力 ② Discovery ③ アソシエーション確立 ④ 認証要求をOPへ送信 ⑥ パスワード入力 ⑤ Discovery on the RP ⑧ Discovery ⑨ 署名の検証 ⑦ 認証応答をRPへ送信 ログイン完了 あなた RP OP シーケンス図
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page17 ② Discovery(例) http://example.com http://openidenabled.com Discovery情報 提供サイト (OPと同じでも良い) RP あなた Content-Type: application/xrds+xml
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page18 ③ アソシエーションの確立 署名用の鍵を交換するためのフェーズ(キャッシュ可) Association handleが署名鍵に紐付くキーに Diffie-Hellmanアルゴリズムに基づく鍵交換 DHセッション鍵にて署名鍵を暗号化して交換 HMAC-SHA1用の160ビット鍵 HMAC-SHA256用の256ビット鍵 強衝突性が突破されているSHA1は、将来的にSHA-256移行が 推奨 アソシエーションは、適切な時間で再構成するのが望 ましい 常に同じアソシエーションだと、ハッシュが破られ署名鍵が 判明するかもしれない pubdh=2 mod p s
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page22 ⑤ Discovery on the RP 認証要求で指定されるRealmに対してYadisプロトコルで Discoveryを行う(XRDS文書の取得) 認証メッセージの応答先である”return_to” URLが、OpenIDの 認証結果を返すEndpointとして妥当であることを確認 同時に、SSL状態(自己署名かEV-SSLか等)を確認できる(かも) 任意のURLへ認証結果や属性情報を送られることを防ぐ Authentication 2.0 Finalで追加された仕様で、利用している OPは少ない うまく使うと、RPの信頼性についてユーザーへ警告を出すことができる RPがXRDSを返却する機能が必要になる 動的に戻りURLが変化する場合はさらに作り込みが必要
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page23 ⑤ Discovery on the RP(例) RP Discovery失敗は 出現のトリガらしい ※RPのIP、EV-SSL対応、 ドメインなど複数の挙動に 従って警告を出すような実装は可能
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page24 RP http://example.com OP http://openidenabled.com ④認証要求 ⑦認証応答 HTTP/1.1 302 Found POST http://openidenabled.com/ruby-openid/trunk/examples/server openid.mode : checkid_setup openid.realm : http://example.com/consumer openid.return_to : http://example.com/consumer/complete ⑤ Discovery on the RP(例) (⑤Discovery on the RP) ⑥パスワードの入力 GET http://example.com/consumer Content-Type: application/xrds+xml
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page27 ⑦認証応答 openid.mode=id_res openid.claimed_id=http://sample-op.com/bob/ openid.identity=http://sample-op.com/bob/ GET/POST http://sample-op.com/openid/endpoint openid.mode=checkid_setup openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select openid.identity=http://specs.openid.net/auth/2.0/identifier_select ⑧ 結果検証時のDiscovery(例) ④認証要求 RP http://example.com OP http://sample-op.com 認証応答に含まれる”(verified)claimed_id”をDiscovery した結果を踏まえて、認証結果の検証を実施する HTTP 302(Redirect) JavaScript自動POST ⑥パスワードの入力 Discovery情報 提供サイト(URL) RPにとって既知でない (verified)claimed_idが返る ⑧Discovery on the claimed_id ⑤Discovery on the RP
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page39 ⑦認証応答 ④認証要求 RP http://example.com OP http://sample-op.com ⑥パスワードの入力 Discovery情報 提供サイト(URL) ⑤Discovery on the RP PAPEの概要と追加案 PAPEメッセージ抜粋 openid.ns.pape=http://specs.openid.net/extensions/pape/1.0 openid.pape.max_auth_age=3600 openid.pape.preferred_auth_policies=http://schemas.openid.net/pape/policies/2007/06/multi-factor PAPEメッセージ抜粋 openid.ns.pape:http://specs.openid.net/extensions/pape/1.0 openid.pape.auth_policies: http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical openid.pape.auth_level.fisc:2 openid.pape.auth_level.ns.fisc: http://www.fisc.or.jp/ex/authnlevel XRDS文書抜粋(OP Endpointのサービスタイプ)
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page45 If it were https OpenID (or XRI) GOOD OP User BAD OP XRDS アソシエーション 証明書チェック 失敗 RP
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page46 If it were https OpenID (or XRI) GOOD OP User BAD OP XRDS RP シグネチャ チェック 失敗
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page49 安全なサービス提供のためにRPができること https URI ないしは、XRIのみを使う XRIはTrusted Resolutionを使う https binding でも SAML binding でも良い OPの証明書ルートチェックは必ず行う 信頼できるルート以外は使わない
Copyright(C) 2008 Nomura Research Institute, Ltd. All rights reserved. Page52 PAPE 1.0 Draft 2 との差異 auth_level に ns を導入 openid.pape.nist_auth_level openid.pape.auth_level.ns.nist openid.pape.auth_level.nist 表記法 「pape」というのは、変数なのだが、誤解する人が 多いので、変数は、のような表現に変更