ã¤ã³ãã©ã¹ãã©ã¯ãã£ã¼é¨é·ã®æ (@kani_b) ã§ãã
2017å¹´1æ5æ¥ããã£ã¦ãã¯ãã¯ããã ã«ãããå ¨ãã¼ã¸ã§ HTTPS ã使ãããããã«ãªãã¾ããã å®å ¨ HTTPS åãããã«ãããããã®çç±ãå ·ä½çãªé²ãæ¹ã«ã¤ãã¦ç´¹ä»ãã¾ãã 以å SRE Tech Talks #2 ã«ã¦ä¸é¨çºè¡¨ããå 容ãå«ã¿ã¾ãã®ã§ããèå³ã®ããæ¹ã¯ãããã¦ã¹ã©ã¤ããã覧ãã ããã
å®å ¨ HTTPS åã«è¸ã¿åã£ãçç±
以åã®ã¯ãã¯ãããã¯ããã°ã¤ã³ãç»é²æ å ±ã®åç §ãªã©ãããããå人æ å ±ãèªè¨¼æ å ±ãæ±ãç®æã®ã¿ã« HTTPS ã使ããã¦ãã¾ããã ãã®ããã«ãå¿ è¦ãªç®æã«ã®ã¿ HTTPS ã使ããæ§æã¯ãããç¨åº¦æ´å²ã®ãã Web ãµã¼ãã¹ã«ããã¦ãã使ããã¦ããæ§æã§ãã ãã®ç¶æ ãããå®å ¨ HTTPS åã«è¸ã¿åã£ãçç±ã説æãã¾ãã
ãµã¼ãã¹ãããã»ãã¥ã¢ã«ãããã
HTTPS ã®å©ç¨ãèããã«ãããã¾ãæãæµ®ãã¶å©ç¹ã¯ããéä¿¡ãæå·åã§ãããããã¦ãéä¿¡å ãèªè¨¼ã§ããããã¨ã§ããããåè¿°ã®éããããã¾ã§ã¯æ©å¯æ§ã®é«ãæ å ±ãæ±ãç®æã®ã¿ã§ HTTPS ãå©ç¨ãã¦ãã¾ãããããã ãã§ããå®ãããæ å ±ãç°¡åã«çªåã§ãã¦ãã¾ãç¶æ ã¯é¿ãããã¨ãã§ãã¾ããããããç¾ä»£ã¯å ¬è¡ç¡ç· LAN ãªã©ãªã¼ãã³ãªãããã¯ã¼ã¯ãããªãæ®åãã¦ãããã¾ãå½å®¶ã¬ãã«ã§ã®çè´ãªã©ãæããã«ãªã£ã¦ãã¦ãã¾ãã
ãã¬ã·ããµã¤ããããã§å¤§ãããªãã¨æãããããããã¾ããããé£äºã¯äººéã®çæ´»ã¨å¯æ¥ã«ç´ä»ãã¦ãããæãã¬æ å ±ãå¾ãããå ´åãããã¾ããä¾ãã°ã¯ãã¯ãããã¯ã¬ã·ãã®æ¤ç´¢æ©è½ãæä¾ãã¦ãã¾ãããã®æ©è½ã«ã¯ããã¾ã§ HTTP ã使ããã¦ãã¾ãããããããå®éã®æ¤ç´¢ååãè¦ã¦ã¿ãã¨ãä¾ãã°ããã¤ã¨ãããã§ãã£ãããç¹å®ã®ç æ° (ç³å°¿ç ãªã©) ã«é©ããã¬ã·ããªã©ããã©ã¤ãã·ã«å¤§ããé¢ãããã¼ã¯ã¼ããå«ã¾ãããã¨ãããã¾ãã
ããè¦ãã¨ããã§ã¯æ¤ç´¢ã¯ HTTPS ã«ããã»ããè¯ããã¨ããæ°æã¡ãåãã¾ããããããæ¤ç´¢ã ãã§ã¯ãªããä»ã®æ©è½ã«ã¤ãã¦ãåæ§ã®ãã¨ãèãããã¾ããããã®æ©è½ãå®éã©ã®ããã«ä½¿ãããã®ãããå®å ¨ã«æ³å®ãããã¨ã¯å°é£ã§ãããã£ã¦ãå ¨ã¦ã®éä¿¡ãæå·åããã¦ããç¶æ ãã¾ãåæã¨ãããã¨ã«ãã¾ããããã¡ãããHTTPS ã®ä¸ã§ããåããããæ å ±ãã©ã®ããã«æ±ãããããã¯ã¾ãå¥ã®è©±ã§ãããã¢ããªã±ã¼ã·ã§ã³ã¬ã¤ã¤ã«ããã¦ã©ã®ããã«æ å ±ãæ±ããã¯ä»å¾ãèæ ®ãã¦ããå¿ è¦ãããã¾ãã
ãã©ãããã©ã¼ã ã®é²å
iOS ã® App Transport Security (ATS) 対å¿å¿ é åãªã©ãã¯ããããã©ãããã©ã¼ã å´ã§éä¿¡ã HTTPS ã«ããæµããé²ãã§ãã¾ããç¾å¨å®å ¨ HTTPS åãé²ãããã¦ãã主ãªè¦å ã¯ããã«ããã®ã§ã¯ãªããã¨æãã¾ããChrome ã«ããã¦ãè¿å¹´ã¯ HTTPS 絡ã¿ã®å¤æ´ãçãã§ããChrome 56 ã§ãªãªã¼ã¹ãããã HTTP ãã¼ã¸ã«ãã°ã¤ã³ãã©ã¼ã ã表示ããã¦ããå ´åã« "å®å ¨ã§ãªããã¼ã¸" ã¨ããè¦åãåºãæ©è½ã¯ãå¤ãã® HTTP ãã¼ã¸ã§ãã°ã¤ã³ç¨ã®ã¢ã¼ãã«ã表示ãã¦ããã¯ãã¯ãããã«ãå½±é¿ãåã¼ãå¤æ´ã§ããã
ã¾ããæ¤ç´¢ã¨ã³ã¸ã³å´ã®å¤æ´ãè¦å ã®ä¸ã¤ã§ããGoogle ã¯æ¤ç´¢ã©ã³ãã³ã°ã«ãã㦠HTTPS ã®å©ç¨æç¡ãã©ã³ãã³ã°ã¢ã«ã´ãªãºã ã«å©ç¨ãããã¨ãçºè¡¨ãã¦ãã¾ããã¾ãå¤ãã®æ¤ç´¢ã¨ã³ã¸ã³ãæ¤ç´¢ç»é¢ãã®ãã®ã HTTPS åãã¦ããã HTTPS åãªãã«èªç¤¾ãµã¼ãã¹ã¸ã®æµå ¥ãªã©ãæ£ç¢ºã«è¨æ¸¬ãããã¨ã¯é£ãããªãã¾ããããããå¤é¨ã®ãã©ãããã©ã¼ã ã HTTPS åã¸ã¨èµãåã£ã¦ãããã¨ãã移è¡çç±ã®ä¸ã¤ã«ãªãã¾ããã
éçºã®ããã«ãã
å®å ¨ HTTPS åããã¦ããªããµã¼ãã¹ã®å¤ãã§ããã°ã¤ã³ãã©ã¼ã ãç»é²æ å ±ã®åç §ãªã©ä¸é¨ã®ç»é¢ã®ã¿ã HTTPS åããã¦ãã¾ããã¯ãã¯ãããã§ãé·ãéåæ§ã« HTTPS ã使ããã¦ããç»é¢ã使ãåãã¦ãã¾ããããéçºè ãããã®ç»é¢ã«ã¯ HTTPS ãå¿ è¦ãã©ããããå¤æãã¦ä½¿ãåãã¦ãããããæ¬æ¥ HTTPS ã§ããã¹ãç»é¢ãããã§ãªãããªã©ã®äºæ ãèµ·ãããç¶æ³ã§ãããã¾ããHTTPS ç»é¢ã§æä¾ããã¦ããã¨ã³ããã¤ã³ãã«ã¢ã¯ã»ã¹ããããã« CORS ã«å¯¾å¿ããå¿ è¦ããããªã©ãæ®æ®µã®éçºã«ãå½±é¿ãåãã§ãã¾ããã
æ°æè¡ã¸ã®å¯¾å¿
HTTPS ã¯ãç¾å¨åºã¦ãã¦ããæ°ããæè¡ã®å¿ é è¦ä»¶ã¨ããããã¨ãå¤ããªãã¾ãããä¾ãã° HTTP/2 ã¯ãã®ä»£è¡¨æ ¼ (æ£ç¢ºã«ã¯ HTTP/2 èªä½ã HTTPS ãè¦æ±ãã¦ããããã§ã¯ãªãããã¤ã³ã¿ã¼ããããµã¼ãã¹ã«ãããã¤ããããã«ã¯ã»ã¼å¿ é ) ã§ããããä»ã«ããServiceWorker ã Web Push, iOS ã® Shared Web Credentials ãªã©ã¯ HTTPS ãå©ç¨ããã¦ãããã¨ãè¦ä»¶ã¨ãªã£ã¦ãã¾ãã ããããæ°ããæè¡ãæ´»ããã¦ããããã«ããå®å ¨ HTTPS åã¯å¿ è¦ã§ããã
以ä¸ããã¯ãã¯ããããå®å ¨ HTTPS åããã«è³ã£ãçç±ã§ããWeb ãµã¼ãã¹ã«ããã¦ããã¯ãå®å ¨ HTTPS åãããªããã¸ãã£ããªçç±ã¯ãªãã¨èãã¾ãã
å®å ¨ HTTPS åã¾ã§ã®éã®ã
å®å ¨ HTTPS åããçç±ãã¾ã¨ã¾ã£ãã¨ããã§ã次ã«å®éã©ã®ããã« HTTPS åããããå ·ä½çãªé²ãæ¹ã«ã¤ãã¦èª¬æãã¾ããå®å ¨ HTTPS åã¯ãæ¦ã以ä¸ã®ããã«é²ãã¾ããã
- HTTPS ãã¹ãç°å¢ãä½æãã
- mixed content ããªãã
- 段éçãªãªã¼ã¹
- å ¨ä½ãªãªã¼ã¹
å®å ¨ HTTPS åã¯ç¤¾å ã®ã¢ããªã±ã¼ã·ã§ã³ãæ¤ç´¢ã¨ã³ã¸ã³ã¯ãã¡ããã®ãã¨ãææºä»ç¤¾ããã®ã¢ã¯ã»ã¹ãã¡ãã£ã¢åªä½æ²è¼æã«å©ç¨ããã URL ãªã©ããããç¯å²ã«å½±é¿ããããã社å ã§ã®å®£è¨ã¯æ©ãã«è¡ãã¾ãããçµæã¨ãã¦ãå¤ãã®é¨ç½²ã®ååãå¾ãªããå®å ¨ HTTPS åãé²ãããã¨ãã§ãã¾ããã
HTTPS ãã¹ãç°å¢ã®ä½æ
ã¾ã㯠HTTPS ã«ãªã£ãéã®ã¢ããªã±ã¼ã·ã§ã³ããã¹ãã§ããç°å¢ãã¤ããå¿ è¦ãããã¾ãã ã¯ãã¯ãããã§ã¯ãRails ã® HTTPS å¿ é åã¹ã¤ããã§ãã force_ssl ãå©ç¨ããç¹å¥ãª Cookie ããªã¯ã¨ã¹ãã«å·®ãè¾¼ãã å ´åã« force_ssl ãæå¹åãããå°ç¨ã®ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«ã«ã¼ãã£ã³ã°ãããããã«ãã¦ãã¾ããããã¡ãã¯ã段éçãªãªã¼ã¹ã®ã¿ã¤ãã³ã°ã§ã¯å é¨ã¢ã¯ã»ã¹ã Cookie ã®æ±ãã«ä¸é½åããã£ãããããªãã¼ã¹ãããã·ã§ãªãã¤ã¬ã¯ãããå½¢ã«å¤æ´ãã¦ãã¾ãã
mixed content ããªãã
mixed content ã¨ã¯ãHTTPS ã®ä¸ã« HTTP ã®ãªã½ã¼ã¹ãå«ã¾ãããã¨ã§ããå¤ãã®ãã©ã¦ã¶ã¯ãmixed content ã«ãªã£ã¦ãããªã½ã¼ã¹ã¯ãã¼ãããªãããããã¯åä½ãããªããããªå¶ç´ãæã£ã¦ãããããå®å ¨ HTTPS åã«ããã mixed content ããªãããã¨ã¯å¿ é ã§ããæã大å¤ãªã®ããã®å¯¾å¿ã ã¨æãã¾ãã
ã¢ããªã±ã¼ã·ã§ã³ã CSS ã®ä¸ã«åã¾ã£ã¦ãã HTTP URL ãæ¢ãã ããHTTPS ã«ä¿®æ£ãã¾ããã¯ãã¯ãããã«ããã¦ããããã¤ã HTTP URL ãè¨è¼ããã¦ãã¾ã£ã¦ããã±ã¼ã¹ãããã¾ããã
ãããã£ã URL ã¯ã protocol-relative URL (//:
ã§ã¯ãã¾ã URL) ã«ç½®ãæããããã¢ããªã±ã¼ã·ã§ã³å´ã§ãªã¯ã¨ã¹ããããã³ã«ãè¦ã¦ URL ãçæããããã«ä¿®æ£ãã¾ãã
大ããªã³ã¼ããã¼ã¹ã«ããã¦ããã®ä½æ¥ã¯æ ¹æ°ã®è¦ããã®ã§ããã¾ãããã®ä½æ¥ããã¦ããéããµã¼ãã¹ã¯éçºããç¶ãã¦ãããããçµãããããã¾ãããã¾ããmixed content ã¯ã³ã¼ããã®ãã®ä»¥å¤ (ã¦ã¼ã¶ã®æã¤ãã¼ã¿ãªã©) ã«èµ·å ãããã¨ãå¤ããããå®éã«æ¬çªã«åºãã¦ãã¹ããã¦ãããã¨ã大ããªå©ãã«ãªãã¾ãããã®ããä»åã¯ãããã¤ãã®ä¸»è¦æ©è½ãå®ãã¦ããããããã« mixed content ãçºçããªã段éã§æ¬¡ã®ã¹ãããã«é²ããã¨ã«ãã¾ããã
ãããã¯ã¼ã¯åºåã® HTTPS 対å¿
ãããã¯ã¼ã¯åºåã¯ããã®ä»çµã¿ä¸å®éã«é ä¿¡ãããåºåã¯ãªã¨ã¤ãã£ãã HTTPS ãå©ç¨ãã¦ããããé常ã«éè¦ã§ããã¯ãã¯ããããå®å ¨ HTTPS åã«çæãã2015å¹´8æé ã¯ãã¾ã å¤ãã®äºæ¥è ã HTTPS ã«å¯¾å¿ãã¦ããªãããããã¯å¯¾å¿ãä¿è¨¼ã§ããªãç¶æ ã§ãããã¤ã¾ãããããã¯ã¼ã¯åºåãé ä¿¡ããã¨ãmixed content ãèµ·ãã¦ãã¾ãå¯è½æ§ãé«ãã£ãã®ã§ãã
ããããATS ããªãªã¼ã¹ããããã¨ã«ãããã®ããç¾å¨ã§ã¯å¤ãã®äºæ¥è ã HTTPS 対å¿ãé²ãã¦ãã¾ããã¯ãã¯ãããã§ãä¸é¨ãããã¯ã¼ã¯åºåãå©ç¨ããã¦ããããã2015å¹´ã®çææã«ã¯ãããåå ã¨ãªãä¸åº¦ãã³ãã£ã³ã°ã¨ãªã£ããã®ã®ãæµããå¤ãã£ããã¨ã§åã³é²ãããã¨ãã§ããããã«ãªãã¾ããããã®ãããã®äºæ 㯠@suzu_v ããã®ã¹ã©ã¤ãã«é常ã«ããããããã¾ã¨ã¾ã£ã¦ãã¾ãã
å®å ¨ HTTPS åå®äºå¾ããããã¯ã¼ã¯åºåã®å£²ä¸ã«ã¤ãã¦äºæ¥é¨ã¨ç¢ºèªãè¡ãã¾ããããç¹ã«å½±é¿ã¯ããã¾ããã§ããã
段éçãªãªã¼ã¹
å®å ¨ HTTPS åã«ããå½±é¿ã確èªããããã段éçãªãªãªã¼ã¹ãè¡ãã¾ããã ãªãã¼ã¹ãããã·ã®ã¬ã¤ã¤ã§ãç¹å®ã® Cookie ãç¨ãã¦å ¨ã¦ã¼ã¶ã®ãã¡æ°%ãå®å ¨ HTTPS åãããã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«ã¢ã¯ã»ã¹ããããã«ãã¾ãã ã¢ããªã±ã¼ã·ã§ã³å´ã®ã¨ã©ã¼ãããã©ã¼ãã³ã¹ããã©ãã¯ãã¤ã¤ãã¦ã¼ã¶ããã®ãæè¦ããåãåãããã¦ã¼ã¶ãµãã¼ãé¨éã¨é£æºããªãã確èªãã¾ãã çµæã¨ãã¦ãããã¤ãã®ãªãã¤ã¬ã¯ããã¹ã¨ä¸å ·åãè¦ã¤ããä¿®æ£ãã¾ããã
CSP Report ã®æ´»ç¨
ä»åã®ç§»è¡ã§ã¯å©ç¨ã§ããªãã£ãã®ã§ãããContent Security Policy (CSP) ã®æ©è½ã使ããã¨ã§ãããå¹ççã« mixed content ã®æ
å ±ãéãããã¨ãã§ãã¾ããCSP ã®ãã£ã¬ã¯ãã£ãã¨ã㦠block-all-mixed-content
ãã£ã¬ã¯ãã£ããããããããæå®ããã¨ãã©ã¦ã¶ã¯ mixed content ãä¸åèªã¿è¾¼ã¿ã¾ãããã¾ããCSP ã®æ©è½ã¨ãã¦ãããªã·éåãçºçããéã«æå®ãã URL ã«ã¬ãã¼ããéåºããæ©è½ (report-uri *1 ) ãããã¾ãã
ããããæ´»ç¨ãããã¨ã§ãã¦ã¼ã¶ã®ãã©ã¦ã¶ã§èµ·ãã mixed content æ
å ±ãåéãããã¨ãå¯è½ã§ãã
ãã®ã¾ã¾ã¦ã¼ã¶ã«ãªãªã¼ã¹ãã¦ãã¾ã㨠mixed content ãåå¨ããå ´åæ¬å½ã«ãªã½ã¼ã¹ãèªã¿è¾¼ã¾ããªããªã£ã¦ãã¾ããããContent-Security-Policy
ãããã§ãªã Content-Security-Policy-Report-Only
ããããå©ç¨ãã¾ãã
Content-Security-Policy-Report-Only: block-all-mixed-content; report-uri https://example.com/csp-report
ä¸è¨ã®ãããªããããéåºããã¨ããã mixed content ãçºçããå ´åæå®ãã URL ã«ãã®ãã©ã¦ã¶ãã JSON ã¬ãã¼ãã POST ããã¾ããå 容ã¯ä»¥ä¸ã®ãããªãã®ã§ãã
{ "csp-report": { "blocked-uri": "http://example.com/some_picture.png", "disposition": "report", "document-uri": "https://example.com/mixed_content.html", "effective-directive": "block-all-mixed-content", "line-number": 6, "original-policy": "block-all-mixed-content; report-uri https://example.com/csp-report", "referrer": "", "source-file": "https://example.com/mixed_content.html", "status-code": 0, "violated-directive": "block-all-mixed-content" } }
JSON ãéããã¦ããã ãã§ãã®ã§ãåãåããµã¼ãã®å®è£ ãç°¡ç´ ãªãã¨ã«å ãã Elasticsearch ãªã©ã«æå ¥ãããã¨ã§ç°¡åã«åæãããã¨ãå¯è½ã§ãã ã¯ãã¯ãããã§ã¯ãä¸é¨ã®ã¦ã¼ã¶ã« CSP ãéåºãã¦ãã¾ããã¾ããã¬ãã¼ãã®åä¿¡ã«ã¯ Amazon API Gateway ã使ããåãåã£ã JSON ã Amazon Kinesis Firehose ã«éä¿¡ã㦠Amazon Elasticsearch Service ã§åæãè¡ããããã«ãã¦ãã¾ããå®è£ ãå¿ è¦ãªç®æ㯠API Gateway ã JSON ãåãåãç®æã®ã¿ã§ãã®ã§ãé常ã«æ¥½ã§ãã
å ¨ä½ãªãªã¼ã¹
段éçãªãªã¼ã¹ã«ããã¦å¾ã ã«å ¬éç¯å²ãåºãã¦ãããåé¡ããªããã°å ¨ä½ãªãªã¼ã¹ã¸ã¨é²ã¿ã¾ãã ã¢ããªã±ã¼ã·ã§ã³ã HTTPS æ¥ç¶ãåãå ¥ããããç¶æ ã«ããä¸ã§ããªãã¼ã¹ãããã·ã§ãªãã¤ã¬ã¯ããè¡ãã¾ãããåé¡ãå¤æããéããã«åãæ»ããããã以ä¸ã®ç¹ã«æ°ãã¤ãã¦ãã¾ããã
- HTTP 301 ã§ã¯ãªã 307 (Temporary Redirect) ã®å©ç¨
- Cookie å±æ§ã HSTS ãªã©åãæ»ãã®ãã«ããå¤æ´ãè¡ããªã
- ã¦ã¼ã¶ãµãã¼ãé¨éã¨ã®åå
ãªãªã¼ã¹å¾ã«ç£è¦ãè¡ãã¾ãããã大ããªåé¡ã¯è¦å½ããã¾ããã§ããã
åãæ»ãã®ãã«ããå¤æ´
å®å ¨ HTTPS åã«ããã "å¾æ»ãã®ãã«ãã" å¤æ´ã¨ãã¦ãCookie ã¸ã® secure å±æ§ã®ä»ä¸ã HTTP Strict Transport Security (HSTS) ãããã¾ãã
Cookie ã® secure å±æ§ã¯ãCookie ã HTTPS ç°å¢ä¸ã§ã®ã¿éåºããå±æ§ã§ãããè¨å®ãã¹ãæ»æã«ããæå³ããªã HTTP ã¢ã¯ã»ã¹ã§ã® Cookie æ¼åºãé²ããã¨ãã§ãã¾ãã å®å ¨ HTTPS åãå®äºããã°ãã®å±æ§ãä»ä¸ãããã¨ã¯ä½ãåé¡ãªãã®ã§ãããä¸ä¸ HTTP ã¸ã®åãæ»ããè¡ã£ãéã«ãä¾ãã°æ¢åã®ã¦ã¼ã¶ã»ãã·ã§ã³ãå ¨ã¦ç¡å¹ (ã»ãã·ã§ã³ Cookie ãéåºãããªã) ã«ãªãã¨ãã£ãäºæ ãæãã¾ãã ãã®ãããå®å ¨ HTTPS åãè¡ã£ãä¸ã§ããµã¼ãã¹ã«å½±é¿ããªããã¨ã確èªã§ããã¿ã¤ãã³ã°ã§ä»ä¸ããå¿ è¦ãããã¾ãã
HTTP Strict Transport Security (HSTS) ã¯ãWeb ãµã¼ãã¹å´ãããã©ã¦ã¶ã«å¯¾ãã次å以éãã®ãã¡ã¤ã³ã«ã¯ HTTPS ã§ã¢ã¯ã»ã¹ãã¦ã»ãããæ¨ãä¼ãè¨æ¶ãã¦ãããä»çµã¿ã§ãã å®å ¨ HTTPS åã«ããã HTTP ãã¼ã¸ã¸ã®ã¢ã¯ã»ã¹ã HTTPS ãã¼ã¸ã«ãªãã¤ã¬ã¯ããã¾ããã¤ã¾ãããªãã¤ã¬ã¯ããããã¾ã§ã®ååã¢ã¯ã»ã¹ã¯ HTTP ã«ãªã£ã¦ãã¾ãã¾ãã HSTS ãä»ä¸ãããã¨ã§ãä¾ãã°ã¦ã¼ã¶ããã©ã¦ã¶ã«ãã¡ã¤ã³ã®ã¿ãå ¥åãã¦ã¢ã¯ã»ã¹ããå ´åã§ãããã®ãã¡ã¤ã³ã«ã¢ã¯ã»ã¹ãããã¨ããããã° HTTPS ãå©ç¨ããããã«ãªãã¾ãã
ãã®ä»çµã¿ãããã©ã¦ã¶ã®æåãå¤æ´ããããå°å ¥ã«ã¯æ³¨æãå¿ è¦ã§ããHSTS ãè¨å®ããããã¡ã¤ã³ã§ãåãæ»ãã®ããã« HTTPS ãã HTTP ã¸ã®ãªãã¤ã¬ã¯ããåã«è¡ãã¨ãªãã¤ã¬ã¯ãã«ã¼ããçºçãã¾ãã HSTS 㯠max-age ã 0 ã«ãã HSTS ããããéåºãããã¨ã§ç¡å¹ã«ãããã¨ãã§ãã¾ãã®ã§ãsecure å±æ§ããã¯åãæ»ããããã¨ããã¾ããããããHSTS ã¯å¸¸ã« HTTPS ã§éåºãããå¿ è¦ããã (ç¡å¹ã«ãããå ´åã§ã) ã¨ããç¹ã«ã¯æ³¨æãå¿ è¦ã§ãã ä¾ãã°ãã¼ããã©ã³ãµã®è² è·ãå¿é ãªã±ã¼ã¹ã§ãä¸åº¦ HSTS ãå ¨ä½ã§æå¹ã«ãã¦ãã¾ãã¨ãåãæ»ãããã¨ãç¶ç¶ã㦠HTTPS ã¢ã¯ã»ã¹ã (ãªãã¤ã¬ã¯ããè¡ãããã¾ã§) åãç¶ããå¿ è¦ãããã¾ãã
ä¸è¨ã®ãã¨ãè¸ã¾ããã¯ãã¯ãããã§ã¯ã¾ã HSTS ãæå¹ã«ãã¦æå³ãã HTTP ã§ã¢ã¯ã»ã¹ããã¦ãããã¼ã¸ãåããªãæ©è½ããªããã¨ã社å ã®ã¨ã³ã¸ãã¢ãäºæ¥é¨éã«ç¢ºèªãã¦ãã secure å±æ§ã®ä»ä¸ãè¡ãã¾ããã ã¢ããªã±ã¼ã·ã§ã³å´ã§ãããéåºãè¡ããã¨ãå¯è½ã§ãããè¨å®ã®è¦éãããããããããªãã¼ã¹ãããã·ãå©ç¨ãã¦ãã¾ãã
å ¨ä½ãªãªã¼ã¹å¾
ç»åããã¾ãå©ç¨ããã¦ããªãæ©è½ãªã©ã§ãã©ãã«ãèµ·ãããã¨ãããããããæè¦ããåãåãããè¦ãªããåå¥ã«å¯¾å¿ãè¡ã£ã¦ãã¾ãã ã¾ããURL ãå¤æ´ããããããéè¨ããããªã©ã®åä½ã«ãæ°ãé ãå¿ è¦ãããã¾ããã
å®äºå¾ã®åé¿ãªã©
ä¸è¨ã®ãããªé²ãæ¹ã§ãç¡äºã«ã¯ãã¯ããããå®å ¨ HTTPS åãããã¨ãã§ãã¾ããã 移è¡ã«ããããããã©ã¼ãã³ã¹ãªã©ãæ¸å¿µã¨ãã¦ä¸ãã£ã¦ãã¾ããããç¾å¨ç¹ã«åé¡ã«ã¯ãªã£ã¦ãã¾ãããHTTPS ã®ãªã¼ãã¼ãããã¯å½ç¶åå¨ãã¾ãããè¿å¹´ã§ã¯ç«¯æ«ã®ãªããåããããã¯ã¼ã¯ã®é«éåãå®å®åã«ãã大ããªåé¡ã«ã¯ãªãã«ããã¨èãã¦ãã¾ããã¾ããHTTP/2 ã TLS 1.3 ãªã©ãããã³ã«ã®é²åã«ããããããªã¼ãã¼ãããã¯æ¸ãããã¨èãã¦ãã¾ãã ã¾ããä¸è¿°ã®éããããã¯ã¼ã¯åºåã®å£²ä¸ããæ¤ç´¢ã¨ã³ã¸ã³ã®é ä½ãªã©ã«ãå½±é¿ã¯ã¿ããã¾ããã§ããã
ãããã«
ã¯ãã¯ããããå®å ¨ HTTPS åããèæ¯ãå ·ä½çãªé²ãæ¹ã«ã¤ãã¦ãç´¹ä»ãã¾ãããç¾å¨ã¯ãå ¬éãã¦ããå ¨ã¦ã®ãµã¼ãã¹ã HTTPS ã§æä¾ãã¦ãã¾ãã å®å ¨ HTTPS åã¯ãã¨ã³ã¸ãã¢ã«éããæ§ã ãªäººãå·»ãè¾¼ãå¿ è¦ããããå ´åã«ãã£ã¦ã¯å°ãæ ¹æ°ãè¦ãä½æ¥ã«ãªãã¾ããã段éçãªãªã¼ã¹ã CSP ãªã©ã使ããã¨ã§ããããé²ãã¦ãããã¨ãå¯è½ã§ãã
å人çã«ã¯ãå®å ¨ HTTPS åã«éãããã¦ã¼ã¶ãå®å ¨ã«ã¤ã³ã¿ã¼ããããå©ç¨ã§ããããã«ãããã¨ã¯ Web ãµã¼ãã¹äºæ¥è ã®ä¸ã¤ã®è²¬åã¨èãã¦ãã¾ããå®å ¨ HTTPS åã¯ããã®ä¸ã§ãå®è¡ã®ããã®éå£ããªããªãã¤ã¤ããæ¹åã®ä¸ã¤ã§ãã
ã¦ã¼ã¶ã®å®å ¨ãæ°æè¡ãªã©ãWeb ã次ã®æ®µéã«é²ãã§ããããã«ã HTTPS 対å¿ã¯ä»å¾ããå¿ é ã«ãªããã¨ã§ãããããã®è¨äºããã¾ã HTTPS 移è¡ãæ¸ãã§ããªãæ¹ã®ãå½¹ã«ç«ã¦ã°å¹¸ãã§ãã
*1:report-uri 㯠CSP Level 3 ã«ããã¦å»æ¢ããã¦ãããããä»å¾ã¯ report-to ã使ã£ã¦ããå¿ è¦ãããã¾ã