Re: [rtcweb] URI schemes for TURN and STUN

Harald Alvestrand <harald@alvestrand.no> Sun, 06 November 2011 16:42 UTC

Return-Path: <harald@alvestrand.no>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4274421F8511; Sun, 6 Nov 2011 08:42:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.449
X-Spam-Level:
X-Spam-Status: No, score=-110.449 tagged_above=-999 required=5 tests=[AWL=0.150, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kuyzGVVPJvCa; Sun, 6 Nov 2011 08:42:36 -0800 (PST)
Received: from eikenes.alvestrand.no (eikenes.alvestrand.no [158.38.152.233]) by ietfa.amsl.com (Postfix) with ESMTP id D523821F84DA; Sun, 6 Nov 2011 08:42:33 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by eikenes.alvestrand.no (Postfix) with ESMTP id 5E01139E0A3; Sun, 6 Nov 2011 17:42:32 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at eikenes.alvestrand.no
Received: from eikenes.alvestrand.no ([127.0.0.1]) by localhost (eikenes.alvestrand.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wnEVSOzTp+xU; Sun, 6 Nov 2011 17:42:31 +0100 (CET)
Received: from [10.154.240.196] (unknown [62.206.113.61]) by eikenes.alvestrand.no (Postfix) with ESMTPS id 468FE39E074; Sun, 6 Nov 2011 17:42:31 +0100 (CET)
Message-ID: <4EB6B904.8050607@alvestrand.no>
Date: Sun, 06 Nov 2011 17:42:44 +0100
From: Harald Alvestrand <harald@alvestrand.no>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15
MIME-Version: 1.0
To: Ned Freed <ned.freed@mrochek.com>
References: <4EAC6BF4.2000604@alvestrand.no> <CALiegf=f4kFzyDLWK+Y5vbuCEJFXX590+VuZ4bbnHZnvX0CoBA@mail.gmail.com> <4EAC8AE0.3020307@acm.org> <4EACD558.1050003@alvestrand.no> <4EAE157F.5020901@it.aoyama.ac.jp> <4EAEB76B.9090304@acm.org> <8B0C4061-D362-4DFE-9677-7E64515A6E1C@network-heretics.com> <4EAF9391.5040209@it.aoyama.ac.jp> <4EB05A23.3060101@alvestrand.no> <01O80L7NM7N000RCTX@mauve.mrochek.com> <CABcZeBPCGcUcEDNJ5T3+LowrdTz-NAka3Q33CA8mvdwb0=+aZg@mail.gmail.com> <4EB480E7.1010200@alvestrand.no> <01O823CUB1SG00XBUL@mauve.mrochek.com>
In-Reply-To: <01O823CUB1SG00XBUL@mauve.mrochek.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>, Keith Moore <moore@cs.utk.edu>, Keith Moore <moore@network-heretics.com>, Behave WG <behave@ietf.org>
Subject: Re: [rtcweb] URI schemes for TURN and STUN
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 06 Nov 2011 16:42:38 -0000

On 11/05/2011 06:20 PM, Ned Freed wrote:
>> On 11/04/2011 04:56 PM, Eric Rescorla wrote:
>> > On Fri, Nov 4, 2011 at 8:31 AM, Ned Freed<ned.freed@mrochek.com>  
>> wrote:
>> >>> Top-posting a general principle, detailed comment at the bottom....
>> >>> For all URI schemes, I think the URI needs to contain all the
>> >>> information you need in order to make contact with the service; you
>> >>> can't negotiate until you've made contact.
>> >>> (the process may involve things like "resolve through a resolution
>> >>> mechanism like DNS" or "get authorization tokens from somewhere 
>> else").
>> >>> In the case of TURN, you need to distinguish between TCP, UDP and 
>> TLS,
>> >>> and you need to make that determination before you send the first
>> >>> packet. That means the distinguishing information between those 
>> three
>> >>> things belongs in the URL; I don't think the scheme is a good 
>> place to
>> >>> encode it.
>> >> I'm in complete agreement with Harald on all of these points. And 
>> while it
>> >> would have been nice if URL syntax was less messy and more 
>> general, making
>> >> it easier to do these sorts of things in a consistent way, it 
>> quite simply
>> >> isn't and we have to make do with what we have.
>> > I don't have any commitment to the scheme. What's the best place?
>
>> I like parameters, like this:
>
>> turn://user@host?proto=tcp
>
>> Quite hard to misunderstand, and quite easy to extend.
>
>> (Note: // is only allowed if what follows is [user[:pass]@]host - I
>> don't recommend using the password, for the obvious reasons, but the
>> syntax will allow it.)
>
> Given your earlier characterization of the TCP/UDP/TLS distinction being
> a single axis, I assume you mean that you'd say:
>
>  turn://user@host?proto=tls
>
> and not
>
>  turns://user@host?proto=tcp

I was thinking

    turn://<user>@<host>?proto=<udp, tcp or tls>

but thought that this was going too far into details.
>
> I have to say I prefer the parameter approach, but I wonder if these 
> really
> are along a single axis - is DTLS a possibility here?
DTLS is a possibility, if the TURN protocol is extended to support it, 
and would be a fourth parameter value. Currently it's not specified (AFAIK).

My opinion is that the URL needs to contain the context that the TURN 
client needs to know before it can contact the TURN server. There may be 
options that can reasonably be negotiated in the TURN channel setup 
procedure; those don't need to be in the URL.

My current reading is that with the current TURN spec, the initial 
packets sent by the user is different for the 3 cases TCP, UDP and TLS.