Re: [Doh] A question on the mix of DNS and HTTP semantics

Daniel Stenberg <daniel@haxx.se> Sun, 18 March 2018 11:43 UTC

Return-Path: <daniel@haxx.se>
X-Original-To: doh@ietfa.amsl.com
Delivered-To: doh@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C5F681270A7 for <doh@ietfa.amsl.com>; Sun, 18 Mar 2018 04:43:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.211
X-Spam-Level:
X-Spam-Status: No, score=-4.211 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 YUhI9CWXAJOW for <doh@ietfa.amsl.com>; Sun, 18 Mar 2018 04:43:58 -0700 (PDT)
Received: from giant.haxx.se (www.haxx.se [IPv6:2a00:1a28:1200:9::2]) by ietfa.amsl.com (Postfix) with ESMTP id 176791242F5 for <doh@ietf.org>; Sun, 18 Mar 2018 04:43:57 -0700 (PDT)
Received: from giant.haxx.se (mail [127.0.0.1]) by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id w2IBhsgA025990 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 18 Mar 2018 12:43:54 +0100
Received: from localhost (dast@localhost) by giant.haxx.se (8.15.2/8.15.2/Submit) with ESMTP id w2IBhr3b025938; Sun, 18 Mar 2018 12:43:53 +0100
X-Authentication-Warning: giant.haxx.se: dast owned process doing -bs
Date: Sun, 18 Mar 2018 12:43:53 +0100
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: Ted Hardie <ted.ietf@gmail.com>
cc: Ben Schwartz <bemasc@google.com>, doh@ietf.org, Patrick McManus <pmcmanus@mozilla.com>
In-Reply-To: <CA+9kkMCGzTe+YPoaUZSUzWR4bdLkTZEUNx6j0dp544hVrHB9=Q@mail.gmail.com>
Message-ID: <alpine.DEB.2.20.1803181226570.24786@tvnag.unkk.fr>
References: <CA+9kkMB7awRfW9jUmY9Q-1p+w3VLtpG5DxhF3s7Q58nEMZeX3w@mail.gmail.com> <CAOdDvNpt-d+8epv80q4eofG4X-K83=zJdmFV67Z2z+4GNOQwxw@mail.gmail.com> <CAHbrMsBFE+4XpRbJucXu=zyMfZdmm29gQDn20GfgTrzk-O170A@mail.gmail.com> <CA+9kkMCGzTe+YPoaUZSUzWR4bdLkTZEUNx6j0dp544hVrHB9=Q@mail.gmail.com>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
X-fromdanielhimself: yes
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"; charset="US-ASCII"
Archived-At: <https://mailarchive.ietf.org/arch/msg/doh/Chtf48r63-czr9AONix8O9KFIuo>
Subject: Re: [Doh] A question on the mix of DNS and HTTP semantics
X-BeenThere: doh@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: DNS Over HTTPS <doh.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/doh>, <mailto:doh-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/doh/>
List-Post: <mailto:doh@ietf.org>
List-Help: <mailto:doh-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/doh>, <mailto:doh-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 18 Mar 2018 11:44:00 -0000

On Sun, 18 Mar 2018, Ted Hardie wrote:

> Saying something in the document like "only 2xx response codes will carry 
> response bodies with DNS UDP wireformat" would be a short and sweet way of 
> saying that in the document, if there is working group consensus that this 
> is true.  Based on my conversations yesterday, I am not sure that there is 
> complete consensus on this point, though there may very well be rough 
> consensus.

I'm firmly in the only-2xx-carry-response-bodies-to-care-about camp. I don't 
even understand how it would work otherwise.

What other HTTP response codes could be used to transmit DNS responses?

> A pure transport failure may result in a retry.  There are some of these 
> responses which strongly indicate that such a retry will result in failures 
> (e.g. 403).  If you do not synthesize some message to the DNS client about 
> the type of failure, and the server does not provide one, what part of the 
> system avoids the retry?

For all 4xx HTTP response codes, the "fault" is in the client side (the 
request) so if you as a client decide to retry the request it doesn't at least 
make any sense to send an identical request again.

I don't think 4xx strictly avoids retries. It informs the client about the 
fact that the request, as-is, was denied. A retry would then have to change 
something in the request for it to be successful. 401 and 407 are good 
examples of this, for which clients often retry with a modified request (with 
added auth headers).

-- 

  / daniel.haxx.se