-
Notifications
You must be signed in to change notification settings - Fork 73
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
Storage Access Headers #1084
Comments
This proposal is interesting, and makes a lot of sense for subdocuments in particular. For Gecko, this would be the only (non-heuristic) way to get access to unpartitioned cookies for non-iframed resources, so by including other subresources, there are a lot of additions this implies for us. A few questions: Would this end up merging into whatwg/fetch? Why does In a similar vein, is it possible to remove the I'm also still not certain that more tightly integrating with CORS is a bad idea. "Then this would mean the embedded site would be required to allow the top-level site to read the bytes of its responses and response headers," isn't necessarily true depending on the definition of the CORS protocol. Opacity is within that algorithm's control. And you are already mandating the use of the Origin header for requests with |
Hey Ben, thanks for taking a look!
Yes, ideally; I'm still working on the spec (aiming to have something out ASAP), and it builds on top of Fetch, Storage Access API, and Fetch Metadata.
Briefly, it exists for the same reason the
If we got rid of the I understand the desire to reuse a preexisting mechanism instead of inventing a new one, but we're talking about a signal that relaxes a security boundary. That really requires us to invent something new, otherwise we'd unnecessarily regress the security of whatever existing thing we piggyback on. That would have bad consequences for existing sites out on the web, which are avoidable if we create something new.
I think if we were starting from square 0 and the web hadn't been using CORS for almost 20 years already, then it would make sense to design a single thing that provides both this feature and what CORS provides today. But it's impractical to try to redesign CORS at this stage and make it do something that none of the web's server deployments planned for. I designed SAH so it could be dropped into the existing web, with minimal change/breakage for any sites that don't use it; I think that is a more practical and more useful property than being tightly integrated with CORS.
The Origin header already carries precisely the meaning we want to convey; its meaning/semantics are not changing through our additional integration with it, so there's no point in inventing something new here. (In contrast, the rest of CORS does carry a different meaning from the API we want to add, and it is already used in places where SAH should probably not be; and an integration with SAH would indeed change the meaning of |
That's a great argument. I think I'm sold there :)
I think I wasn't clear. If you give no special power of granting storage access to the 307. Instead, I'm saying that "retry" is pretty ambiguous and that there are 2 similar-looking but different things in browsers right now. A self-redirect via 307 + Location header and
Sure, I agree with this. I think we may have different definitions of "integrating". In Fetch, a This discussion also gave me another realization: the Origin header isn't sent for non-cors-mode GET requests for compatability constraints. That means that for subdocument loads or image loads to use SAH without top-level document changes, you need to change the rules for when the Origin header is sent, potentially affecting compat. Have you given this thought? |
🎉🎉
I'm open to different names to make it clearer/less ambiguous (but I also think Re: layering with Fetch and HTTP, I'm drafting a spec at privacycg/storage-access-headers#20 which doesn't have to touch HTTP; PTAL and LMK what you think.
Ah, I think I see what you mean. Yes, in that sense, this does create more Re: Access-Control-Allow-Credentials, that's tricky. Credentials include more than just cookies, so I think "allow cookies/TLS certs/auth headers to be sent" is a bit of a different signal than "please send cookies if permission has been granted". That said, maybe Access-Control-Allow-Credentials should also "activate" the storage-access permission. I'll think some more on that and whether it seems feasible/desirable. Re: compatibility for the Origin header, yeah, Anne mentioned that in privacycg/storage-access-headers#7 (comment). I strove to minimize the potential breakage due to that (spec section), but I'm not convinced it's completely avoidable. I'm definitely open to suggestions if you have any. |
Request for Mozilla Position on an Emerging Web Specification
@
-mention GitHub accounts): @cfredric @johannhofOther information
The Storage Access Headers proposal creates new HTTP request and response headers to enable authenticated embeds to access third-party cookies, even without an iframe, via existing storage-access permission grants.
The text was updated successfully, but these errors were encountered: