Server Name Indication
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/11/18 13:56 UTC 版)
SNIは特に、HTTP 1.1の名前ベースバーチャルホストをHTTPSに対応させるために使われる。SNIを機能させるには、Webサーバ側とブラウザ側両面の対応が必要である。SNIを実装しないブラウザでは全てのホスト名で同じサーバ証明書が使われるため、警告が表示されることがある。2016年時点でPC・モバイルの主要なブラウザで問題なく利用できる状況である。
問題の背景
SSL/TLS接続のはじめに、クライアントはSSL/TLSのサーバから(サーバとCAの)証明書を受け取り、証明書の改ざんされていないことなどを確認する。サーバ証明書にはホスト名が書かれており、それが今接続しようとしているホスト名と一致することをクライアントは確認する。そうでない場合、なりすましや中間者攻撃の恐れがあるため、クライアントはユーザに警告をする。ユーザの責任で証明書を信用し、警告を迂回することができるアプリケーションも存在する。
HTTPの場合、名前ベースバーチャルホストを使うと、複数のホスト名(同一のドメインであれ、異なるドメインであれ)を単一のサーバと単一のグローバルIPで運用できる。これは、ブラウザ側がHTTPヘッダによって希望のホスト名を指定することで働く。しかし、HTTPSの場合、HTTP要求をやりとりする前にSSL/TLSハンドシェイクを行う必要がある。このため、ブラウザがどのホストを訪問するかを、ハンドシェイク時点でサーバ側には予測できず、HTTPヘッダのホスト名によって複数枚のサーバ証明書を使い分けることができない。したがって、単一のサーバで複数枚のサーバ証明書を使い分けるには名前ベースバーチャルホストは利用できず、ホスト名ごとに異なるグローバルIPを使う必要があった(IPベースバーチャルホスト)。
この問題への対処方法として、1枚のサーバ証明書に複数のホスト名を指定する手段が知られていた。X.509 v3の証明書で導入されたsubjectAltName拡張を利用することで、追加のホスト名を指定できる。通常、主体者のCommon Name属性同様、こちらでもワイルドカードを使える。しかし、実運用においてサーバの運用する全てのホスト名を予めCSRに含めておくことは現実的ではなく、ホスト(ワイルドカードの場合、ドメイン)名が増えるたびに別々にサーバ証明書を導入することが多い。2005年から、CAcertはTLSをバーチャルホスト下で使う方法について様々な実験を行なった[1]が、多くは非実用的なものだった。例えば、subjectAltName拡張を使って運用する全ドメインのホスト名を1枚のサーバ証明書に集約し、ドメインが増えたりドメイン名が変わったりするごとに取得しなおすという方法[2]が提案された。
これらの事情によって、複数のサーバ証明書を使い分けたいサーバは、単数または少数のホスト名をIP別に運用することが要求される。ホスト(ワイルドカードの場合、ドメイン)名ごとに別のグローバルIPを取得することはコストがかかる(IPアドレス枯渇問題)ため、多くのWebサイトにはHTTPS通信の利用はハードルが高かった。
SNIによる解決
Server Name Indication(SNI)では、TLSに拡張を加えることでこの問題に対処する。TLSのハンドシェイク手続きで、HTTPSクライアントが希望するドメイン名を伝える(この部分は平文となる)[3]。それによってサーバが対応するドメイン名を記した証明書を使うことが可能になる。サーバとクライアントが共にSNIに対応していれば、一つのIPで複数のドメインにHTTPSサーバを提供することが可能になる。
SNIは2003年6月、RFC 3546「TLS拡張仕様」に加わった。その後更新され、2014年1月現在、SNIの記述のある最新の仕様はRFC 6066 (日本語訳) である。
- ^ “CAcert VHostTaskForce”. CAcert Wiki. 2012年8月26日閲覧。
- ^ “What is a Multiple Domain (UCC) SSL Certificate?”. 2012年8月26日閲覧。
- ^ “TLS Server Name Indication”. Paul's Journal. 2012年8月26日閲覧。
- ^ Patton, Christopher (2020年12月8日). “Good-bye ESNI, hello ECH!”. 2022年8月6日閲覧。
- ^ “EdelKey Project”. 2012年8月26日閲覧。
- ^ Brand, Kaspar (2009年3月29日). “TLS SNI Test Site”. 2012年8月26日閲覧。
- ^ “Understanding Certificate Name Mismatches” (2009年12月7日). 2013年7月8日閲覧。
- ^ Opera (2005年2月25日). “Changelog for Opera [8] Beta 2 for Windows (via Archive.org)”. Opera Changelogs for Windows. Opera.com. 2005年11月23日時点のオリジナルよりアーカイブ。2013年7月19日閲覧。 “Readded experimental support for TLS Extensions and TLS 1.1. Setting is disabled by default.”
- ^ “Google Chrome, Issue 43142, Use SSLClientSocketNSS on Windows by default” (2010-10-29 - Although many report Chrome 8 does not work with SNI on XP and Win7). 2012年8月26日閲覧。
- ^ Kehrer, Paul. “SNI in iOS 4.0”. 2010年11月22日閲覧。
- ^ “Bug 122433: Server Name Identification support”. Bugs.kde.org. 2011年7月18日閲覧。
- ^ “Issue 12908 - android Https - websites that support Server Name Indication (SNI) don't work”. code.google.com. 2011年8月23日閲覧。
- ^ “Bug 34607: Support for Server Name Indication”. Apache Software Foundation. 2012年8月26日閲覧。
- ^ “Revision 776281: adding support for Server Name Indication to the Apache 2.2.x branch”. Apache Software Foundation. 2012年8月26日閲覧。
- ^ “CHANGES: Server Name Indication support is listed under the changes for Apache 2.2.12”. Apache Software Foundation. 2012年8月26日閲覧。
- ^ Notaras, George (2007年8月10日). “SSL-enabled Name-based Apache Virtual Hosts with mod_gnutls”. 2012年8月26日閲覧。
- ^ “1.4.24 - now with TLS SNI and money back guarantee”. Blog.lighttpd.net. 2011年3月8日閲覧。
- ^ “#386 (TLS servername extension (SNI) for namebased TLS-vhosts)”. Trac.lighttpd.net. 2011年3月8日閲覧。
- ^ “sol13452: Configuring a virtual server to serve multiple HTTPS sites using TLS Server Name Indication (SNI) feature”. ask.f5.com. 2012年3月26日閲覧。
- ^ “IBM HTTP Server SSL Questions and Answers”. Publib.boulder.ibm.com. 2011年3月8日閲覧。
- ^ “IHS 8 powered by Apache 2.2.x ?”. Publib.boulder.ibm.com. 2011年3月8日閲覧。
- ^ “Apsis Gmbh”. apsis.ch. 2011年8月18日閲覧。
- ^ “What’s New in IIS 8”. weblogs.asp.net. 2012年4月1日閲覧。
- ^ “Open Source PageKite”. PageKite.net. 2012年4月18日閲覧。
- ^ “SSL/TLS back-ends, endpoints and SNI”. PageKite.net. 2012年4月18日閲覧。
- ^ “Configuring an SSL Virtual Server for Secure Hosting of Multiple Sites”. Citrix. 2012年7月5日閲覧。
- ^ “Introducing AlteonOS 28.1! - Knowledge Base - Radware”. kb.radware.com. 2012年8月20日閲覧。
- ^ “NSS 3.11.1 Release Notes”. Mozilla.org. 2011年3月8日閲覧。
- ^ “TLS Extensions”. Gnu.org (2010年8月1日). 2011年3月8日閲覧。
- ^ “Using Server Name Indication (SNI) with CyaSSL”. wolfSSL.com (2013年5月24日). 2013年11月25日閲覧。
- ^ a b “Support TLS SNI extension in ssl module”. Bugs.python.org. 2011年3月8日閲覧。
- ^ a b “QTBUG-1352. It would be useful if QSslSocket supports TLS extensions such as Server Name Indication as per RFC 3546.”. Qt Bug Tracker. 2011年4月15日閲覧。
- ^ a b “Java SE 7 Release Security Enhancements”. download.oracle.com. 2012年12月12日閲覧。
- ^ a b “HttpComponents HttpClient 4.3.2 Released”. 2014年1月25日閲覧。
- ^ “News: GNU wget 1.14 released”. GNU Wget (2012年10月19日). 2013年7月19日閲覧。
- ^ “Bugs: bug #26786, TLS SNI support”. GNU Wget (2010年10月29日). 2012年8月26日閲覧。
- ^ “Android’s HTTP Clients”. Google. 2012年8月3日閲覧。
- ^ “Issue 12908: Https websites that support Server Name Indication (SNI) don't work”. Google. 2012年8月3日閲覧。
- ^ “IO::Socket::SSL Changes file mentions introduction of SNI”. 2013年7月19日閲覧。
- ^ “Pike's SSL module”. 2013年8月30日閲覧。
- ^ “Understanding Certificate Name Mismatches”. Blogs.msdn.com. 2011年3月8日閲覧。
- ^ “Android issue 1290 - Https websites that support Server Name Indication (SNI) don't work”. Code.google.com (2010年12月1日). 2011年12月13日閲覧。
- ^ “NSS Roadmap (as of 11 September 2009)”. Wiki.mozilla.org. 2011年3月8日閲覧。
- 1 Server Name Indicationとは
- 2 Server Name Indicationの概要
- 3 SNIの暗号化
- 4 関連項目
- Server Name Indicationのページへのリンク