Re: [TLS] ESNI and Multi-CDN

Ilari Liusvaara <ilariliusvaara@welho.com> Wed, 19 December 2018 11:28 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 90CF0124BAA for <tls@ietfa.amsl.com>; Wed, 19 Dec 2018 03:28:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
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 tz7twb9PeTII for <tls@ietfa.amsl.com>; Wed, 19 Dec 2018 03:27:57 -0800 (PST)
Received: from welho-filter1.welho.com (welho-filter1.welho.com [83.102.41.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DB1E6130DFC for <tls@ietf.org>; Wed, 19 Dec 2018 03:27:54 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by welho-filter1.welho.com (Postfix) with ESMTP id CEAE616066; Wed, 19 Dec 2018 13:27:51 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp2.welho.com ([IPv6:::ffff:83.102.41.85]) by localhost (welho-filter1.welho.com [::ffff:83.102.41.23]) (amavisd-new, port 10024) with ESMTP id n2QfaWVJ_Y3X; Wed, 19 Dec 2018 13:27:51 +0200 (EET)
Received: from LK-Perkele-VII (87-92-19-27.bb.dnainternet.fi [87.92.19.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by welho-smtp2.welho.com (Postfix) with ESMTPSA id 0BDB772; Wed, 19 Dec 2018 13:27:48 +0200 (EET)
Date: Wed, 19 Dec 2018 13:27:48 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: "Salz, Rich" <rsalz@akamai.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Message-ID: <20181219112748.GA6681@LK-Perkele-VII>
References: <CAHbrMsCDR4oQzJhkcF05+wSKEoDEnACLH8D-os34xoNE9hyWHQ@mail.gmail.com> <20181218211435.GB592@LK-Perkele-VII> <CAHbrMsAVNua0TDinVZr7zaO5R_MYSOVwzKDvb1GzeXXvgRJQ9g@mail.gmail.com> <20181218214928.GD592@LK-Perkele-VII> <8ED2A93D-3FC8-43C6-A15D-008F0890DEF4@akamai.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <8ED2A93D-3FC8-43C6-A15D-008F0890DEF4@akamai.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/QJIZzxheEwUId8nIO3neqiGgTJY>
Subject: Re: [TLS] ESNI and Multi-CDN
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 19 Dec 2018 11:28:01 -0000

On Tue, Dec 18, 2018 at 10:46:29PM +0000, Salz, Rich wrote:
> Here is how it usually works.  Not everyone necessarily does it this
> way, but in our experience almost all of them do.
> 
> 1. Sites use a CNAME, usually using a host-specific name.
> 
> 2. Sometimes the CDN owns the DNS entry. 

There is also:

3. The site owns the zone apex DNS entry. And since it is zone apex, no
CNAME can be used (yes, everything falls apart in practice if you do).
So zone owner inserts a bunch of A/AAAA records pointing at the CDN (or
worse, CDNs).

Fixing the above is a perennial topic. Proposals include CNAME-like
mechanisms scoped to just addresses, and HTTP service discovery
mechanisms (as most popular things other than HTTP already do service
discovery).

> Having the ESNI RRtype include optional a/quadA records is something
> we have talked about internally. If so, it should be part of the RRtype
> definition, of course. We came to the same idea. Of course, we will
> then have to fight the intent to make this "generic server record"
> data such as draft-nygren-service-bindings. :)

The only use for addresses in ESNI records I can come up with is
scoping keys to practicular addresses. But one could do that by
including address masks in ESNI records so clients can match ESNI
keys to addresses without breaking database normalization.

And if one is dealing with the third case above, the solutions are
basically service discovery. And then one presumably would want it to
be service-specific (as there are other rarer services that also lack
discovery besides HTTP).

> DNS is a strange and wondrous beast, like a bear riding a bicycle. 
> We should make sure that DNS folks are heavily involved in this draft.

Here are some tips:

- If you have name references, encode those in DNS wire format and
  preferably put them first, so that recursives can follow them and
  include records they think are helpful.
- Do not assume the above happens (but do assume it may happen). Client
  has to act as a backstop.
- DNS is 8-bit clean just fine with new types.
- Records do not need explicit terminators.
- There can be many records for each type on the same owner.
- The unit of atomicity is set of records with the same (owner,
  class, type) combo. 
- The 64kB limit is not just for individual record but whole set of
  records with (owner, class, type). And to be safe, limit it to 63.5kB
  minus 12 bytes per record.

The following are Bad Idea:

- Using type or class ANY (a.k.a. *). 
  - Type ANY does the wrong thing.
  - Class ANY does completely nonsensical thing.
- Defining a new class.
- Using class other than IN (Internet).
- If you use labels, using lots of different labels at outermost level.
- Putting anything into new type that DNS can not treat as a blob.
- Assuming authoritatives do anything smart.
- Assuming authoritatives follow any references.
- Assuming different types are in any way atomic w.r.t. each other.
- Copying TXT record wire format.


-Ilari