You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -163,7 +169,7 @@ Spectre-like side-channel attacks inexorably lead to a model in which active web
163
169
has entered the address space of the process which hosts it. While this has deep implications for
164
170
user agent implementations' internal hardening strategies (stack canaries, ASLR, etc), here we'll
165
171
remain focused on the core implication at the web platform level, which is both simple and profound:
166
-
any data which flows into an origin's process is legible to that origin. We must design accordingly.
172
+
any data which flows into an origin's process is legible to that origin. We m)ust design accordingly.
167
173
168
174
In order to determine the scope of data that can be assumed accessible to an attacker, we must make
169
175
a few assumptions about the normally-not-web-exposed process model which the user agent implements.
@@ -193,24 +199,26 @@ TL;DR {#tldr}
193
199
-------------
194
200
195
201
1. **Restrict attackers' ability to load your data as a subresource** by setting a
196
-
[=cross-origin resource policy=] (CORP). In the best case, you can default to a restrictive
197
-
`same-origin` value, opening up to `same-site` or `cross-origin` only in cases where you expect
198
-
the resource to be used beyond your origin.
202
+
[=cross-origin resource policy=] (CORP) (default to `same-origin`, opening up to `same-site`
203
+
or `cross-origin` only when necessary), and by making good decisions about when to enable access
204
+
via CORS.
199
205
200
206
2. **Restrict attackers' ability to frame your data as a document** by opt-ing into framing
201
207
protections via `X-Frame-Options: SAMEORIGIN` or CSP's more granular [=frame-ancestors=]
202
-
directive.
208
+
directive (`frame-ancestors 'self' https://trusted.embedder`, for example).
203
209
204
210
3. **Restrict attackers' ability to obtain a handle to your window** by setting a
205
211
[=cross-origin opener policy=] (COOP). In the best case, you can default to a restrictive
206
212
`same-origin` value, opening up to `same-origin-allow-popups` or `unsafe-none` only if
207
213
necessary.
208
214
209
-
4. **Prevent MIME-type confusion attacks** by setting `X-Content-Type-Options: nosniff` on all
210
-
your responses.
215
+
4. **Prevent MIME-type confusion attacks** and increase the robustness of passive defenses like
216
+
[=cross-origin read blocking=] (CORB) /
217
+
<a href="https://github.com/annevk/orb">opaque response blocking</a> ([[ORB]]) by setting
218
+
`X-Content-Type-Options: nosniff` on all your responses.
211
219
212
220
ISSUE: Actually describe mitigations, swiping liberally from
213
-
<a href="https://docs.google.com/document/d/1JBUaX1xSOZRxBk5bRNZWgnzyJoCQC52TIRokACBSmGc/edit?resourcekey=0-cZ7da6v52enjwRSsp_tLyQ">Notes on the threat model of _cross-origin isolation_</a>,
221
+
<a href="https://docs.google.com/document/d/1JBUaX1xSOZRxBk5bRNZWgnzyJoCQC52TIRokACBSmGc/edit?resourcekey=0-cZ7da6v52enjwRSsp_tLyQ">Notes on the threat model of *cross-origin isolation*</a>,
214
222
<a href="https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit">Safely reviving shared memory</a>, etc.
215
223
216
224
Practical Examples {#examples}
@@ -227,7 +235,6 @@ to making these resources widely available, and value in allowing embedders to r
227
235
something like the following response headers could be appropriate:
<p><strong>Restrict attackers' ability to load your data as a subresource</strong> by setting a <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#http-cross-origin-resource-policy" id="ref-for-http-cross-origin-resource-policy">cross-origin resource policy</a> (CORP). In the best case, you can default to a restrictive <code>same-origin</code> value, opening up to <code>same-site</code> or <code>cross-origin</code> only in cases where you expect
2166
-
the resource to be used beyond your origin.</p>
2165
+
<p><strong>Restrict attackers' ability to load your data as a subresource</strong> by setting a <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#http-cross-origin-resource-policy" id="ref-for-http-cross-origin-resource-policy">cross-origin resource policy</a> (CORP) (default to <code>same-origin</code>, opening up to <code>same-site</code> or <code>cross-origin</code> only when necessary), and by making good decisions about when to enable access
2166
+
via CORS.</p>
2167
2167
<lidata-md>
2168
2168
<p><strong>Restrict attackers' ability to frame your data as a document</strong> by opt-ing into framing
2169
-
protections via <code>X-Frame-Options: SAMEORIGIN</code> or CSP’s more granular <adata-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#frame-ancestors" id="ref-for-frame-ancestors">frame-ancestors</a> directive.</p>
2169
+
protections via <code>X-Frame-Options: SAMEORIGIN</code> or CSP’s more granular <adata-link-type="dfn" href="https://w3c.github.io/webappsec-csp/#frame-ancestors" id="ref-for-frame-ancestors">frame-ancestors</a> directive (<code>frame-ancestors 'self' https://trusted.embedder</code>, for example).</p>
2170
2170
<lidata-md>
2171
2171
<p><strong>Restrict attackers' ability to obtain a handle to your window</strong> by setting a <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policies" id="ref-for-cross-origin-opener-policies">cross-origin opener policy</a> (COOP). In the best case, you can default to a restrictive <code>same-origin</code> value, opening up to <code>same-origin-allow-popups</code> or <code>unsafe-none</code> only if
2172
2172
necessary.</p>
2173
2173
<lidata-md>
2174
-
<p><strong>Prevent MIME-type confusion attacks</strong> by setting <code>X-Content-Type-Options: nosniff</code> on all
2175
-
your responses.</p>
2174
+
<p><strong>Prevent MIME-type confusion attacks</strong> and increase the robustness of passive defenses like <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#corb" id="ref-for-corb">cross-origin read blocking</a> (CORB) / <ahref="https://github.com/annevk/orb">opaque response blocking</a> (<adata-link-type="biblio" href="#biblio-orb">[ORB]</a>) by setting <code>X-Content-Type-Options: nosniff</code> on all your responses.</p>
2176
2175
</ol>
2177
-
<pclass="issue" id="issue-32803971"><aclass="self-link" href="#issue-32803971"></a> Actually describe mitigations, swiping liberally from <ahref="https://docs.google.com/document/d/1JBUaX1xSOZRxBk5bRNZWgnzyJoCQC52TIRokACBSmGc/edit?resourcekey=0-cZ7da6v52enjwRSsp_tLyQ">Notes on the threat model of _cross-origin isolation_</a>, <ahref="https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit">Safely reviving shared memory</a>, etc.</p>
2176
+
<pclass="issue" id="issue-26c425e2"><aclass="self-link" href="#issue-26c425e2"></a> Actually describe mitigations, swiping liberally from <ahref="https://docs.google.com/document/d/1JBUaX1xSOZRxBk5bRNZWgnzyJoCQC52TIRokACBSmGc/edit?resourcekey=0-cZ7da6v52enjwRSsp_tLyQ">Notes on the threat model of <em>cross-origin isolation</em></a>, <ahref="https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit">Safely reviving shared memory</a>, etc.</p>
<divclass="issue"> Propose this to WebAppSec.<ahref="#issue-bdf75540"> ↵ </a></div>
2632
2639
<divclass="issue"><adata-link-type="biblio" href="#biblio-coi-threat-model">[COI-THREAT-MODEL]</a> spells out more implications. Bring them in here for more nuance.<ahref="#issue-340f57a5"> ↵ </a></div>
2633
-
<divclass="issue"> Actually describe mitigations, swiping liberally from <ahref="https://docs.google.com/document/d/1JBUaX1xSOZRxBk5bRNZWgnzyJoCQC52TIRokACBSmGc/edit?resourcekey=0-cZ7da6v52enjwRSsp_tLyQ">Notes on the threat model of _cross-origin isolation_</a>, <ahref="https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit">Safely reviving shared memory</a>, etc.<ahref="#issue-32803971"> ↵ </a></div>
2640
+
<divclass="issue"> Actually describe mitigations, swiping liberally from <ahref="https://docs.google.com/document/d/1JBUaX1xSOZRxBk5bRNZWgnzyJoCQC52TIRokACBSmGc/edit?resourcekey=0-cZ7da6v52enjwRSsp_tLyQ">Notes on the threat model of <em>cross-origin isolation</em></a>, <ahref="https://docs.google.com/document/d/1zDlfvfTJ_9e8Jdc8ehuV4zMEu9ySMCiTGMS9y0GU92k/edit">Safely reviving shared memory</a>, etc.<ahref="#issue-26c425e2"> ↵ </a></div>
2634
2641
<divclass="issue"> Does <code>Content-Disposition</code> make any sense? <ahref="https://github.com/mikewest/post-spectre-webdev/issues/1"><https://github.com/mikewest/post-spectre-webdev/issues/1></a><ahref="#issue-830682a1"> ↵ </a></div>
2635
2642
<divclass="issue"> Find some links.<ahref="#issue-94179e25"> ↵ </a></div>
2636
2643
<divclass="issue"> Find some links.<ahref="#issue-94179e25①"> ↵ </a></div>
0 commit comments