1. 序論
~INFORMATIVE作者には、自身による~siteや~appを,非保安的~transportから離れて,暗号化されかつ認証された接続へ移行0することが、ますます奨励されている `WEB-HTTPS$r 。 この移行には,作者, 利用者~双方にとり有意な利点があるが、負の副作用もないわけではない。 ◎ Increasingly, we encourage authors to transition their sites and applications away from insecure transport, and onto encrypted and authenticated connections [WEB-HTTPS]. While this migration has significant advantages for both authors and users, it isn’t without negative side-effects.
【 この仕様の “作者( author )” は、~page内容の作者というより,~site管理者(~serverの環境設定の作者)を指している。 】
特に,混在~内容の検査 `MIX$r は、相当~量の旧来の内容を ~HTTPSに移動する~~仕事を抱える管理者たちにとって,悩みの種になり得る。 古い内容を読み通して,資源~URLを手作業で書直すには、かなりの手間がかかる。 さらには、[ BBC ~siteの~archive `BBC-ARCHIVE$r や, New York Times の直書きされた~URL `NYT-HTTPS$r ]を考えればわかるように、真に旧来の内容は,更新-が困難あるいは不可能なこともざらにある。 ◎ Most notably, mixed content checking [MIX] has the potential to cause real headache for administrators tasked with moving substantial amounts of legacy content onto HTTPS. In particular, going through old content and rewriting resource URLs manually is a huge undertaking. Moreover, it’s often the case that truly legacy content is difficult or impossible to update. Consider the BBC’s archived websites [BBC-ARCHIVE], or the New York Times' hard-coded URLs [NYT-HTTPS].
この負担は、~site作者から除去されるべきである — [ ~siteは保安的~資源のみ読込むことを意図していて,非保安的~URLは 等価な保安的~URLに置換されたかのように扱われるベキである ]ことを,作者が~UAに表明できるようにすることにより。 ◎ We should remove this burden from site authors by allowing them to assert to a user agent that they intend a site to load only secure resources, and that insecure URLs ought to be treated as though they had been replaced with equivalent secure URLs.
この文書は、新たな ~CSP 指令 `upgrade-insecure-requests$dir を定義する。 作者は、この指令を通して,上述について表明できる。 この施策は~headerとして送達されることに注意。 これにより、管理者は,~source~codeを個々に触れることなく,~pageの集合を昇格の仕組みに容易く~opt-intoできるようになる。 施策を~HTMLの中に~inline化するような~approach†では、上述した旧来の内容などには~~対処できないであろう。 ◎ This document defines a new Content Security Policy directive, upgrade-insecure-requests, through which authors can make this assertion. Note: Delivering the policy as a header allows an administrator to easily opt a set of pages into the upgrade mechanism without touching their source code individually. The legacy content examples above would not be feasible with an approach that inlined the policy into HTML, for example.
【† とは言え、 `meta^e 要素~内に~inline化して 送達された場合に無視されるわけではないであろう。 】
1.1. 目標
包括的な目標は、[ 混在~内容の阻止-法 `MIX$r による負の副作用を抑制する ]ことにより,~siteを非保安的~生成元から移行する際の負担を抑制することである。 ◎ The overarching goal is to reduce the burden of migrating websites from insecure origins by reducing the negative side effects of mixed content blocking [MIX].
作者が[ ~server側で準備作業を済ませておくこと( 証明書を得る / ~serverを環境設定する / ~redirectを設定しておく )],および[[ 当事者主体, 第三者主体 ]の両~内容とも,保安的`~scheme$url上の 【非保安的~scheme上のそれと】 同じ ( `~host$url, `~path$url ) 組 で~access可能になること ]を確保することを前提に,この特色機能が実装されたならば、次が成立するベキである: ◎ If we assume that authors do the server-side legwork (obtaining a certificate, configuring the server, setting up redirects), and that authors also ensure that both first- and third-party content is accessible at the same host and path on a secure scheme, then the following statements ought to hold after implementing this feature:
-
作者は、所与の~pageから要請されるすべての内容が,成功裡かつ保安的に読込まれることを確保できるべきである。 混在~内容を阻止して保安的~生成元へ移行した結果,~pageが壊されるべきでない。 ◎ Authors should be able to ensure that all content requested by a given page loads successfully, and securely. Mixed content blocking should not break pages as a result of migrating to a secure origin.
注記: 混在内容の`厳格~mode$は、この要件を満たさない — それが表明するのは、逆の性格の様な何かである。 ◎ Note: This requirement is not met by Mixed Content’s strict mode, which makes something like the opposite assertion.
- ~UAは、前項の結果として、要請している混在~内容に関係するどの保安~指示子も格下げするべきでない — どのような非保安的~内容も要請されないべきである。 ◎ As a result of #1, the user agent should not degrade any security indicators related to requesting mixed content, as no insecure content should be requested.
- 作者は、すべての内部~linkが,利用者にとって ~siteの保安的~addressへ — 移行前の非保安的~addressではなく — 正しく送信されることを確保できるべきである。 ◎ Authors should be able to ensure that all internal links correctly send users to the site’s secure address, and not to its pre-migration insecure address.
- 作者は、~siteの内容を編集せずに,以上の目標すべてを達成できるべきである。 このことは、保守管理が~~相応に困難で, 昇格など全く~~想定されてない,~archiveされた内容や旧来の~systemにとり、特に重要である。 ◎ Authors should be able to achieve all these goals without editing a site’s content. This is particularly important for archived content and legacy systems for which maintenance is difficult enough, never mind upgrades.
- 作者は、`昇格の仕組み$を~supportする~clientには保安的~資源を~serveしつつ,~supportしない~clientに対しても非保安的~資源を~serveし続けることで、非保安的から保安的への移行0を,~~継続的に行えるべきである。 ◎ Authors should be able to pursue a gradual transition from insecure to secure, serving secure resources to clients that support upgrades, while retaining insecure resources for clients that don’t.
注記: ここに定義される`昇格の仕組み$は、 Strict Transport Security `RFC6797$r に取代わることを意図するものではない。 詳細は、~HSTSとの関係節を見よ。 ◎ Note: The mechanism defined here does not intend to supplant Strict Transport Security [RFC6797]. See §8.2 Relation to HSTS for details.
1.2. 各種~例
1.2.3. 失敗した昇格
Tinycorp 社は `upgrade-insecure-requests$dir を可能化したが、時期尚早であった — 実際にはまだ `http://cdn.example.com/^s 上で~HTTPSを~supportしていなかったので。 次の~codeが与えられたとする: ◎ Tinycorp, Inc. enabled upgrade-insecure-requests a bit earlier than they should have, as they don’t actually support HTTPS on http://cdn.example.com/. Given the following code:
<img src="http://cdn.example.com/image.png">
~UAは、 非~naviによる昇格 節に述べたように,~URLを `https://cdn.example.com/image.png^s に書直して要請を昇格することになる。 ~serverは保安的~要請に応答しないので、その結果は~network~errorになる。 ◎ User agents will upgrade requests, as described in §1.2.1 Non-navigational Upgrades, rewriting the URL as https://cdn.example.com/image.png. As the server doesn’t respond to secure requests, this results in a network error.
この局面に際しては、~fallbackはない。 ~UAは、意図的にそのように要請を発行させるものと受け取って動作するので、要請は失敗する。 ◎ There is no fallback in this scenario: the user agent acts just as though the request had been intentionally made, and the request fails.
1.3. 各種~推奨
作者【~server運用者】 には、`昇格の仕組み$を~supportする~UAが,可能な限り保安的になるよう確保したいと望むなら,次を行うことを推奨する: ◎ We recommend that authors who wish to ensure that user agents which support upgrade-insecure-requests are as secure as possible do the following:
-
非保安的かつ`安全に昇格-可能$な要請に対しては、~status~code `307^st を伴う `Location$h ~headerで応答することにより,~HTTPから~HTTPSへ~redirectする。 ◎ Redirect insecure, safely upgradable requests from HTTP to HTTPS by responding with a Location header and a 307 status code.
~Nginxにおいては、この種の~redirectionは,次の様になるであろう: ◎ In Nginx, this kind of redirection might look like this:
server { if ($http_upgrade_insecure_requests = "1") { add_header Vary Upgrade-Insecure-Requests; return 307 https://$host$request_uri; } }
無論これは,ごく単純化されており、~~実際の環境設定はずっと複雑になるであろう。 ◎ This is, of course, greatly simplified; your configuration will likely be significantly more complex.
-
`先天的に認証-済み$かつ`安全に昇格-可能$な要請に対しては、要請されている資源に必要とされるなら, `upgrade-insecure-requests$dir 指令を伴わせて応答する。 ◎ Respond to a priori authenticated safely upgradable requests with a upgrade-insecure-requests directive if necessary for the resource being requested.
~Nginxにてこの指令を追加するときは、次の様になるであろう: ◎ In Nginx, adding this directive might look like this:
server { ... add_header `Content-Security-Policy$h `upgrade-insecure-requests$dir; ... }
無論これは,ごく単純化されており、~~実際の環境設定はずっと複雑になるであろう。 ◎ This is, of course, greatly simplified; your configuration will likely be significantly more complex.
-
生成元が`~HSTS安全$である場合、~SSL-stripping中間者~攻撃に抗して保護するため、 `preload^dir 指令を伴う `Strict-Transport-Security$h ~headerを送信して,混在内容の`厳格~mode$を可能化することにより,非保安的~内容は決して読込まれないことを確保する。 ◎ If the origin is HSTS-safe, then protect against SSL-stripping man-in-the-middle attacks by sending a Strict-Transport-Security header with the preload directive, and ensure that insecure content is never loaded by enabling Mixed Content’s strict mode.
~Nginxにてこの~headerを追加するときは、次の様になるであろう( `preload^dir 指令の利用は、この生成元の~HSTS状態を通達し,~UAの HSTS Preload Lists に安全に取込まれることに注意): ◎ In Nginx, adding this header might look like this (note the use of the preloaded directive, which signifies that this origin’s HSTS state can be safely imported into user agents' HSTS preload lists):
server { ... add_header `Strict-Transport-Security$h "max-age=10886400; preload" add_header `Content-Security-Policy$h `block-all-mixed-content$dir; ... }
無論これは,ごく単純化されており、~~実際の環境設定はずっと複雑になるであろう。 ◎ This is, of course, greatly simplified; your configuration will likely be significantly more complex.
加えて、~UA~vendorたちと協働する — 当の生成元を HSTS Preload Lists に追加することを通して(例えば、当の生成元を hstspreload.appspot.com まで届出ることにより)。 ◎ Additionally, work with user agent vendors to add the origin to HSTS Preload Lists (for example, by submitting the origin to hstspreload.appspot.com).
-
生成元が`条件付きで~HSTS安全$の場合、`安全に昇格-可能$な要請のみに呼応して~HSTSを~opt-intoする。 ◎ If the origin is conditionally HSTS-safe, then opt-into HSTS only in response to safely upgradable requests.
~Nginxにて この~headerを条件付きに追加するときは、次の様になるであろう( note the use of `map^c, as setting headers inside `if^c without returning immediately is, well, iffy 【~Nginxには不詳なので,原文のままにしておく】 ): ◎ In Nginx, adding this header conditionally might look like this (note the use of map, as setting headers inside if without returning immediately is, well, iffy):
server { ... map $http_https $sts { "1" "max-age=10886400" } add_header `Strict-Transport-Security$h $sts; ... }
無論これは,ごく単純化されており、~~実際の環境設定はずっと複雑になるであろう。 ◎ This is, of course, greatly simplified; your configuration will likely be significantly more complex.
2. 主要な概念と各種用語
- `昇格の仕組み@
- この文書に述べる,(~URLを透過的に保安的~URLに昇格しても)~pageが壊されないようにするための `upgrade-insecure-requests$dir の仕組みを指す。 (~page/資源/~site が) “昇格の仕組みを要する” とは、[ ~UAにおいて`昇格の仕組み$が~supportされている ]ことを要することを意味する。
- 【 この用語は、本文の記述を 簡潔に, かつ一貫させるために,この訳に導入している。 原文では、 “この文書に述べる〜” に記した様な長い修飾がいちいち付いていて,読みにくいので — おそらく、 HTTP `Upgrade^h ~headerなどによる,他の “昇格の仕組み” と区別するためと思われるが、 “昇格” が他の意味を指す箇所は,この仕様には現れない。 】
- 要請を `昇格する@ ◎ upgrade
- ~URLの`~scheme$url が[ `http^l / `ws^l ]から[ `https^l / `wss^l ]に書直された`要請$は、昇格されたという。 ◎ A request is said to be upgraded if it is rewritten to contain a URL with a scheme of https or wss.
- `安全に昇格-可能@ な要請 ◎ safely upgradable requests
-
次のいずれかを満たす`要請$は、 安全に昇格-可能 とされる:
- 返される`資源~表現$は、`昇格の仕組み$を要さない。
- `要請$の`~header~list$rqは、値 `1^v にされた `Upgrade-Insecure-Requests$h ~headerを包含している。
- `~HSTS安全@ な生成元 ◎ HSTS-safe origin
-
次のいずれも満たす`生成元$は、 ~HSTS安全とされる:
- それが返す どの`資源~表現$も `昇格の仕組み$を要さない, かつ
- それが返す どの`資源~表現$も~HTTPS越しに~serveされる。
- `~HSTS安全$な生成元は、すべての~UAに対し `Strict-Transport-Security$h を安全に~opt-intoできる — `昇格の仕組み$を~supportしない~UAに対しても,~pageが壊される~riskなしに。 ◎ HSTS-safe origins can safely opt-into Strict-Transport-Security for all user agents, without risking broken pages for user agents which do not support upgrade-insecure-requests.
- `条件付きで~HSTS安全@ な生成元 ◎ conditionally HSTS-safe origin
-
次のいずれも満たす`生成元$は、 条件付きで~HSTS安全 とされる:
- それが返す ある`資源~表現$は `昇格の仕組み$を要する, かつ
- それが返す どの`資源~表現$も~HTTPS越しに~serveされる。
- `条件付きで~HSTS安全$な生成元は、`昇格の仕組み$を~supportする~UAに対してのみ, `Strict-Transport-Security$h を安全に~opt-intoできる。 ◎ Conditionally HSTS-safe origins can safely opt-into Strict-Transport-Security only for user agents which support upgrade-insecure-requests.
- `事前読込-可能な~HSTS~host@ ◎ preloadable HSTS host
-
`~host$url %~host は、 Known HSTS Host Domain Name Matching ( “既知の~HSTS~host~domain名との照合” )を遂行したとき,次のいずれかを満たすならば、 事前読込-可能な~HSTS~host とされる:
- %~host は、[ `includeSubDomains$dir, `preload^dir の両~指令とも表明している ある`既知の~HSTS~host$ ]に superdomain match する†
- %~host は、[ `preload^dir 指令を表明している ある`既知の~HSTS~host$ ]に congruent match する††
【† “上位~domain合致” — ~HSTS~hostは %~host の ある上位~domainに一致する 】【†† “合同~合致” — ~HSTS~hostは %~host に一致する 】
◎ A host host is a preloadable HSTS host if, when performing Known HSTS Host Domain Name Matching, host is a superdomain match for a Known HSTS Host which asserts both the includeSubDomains directive and the preload directive, or host is a congruent matchfor a Known HSTS Host which asserts the preload directive. - 注記: 手短に言えば、これらは, “~UAが、[ `preload^dir 指令を包含していた `Strict-Transport-Security$h ~header ]を,手元に~pinしておいた~hostたち” である。 ◎ Note: This is a long way of saying "any host the user agent has pinned with a Strict-Transport-Security header that contained a preload directive".
`upgrade-insecure-requests^dir ~CSP指令 節に利用される~ABNF( Augmented Backus-Naur Form )記法は、 `ABNF$r ( RFC5234 )にて指定される。 ◎ The Augmented Backus-Naur Form (ABNF) notation used in §3.1 The upgrade-insecure-requests Content Security Policy directive is specified in RFC5234. [ABNF]
【この訳に固有の表記規約】
この訳の,~algoや定義の記述に利用されている各種記号( ~LET, ~IF, ~RET, 等々)の意味や定義の詳細は、~SYMBOL_DEF_REFを~~参照されたし。
3. 非保安的~資源~要請の昇格-法
作者は、資源~要請の~URLを`先天的に認証-済み$~variantに透過的に昇格するよう, ~UAに指図してよい。 これにより、非保安的~生成元から移行するときの負の副作用を軽減できる。 ◎ In order to allow authors to mitigate the negative side-effects of migration away from insecure origins, authors may instruct the user agent to transparently upgrade resource requests to a priori authenticated variants of the original request’s URL.
この指図を~supportするため、各[ `環境~設定群~obj$ / `閲覧文脈$ ]には、次のものが結び付けられる†: ◎ To support this instruction: ◎ ↓
- `非保安的~要請~施策@
- `昇格不可@i / `昇格可@i のいずれかを値にとり、他から指定されない限り`昇格不可$iに設定される。 この施策は、[ `~fetching$の間に,非~navi要請や~form提出が昇格されるべきかどうかを決定する ]ために,[ `適切になるなら,要請を先天的に認証-済み~URLに昇格する$ ]ときに検査される。 ◎ Environment settings objects and browsing contexts are given an insecure requests policy which has two potential values Do Not Upgrade and Upgrade. It is set to Do Not Upgrade unless otherwise specified. This policy is checked in §4.1 Upgrade request to an a priori authenticated URL, if appropriate in order to determine whether or not non-navigation requests and form submissions should be upgraded during fetching.
- `非保安的~navi昇格~集合@
- ~naviが昇格するベキとされる,いくつかの ( `~host$url, `~port$url ) 組 からなる集合であり、他から指定されない限り空~集合とする。 この集合は、[ `~navi要請$が昇格されるべきかどうか決定する ]ために,[ `適切になるなら,要請を先天的に認証-済み~URLに昇格する$ ]ときに検査される。 ◎ Environment settings objects and browsing contexts are given an upgrade insecure navigations set which contains a set of (host, port) tuples to which navigations ought to be upgraded. Its value is the empty set unless otherwise specified. This set is checked in §4.1 Upgrade request to an a priori authenticated URL, if appropriate in order to determine whether or not navigation requests should be upgraded.
【† “文書( `Document$I )の`非保安的~要請~施策$(または `非保安的~navi昇格~集合$)” のような句も現れる — これは、文書が`属する閲覧文脈$の`非保安的~要請~施策$を指しているものと思われる。 】
3.1. `upgrade-insecure-requests^dir ~CSP指令
~serverは、[ `upgrade-insecure-requests@dir 指令を包含する `Content-Security-Policy$h ~header `CSP$r ]を送信することにより,[ 特定0の`被保護~資源$に対する非保安的~要請 ]を昇格するよう,~UAに指図して~MAY。 この指令は、次の `ABNF$r 文法で定義される: ◎ A server MAY instruct a user agent to upgrade insecure requests for a particular protected resource by sending a Content-Security-Policy header [CSP] that contains a upgrade-insecure-requests directive, defined via the following ABNF grammar:
`directive-name$P = "upgrade-insecure-requests" `directive-value$P = ""
`upgrade-insecure-requests^dir 指令を`施行-$するときは: ◎ When enforcing the upgrade-insecure-requests directive:
- %設定群 ~LET `被保護~資源$の`現任の設定群~obj$ ◎ Let settings be the protected resource’s incumbent settings object.
- %設定群 の`非保安的~要請~施策$ ~SET `昇格可$i ◎ Set settings’s insecure requests policy to Upgrade.
- %組 ~LET `被保護~資源$の`~URL$の ( `~host$url, `~port$url ) 組 ◎ Let tuple be a tuple of the protected resource’s URL's host and port.
- %組 を %設定群 の`非保安的~navi昇格~集合$に挿入する ◎ Insert tuple into settings’s upgrade insecure navigations set.
`監視-$時においては、 `upgrade-insecure-requests^dir 指令の効果はない — すなわち、この指令が `Content-Security-Policy-Report-Only$h ~headerを介して送信されたときは無視される。 作者は、 `Content-Security-Policy-Report-Only$h を介して,昇格された資源の元の~URLが非保安的であったかどうかを決定できる。 例えば次のように:
`Content-Security-Policy-Report-Only$h: default-src https:; report-uri /endpoint
追加の詳細は、 昇格の報告-法 節を見よ。
◎ Monitoring the upgrade-insecure-requests directive has no effect: the directive is ignored when sent via a Content-Security-Policy-Report-Only header. Authors can determine whether or not upgraded resources' original URLs were insecure via Content-Security-Policy-Report-Only. For example, Content-Security-Policy-Report-Only: default-src https:; report-uri /endpoint. See §3.4 Reporting Upgrades for additional detail.3.1.1. “混在~内容” との関係
`upgrade-insecure-requests$dir 指令は、 `~fetching$ ~algo `FETCH$r の冒頭にて,[ `適切になるなら,要請を先天的に認証-済み~URLに昇格する$ ]の結果に従って,要請が書直されるようにする。 この書直しは、[ 混在内容 `MIX$r / ~CSP `CSP$r ]による検査-の効果が生じる前に起こることが重要であることに注意。 この順序付けは、次を意味する: ◎ The upgrade-insecure-requests directive results in requests being rewritten at the top of the Fetching algorithm [FETCH], as specified in §4.1 Upgrade request to an a priori authenticated URL, if appropriate. It’s important to note that the rewrite happens before either Mixed Content [MIX] or Content Security Policy checks take effect [CSP].
- 昇格された要請は、混在~内容として扱われなくなる。
-
`upgrade-insecure-requests$dir 指令の効果は, `block-all-mixed-content$dir 指令が当の要請を阻止する機会を得る前に生じる。 前者が設定された場合、後者は実質的に何もしないことになる。
作者には、 各種~推奨 節にて要旨を述べるように,この二つの指令のうち いずれか一方は設定することが推奨される。
3.2. ~clientの昇格-能力についての特色機能の検出-法
[ 保安的への移行0越しに,利用者に適度な体験を供する ]ために,`昇格の仕組み$を要する~siteは、何らかの仕方で[ 個々の`要請$について,それを~HTTPから~HTTPS(あるいは その逆)へ安全に~redirectできるかどうか ]を決定する必要がある。 更には、`条件付きで~HSTS安全$な生成元は, 【昇格の仕組みを】~supportする~UAに限って `Strict-Transport-Security$h を~opt-intoできる — そうしなければ、~siteの利用者にとって よくない結果になりかねない。 ◎ Sites which require the upgrade mechanism laid out in this document in order to provide users with a reasonable experience over secure transit need some way to determine whether or not a particular request can safely be redirected from HTTP to HTTPS (and vice-versa). Moreover, conditionally HSTS-safe origins can only opt-into Strict-Transport-Security for supported user agents, and doing otherwise could have negative consequences for the site’s users.
この裁定は,~UA~sniffing 【~serverが,~UAが昇格の仕組みを~supportするかどうか推定( sniff )する?】 に依拠して下すものではない — ~UAは、`~navi要請$の発行-時に `Upgrade-Insecure-Requests$h ~headerを含ませることにより,自身の昇格~能力を告知できる。 `Upgrade-Insecure-Requests^h ~HTTP要請~header 節を見よ。 ◎ Rather than relying on user-agent sniffing to make this decision, user agents can advertise their upgrade capability when making navigation requests by including an Upgrade-Insecure-Requests header field as described in §3.2.1 The Upgrade-Insecure-Requests HTTP Request Header Field.
3.2.1. `Upgrade-Insecure-Requests^h ~HTTP要請~header
`Upgrade-Insecure-Requests@h ~HTTP要請~headerは、次を表す合図を~serverへ向けて送信する:
- ~clientは、暗号化-済みかつ認証-済みの応答を選好すること,および
- ~clientは、`upgrade-insecure-requests$dir 指令を成功裡に取扱えるので,その選好を可能な限り円滑に供せる。
この選好は、次の `ABNF$r 文法で表現される: ◎ This preference is represented by the following ANBF:
"Upgrade-Insecure-Requests:" *`WSP$P "1" *`WSP$P
注記: `Upgrade-Insecure-Requests^h ~headerは 選好を表すが、既存の `Prefer$h ~headerを介してそれを送信するのには,問題がある — ~serverからの応答に利用されるそれは、~cache~keyの一部になることが予期されるので。 w3/webappsec#216 に論じられるように、 `Vary$h: `Prefer^v は,対象が広過ぎる。 ◎ Note: Though the Upgrade-Insecure-Requests header expresses a preference, sending it via the existing Prefer header is problematic, as we expect the response from the server to use it as part of the cache key. Vary: Prefer is too broad, as discussed in w3/webappsec#216.
~UAの適合性についての詳細は、[ `適切になるなら,要請を先天的に認証-済み~URLに昇格する$ ]~algoの段 #1 にて述べる。 その段は、次のような~UA要件を表現する: ◎ User agent conformance details are described in step #1 of the the §4.1 Upgrade request to an a priori authenticated URL, if appropriate algorithm. That step represents the following requirements:
- 以下における %~URL は、~UAが送信する`要請$の`~url$rq を表すとする。 ◎ ↓
-
%~URL が非保安的ならば、`要請$に `Upgrade-Insecure-Requests$h ~headerも伴わせ~MUST。 ◎ User agents MUST send an Upgrade-Insecure-Requests header field along with requests for insecure URLs.
注記: ~serverは、この合図を利用して,`昇格の仕組み$を要する~pageに対する ~HTTP要請を,~HTTPSに昇格できる。 ◎ Note: Servers can use this signal to upgrade HTTP requests to HTTPS for pages that require upgrade-insecure-requests support.
-
%~URL が`先天的に認証-済み$であって, %~URL の`~host$urlは`事前読込-可能な~HSTS~host$でない ならば、`要請$に `Upgrade-Insecure-Requests$h ~headerを伴わせ~MUST。 ◎ User agents MUST send an Upgrade-Insecure-Requests header field along with requests for a priori authenticated URLs whose url’s host is not a preloadable HSTS host.
注記: ~serverは、この合図の不在を利用して,`昇格の仕組み$を要する~pageに対する ~HTTPS要請を,~HTTPに降格できる。 ◎ Note: Servers can use the absence of this signal to downgrade HTTPS requests to HTTP for pages that require upgrade-insecure-requests support.
-
%~URL が`先天的に認証-済み$であって, %~URL の`~host$urlは`事前読込-可能な~HSTS~host$である ならば、定期的に,`要請$に `Upgrade-Insecure-Requests$h ~headerを伴わせる~SHOULDである。 例えば、表明された `max-age^dir の失効が 2 〜 3 日後に迫っているときや, 少ない割合の要請に限って, `Upgrade-Insecure-Requests$h ~headerを送信することもできる。 ◎ User agents SHOULD periodically send an Upgrade-Insecure-Requests header field along with requests for a priori authenticated URLs whose url’s host is a preloadable HSTS host. For example, user agents could send an Upgrade-Insecure-Requests header field only when the asserted max-age is a few days from expiration, or only for a small percentage of requests.
注記: `事前読込-可能な~HSTS~host$は,自身は`~HSTS安全$であると表明-済みなので、降格する合図は必要はない。 そのような~hostは,表明された `max-age^dir が失効する前に~HSTS~statusを~refreshする必要があり、 `Upgrade-Insecure-Requests$h ~headerは,その~HSTSを~refreshさせる合図として申し分なく~~働く。 ◎ Note: preloadable HSTS hosts have asserted that they are HSTS-safe, and therefore don’t need a downgrade signal. They will need to refresh HSTS status before the asserted max-age expires, and the Upgrade-Insecure-Requests header field serves as a fine signal that HSTS could be refreshed.
~serverが~HTTP要請の~header内でこの選好に遭遇したときは: ◎ ↓
- 要請されている資源の `先天的に認証-済み$の表現へ,利用者を~redirectする~SHOULDである。 ◎ When a server encounters this preference in an HTTP request’s headers, it SHOULD redirect the user to a a priori authenticated representation of the resource being requested.
- 要請の`~host$urlが[ `~HSTS安全$/ `条件付きで~HSTS安全$ ]ならば、応答~内に `Strict-Transport-Security$h ~header `RFC6797$r を含ませる~SHOULDである。 ◎ When a server encounters this preference in an HTTPS request’s headers, it SHOULD include a Strict-Transport-Security header in the response if the request’s host is HSTS-safe or conditionally HSTS-safe [RFC6797].
`昇格の仕組み$を~supportする~clientは、 `http://example.com/^s へ、次のように要請する: ◎ A client that supports this document’s upgrade mechanism requests http://example.com/ as follows:
GET / HTTP/1.1 Host: example.com `Upgrade-Insecure-Requests$h: 1
~serverが、選好を構文解析して,利用者の~clientが昇格-要請を上手く扱えることに気付いたので、要請に対し,利用者が要請している資源の保安的~versionへ~redirectするよう 応答する場合: ◎ The server parses the preference, notices that the user’s client can deal well with upgrade requests, and therefore responds to the request by redirecting the user to a secure version of the resource she’s requesting:
HTTP/1.1 307 Moved Temporarily `Location$h: https://example.com/ `Vary$h: `Upgrade-Insecure-Requests$h
`Vary$h ~header内には `Upgrade-Insecure-Requests$h ~headerが~listされている — さもなければ、~redirect応答は,[ `昇格の仕組み$を~supportしない~client ]用の~cacheにより~serveされるようになるかもしれないので。 類似する効果は、 `Cache-Control$h ~headerを用いて,この~redirect応答を~cacheできなくすることでも達成できる: ◎ The Upgrade-Insecure-Requests header field is listed in the Vary header, as the redirect response might otherwise be served by caches to clients that don’t support the upgrade mechanism defined here. A similar effect could be achieved by making this redirect response uncachable via the Cache-Control header:
HTTP/1.1 307 Moved Temporarily `Location$h: https://example.com/ `Cache-Control$h: `no-store$dir
3.3. 施策の継承
[ `Document$I の`現任の設定群~obj$ の`非保安的~要請~施策$ ~EQ `昇格可$i ]の場合、~UAは,次の仕方で,すべての`入子の閲覧文脈$に設定が継承されることを確保し~MUST: ◎ If a Document's incumbent settings object’s insecure requests policy is set to Upgrade, the user agent MUST ensure that all nested browsing contexts inherit the setting in the following ways:
-
`入子の閲覧文脈$ %文脈 を作成するときは: ◎ When a nested browsing context context is created:
- %文書 ~LET %文脈 を`埋込んでいる文書$ ◎ ↓
-
~IF[ %文書 の`非保安的~要請~施策$ ~EQ `昇格可$i ]: ◎ If context’s embedding document’s insecure requests policy is Upgrade, then:
- %文脈 の`非保安的~要請~施策$ ~SET `昇格可$i ◎ Set context’s insecure requests policy to Upgrade.
- [ %文書 の`非保安的~navi昇格~集合$ ]内の ~EACH ( %値 ) に対し ⇒ %文脈 の`非保安的~navi昇格~集合$に %値 を追加する ◎ For each value in context’s embedding document’s upgrade insecure navigations set, add value to context’s upgrade insecure navigations set.
-
`閲覧文脈$ %文脈 内に`新たな文書を作成-$をするときは: ◎ When creating a new Document object document in a browsing context context:
-
~IF[ %文脈 の`非保安的~要請~施策$ ~EQ `昇格可$i ]: ◎ If context’s insecure requests policy is Upgrade, then:
- %設定群 ~LET 作成される文書の`現任の設定群~obj$ ◎ Let settings be document’s incumbent settings object.
- %設定群 の`非保安的~要請~施策$ ~SET `昇格可$i ◎ Set settings’ insecure requests policy to Upgrade.
- %文脈 の`非保安的~navi昇格~集合$内の ~EACH ( %値 ) に対し ⇒ %設定群 の`非保安的~navi昇格~集合$に %値 を追加する ◎ For each value in context’s upgrade insecure navigations set, add value to settings’s upgrade insecure navigations set.
-
同様に、~workerの~~始動時には、~UAは,次の仕方で それを作成した文脈から設定が継承されることを確保し~MUST: ◎ Likewise, when spinning up a worker, the user agent MUST ensure that it inherits the setting from the context that created it in the following ways:
-
`~worker環境~設定群~objを設定しておく$ ~algoの,現在の段 #4 の後に次の手続きを~~挿入する: ◎ When executing the set up a worker environment settings object algorithm, perform the following steps after the current step #4:
-
~IF[ `継承ed担当の閲覧文脈^V の`非保安的~要請~施策$ ~EQ `昇格可$i ]: ◎ If inherited responsible browsing context’s insecure requests policy is Upgrade, then:
- %設定群~obj の`非保安的~要請~施策$ ~SET `昇格可$i ◎ Set settings object’s insecure requests policy to Upgrade.
- [ `継承ed担当の閲覧文脈^V の`非保安的~navi昇格~集合$ ]内の ~EACH ( %値 ) に対し ⇒ %設定群~obj の`非保安的~navi昇格~集合$に %値 を追加する ◎ For each value in inherited responsible browsing context’s upgrade insecure navigations set, add value to settings object’s upgrade insecure navigations set.
-
3.4. 昇格の報告-法
非保安的~要請の昇格-法は、[ `昇格の仕組み$を~supportしない~UAにおいて要請が非保安的になるかどうかを,作者が突き止めれる能 ]に干渉しては~MUST_NOT。 そのため、昇格を遂行する時機は,[ %要請 を`監視-$下にある保安~施策すべてに対し評価した後 ], かつ[ %要請 を`施行-$下にある保安~施策すべてに対し評価する前 ]で~MUST。 ◎ Upgrading insecure requests MUST not interfere with an authors' ability to track down requests that would be insecure in a user agent that does not support upgrades. To that end, upgrades MUST be performed after evaluating request against all monitored security policies, but before evaluating request against all enforced policies.
`被保護~資源$が,非保安的な画像 `<img src="http://example.com/image.png">^s を包含していて,次の~HTTP~headerを送達するような文脈の中では: ◎ Within the context of a protected resource which contains the insecure image <img src="http://example.com/image.png">, and delivers the following HTTP headers:
`Content-Security-Policy$h: `upgrade-insecure-requests$dir; `default-src$dir https: `Content-Security-Policy-Report-Only$h: `default-src$dir https:; `report-uri$dir /endpoint
~UAは、`要請$ %要請 を次のように取り扱うことになる: ◎ The user agent will fire off a request request that:
- %要請 が`監視-$下にある施策に違反するならば、それに従って `/endpoint^s へ`違反~報告$xを送達する。 ◎ Violates the policy being monitored, thereby delivering a violation report to /endpoint.
- %要請 を `http://example.com/image.png^s から `https://example.com/image.png^s へ昇格する。 ◎ Is upgraded from http://example.com/image.png to https://example.com/image.png.
- %要請 は、`施行-$下にある施策には違反しない。 ◎ Does not violate the policy being enforced.
注記: `CSP$r が`FETCH$r の用語を通して書直されたなら、これは,有意に明確化されることになる。 ◎ Note: This will be significantly clarified once [CSP] is rewritten in terms of [FETCH].
4. 各種 処理~algo
4.1. 適切になるなら %要請 を先天的に認証-済み~URLに昇格する
この~algoは、所与の`要請$ %要請 に対し,[ %要請 が出自にしている`~client$rq ]が昇格を~opt-inしていたならば、 %要請 の`~url$rqを書直す。 それはまた、非保安的`~navi要請$に対し,[ ~serverによる~clientの昇格~特色機能を検出する能を改善する ]ために, `Upgrade-Insecure-Requests$h ~headerを注入する。 ◎ Given a request request, this algorithm will rewrite its url if the client from which the request originates has opted-in to upgrades. It will also inject an Upgrade-Insecure-Requests header field header for insecure navigation requests in order to improve a server’s ability to feature-detect a client’s upgrade capabilities.
~form提出は例外として、非同一生成元`~navi要請$は昇格されない。 ~form提出は、平文text提出を介して~dataが漏洩される~riskを軽減するため,昇格されることになる。 ◎ We will not upgrade cross-origin navigation requests, with the exception of form submissions. Form submissions will be upgraded to mitigate the risk of data leakage via plaintext submissions.
注記: この~algoは、`~main~fetch$~algoの冒頭で~callされる。 ◎ Note: This algorithm is called at the top of the Main Fetch algorithm.
- %~url ~LET %要請 の`~url$rq ◎ ↓
-
~IF[ %要請 は`~navi要請$である ]~AND[[ %~url は`先天的に認証-済み$でない ]~OR[ %~url の`~host$urlは`事前読込-可能な~HSTS~host$でない ]] ⇒ %要請 の`~header~list$rqに`~headerを付加する$( `Upgrade-Insecure-Requests^h / `1^v ) ◎ If request is a navigation request, append a header named Upgrade-Insecure-Requests with a value of 1 to request’s header-list if any of the following criteria are met: • request’s url is not a priori authenticated • request’s url’s host is not a preloadable HSTS host
注記: ~UAは、他の要請に対しても `Upgrade-Insecure-Requests$h ~headerを付加することを選べる — `Upgrade-Insecure-Requests^h ~HTTP要請~header 節にて論じられるように。 ◎ Note: User agents can choose to append the Upgrade-Insecure-Requests header field for other requests, as discussed in §3.2.1 The Upgrade-Insecure-Requests HTTP Request Header Field.
-
~IF[ 次のすべてが満たされる ] ⇒ ~RET: ◎ If request is a navigation request, then:
- %要請 は`~navi要請$である
- %要請 は~form提出でない ◎ If request is a form submission, skip the remaining substeps, and continue upgrading request.
- %要請 の`~target閲覧文脈$rqは`入子の閲覧文脈$でない ◎ If request’s target browsing context is a nested browsing context, skip the remaining substeps and continue upgrading request.
- %~url の ( `~host$url, `~port$url ) 組 ~NIN %要請 の`~client$rqの`非保安的~navi昇格~集合$ ◎ Let tuple be a tuple of request’s url’s host and port. ◎ If tuple is contained in client’s upgrade insecure navigations set, then skip the remaining substeps, and continue upgrading request. ◎ Return without further modifying request.
注記: ~top-level`~navi要請$が昇格されるのは、特定0の`被保護~資源$に対し 挙動を明示的に~opt-intoしている~hostに限られる — 各種~例 節にて述べたように。 第三者主体~資源への~top-level~naviに対し 昇格を遂行することは、~pageを壊す~~確度をかなり高めるので,当面は避けることにしている。 入子の~navi(例えば `iframe$e を介するもの)に対しては、その埋込元の保安~statusに影響するので、必要に応じて,その昇格を確保する。 ◎ Note: We only upgrade top-level navigation requests for hosts that have explicitly opted-into the behavior for a particular protected resource, as described in §1.2 Examples. Performing upgrades for top-level navigations to third-party resources brings a significantly higher potential for breakage, so we’re avoiding it for the moment. Nested navigations (via iframe, for example) affect the security status of their embedder, so we ensure that they are upgraded if necessary.
- ~IF[[ %要請 の`~client$rqに対する`非保安的~要請は昇格されるべきか?$ ]の結果 ~EQ `昇格不可$i ] ⇒ ~RET ◎ Let upgrade state be the result of executing §4.2 Should insecure requests be upgraded for client? upon request’s client. ◎ If upgrade state is Do Not Upgrade, return without modifying request.
-
~IF[
%~url の`~scheme$url ~EQ `http^c
]
⇒
%~url の`~scheme$url ~SET `https^c;
~RET ◎ If request’s url’s scheme is http, set request’s url’s scheme to https, and return. -
~IF[ %~url の`~port$url ~EQ `80^c ] ⇒ %~url の`~port$url ~SET `443^c ◎ If request’s urls port is 80, set request’s urls port to 443.
注記: ~portが明示的に `80^c に設定されている場合は,~UAは ~URLの~portのみを変更し、[ ~portが設定されていない/何か非標準の値に設定されている ]場合は,その値を改変しないことになる。 この実装には、~HSTSと同じ~tradeoffがある【?】( `RFC6797$r を見よ — 特定的には, Section 8.3 の段 #5, Appendix A の~item #6。 ◎ Note: This will only change the URL’s port if the port is explicitly set to 80. If the port is not set, or if it is set to some non-standard value, the user agent will not modify that value. This implementation makes the same tradeoffs as HSTS (see [RFC6797], and specifically step #5 of Section 8.3, and item #6 in Appendix A).
注記: `FETCH$r の再帰的な資質に因り、この~algoは,初期~要請のみならず ~redirectに対しても,非保安的な要請を昇格することになる。 ◎ Note: Due to [FETCH]'s recursive nature, this algorithm will upgrade insecurely-redirected requests as well as insecure initial requests.
4.2. %~client に対する非保安的~要請は昇格されるべきか?
この~algoは、所与の[ `要請$の`~client$rq ] %~client (`環境~設定群~obj$)に結付けられている非保安的~要請が昇格されるべきならば `昇格可$i / ~ELSE_ `昇格不可$i ]を返す。 要約すると、これは、 %~client を検査して,[ %~client, または %~client の`閲覧文脈$ ]に設定されている適切な`非保安的~要請~施策$を返す: ◎ Given an request’s client client (an environment settings object), this algorithm returns Enforced Upgrade if insecure requests associated with that client should be upgraded, or Do Not Upgrade otherwise. In short, this will check the client and return the appropriate insecure requests policy set on it or its browsing context.
-
~IF[ %~client には`担当の文書$がある ] ⇒ ~RET それ†の`非保安的~要請~施策$の値 ◎ If client has a responsible document, return the value of its insecure requests policy.
注記: これは,次のいずれかに該当する[ `Document$I / `Worker$I ]を~catchする:
- `upgrade-insecure-requests$dir 指令により施策が直に設定されているもの
- `埋込んでいる文書$から施策を継承しているもの
【† この “それ” と下の段の “それ” は、おそらく( %~client ではなく) “担当の〜” の方を指す。 】
-
~IF[ %~client には`担当の閲覧文脈$がある ] ⇒ ~RET それ†の`非保安的~要請~施策$の値 ◎ If client has a responsible browsing context, return the value of its insecure requests policy.
注記: これは、~detachされた`~client$rq から誘発された要請を~catchする。 これが必要とされるかどうかは確かでない, really, given 施策の継承 節に定義される継承~構造。【?】 ◎ Note: This catches requests triggered from detached clients. Not sure this is necessary, really, given the inheritance structure defined in §3.3 Policy Inheritance.
- ~RET `昇格不可$i ◎ Return Do Not Upgrade.
5. ~WebSocketに対する改変
~WebSocketは`~fetching$~algoを利用しないので、それによる要請は,別々に取扱う必要がある。 ◎ WebSockets do not use the fetching algorithm, so we need to handle those requests separately.
`~WebSocket接続を確立-$する~algo `RFC6455$r は、次に従って改変される: ◎ The establish a WebSocket connection algorithm [RFC6455] is modified as follows:
-
現在の段 1 の後(かつ, `MIX$r にて導入された新たな段 #2 の前)に,次の段を遂行する: ◎ After the current step 1 (and before the new step #2 introduced in [MIX]), perform the following step:
-
~IF[ %secure ~EQ ~F ]~AND[[[ %~client の%~entry~script に`関連する設定群~obj$ ]に対する`非保安的~要請は昇格されるべきか?$ ]の結果 ~EQ `昇格可$i ]: ◎ If secure is false: ◎ • Let upgrade state be the result of executing §4.2 Should insecure requests be upgraded for client? upon the relevant settings object for client’s entry script. ◎ • If upgrade state is Do Not Upgrade, skip the remaining substeps.
- %secure ~SET ~T ◎ Set secure to true.
-
~IF[ %~port ~EQ `80^c ] ⇒ %~port ~SET `443^c ◎ If port is 80, set port to 443.
注記: ~portが明示的に `80^c に設定されている場合は,~UAは ~URLの~portのみを変更し、[ ~portが設定されていない/何か非標準の値に設定されている ]場合は,その値を改変しないことになる。 この実装には、~HSTSと同じ~tradeoffがある【?】( `RFC6797$r を見よ — 特定的には, Section 8.3 の段 #5, Appendix A の~item #6。 ◎ Note: This will only change the URL’s port if the port is explicitly set to 80. If the port is not set, or if it is set to some non-standard value, the user agent will not modify that value. This implementation makes the same tradeoffs as HSTS (see [RFC6797], and specifically step #5 of Section 8.3, and item #6 in Appendix A).
-
6. 保安~上の考慮点
6.1. ~HSTSとの相互作用
`upgrade-insecure-requests$dir 指令は、 `Strict-Transport-Security$h ~HTTP応答~header `RFC6797$r を置換するものではない。 自身の~siteを保安的~transport越しに~serveしている作者は、利用者が悪意的な[ 能動的/受動的 ]~network攻撃者による[ ~SSL-stripping攻撃や, 監視 ]の対象0にされないことを確保するため、適切な `max-age^dir を伴う~headerを送信する~SHOULDである。 ◎ The upgrade-insecure-requests directive does not replace the Strict-Transport-Security HTTP response header [RFC6797]. Authors who serve their site over secure transport SHOULD send that header with an appropriate max-age in order to ensure that users are not subject to SSL stripping attacks by maliciously active network attackers, or monitoring by maliciously passive network attackers.
6.2. ~CSP違反~報告
~UAは、昇格された資源に対し違反~報告を送信するときは、当の要請を誘発した[ `Document$I / `Worker$I ]を~targetにし~MUST — `upgrade-insecure-requests$dir 指令が設定された[ `Document$I / `Worker$I ]ではなく。 施策の継承 節に因り,後者は 前者の非同一生成元 先祖かもしれず、その場合,違反~報告を[ 報告-先 端点の集合 ]へ送信すると,期待されない仕方で~dataが漏洩され得るので。 ◎ When sending a violation report for an upgraded resource, user agents MUST target the Document or Worker that triggered the request, rather than the Document or Worker on which the upgrade-insecure-requests directive was set. Due to §3.3 Policy Inheritance, the latter might be a cross-origin ancestor of the former, and sending violation reports to that set of reporting endpoints could leak data in unexpected ways.
同じ理由から、 `SecurityPolicyViolationEvent$I は、当の要請を誘発した `Document$I 以外を~targetにしては~MUST_NOT。 ◎ Likewise, the SecurityPolicyViolationEvent MUST NOT target any Document other than the one which triggered the request, for the same reasons.
7. 処理能~上の考慮点
`昇格の仕組み$は、`事前読込-可能な~HSTS~host$でない~hostへ向けた外方へのどの`~navi要請$にも `Upgrade-Insecure-Requests: 1\r\n^s を追加する( public-webappsec@w3.org, および w3c/webappsec#216 にて長く論じられているように)。 この~headerの利点と意図は、 `Upgrade-Insecure-Requests^h ~HTTP要請~header にて~~述べる — ~platformの恒久的な設備にはならないよう,しかるべき手続き(`事前読込-可能な~HSTS~host$を築き上げること)はとられているが、この~headerが消え失せる日が来るまでには,長い長い年月を~~要するであろう。 ◎ The upgrade mechanism specified here adds Upgrade-Insecure-Requests: 1\r\n to every outgoing navigation request to non-preloadable HSTS hosts (as discussed at length on public-webappsec@, and w3c/webappsec#216). The advantages and intent of the header are laid out in §3.2.1 The Upgrade-Insecure-Requests HTTP Request Header Field, and though we’ve taken some steps to ensure that it won’t be a permanent fixture of the platform (by carving out preloadable HSTS hosts), it’s going to be a long, long time before the header vanishes.
~UAには、追加の築き上げを見出して,それを実装することが奨励される。 ◎ User agents are encouraged to find additional carveouts, and implement them.
9. IANA 考慮点
9.1. `Upgrade-Insecure-Requests^h ~header
恒久的~message~header~registry `RFC3864$r は、次の登録で更新されるべきである: ◎ The permanent message header field registry should be updated with the following registration: [RFC3864]
- ~header~field名
- `Upgrade-Insecure-Requests^h
- 適用-可能な~protocol
- http
- 位置付け
- 標準
- ~~作成/変更管理者
- W3C
- 仕様~文書
- この仕様( `Upgrade-Insecure-Requests^h ~HTTP要請~header を見よ)
9.2. `upgrade-insecure-requests^dir 指令
~CSP指令~registry `RFC7762$r は、次の登録で更新されるべきである: ◎ The Content Security Policy Directive registry should be updated with the following registration: [RFC7762]
- 指令~名
- `upgrade-insecure-requests$dir
- 参照先
- この文書( `upgrade-insecure-requests^dir ~CSP指令 節)
10. 謝辞
この文書の初期~草案を健全に仕立てた Anne van Kesteren 氏に。 問題領域を明確化して,影響0を指摘された Peter Eckersley 氏, Daniel Kahn Gillmor 氏に。 ◎ Anne van Kesteren helped ensure that the initial draft of this document was sane. Peter Eckersley and Daniel Kahn Gillmor clarified the problem space, and helped point out the impact.