-
Notifications
You must be signed in to change notification settings - Fork 56
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
WebTransport #389
Comments
A few very preliminary comments from spending an hour or two starting to look over the various documents: From looking at the explainer, it seems like the "Detailed design discussion" and "Alternative designs considered" sections could perhaps be fleshed out a little bit more. One example of something I'd have liked to learn from those sections that I didn't would be how this proposal differs in scope from the previous It would likely also be useful for the explainer to explain how this spec relates to the WHATWG Streams specification. It would also be useful to understand why the spec currently doesn't expose these in workers, and whether there's a future plan to do so. Is there a section somewhere, either in the explainer or one of the two specs, that explains how the two specs (the one in WICG and the one in IETF) fit together? A few very detailed comments on bits that I noticed while jumping around to look at some examples of things: I'd note that the
This seems a little bit odd, and likely to be a bit of a programming hazard (producing rejections in unexpected ways, depending on timing/races). Would it make more sense to return an empty sequence? That said... in the context of understanding why this method is asynchronous -- would it even be guaranteed to be empty? If it's asynchronous because the datagrams are on their way over from another thread or process... might asking for more not yield more? Also, it seems like the type of |
(I realize those detailed comments may quickly become irrelevant if there's a big refactor to integrate with the streams spec, as one of the other links suggested.) |
Responses to dbaron's comments from 10 days ago: RTCQuicTransport is the p2p impl of a WebTransport. I made w3c/webtransport#41 to track making that more clear. The explainer has now been updated to use WHATWG streams. We plan to update the spec to use them as well after some more discussion on how WHATWG streams should work (in particular for creating send streams and bidirectional streams). We definitely want WebTransports to work in WebWorkers, we simply didn't think to say that explicitly. The W3C spec references the IETF specs. Victor made w3c/webtransport#37 to track that. I can't find any example of "!!". Perhaps that went away when we moved to WHATWG streams in the explainer. On the nullability of receiveDatagrams(): you're right, that's a mistake. But we decided on a different approach that doesn't return null (see w3c/p2p-webtransport#124). We just need a PR for it. On the goofiness of receiveDatagrams() only being called once at a time: that will probably go away with |
@cynthia and I are currently looking at this in a breakout. So far I'd note that we found that there are additional documents that seem critical to understanding this, in particular: |
dbaron to invite Martin Thomson to a future call |
@ylafon and I discussed during our Wellington F2F. We think this proposal is extremely interesting, and will bring a whole new set of capabilities to the web. However, we also consider this a pretty powerful feature - and was wondering about the implications of the constructor magically connecting, hence not being able to be a promise. (which would allow gating it behind a permission) We also had some concerns about port scanning through this mechanism (e.g. through timing based testing, albeit it would only work on UDP ports for now) but it does feel like gating this behind a permission would be good enough as a mitigation. |
@cynthia The WebTransport constructor was modeled after the WebSockets constructor which also immediately establishes a connection. To address the port-scanning issue we could prevent WebTransport from connecting to ports on the "bad ports" list. |
@aboba WebSockets is less powerful, and hence was never gated. This is a significantly more powerful API, so I think different considerations has to apply. As for the bad port blacklisting, those I believe are TCP ports; not sure if that blacklist would apply here. |
What are the specific ways in which WebTransport is more powerful than WebSocket that are of security concern here? |
w3c/webtransport#110 seems somewhat relevant for the TAG review. (Also applies to some of the other class names I realized, e.g., QuicTransport.) At least from Mozilla's review of this I don't think we found reason to permission-gate this and even "bad ports" might not be needed due to the specifics of the networking handshake. @martinthomson might recall this better. Having said that, I believe @ricea still plans on doing a stream-based version of |
Yes, I think that we can avoid the port list and the permissions. Port scanning can be addressed by having the connection fail with a minimum timeout and no error codes that expose how it failed (maybe with some exceptions that we can carefully vet). After that, you leak no information until the server consents to communicate with this origin. The big concerns are that we keep this and the new WebSocket stuff in sync so that they share what they need to (and that we don't do the same work twice). I'm assured that there is good coordination with Google between the teams, so that much is good. |
@martinthomson Are you referring to WebSocketStream? There are some differences, but they were closed as "won't fix": |
In light of https://docs.google.com/document/d/1La1ehXw76HP6n1uUeks-WJGFgAnpX2tCjKts7QFJ57Y/edit those make sense I think, w3c/webtransport#54 appears unaddressed still. |
Not sure that "Peter talked to Adam" is sufficient for a decision, though I appreciate that this is a personal submission, so it does have a different standard. Now sure how the WebSocketStream API is necessarily distinct based on the proposal. |
Sangwhan and just discussed this and we are fine with not gating with a permission to avoid port scanning as long as there is no way to infer what is happening by doing time-based analysis (connecting to a filtered port takes far more time than a blocked one or one responding with another protocol). |
@dbaron and I discussed this during a breakout today, and concluded that given the above port scanning mitigations are in place we are happy to see this proposal move forward. Thanks for bringing this to our attention, and we plan to close this after discussing with the group. We'd like the group to actively engage in review with relevant experts while development progresses. (In particular, networking is one of our weak points, so we might have missed something important.) |
おはようTAG!
I'm requesting a TAG review of:
Further details:
You should also know that...
We'd prefer the TAG provide feedback as (please select one):
The text was updated successfully, but these errors were encountered: