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

QUIC role determination from ICE #103

Open
shampson opened this issue Dec 18, 2018 · 10 comments
Open

QUIC role determination from ICE #103

shampson opened this issue Dec 18, 2018 · 10 comments
Labels

Comments

@shampson
Copy link
Collaborator

Is the QUIC role appropriate based upon ICE? Currently the determination is:

  • ICE controlled = QUIC client
  • ICE controlling = QUIC server

I see that this is taken from DtlsTransport and I'm wondering what the motivation was. A potential problem could be a server that implements ICE Lite, which requires to be the controlled role, which is a QUIC client in our case.

@aboba aboba added the question label Dec 19, 2018
@pthatcherg
Copy link
Collaborator

We should remember that the app can choose. This is just the default role (or "auto").

I think the motivation originally was related to SDP offer/answer. In RFC 5245, the offerer must be controlling and the answerer controlled (assuming both are full, not lite). But the answerer will typically get an ICE check through first, and so it's more efficient if it acts as the DTLS client. Thus, controlled == DTLS client. I'm guessing we've kind of inherited this..

But I don't know. Maybe there are other reasons I can't remember or think of.

We don't have the constraint about the ICE role being controlled from the offerer. And we don't need to worry about backwards compat with SDP. So perhaps we should make controlling == client. As you say, that makes a lot more sense in a client/server world when the server is using ICE lite.

By the way, the ORTC IceTransport includes an "iceLite" field on the RTCIceParameters dictionary. The WebRTC one doesn't. Should we make an issue for that? Without it, there's no way to tell the browser it's talking to a lite endpoint.

@shampson
Copy link
Collaborator Author

The app can choose, but only by the value of remoteParameters.role passed into start, "a RTCQuicTransport object assumes a QUIC role of auto upon construction." Otherwise the value is determined by the ICE role once the RTCIceTransport gets to the connected state.

@shampson
Copy link
Collaborator Author

@pthatcherg
Copy link
Collaborator

pthatcherg commented Dec 28, 2018 via email

@steely-glint
Copy link

In classic webRTC DLTS role isn't determined by ICE role, it is determined by a=setup passive/active/actpass
If I remember right, the offerer is supposed to offer actpass - so the answerer may chose the role they wish to take.

I'm not saying that we should preserve the mistakes of the past, just that it is a decision of the UA - albeit somewhat constrained.

@shampson
Copy link
Collaborator Author

shampson commented Jan 3, 2019

Currently we don't pick a role if QUIC packets come early (as done in WebRTC's DtlsTransport here), and according to the current spec it is only determined by the ICE role.

Another idea: connect() & setRemoteFingerprints() (each side listens)

In any case the developer needs to know which side is calling the other (one side has to initiate the handshake or set the role).

I think how the fingerprints are verified is a separate discussion, with 2 options:

  1. It's done inherently in the QUIC handshake if they're passed in before starting the handshake
  2. Done after the handshake by the developer with verify(remoteFingerprints)

@aboba
Copy link
Collaborator

aboba commented Jan 4, 2019

In general, a goal of the existing design (which was focussed on ORTC) was to minimize the total handshake time since that is important to developers in scenarios such as games. So ICE parameters might be sent along and as soon as ice.start() is called, the Offerer can respond to incoming checks (this can't happen before start is called because the role isn't established and conflicts could result). Receipt of a successful check will allow the Answer to begin the QUIC negotiation as a client, but negotiation cannot conclude (and media cannot be rendered) without the fingerprint verification via RTCQuicTransport.start().

A question: Can 0-RTT keys be established in P2P QUIC? After an initial certificate exchange and fingerprint verification between peers, it is possible to construct a subsequent RTCQuicTransport with the same certificates and would this enable 0-RTT? Just wondering if you would still need RTCQuicTransport.start() in such a situation. The fingerprint verification would have previously been done, but perhaps other checks (certification expiration?) would be needed.

Another question: Is there interest in supporting WebRTC-QUIC as an extension to WebRTC 1.0 in the absence of WebRTC-ICE? If so, then we'd need to define the QUIC SDP negotiation, which would presumably be akin to RFC 8122 DTLS negotiation (e.g. a=fingerprint and a=setup lines).

@pthatcherg
Copy link
Collaborator

pthatcherg commented Jan 23, 2019

Editor's meeting notes: we think we can resolve the issues by just always being "auto" and not allowing a role choice by the web app. This has the downside that in a client/server situation with an ICE-lite server will be a QUIC client. But once we have the client/server API, one won't need to use ICE-lite on the server.

@shampson
Copy link
Collaborator Author

Also - we are willing to revisit this if we see a strong use case/need. Currently we don't see a strong enough reason to support choosing the role.

@robin-raymond
Copy link
Collaborator

FYI - ICE lite will cause the server to be in ICE controlled role. The current spec says that ICE controlled role causes the QUIC transport to be in client mode. This actually causes a desirable behaviour for faster setup the server will issue the "HELLO" (with less round trips that the server being set in a server role). It might be odd that a server is in a client QUIC role but that's the nature of having a double handshake (ICE handshake first, then QUIC handshake after) to minimize round trips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants