<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <dfn>App Transport Security</dfn> (<dfn>ATS</dfn>) は、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">iOSアプリ</anchor>において<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">素のHTTP</anchor>
の接続を拒否し専ら <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTPS</anchor> を使うことを求めるものです。</p><section><h1>背景</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">素のHTTPを取り巻く脅威</anchor>が重大に捉えられるようになり、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web</anchor>
のみならず<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ネイティブアプリ</anchor>でも <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTPS</anchor> への移行が急務であるとして、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Apple</anchor> が <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">iOS</anchor> に導入したのが <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ATS</anchor> です。</p></section><section><h1>HSTS と ATS</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor> における <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HSTS</anchor> と <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ATS</anchor> は、名前と趣旨は似ていますが、
動作は全く異なります。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HSTS</anchor> は、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webサイト</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">著者</anchor>が、自サイトへの <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor>
アクセスを禁止し、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTPS</anchor> に自動的に<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">リダイレクト</anchor>するよう
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webブラウザー</anchor>に求めるものです。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ATS</anchor> は、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">iOS</anchor> が<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">アプリ</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor> アクセスを原則として禁止するもので、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">アプリ</anchor>の開発者が <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">iOS</anchor> 側に例外的に認める <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor> アクセスを指示できるというものです。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HSTS</anchor> よりも <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ATS</anchor> の方がかなり強力な制約となっています。</p></section><section><h1>歴史</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <cite xml:lang="en">iOS 9.0</cite>
(<time>2015-06-14 12:10:37 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-DontLinkElementID_13">https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-DontLinkElementID_13</anchor-external></figcaption><blockquote><p>App Transport Security (ATS) lets an app add a declaration to its Info.plist file that specifies the domains with which it needs secure communication. ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one.</p><p>If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible.</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <cite xml:lang="ja">【追記】iOS9でHTTP通信がSSL通信になるのを防ぐ方法</cite>
(<time>2015-06-14 12:11:45 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://nlogic.jp/?p=412">http://nlogic.jp/?p=412</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <cite xml:lang="en">App Transport Security Technote: App Transport Security Technote</cite>
(<time>2015-09-04 13:25:14 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/">https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/</anchor-external></figcaption><blockquote><p>App Transport Security is a feature that improves the security of connections between an app and web services. The feature consists of default connection requirements that conform to best practices for secure connections. Apps can override this default behavior and turn off transport security.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <cite xml:lang="en">【Apple WWDC 2016】iOS 10のApp Transport Securityと2016年末からのATS必須化についてAppleのエンジニアに聞いてきた - Hatena Developer Blog</cite>
( (<time>2016-06-17 09:29:15 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://developer.hatenastaff.com/entry/2016/06/16/165924">http://developer.hatenastaff.com/entry/2016/06/16/165924</anchor-external></figcaption><blockquote><p>iOS 9では従来通り、NSAllowsArbitraryLoads が YES であれば、自由にhttp通信が行えます。</p><p>iOS 10では、まず NSAllowsArbitraryLoadsInWebContent が YES かどうかで条件が別れます。NSAllowsArbitraryLoadsInWebContent が、設定されていないか NO である場合は、iOS9と同じ挙動になります。 YES に設定されている場合は、iOS 10では NSAllowsArbitraryLoads が無視され、WKWebViewのみがhttp通信を許されるようになります。</p><p>このとき、データ通信を行うNSURLSessionに加え、UIWebViewについてもhttp通信が許可されないのがポイントです。なるべくWKWebViewを利用して欲しいとのことでした。また、NSExceptionDomains を設定すれば、指定したドメインへのNSURLSessionやUIWebViewからのhttp通信も許可されるそうです。</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <cite xml:lang="ja">Apple、HTTPSを必須にする「ATSサポート」義務付けを延期 | スラド セキュリティ</cite>
(<time>2016-12-27 15:40:51 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://security.srad.jp/story/16/12/26/0516206/">https://security.srad.jp/story/16/12/26/0516206/</anchor-external></p></section></body></html>