Re: [tram] Path Forward for STUN ORIGIN - how to match

Cullen Jennings <fluffy@iii.ca> Thu, 27 August 2015 13:49 UTC

Return-Path: <fluffy@iii.ca>
X-Original-To: tram@ietfa.amsl.com
Delivered-To: tram@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A0DB91B2CF8 for <tram@ietfa.amsl.com>; Thu, 27 Aug 2015 06:49:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PA9gSsR2Qu8h for <tram@ietfa.amsl.com>; Thu, 27 Aug 2015 06:49:34 -0700 (PDT)
Received: from smtp72.ord1c.emailsrvr.com (smtp72.ord1c.emailsrvr.com [108.166.43.72]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 981BA1ACEFE for <tram@ietf.org>; Thu, 27 Aug 2015 06:49:33 -0700 (PDT)
Received: from smtp26.relay.ord1c.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp26.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 1A000380258; Thu, 27 Aug 2015 09:49:33 -0400 (EDT)
Received: by smtp26.relay.ord1c.emailsrvr.com (Authenticated sender: fluffy-AT-iii.ca) with ESMTPSA id 9834D3801A5; Thu, 27 Aug 2015 09:49:32 -0400 (EDT)
X-Sender-Id: fluffy@iii.ca
Received: from [192.168.4.100] ([UNAVAILABLE]. [128.107.241.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:465 (trex/5.4.2); Thu, 27 Aug 2015 13:49:33 GMT
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
From: Cullen Jennings <fluffy@iii.ca>
In-Reply-To: <CAKhHsXGwB1vovKQYaGnoZ1MuzREbDA8cTp4sCePNc6=saKN5BA@mail.gmail.com>
Date: Thu, 27 Aug 2015 07:49:31 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: <042FB94E-E3B7-431C-9EC7-D9DF7406756E@iii.ca>
References: <CAKhHsXGwB1vovKQYaGnoZ1MuzREbDA8cTp4sCePNc6=saKN5BA@mail.gmail.com>
To: Alan Johnston <alan.b.johnston@gmail.com>
X-Mailer: Apple Mail (2.2104)
Archived-At: <http://mailarchive.ietf.org/arch/msg/tram/oM_SSdnF0t6EFLClLuhLfajoa-0>
Cc: "tram@ietf.org" <tram@ietf.org>
Subject: Re: [tram] Path Forward for STUN ORIGIN - how to match
X-BeenThere: tram@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussing the creation of a Turn Revised And Modernized \(TRAM\) WG, which goal is to consolidate the various initiatives to update TURN and STUN." <tram.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tram>, <mailto:tram-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tram/>
List-Post: <mailto:tram@ietf.org>
List-Help: <mailto:tram-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tram>, <mailto:tram-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Aug 2015 13:49:37 -0000

I think this is close to the right solution but it is different than what I thought we talking about in the room. So I'm basically on board with this approach but think it needs a bit of tweaking ... More inline ...


> On Aug 25, 2015, at 1:57 PM, Alan Johnston <alan.b.johnston@gmail.com> wrote:
> 
> 
> Possible Solution
> =============
> 
> The solution that was discussed in Prague that seems to be the best tradeoff between privacy and functionality is to only include ORIGIN information in a STUN or TURN request if the domain of the Origin matches the domain of the STUN or TURN server in the STUN or TURN URI.  Since web and STUN and TURN run on different ports, and often will resolve to different IP addresses, a full host comparison is not possible.  This proposal is not perfect: it does not provide perfect privacy for subdomains (e.g. sub1.example.com and sub2.example.com will match with this rule, even if they are separate entities.  Of course, subdomain users could always register a new domain and point DNS records to their sub hoster.)
> 

I think we are having some confusions over what we mean by domain in this context. So lets say the TURN URL is

turn:acme.example.com

In the meeting when people said domain, I was thinking acme.example.com and I think you were thinking example.com.  

Probably the word we should use is "host" as defined in RFC 7065 to mean acme.example.com. Let me define "label" as the things between the . in the host. So the above example is a list of three labels, acme, example, com with the com being called the "top" end of the list and the acme being the "last" end of the list. 

I think there are three match policies people might  argue for

A) match only the top two labels

B) match all the the labels except the last 

C) match all the labels

So in the A case, if the browser was at a web site acme.example.com, the origin would be sent if the stun/turn server was stun.examle.com but not if it was stun.org. The problem with this is that if website is facebook.com.uk and the stun / turn server is anything in com.uk, then the origin is sent and that is not really what we wanted. 

So in the B case, if the website is example.com, then we match any stun server in .com which is probably not what we wanted. 

In the case of C, imagine a website called example.com that wants to run it's TURN and STUN and web on different servers. It would configure an DNS SRV record to point at it STUN server, another for the TURN server and perhaps a CNAME to point at the the web server. It might even be outsourcing the TURN server to some other provider that provides TURN for lots of domains on the same server. The only thing this domain needs to do to outsource it is provide the DNS entry. 

I could live with A,B, or C, but I think that C provides the best privacy, is the easiest to understand, and meets the requirements so I favor a match rule where we match the whole host found in the TURN or STUN URI to the host part of the HTTP ORIGIN. I don't care about matching if the origin is secure or not or ports.