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

WebSocket connections need partitioning #1122

Closed
annevk opened this issue Dec 7, 2020 · 8 comments
Closed

WebSocket connections need partitioning #1122

annevk opened this issue Dec 7, 2020 · 8 comments
Labels
security/privacy There are security or privacy implications topic: connections topic: websockets

Comments

@annevk
Copy link
Member

annevk commented Dec 7, 2020

Currently WebSocket connections share no infrastructure with "HTTP" connections, this is somewhat wrong, at least when it comes to state partitioning.

(See also #1118.)

cc @MattMenke2 @shivanigithub @sleevi

@annevk annevk added security/privacy There are security or privacy implications topic: websockets labels Dec 7, 2020
@MattMenke2
Copy link
Contributor

In Chromium, we've already wired up partitioning to WebSockets (though are not yet shipping it), so we certainly agree with this.

@annevk
Copy link
Member Author

annevk commented May 25, 2021

As WebSocket connections are dedicated connections, partitioning isn't strictly needed. #1241 will further clarify this. That will also make them have a partitioning key, though it will not end up mattering.

I think that means this can be closed.

@MattMenke2
Copy link
Contributor

While they're not covered in the fetch spec, there are other caches (TLS session resumption), websocket over shared H2/QUIC connections, ALPN data, and the DNS cache, that are partitioned, and WebSockets should presumably pull all of those from the correct partition. If proxy connections and the HTTP auth cache are partitioned, needs to use the right partition for those as well.

@annevk
Copy link
Member Author

annevk commented May 25, 2021

Ideally we would cover those in Fetch I think (or at least mention that they should be considered part of the connection and thus be partitioned).

If WebSocket over H2 (and QUIC? Is there an RFC for that?) can reuse a connection, Fetch needs some more complicated logic than I suggested in #1241. Not immediately clear to me what that would look like. forceDedicatedIfH1 or some such...

@MattMenke2
Copy link
Contributor

Unfortunately, I'm not familiar enough with WebSockets or H2/H3 to know where the details are specified.

@annevk
Copy link
Member Author

annevk commented May 25, 2021

There's https://datatracker.ietf.org/doc/html/rfc8441 for H2.

@ricea
Copy link
Collaborator

ricea commented May 26, 2021

WebSocket over H2 does reuse connections. Currently you can't use WS/H2 at all unless you have an existing H2 connection.

WebSocket over H3 is not a thing yet although in principle it should be a straightforward application of WS/H2 semantics.

@annevk
Copy link
Member Author

annevk commented May 26, 2021

Thanks everyone. I'm going to fold this into #1243 as that will truly solve this (fingers crossed).

@annevk annevk closed this as completed May 26, 2021
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 topic: connections topic: websockets
Development

No branches or pull requests

3 participants