-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce CORP on "navigate" request mode #1113
Comments
See the discussion at #687 (comment). I'm not sure that's worth revisiting. I think it makes sense to enforce XFO for redirects. HTML doesn't do that currently, but that could be changed. I'm not entirely sure I understand the analysis in the Chromium bug. Is the assumption that all those redirects do not want to be blocked? Why? |
I do think it’s worth revisiting. The requirement of XFO together with CORP isn’t well explained anywhere in the spec or MDN (AFAICT). And implementing this would also allow developer to use “same-site” keyword which isn’t available in XFO. I think this change is more logical and easy for devs, than what we have today.
Sure, but Chrome doesn’t want to implement this so far. And it’ll be much easier to just change CORP than landing a breaking change.
XFO should be enforced regardless of redirect :) Which isn’t the case today, and that would leak some secrets. |
Well:
|
Because people adding CORP response header to resources loaded iframes (including redirects) would be lesser at this point then people specifying XFO. Why do you think enforcing CORP in requests from iframes is a breaking change (other than spec-wise)?
You can read the thread in the bug, but they see 0.75% out of all subframe navigation to have XFO with redirect response status. Which is high enough that they won't be able to change the behavior. However, I would expect CORP to be much lesser in the same matrix.
If we are able to change the current behavior of XFO (i.e. enforce on redirect), then we can add |
CC: @mikewest @arturjanc |
Enforcing CORP for navigations might break navigations that are expected to succeed. I had read the Chromium thread, and what I don't understand is why the conclusion is that blocking those fetches would be bad. It seems some more analysis would be needed to reach that conclusion. |
With regard to XFO: I didn't do any additional research beyond getting a count. It's something that's broken applications in the past (both Google Drive and Dropbox both served XFO on redirect responses that were expected to turn into downloads, AFAIR), and given that experience, it didn't seem worth the time it would take to dive into HTTP Archive and/or add additional metrics to track things down more closely. I'd welcome analysis that showed it to be less likely to break things than my priors suggest. |
Thanks, it does sound like there's a potential path there for "allowing a download if it turns out to be a download or is a download, and blocking otherwise", but maybe it was not the sole reason and that would also be a fair bit more involved than blocking. |
I don't think I like the idea of CORP applying to frames for the following reasons:
IMHO a better avenue here is to fix the handling of XFO on redirect responses and/or update the MDN page about CORP to tell developers they should set |
I agree with @arturjanc. CORP is a subresource control mechanism, where you have a context/origin attached to the load. It seems best to keep CORP within this scope. |
Okay, I agree with @arturjanc's 2nd reason that this change makes adoption of CORP more difficult. However, I think we still have few gotchas for developers in frames vs resources protection.
While it seems like enforce CORP on navigations are a bad idea, I think we need to do a better job of explaining what developers need to do (i.e. supply XFO AND CORP to all sensitive responses). |
That's a little surprising. @annevk, is Firefox pushing forward on ORB instead? Something in this area seems necessary.
I think we'd be better served by spending time on changing the default behavior so that developers don't have to think about the risk unless they actually want their resources to be embeddable: https://github.com/mikewest/embedding-requires-opt-in/ is something I'd like us to do in the near future, for example. Doing the same for CORP is a huge lift, but perhaps there are alternatives I haven't thought about. |
We would like to push ORB in due course, yes. |
It seems like this can be closed? (We already have various issues tracking the final design of CORB/ORB.) |
There is an inconsistency in CORP, where CORP is not enforced on a request with navigate mode (e.g. a site embedded by an iframe). While I understand that
X-Frame-Options
orCSP: frame-ancestors
can do this, there are few problems.I think it'd be better to enforce CORP on a request with navigate mode as well.
The text was updated successfully, but these errors were encountered: