Re: [Doh] Clarification for a newbie DoH implementor

Vladimír Čunát <vladimir.cunat+ietf@nic.cz> Thu, 18 April 2019 12:20 UTC

Return-Path: <vladimir.cunat+ietf@nic.cz>
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 57234120300 for <doh@ietfa.amsl.com>; Thu, 18 Apr 2019 05:20:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.021
X-Spam-Level:
X-Spam-Status: No, score=-6.021 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_HI=-5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 TNWuvc3o7_ZI for <doh@ietfa.amsl.com>; Thu, 18 Apr 2019 05:20:38 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B7F6C1202FF for <doh@ietf.org>; Thu, 18 Apr 2019 05:20:37 -0700 (PDT)
Received: from [IPv6:2001:1488:fffe:6:ffff:ffff:ffff:2] (unknown [IPv6:2001:1488:fffe:6:ffff:ffff:ffff:2]) by mail.nic.cz (Postfix) with ESMTPSA id 8E25E60710; Thu, 18 Apr 2019 14:20:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1555590033; bh=w8idke3tvdI2goasA5O6GKI3t7y9DiswlU/NwIiaruw=; h=To:From:Date; b=kVAMdrGeUCwkM9v5ltZQPZI/lls3EMxEcvsB1+zt38ED3fL0jf0aZdFptWXSowpAC nPV0SsJ55OyUBISMQl1In35iLbTuTkmvyrjRu+jwpRwTktYC5dF8mjp5Qcq5eJEeHh LdEWft3n8gmjQqJfYWTVCJzRbsBtXm0JOkS60Bfw=
To: Mark Delany <d5e@xray.emu.st>
References: <20190418071238.68406.qmail@f3-external.bushwire.net>
From: Vladimír Čunát <vladimir.cunat+ietf@nic.cz>
Cc: doh@ietf.org
Openpgp: preference=signencrypt
Autocrypt: addr=vladimir.cunat+ietf@nic.cz; prefer-encrypt=mutual; keydata= mQINBFgDknYBEADHEQwLBlfqbVCzq7qYcBFFTc1WCAFtqiKehOrsITnKusZw4nhYwlKQxcum gj01xJOhbfHBCBeGlDydYqemKg4IfY2nwSyPwZZYMJn7L7AGrCeytr4VMvDJ7o7qDZjjim4i fv+GUwdk3plXx6oMF4nctesI8aAOuLUHAn0PfrGfNhWoaglOKgdOI6DGjhI/aGkvy+jrI/+X sdMV+3f1RuEOfI+Yu4SXFjJyhAmqEOBRxxdHqKreIIpz3Lg38yWwiVGfwgQT+nFIz9BpHH3l Wg1uS8xM3ezceBmRYV8zT9PvbeZ57BlaTR6rLae5RYwV397PSLBqqLkB5H0TDRUFBnwBsUob LebYHmJCOydvyNv5AFkLmLZ7O4j2jFo1WPSMt3ThM6wRwqrnB4Gi+6onyrZfE1DnVZMqbxZ3 VXa+E4S5YwrfCLUErGEn+d40OtoRZmQXhRPVAsdjimMj9oFM9RoxSgUrDg6Ia3n0IrKFb++z HAFbqkR5g4qzXiOMEG621GYEex2sDEKz/PD4CVKlNI9eld4ToH592kAwzJmd+sAi+Rfos0NE zxuFd0ekAOeWoURo0zoYTSWPlMOmFMvcpH6LP3leJmY7x4z/b1ng/+7UnKonVALVPFbRbElO kIfAtLKcUEofwV1jr7DyYGPalJtiDJPomB041ZHCj2RxyXY/oQARAQABtDBWbGFkaW3DrXIg xIx1bsOhdCAod29ya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b6cUqgkihmgm39xx24GPlNAdCRuq01+iILol+Wox6OwF6hmqx1EMSmxcmGo UREr0rkMnFVsWeAYeVoE4q689qxCPu9iCMJMJnkRe1o9oQYSN7my+S98gA==
Message-ID: <0e241cc8-dd4c-f93d-92b6-83dd62791bc4@nic.cz>
Date: Thu, 18 Apr 2019 14:20:33 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0
MIME-Version: 1.0
In-Reply-To: <20190418071238.68406.qmail@f3-external.bushwire.net>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/doh/3uV9jZJ3sE591T6ni9R9-XveWV0>
Subject: Re: [Doh] Clarification for a newbie DoH implementor
X-BeenThere: doh@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 18 Apr 2019 12:20:40 -0000

Hello!
Reactions to particular parts inline.  I omitted those where I can't say
too much.

On 4/18/19 9:12 AM, Mark Delany wrote:
> [...]
> ## TTL reduction due to HTTP "Age" header
>
> RFC8484 Section 5.1 advises that clients MUST account for the HTTP "Age"
> header by reducing TTLs. Unfortunately the RFC is silent on what to do if
> that reduction causes the TTL to be reduced to zero or below. Should the RR
> be removed which could result in an empty/odd response? Should the TTL be set
> to zero and let the client deal with it? This seems a risky choice as client
> behaviour with zero TTL is well-know to be quite unpredictable.
>
> Current behaviour is to never set the TTL lower than 1s and leave
> every RR in place.

I believe the HTTP "Age" makes sense as the minimum of all TTLs in the
packet, or optionally smaller but never larger.  Therefore it should not
happen, but in case it does, I can't think of anything better than
resetting the underflowed TTLs to 1s.

The RFC only bounds to minimum TTL *in answer section*, but I believe
that's a mistake as you can't just ignore authority section at least. 
There may be records vital for DNSSEC validation of negative answers,
for example.


> ## ECS Performance, Privacy, etc.

I can't see how using a different transport makes ECS issues different. 
If you use UDP forwarding to some public resolver, you are in pretty
same situation, except that you're more likely to be intercepted, etc.


> ** RFC8467 DNS Padding for DoH client

I'm not so sure about this, but my point of view is, shortly, that
padding is a per-hop thing.  It depends on the particular transport -
for unencrypted ones it doesn't even make any sense, so I can't see why
padding should matter between your proxy and its clients.  I believe
this point of view is consistent with the RFC, too.


> ** RFC8484 DNS Padding for GET requests
>
> My first thought is that DNS padding should apply to both GET and POST
> methods, but 4.1.1 says "Finally, a GET-based query ... and that padding is
> omitted". Is "padding omitted" referring to DNS padding or base64url padding?
> I presume base64url padding, but it's ambiguous.
>
> For now the implementation doesn't add DNS padding for GET requests. Should I
> change that?

That's certainly about base64url padding.  It could get clarified in the
RFC, but I suspect most people don't get to reading errata or
"corrected" RFC versions.


--Vladimir (Knot Resolver)