Re: [dns-privacy] Demultiplexing HTTP and DNS on the same listener [New Version Notification for draft-dkg-dprive-demux-dns-http-02]

Stefan Eissing <stefan.eissing@greenbytes.de> Thu, 04 May 2017 09:42 UTC

Return-Path: <stefan.eissing@greenbytes.de>
X-Original-To: dns-privacy@ietfa.amsl.com
Delivered-To: dns-privacy@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B05A912E855 for <dns-privacy@ietfa.amsl.com>; Thu, 4 May 2017 02:42:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.103
X-Spam-Level:
X-Spam-Status: No, score=-0.103 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=ahgFkeSF; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=SFfB3UIH
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 2TDXhhQ72Jt9 for <dns-privacy@ietfa.amsl.com>; Thu, 4 May 2017 02:42:32 -0700 (PDT)
Received: from mail.greenbytes.de (mail.greenbytes.de [217.91.35.233]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 85AEB12E6D7 for <dns-privacy@ietf.org>; Thu, 4 May 2017 02:42:30 -0700 (PDT)
Received: by mail.greenbytes.de (Postfix, from userid 117) id A450715A057E; Thu, 4 May 2017 11:42:28 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1493890948; bh=RW52BSMhYeVa50zffCHVhMzmq2uo48N92i9EaTqI+Gs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=ahgFkeSFl5/lUIn/tmH3RL9ZkANV2KkTAQ3pKz3OxBD188tTCwPVdIScXwJo3p9Df bQXS5ez4AmbcdtqekEGy376orBXyn7H/1bY+0hOOI8UnPRzaAI1yze4OC5jLBX2LUK zOfuVFAtjpwtHdCjfA/m5LwP/OwLot6eij6rmsnU=
Received: from delight.greenbytes.local (unknown [217.91.35.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 1FCBA15A0535; Thu, 4 May 2017 11:42:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1493890946; bh=RW52BSMhYeVa50zffCHVhMzmq2uo48N92i9EaTqI+Gs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=SFfB3UIHIMkaazBM8JQ9vaVkWkni1nwvyBtTGlX8PWVChL/NWjpCOwl1mQ0RF5aZp e4lJIiMISRXyyCbAE0QXW1xk6xUMEnGo2z9z6GCarPRTvaBtK9f/oxdHsHfyDR2aFB 9UY3ruKvtnFvc65xETAkXnqxMB8T7C9/O5XRQezU=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Stefan Eissing <stefan.eissing@greenbytes.de>
In-Reply-To: <BN6PR03MB2708762328EE8C91A229B9B987EA0@BN6PR03MB2708.namprd03.prod.outlook.com>
Date: Thu, 04 May 2017 11:42:25 +0200
Cc: Martin Thomson <martin.thomson@gmail.com>, McManus Patrick <mcmanus@ducksong.com>, HTTP Working Group <ietf-http-wg@w3.org>, DNS Privacy Working Group <dns-privacy@ietf.org>, Mike Bishop <Michael.Bishop@microsoft.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <B3FE4E3A-B6C2-44C8-ADFC-20ADD4284E72@greenbytes.de>
References: <87tw51remp.fsf@fifthhorseman.net> <CAOdDvNoNPXNXzpVcX7TZX=Z++kWMBhG_+uDH3Vk1Jp8+adcHLQ@mail.gmail.com> <CAOdDvNruCCyB2rsF9VgaVEOjQGD82wA0AiLAghiGjDM0SpBFPQ@mail.gmail.com> <87lgqdr0fr.fsf@fifthhorseman.net> <BN6PR03MB27085632B5CBA7324894699487EA0@BN6PR03MB2708.namprd03.prod.outlook.com> <CABkgnnVLasxAfsezDp4H0cSOme5okHUY0ruG7EzgsNEW89SmDQ@mail.gmail.com> <87bmr9qwn7.fsf@fifthhorseman.net> <BN6PR03MB2708762328EE8C91A229B9B987EA0@BN6PR03MB2708.namprd03.prod.outlook.com>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dns-privacy/TmKNHqGyau3yr3gqP770zZPaD-g>
Subject: Re: [dns-privacy] Demultiplexing HTTP and DNS on the same listener [New Version Notification for draft-dkg-dprive-demux-dns-http-02]
X-BeenThere: dns-privacy@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: <dns-privacy.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dns-privacy>, <mailto:dns-privacy-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dns-privacy/>
List-Post: <mailto:dns-privacy@ietf.org>
List-Help: <mailto:dns-privacy-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dns-privacy>, <mailto:dns-privacy-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 May 2017 09:42:35 -0000

> Am 04.05.2017 um 04:53 schrieb Mike Bishop <Michael.Bishop@microsoft.com>:
> 
> If you want to do this transparently inside of HTTP without looking different on the outside, define an HTTP/2 extension for tunneling DNS.  Unknown frame types and settings MUST be ignored -- the client can start shipping DNS queries on stream 0 speculatively and have them ignored if the server doesn't speak your extension, or wait to see if the server's SETTINGS frame indicates that it supports the extension (after 1 RTT), both without any loss of compatibility or performance (other than extra bytes).  It doesn't get you HTTP/1.x compatibility, but I'm dubious anything you do within that can be done performantly nor is it a long-term pool to hide in.

I recommend this as a h2 based solution. If a client wants to use the connection purely for DNS traffic, you just need to add the static preamble and SETTINGS bytes and prefix each data chunk (of max 16K) with a 9 byte h2 frame header. And read the same in answers from the server. Ignoring any frame type you do not know. Flow control is done entirely by TCP.

This gives you an up and down byte stream transferred as h2 extension frames. The connection handshake looks 100% identical before the strong encryption kicks in. And you could the same, maybe with some tweaked frame identifiers, on a QUIC connection in the future, I would assume.

If you want to define something that really lives besides other h2 streams on the same connection, then you need to make use of h2 flow control and other features. But as I understood, this is not a scenario you are aiming for.

Cheers,

-Stefan (h2 in Apache httpd)