-
Notifications
You must be signed in to change notification settings - Fork 19
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
Share some connection infrastructure with Fetch #73
Comments
Consistent handling would also include the blocked ports list. |
Fetch currently enforces that at a different point and we would not want to block those ports for WebTransport I believe, but if that needs to be shared with WebRTC we should make that work, yes. |
WEBRTC just added a reference to the blocked ports list to the webrtc spec because of a known exploit that it would help against, which is why I pointed it out as a shared piece of infrastructure. I do think WebTransport needs to respec a blocked ports list. |
I think that it makes sense to share name resolution and even socket establishment (if that is even large enough to bother factoring out into common code). If you go beyond socket establishment to connection establishment and pooling, then that doesn't apply to WebRTC. Even when it comes to TURN, the connection management is fundamentally different to what goes on with an HTTP proxy. A big question here is what, if anything, we do for policy enforcement (I can't find the original issue here, but I do remember discussing this on several occasions). Any solution we come up with for managing connections to hosts that are identified using certificate fingerprints will want to be shared with WebRTC and WebTransport. My initial thought is a I don't think that we can avoid policy enforcement for ever; people use I don't believe that the blocked ports are necessary for WebRTC or WebTransport as both protocols have fairly good consent/address validation arrangements. I say that only cautiously as QUIC has some exposure to request forgery attacks and it might turn out that we need something. I don't know whether anyone has done a proper analysis for DTLS and STUN to know if WebRTC is vulnerable, so that might be worth checking too. |
@martinthomson read up on "NAT slipstream". It used WebRTC and TURN as a carrier for some of the attacks. |
Thanks @alvestrand, I'd forgotten that attack. That is a request forgery attack that exploits vulnerabilities in commonly deployed SIP ALGs. It's a pity that STUN and TURN are so poor when it comes to request forgery given their function. If your claim is that this is common with (unsecured) HTTP, that is true, but it probably worth noting that this commonality will be a case-by-case thing. |
The network partition key (https://fetch.spec.whatwg.org/#network-partition-key) may be a sharable object. |
@annevk to unstuck this, would you be able to provide examples or guidance (or even a PR) with how and which algorithms you imagine WebRTC invoking in fetch here? |
I'm slowly making progress on enabling this together with @ricea. The idea is that WebRTC would at some point hook into https://fetch.spec.whatwg.org/#concept-connection-obtain (or perhaps something lower-level as mt points out above), with parameters that make sense for it. That would then take care of any domain resolving (if needed) and setting up and returning a connection. My hope is that we can also move some other logic there, such as port blocking, what |
Anne, I'm having a bit of trouble understanding how "obtain a connection" could be a common merge point. I do appreciate that @ricea is trying to help, but having someone who knows the WebRTC networking stack (ICE, STUN and all that machinery) in the loop is probably vital, so that we don't generate proposals that don't make sense in the WebRTC context. |
Agreed. We're still in the process of ensuring Fetch, WebSocket, and WebTransport are aligned and it might make sense that WebRTC only reuses some aspects. I'd love to chat once we're closer. Here are the things that come to mind with regards to sharing:
|
@annevk, is your WIP online in some kind of draft document? |
Ping? |
Status is still the same as I've been OOO. You can check connection PRs at https://github.com/whatwg/fetch/pulls for progress with regards to the first paragraph. |
I think there are basically two reasons why we would want centralized connection management in the platform:
(See also w3c/webtransport#128.)
The text was updated successfully, but these errors were encountered: