Skip to content
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

Add From-Origin? #365

Closed
annevk opened this issue Aug 10, 2016 · 3 comments
Closed

Add From-Origin? #365

annevk opened this issue Aug 10, 2016 · 3 comments
Labels
security/privacy There are security or privacy implications

Comments

@annevk
Copy link
Member

annevk commented Aug 10, 2016

Notes from @jakearchibald:

  • A header on the response which prevents the browser using a response if it's initiated by another origin, with the exception of top-level GET navigations where the initiator has no access to a WindowProxy or a load event
  • Can be easily added to all requests like x-frame-options, with exceptions where needed (including whitelisting a particular origin)
  • Without those exceptions it would break basic <img> and <script> linking, although some hosts may be happy with the ability to do that
  • Protects unauthenticated-but-private hosts like local servers and intranets
  • Also prevents clickjacking and window.open, so load times that may be influenced by origin storage aren't exposed
  • Doesn't really protect against CSRF, as the credentialed request is still sent to the target
  • Abandoned, but its intent could be revived. Feels like a good fit for CSP given CSP has frame-ancestors
  • Would need to terminate the connection upon failure, to prevent exposing size through TCP windows

This could be part of CSP, but CSP thus far doesn't have response-specific rules. So it's more like a logical counterpart to CORS. @mikewest?

(See #355 and w3c/resource-timing#64 for some earlier discussion on this. See https://www.w3.org/TR/2012/NOTE-from-origin-20120529/ for an earlier iteration of this idea, with somewhat different semantics.)

@annevk annevk added the security/privacy There are security or privacy implications label Aug 10, 2016
@jakearchibald
Copy link
Collaborator

What would my Vary header be when responding with From-Origin? Given the Origin header isn't always sent, I could run into difficulties.

@mnot
Copy link
Member

mnot commented Aug 11, 2016

What would the possible values be, and does it allow only one, or any number?

@annevk
Copy link
Member Author

annevk commented Aug 26, 2016

There's still not much interest in this so I'm closing this. Most popular CSRF defense is still same-site cookies, though it's unclear how fast everyone is implementing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security/privacy There are security or privacy implications
Development

No branches or pull requests

3 participants