センシティブな情報を扱うサイトでYahoo! JAPANのOpenIDを単体で使ってはいけない

なんとも自虐的なタイトルではありますが、これはYahoo! JAPANが宣言していることなので特に問題はございません。

今までもYahoo! JAPANOpenIDのAuthN ResponseにはPAPE関連のレスポンスが含まれていたのですが、実は仕様とすこしずれてた部分がありました。
現在はちゃんと仕様に沿っているので、今日はさらっと説明します。

Yahoo! JAPANOpenID Discovery結果(2010/10/10現在)

久々にDiscoveryしてみましょう。

$ curl http://open.login.yahoo.co.jp/openid20/www.yahoo.co.jp/xrds
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS
    xmlns:xrds="xri://$xrds"
    xmlns:openid="http://openid.net/xmlns/1.0"
    xmlns="xri://$xrd*($v*2.0)">
  <XRD>
    <Service priority="0">
      <Type>http://specs.openid.net/auth/2.0/server</Type>
      <Type>http://specs.openid.net/extensions/pape/1.0</Type>
      <Type>http://openid.net/srv/ax/1.0</Type>
      <Type>http://specs.openid.net/extensions/ui/1.0/mode/popup</Type>
      <Type>http://csrc.nist.gov/publications/nistpubs/800-63/SP800-63V1_0_2.pdf</Type>
      <URI>https://open.login.yahooapis.jp/openid/op/auth</URI>
    </Service>
  </XRD>
</xrds:XRDS>

"http://csrc.nist.gov/publications/nistpubs/800-63/SP800-63V1_0_2.pdf"って書いてあります。

AuthN Response

OpenIDのAuthN Responseがどうなっているかを確認しましょう。
今まで通り、PAPE関連のパラメータが勝手についてきます。

...
&openid.signed=assoc_handle%2C...%2Cns.pape%2Cpape.auth_policies%2Cpape.auth_level.ns.nist%2Cpape.auth_level.nist
...
&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0
&openid.pape.auth_policies=http%3A%2F%2Fschemas.openid.net%2Fpape%2Fpolicies%2F2007%2F06%2Fnone
&openid.pape.auth_level.ns.nist=http%3A%2F%2Fcsrc.nist.gov%2Fpublications%2Fnistpubs%2F800-63%2FSP800-63V1_0_2.pdf
&openid.pape.auth_level.nist=0
&openid.sig=...

PAPEの仕様

さて、上記のレスポンスの意味を整理しておきましょう。
仕様はこちら : Final: OpenID Provider Authentication Policy Extension 1.0

&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0

これは、省略。

&openid.pape.auth_policies=http%3A%2F%2Fschemas.openid.net%2Fpape%2Fpolicies%2F2007%2F06%2Fnone

これについては、ちゃんと仕様に書いてありますよ。

openid.pape.auth_policies

One or more authentication policy URIs representing policies that the OP satisfied when authenticating the End User.
Value: Space separated list of authentication policy URIs.
Note: If no policies were met though the OP wishes to convey other information in the response, this parameter MUST be included with the value of http://schemas.openid.net/pape/policies/2007/06/none.

Final: OpenID Provider Authentication Policy Extension 1.0

Yahoo! JAPANでログイン中にOpenIDを利用するとき、毎回PW入力すらせずに利用できます。

世の中、Googleさんが2要素認証をやるとか言ってるこの世の中ですよね。
Googleさんは"http://schemas.openid.net/pape/policies/2007/06/multi-factor"とか使えるようになるってことですね。

&openid.pape.auth_level.ns.nist=http%3A%2F%2Fcsrc.nist.gov%2Fpublications%2Fnistpubs%2F800-63%2FSP800-63V1_0_2.pdf
&openid.pape.auth_level.nist=0

この2行の意味としては、

って感じですね。

だから、Discoveryのところにこのpdfのパスが書いてあったんですね。

そして、正確には、"0"なのよ、ってのは間違い。

6.1. NIST Assurance Levels
...
Note: Level 0 is not an assurance level defined by NIST, but rather SHOULD be used to signify that the OP recognizes the parameter and the End User authentication did not meet the requirements of Level 1.
See Appendix A.1.2 (NIST Authentication Mechanism Levels) for high-level example classifications of authentication methods within the defined levels.
Authentication using a long-lived browser cookie, for instance, is one example where the use of "level 0" is appropriate.
Authentications with level 0 should never be used to authorize access to any resource of any monetary value whatsoever.
The previous sentence should not be construed as implying that any of the other levels are recommended or appropriate for accessing resources with monetary value either without the Relying Party doing an appropriate risk assessment of the particular OpenID provider asserting them and their issuance and authentication procedures as they apply to the particular online interaction in question.

1までも行かないのは0ってことです。

ということで、結果として

"センシティブな情報を扱うサイトでYahoo! JAPANOpenIDを単体で使ってはいけない"となります。
Yahoo! JAPANがこんなレスポンスを返している以上、センシティブな情報を扱うときなどは+αの認証を用意する必要があるなど注意が必要ですね。
お金を扱ってるRPさん、気をつけてください。