OpenID Provider ã®ã»ãã¥ãªãã£å¯¾ç (1) - ã¾ã㯠SSL ãå°å ¥ï¼è©±ã¯ããããã
ãã£ã¨ä¸æºåçµãã£ãã®ã§æ¸ãã¦ã¿ãã
OpenID ã§ã®ãããã³ã«ã¡ãã»ã¼ã¸ã§ãèªè¨¼ã¢ãµã¼ã·ã§ã³è¦æ±*1åã³å¿ç*2ã§ã®ã¡ãã»ã¼ã¸ã¯é常ãRP-OP é㧠associate æã«äº¤æãã MAC ãã¼ãæã£ã¦ç½²åãè¡ãçºãæå¾
ããç¸æã¨éä¿¡ãã¦ããéãã¯æ¹ããã¯èµ·ããã«ããã¨èãããã¾ãã
ä½ãæè¿è©±é¡ã«åºã¦æ¥ã¦ãã DNS Cache Poisoning ã®ãããªæ»æãåããå ´åãä¸éè
æ»æ (man-in-the-middle attack) ãæç«ããå¯è½æ§ãããã¾ãã
æ»æææ³ã®ä¾
ä¾ãã°ãRP ã® DNS ãæ±æããã¦ããå ´åãèãã¾ããæ¬æ¥ OP ã§ããã¯ãã®ãã¹ããæªæã®ãã第ä¸è ã®ãµã¼ãã¼ã«å²ãå½ã¦ããã¦ããå ´åããã®ç¬¬ä¸è ã®ãµã¼ãã¼ãä¸ç¶ãè¡ãã°ãDH éµäº¤æãè¡ã£ã¦ãã¾ã£ããç¡æå³ã§ãèªè¨¼ãã¼ã¿ãçã¾ããå¯è½æ§ãããã¾ããã¤ã¾ãã
- RP ããè¦ã㨠OP ã«è¦ãã¦
- OP ããè¦ã㨠RP ã«è¦ãã
ãã㪠RP Proxy ãã§ã£ã¡ä¸ããã¨ãåé¡ç¡ã associate ãè¡ããéã®ãã¼ã¿ã¯å ¨ã¦ãã£ã±æãããã¨ã
SSL/TLS ãç¨ããå ´å
ãã®å ´å㯠SSL/TLS ã®æ©æ§ãä¿¡ããäºãåºæ¥ããã¤ã¾ãä¿¡é ¼åºæ¥ãèªè¨¼å±ãçºè¡ãããµã¼ãã¼è¨¼ææ¸ã®å ´åã¯ãèªè¨¼ã¢ãµã¼ã·ã§ã³è¦æ±ï¼å¿çã¡ãã»ã¼ã¸ã®æ¹ããã¯é£ããã®ã§ãããæ¡ç¨ããDH éµäº¤æã§ã¯ãªãå¹³æ㧠MAC ãã¼ã渡ãããã«ããã°è¯ãã¨æãã¾ãã
ã¾ã associate ã check_authentication ã®å ´åã¯ç½²åã¯ããã¾ããã®ã§ãããä¸éè æ»æã®ãªã¹ã¯ãé«ã¾ãã¾ããããã§ããã£ã±ã SSL/TLS 使ããã£ã¦è©±ã«ãªã£ã¦ãã¾ãã¨ã
ãã®éã«ããªã¬ãªã¬è¨¼ææ¸ã ã£ããã¨ãããµã¼ãã¼è¨¼ææ¸ã®çºè¡åºæºãã ãã¶ã°ã¬ã¼ãªèªè¨¼å±ã¨ãã¯å¼¾ãããã®ã§ãd:id:ZIGOROu:20080805:1217923189 ã®ãããªç¢ºèªææ³ãå¿ è¦ã«ãªãã¾ããä»ã¾ã§ LWPx::ParanoidAgent 使ã£ã¦ããã大ä¸å¤«ã¨ãæã£ã¦ãããããã¾ããã大ããªééãã§ãï¼
ä¸å¿ LWPx::ParanoidAgent ã«ã¯ paranoid_proxy ã¨è¨ãè¨å®é ç®ãããã
if (my $pp = $self->{paranoid_proxy}) { $req->uri("$pp?url=" . eurl($req->uri) . "&timeout=" . ($self->{timeout} + 0) . "&max_size=" . ($self->{max_size} + 0)); }
ã¨è¨ãå½¢å¼ã§ Proxy (çãªãã®!?) çµç±ã§ã¢ã¯ã»ã¹åºæ¥ããããªã¤ã³ã¿ã¼ãã§ã¼ã¹ãããã¾ãããã¾ããªã¹ã¯ãæ¸ããäºã¯åºæ¥ã¾ãã解決çã«ã¯ãªã£ã¦ãªãã®ã§ããã¯ã SSL/TLS ã使ãã¹ãã§ãã
ã¡ãªã¿ã«OpenID Authentication 2.0 仕様ã«ããã¡ãã¨æ¸ãã¦ããã¾ãã
In order to get protection from SSL, SSL must be used for all parts of the interaction, including interaction with the end user through the User-Agent. While the protocol does not require SSL be used, its use is strongly RECOMMENDED.ç°¡åã«è¨ãã°ã
UA ãä»ããéä¿¡ãå«ãã¦å ¨ã¦ã®åæ¹åé信㧠SSL ã使ã£ãæ¹ãããã§ããã£ã¦äºã§ããã
å½å OP ã®ç¾ç¶
2008/08/05 ç¾å¨ã®å½å OPã®å¯¾å¿ç¶æ³ãã¯ã¦ãª
ZIGOROu - はてな ããã<link rel="openid.server" href="http://www.hatena.ne.jp/openid/server" />ãªã®ã§ SSL é対å¿ã
Livedoor
livedoor プロフィール ããã<link rel="openid.server" href="http://auth.livedoor.com/openid/server" /> <link rel="openid2.provider" href="http://auth.livedoor.com/openid/server" /> <meta http-equiv="x-xrds-location" content="http://auth.livedoor.com/openid/xrds?username=zigorou_" />
$ lwp-request -m HEAD http://profile.livedoor.com/zigorou_/ã®ããã«ããã¨ã
X-XRDS-Location: http://auth.livedoor.com/openid/xrds?username=zigorou_ã¨è¿ã£ã¦æ¥ãã
$ curl http://auth.livedoor.com/openid/xrds?username=zigorou_ã¨ããã¨ã
<?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="1"> <Type>http://specs.openid.net/auth/2.0/signon</Type> <URI>https://auth.livedoor.com/openid/server</URI> <LocalID>http://profile.livedoor.com/zigorou_/</LocalID> </Service> <Service priority="2"> <Type>http://openid.net/signon/1.1</Type> <URI>https://auth.livedoor.com/openid/server</URI> <openid:Delegate>http://profile.livedoor.com/zigorou_/</openid:Delegate> </Service> <Service priority="3"> <Type>http://openid.net/signon/1.0</Type> <URI>https://auth.livedoor.com/openid/server</URI> <openid:Delegate>http://profile.livedoor.com/zigorou_/</openid:Delegate> </Service> <Service priority="10"> <Type>http://specs.openid.net/auth/2.0/signon</Type> <URI>http://auth.livedoor.com/openid/server</URI> <LocalID>http://profile.livedoor.com/zigorou_/</LocalID> </Service> <Service priority="20"> <Type>http://openid.net/signon/1.1</Type> <URI>http://auth.livedoor.com/openid/server</URI> <openid:Delegate>http://profile.livedoor.com/zigorou_/</openid:Delegate> </Service> <Service priority="30"> <Type>http://openid.net/signon/1.0</Type> <URI>http://auth.livedoor.com/openid/server</URI> <openid:Delegate>http://profile.livedoor.com/zigorou_/</openid:Delegate> </Service> </XRD> </xrds:XRDS>ã¨è¿ã£ã¦æ¥ãã対å¿ãã¦æ¬²ãããªã¨æãã®ã¯ã
- HEADæã®ã¬ã¹ãã³ã¹ããã X-XRDS-Location åã³ HTML ä¸ã® x-xrds-location ã®å¤ã https ã«ãã
wassr.jp
ã¡ãã£ãã OP 㪠wassr ã確èªãhttp://wassr.jp/user/zigorou ãã<link rel="openid2.provider" href="https://wassr.jp/open_id/auth" /> <link rel="openid.server" href="https://wassr.jp/open_id/auth" />
OpenID.ne.jp
http://zigorou.openid.ne.jp/ ããã<link rel="openid.server" href="http://zigorou.openid.ne.jp/index.php/serve" /> <link rel="openid.delegate" href="http://zigorou.openid.ne.jp/" />ãªã®ã§ SSL é対å¿ãã¨ããã§ä½æ delegate æå®ãã¦ãããã w
Yahoo! JAPAN
https://me.yahoo.co.jp/a/dLJv9AJ6Zftj.zOQocdM_hEdqg-- ããã<link rel="openid2.provider" href="https://open.login.yahooapis.jp/openid/op/auth"> <link rel="openid.server" href="https://open.login.yahooapis.jp/openid/op/1.1/auth">SSL ã«å¯¾å¿æ¸ã¿ãããã Yahoo! ã§ããã