Web ãã©ã«ã㧠WebDAV
Apache ã® WebDAV æ©è½ã Windows ã® Web ãã©ã«ãã«å¯¾å¿ããã話ï¼
Digest èªè¨¼ãæãã£ã WebDAV ãµã¼ããéããªã
Digest èªè¨¼ãæãã£ã WebDAV ãµã¼ãã Web ãã©ã«ãã§éããã¨ããã¨ãï¼ã¨ã©ã¼ãåºã¦éããªããã¨ãããï¼
c:/Documents and Settings/rero/Local Settings/Temp/wecerr.txt
05/23/2005 07:44:00 HTTP 404 Not Found <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /_vti_bin/shtml.exe/_vti_rpc was not found on this server.</p> <hr> <address>Apache Server at 192.168.0.2 Port 80</address> </body></html>
ããã¯ï¼Windows ã® Webãã©ã«ãã§ã¯ï¼Digest èªè¨¼ã§ OPTIONS ã¡ã½ãããéããªããã¨ãåå ãããï¼Basic èªè¨¼ã§ã¯éãã®ã§ï¼SSL + Basic èªè¨¼ãªã©ã§ã¯ãã®åé¡ã¯èµ·ãããªã模æ§ï¼OPTIONS ã¡ã½ãããéããªãã¨ï¼Web ãã©ã«ã㯠/_vti_bin/shtml.exe/_vti_rpc ã¨ããæ®éã¯åå¨ããªããã¡ã¤ã«ï¼Front Page Server Extensions ã®ãã¡ã¤ã«ãããï¼ãæ¢ãã«è¡ãã®ã ãããï¼
ã¤ã¾ãï¼Digest èªè¨¼ã使ãã¨ãã¯
ä¾ï¼
<Location /dav> Dav On AuthType Digest AuthName "dav" AuthDigestFile "/etc/apache2/.htdigest" <LimitExcept OPTIONS> Require valid-user </LimitExcept> </Location>
åè
OS Xã«mod_auth_digestãã¤ã³ã¹ãã¼ã«
Windowsã®Webãã©ã«ãã¯mod_auth_digestã®ãã¤ã¸ã§ã¹ãèªè¨¼ã«
対å¿ãã¦ãã¾ãã
ãã ããOPTIONSãªã¯ã¨ã¹ãã¯ã ããªããã§ãhttpd.confã§ã¯ã<LimitExcept OPTIONS> require valid-user </LimitExcept>ã¨ãã¦OPTIONSãªã¯ã¨ã¹ãæã«ã¯èªè¨¼ããªãããã«ããå¿ è¦ãããã®ã§ããã
_vti_inf.html ã _vti_bin ãè¦ã¤ãããªãã¨ããã¨ã©ã¼ãã°ãæ®ã
mod_headers - Apache HTTP ãµã¼ã
mod_setenvif - Apache HTTP ãµã¼ã
access_log ã error_log ã« _vti_inf.html ã _vti_bin ï¼Front Page Server Extensions ã®ãã¡ã¤ã«ãããï¼ãè¦ã¤ãããªãã¨ããã¨ã©ã¼ãã°ãæ®ãï¼å®å®³ã¯ãªããï¼ä½ã¨ãªãæ°æã¡æªãï¼
/var/log/apache2/access_log
192.168.0.5 - - [24/May/2005:21:24:54 +0900] "GET /_vti_inf.html HTTP/1.1" 404 272
192.168.0.5 - - [24/May/2005:21:24:54 +0900] "POST /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 404 286
192.168.0.5 - - [24/May/2005:21:24:54 +0900] "OPTIONS /dav HTTP/1.1" 401 462
/var/log/apache2/error_log
[Tue May 24 21:24:19 2005] [error] [client 192.168.0.5] File does not exist: /var/www/localhost/htdocs/_vti_inf.html
[Tue May 24 21:24:19 2005] [error] [client 192.168.0.5] File does not exist: /var/www/localhost/htdocs/_vti_bin
ãã®åé¡ã®å¯¾çã¯ï¼Web ãµã¼ãããã®å¿çã«
MS-Author-Via: DAV
ã¨ããããããä»ããã°ããã¨ãã解決æ³ãåæã§å ±åããã¦ããï¼ï¼ãã ãï¼åè¿°ãã Digest èªè¨¼ã®åé¡ã解決ãã¦ããªããã°ï¼ãã°ã«æ®ãã¨ã©ã¼ã¯æ¶ããªãï¼ï¼
httpd.conf ã®è¨å®ã¯ä»¥ä¸ã®ããã«ãªãï¼Header ãã£ã¬ã¯ãã£ãã使ãã«ã¯ mod_headers ãå¿ è¦ã§ããï¼
<Location /> Header add MS-Author-Via "DAV" </Location>
ãããã®ãã¡ã¤ã«ã¯ DocumentRoot ã¸æ¢ãã«è¡ããã¨ããã®ã§ï¼
ã¾ãï¼ããã§ã¯ Web ãã©ã«ã以å¤ãã Web ãµã¼ãã¸ã¢ã¯ã»ã¹ããã¨ããä½åãªããããã¤ãã¦æ°æã¡æªãã¨æãããããããªãï¼ãã®ã¨ãã¯ï¼ä»¥ä¸ã®ããã« User-Agent 㧠Web ãã©ã«ããã©ããå¤å®ãã¦ï¼Web ãã©ã«ãã®å ´åã®ã¿ããããä»å ããã°ããï¼BrowserMatch ãã£ã¬ã¯ãã£ãã使ãã«ã¯ mod_setenvif ãå¿ è¦ã§ããï¼
<Location /> BrowserMatch "Microsoft Data Access Internet Publishing Provider .*" WEB_FOLDER Header add MS-Author-Via "DAV" env=WEB_FOLDER </Location>
ãã ãï¼Web ãã©ã«ãã® User-Agent ã¯
Microsoft Data Access Internet Publishing Provider Cache Manager
Microsoft Data Access Internet Publishing Provider DAV 1.1Microsoft Data Access Internet Publishing Provider Protocol Discovery
Microsoft Data Access Internet Publishing Provider DAV
ãªã©è²ã ãããããªã®ã§æ£è¦è¡¨ç¾ã§æå®ãã¦ããï¼Windows ã®ãã¼ã¸ã§ã³ï¼Office XP ã®ã¤ã³ã¹ãã¼ã«ã®æç¡ï¼Web ãµã¼ãã®ãã¼ããªã©ã®éã㧠Web ãã©ã«ãèªä½ã®æåãå¤ãããããï¼
ã¡ãªã¿ã«ï¼èªåã tcpdump ã§ç¢ºèªãã Web ãã©ã«ãã® User-Agent ã¯
User-Agent: Microsoft Data Access Internet Publishing Provider DAV 1.1
ã ã£ãï¼ï¼Windows XP SP2, Office XP æªã¤ã³ã¹ãã¼ã«ï¼Apache ã®ãã¼ã㯠80ï¼
åè
å種 WebDAV ã¯ã©ã¤ã¢ã³ãã®æåã説æããã¦ããï¼
nemuiDoc: WebDAVClients
WebDAVãµã¼ãã®æ§ç¯ #2 (WindowsXPããã¢ã¯ã»ã¹ãã)
Windows XP + WebClient
ãã¤ãããã¯ã¼ã¯ï¼ãããã¯ã¼ã¯ãã¬ã¼ã¹ã追å ãã ãã WebDAV ãµã¼ãã追å ãããã¨ããã¨ãï¼èªè¨¼å¤±æãç¹°ãè¿ãã¦è¿½å ã§ããªã件ï¼èªè¨¼ããã£ã³ã»ã«ããã¨ï¼ãå ¥åãããã©ã«ãã¯æå¹ã§ã¯ãªãããã§ããå¥ã®ãã©ã«ããé¸æãã¦ãã ããããã¨ããã¨ã©ã¼ã¡ãã»ã¼ã¸ã表示ããã¦è¿½å ã«å¤±æããï¼ã¡ãªã¿ã«ï¼ãã®åé¡ã¯ WebDAV ãã£ã¬ã¯ããªã«èªè¨¼ãæãã¦ããªãã¦ãçºçããï¼
ã¯ã©ã¤ã¢ã³ãå´ã§å¯¾å¦ããå ´åã¯ï¼ã³ã³ããã¼ã«ããã«ï¼ç®¡çãã¼ã«ï¼ãµã¼ãã¹ ãã WebClient ãåæ¢ãã¦ï¼WebDAV ãµã¼ã追å å¾ã«ï¼åã³ WebClient ãµã¼ãã¹ãéå§ããã°ããï¼ï¼èªåã®å ´å㯠WebClient ãµã¼ãã¹ã¯æ¢ãã£ã±ãªãã«ãã¦ããï¼ç¹ã«å¿ è¦ãªãããï¼ï¼
ãµã¼ãå´ã§å¯¾å¦ããå ´åã¯ï¼mod_encoding ãå°å ¥ã㦠NormalizeUsername ãã£ã¬ã¯ãã£ããè¨å®ããã¨ãã解決æ³ãåæã§å ±åããã¦ããï¼ä»åã®åé¡ã¯ï¼WebClient ãèªè¨¼æã«ãµã¼ãã«ã¦ã¼ã¶åãéãã¨ãï¼ã¦ã¼ã¶åã®æååã«åæã«ãã¹ãåãä»ã足ãã¦ï¼ãããªã¦ã¼ã¶ããªããï¼ã¨æããã¦ãã模æ§ï¼NormalizeUsername ã¯ãã®åæã«å¤ããããã¦ã¼ã¶åãè£æ£ãã¦ããããããï¼ãã®æ¹æ³ã¯å½æ¹æªç¢ºèªï¼