Intent to Implement and Ship: Cross-Origin Resource Policy
Contact emails
luk...@chromium.org, cr...@chromium.org
Explainer
N/A - Cross-Origin-Resource-Policy is already part of Fetch spec (prior to being included in the spec, this feature was discussed in https://github.com/whatwg/fetch/issues/687 around Mar-Jun 2018).
Design doc/Spec
Spec link: https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header
Summary
“Cross-Origin-Resource-Policy” response header allows http servers to ask the browser to block cross-origin or cross-site embedding of the returned resource. It is complementary to the Cross-Origin Read Blocking feature and is especially valuable for resources not covered by CORB (which only protects HTML, XML and JSON).
Motivation
“Cross-Origin-Resource-Policy” is currently the only way to protect images against Spectre attacks or against compromised renderers (both of which can circumvent the opaqueness of cross-origin images). In the future Sec-Fetch-Site might offer another, complementary defense mechanism.
Risks
Interoperability and Compatibility
Edge: No signals
Firefox: Public support (when discussing https://github.com/whatwg/fetch/issues/687)
Safari: Shipped (in Q2 2018)
Web / Framework developers: Some positive support.
Ergonomics
N/A - this is a http response header (with quite restricted syntax).
Activation
N/A
Debuggability
N/A - can just use DevTools Network panel.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Is this feature fully tested by web-platform-tests?
Yes - see wpt/fetch/cross-origin-resource-policy/...
Link to entry on the feature dashboard
https://www.chromestatus.com/features/4647328103268352
Requesting approval to ship?
Yes - the change is small and I’d like to ship enabled-by-default immediately.
LGTM. This is a reasonable mitigation against a few different attack vectors that I expect a reasonable subset of developers to be able to easily opt-into for sensitive resources. I'm in favour of shipping it quickly, matching Safari's existing behavior.
That said, I recall +Artur Janc suggesting that some bits and pieces of the discussion in the linked GitHub issue would make sense for a v2.
Is there any plan for that work in the future?
On Tue, Jan 22, 2019 at 7:04 AM Mike West <mk...@chromium.org> wrote:LGTM. This is a reasonable mitigation against a few different attack vectors that I expect a reasonable subset of developers to be able to easily opt-into for sensitive resources. I'm in favour of shipping it quickly, matching Safari's existing behavior.Thanks Mike!That said, I recall +Artur Janc suggesting that some bits and pieces of the discussion in the linked GitHub issue would make sense for a v2.I assume that you are mostly referring to https://github.com/whatwg/fetch/issues/760 which wants to make Cross-Origin-Resource-Policy accept literal origins?Is there any plan for that work in the future?Hmm... this is a very good prioritization question. I think the answer depends on 1) how often in practice sensitive resources need to be exposed cross-site but only to specific origins (this scenario is not addressed by v1 of Cross-Origin-Resource-Policy) and 2) whether this problem is best solved by working on v2 of Cross-Origin-Resource-Policy VS by working on finalizing and implementing something like Sec-Fetch-Site. I hope that you and aaj@ can provide some guidance here.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/9dc86bf0-edd2-4202-80b6-b83578b0eb34%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYc_t%3DhK8DQPsJyRi5gts7nz4fOWrMnJdQ7APr4hopRN8A%40mail.gmail.com.
LGTM2, this seems pretty straightforward with Safari already having shipped it and the spec work being done.In https://staging.wpt.fyi/results/fetch/cross-origin-resource-policy?run_id=5844727341514752&run_id=6163721139257344&run_id=6582181900058624&run_id=4697720035999744 it looks like Safari is a fair bit greener than Chrome. Can you look into that? If these are the exact tests for the feature being shipped, then ideally all failures should be accounted for, although not necessarily fixed.