Re: [dns-privacy] [Ext] Revised opportunistic encryption draft

Brian Dickson <brian.peter.dickson@gmail.com> Sat, 31 October 2020 20:53 UTC

Return-Path: <brian.peter.dickson@gmail.com>
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 4AE163A0EA7 for <dns-privacy@ietfa.amsl.com>; Sat, 31 Oct 2020 13:53:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 SI41nY_BD3Dh for <dns-privacy@ietfa.amsl.com>; Sat, 31 Oct 2020 13:53:09 -0700 (PDT)
Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 23C063A0EA2 for <dprive@ietf.org>; Sat, 31 Oct 2020 13:53:09 -0700 (PDT)
Received: by mail-vs1-xe2c.google.com with SMTP id w25so5337826vsk.9 for <dprive@ietf.org>; Sat, 31 Oct 2020 13:53:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B2wZBoVo02pps8jPNskIo05shsTRfJOiyXM5/x5NX+M=; b=qIGW02cv7X3GMn7ffmLkcUDpvlTmJvCc6ff4PraJypKZoX5/S0X8+3EGHdc1AhQwhG TbNiK1jiwF+NnOPfSVpCprwYqteXvkOIRCyiyofUQ6q08TEqtA7DEqpyv6luKHh4tDgA ieeOusVeQbnbSHJ35J9+3YcIOOqJhN6vMrGySVPFYdOfBfST2DqsCryrs11hV0jgVgbZ tkhk5jkAwfYIFsnpDM8mL3xc2P//Y1D7iFB9kehgcGfd7NHvtUZr+sEj3krW29HgavR5 y4uJbegrKueM3zbkWlGs5qcyZ/7HvcfCoHB5jU6ZRPUXGSZ8QLiQ9vZn0FLn/TxUlJPK VIpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B2wZBoVo02pps8jPNskIo05shsTRfJOiyXM5/x5NX+M=; b=GeGGHROtU+Wrc74alaKgj4aLGeeokcU0shT6hbx9hN47C0Uq01RinAciXnN/bhoYrR +kGVCiU+Z3fnq9RVxSoCngidGFZHTs3yKKy8t/9Wm1iWB7+3hWAuCTMqTjk8pdMqF77I 3cvlqJXYkCj6uv+Pr6YzIXp9vb28r7ov9LQ5cyO2J/ckUtRVK32UlxpOZaW2Bm21xayJ VwLkL2nb5Ey10HdBWj0UnmQe28Kq/TyHUTdG5tbtp+HgP0fLSH+Ynl7iYs2LWaMFM0vw dPF47ZCeLCl3FjhvjkshritxTOyrxsWb2q8/bdRmeR4p4KMsa5wfNoK+WPSxow3OLwmM f9sA==
X-Gm-Message-State: AOAM531Z2r+kYyOS7Age6bS32vlnEbLKigNnzqG68t9cCdamw7kTfk4e hb9CA6eQEj9ob4fijpdvTplJZYWUzQqS2OBlSxRqmi3rCFA=
X-Google-Smtp-Source: ABdhPJynusG22GoGuBg53nFJivbc2eOkHjihzeoajcK0fWPtvZei4gYtrN1U3Qq0mngXIULVhrd3Z0lKMNnqCdRP36A=
X-Received: by 2002:a05:6102:7c9:: with SMTP id y9mr11649949vsg.49.1604177587987; Sat, 31 Oct 2020 13:53:07 -0700 (PDT)
MIME-Version: 1.0
References: <C0CBEBC5-D28A-46C0-AE50-078710015466@icann.org> <alpine.LRH.2.23.451.2010301202350.2587497@bofh.nohats.ca> <2444B21B-9465-4A5B-97CC-AF809309300A@icann.org> <CABcZeBPZFY9aQ5Nb0q_4uTMFRbY3-S2rus4vaeLaUmvU+h_ftg@mail.gmail.com> <2D07CBD0-30CE-418E-AD05-02E0A5EDB79F@icann.org> <CABcZeBNdNnyjzk0mOtfix=OvVTEpPzegEw_V5QfKvYtkFV+zOw@mail.gmail.com>
In-Reply-To: <CABcZeBNdNnyjzk0mOtfix=OvVTEpPzegEw_V5QfKvYtkFV+zOw@mail.gmail.com>
From: Brian Dickson <brian.peter.dickson@gmail.com>
Date: Sat, 31 Oct 2020 13:52:57 -0700
Message-ID: <CAH1iCirz27EoahrYE8z9AV=Cf=A-i=iPP1deOYPWO8_k1mL+XA@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Cc: Paul Hoffman <paul.hoffman@icann.org>, "dprive@ietf.org" <dprive@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000049ed9205b2fdb3de"
Archived-At: <https://mailarchive.ietf.org/arch/msg/dns-privacy/FdUhMUGNR-CybLrTBQfgGjq0ZY0>
Subject: Re: [dns-privacy] [Ext] Revised opportunistic encryption draft
X-BeenThere: dns-privacy@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 31 Oct 2020 20:53:12 -0000

On Fri, Oct 30, 2020 at 2:45 PM Eric Rescorla <ekr@rtfm.com> wrote:

>
>
> On Fri, Oct 30, 2020 at 1:46 PM Paul Hoffman <paul.hoffman@icann.org>
> wrote:
>
>> On Oct 30, 2020, at 12:32 PM, Eric Rescorla <ekr@rtfm.com> wrote:
>> >
>> >
>> >
>> > On Fri, Oct 30, 2020 at 10:03 AM Paul Hoffman <paul.hoffman@icann.org>
>> wrote:
>> > On Oct 30, 2020, at 9:11 AM, Paul Wouters <paul@nohats.ca> wrote:
>> >> > I still believe the cost of authenticating a DNS(SEC) server is so
>> low
>> >> > these days (with ACME available at no cost and with full automation)
>> >> > that this draft is better not done.
>> >>
>> >> The cost in terms of CPU cycles is indeed low. That is not the cost
>> that is being considered when choosing opportunistic encryption. There is a
>> real cost to the system if entire zones get server failures due to
>> authentication mistakes made by the authoritative servers (not renewing
>> certificates, errors in TLSA records, upstream validation problems that
>> cause TLSA records not to validate, ...) or resolvers (dropping trust
>> anchors that are in use, bad validation logic for TLSA, ...).
>> >>
>> > How is this different from the transition of the Web to HTTPS?
>>
>
I think a better comparison (better meaning more relevance and closer
tracking of the transition and operation) would be the transition of SMTP
to SMTP using TLS without downgrade susceptibility.


>
>> The DNS data is already authenticated if they are using DNSSEC.
>
>
To quote Daffy Duck, "Ha! That's it! Hold it right there! Pronoun trouble."
:-)

The problem with the above statement is who "they" is.

It's actually not a real problem, as I believe the correct "they" is being
referenced. I merely want to put more emphasis on which "they" this is, for
clarity in the rest of the conversation.

In this context, "they" is "whoever is operating the authoritative DNS
servers" for a zone or set of zones.

It should be noted that for a given zone, it is possible that more than one
set of DNS servers, operated by different DNS operators, can serve a given
zone. If there is >1 operator, the failure of one operator to maintain all
the DoTA mechanisms (certs, TLSA records, DNSSEC signatures) does not
impact the zone availability. Thus, the architecture of an optional (I
prefer that over opportunistic) encryption scheme regarding that side of
the connection is not fatally flawed if the mechanism(s) used involving
those mechanisms can fail, so long as they fail safe.

The important characteristic is that whatever method(s) are used, they need
to be completely downgrade resistant to all attack mechanisms, and they
need to fail safe.


>
> I don't see how this is an operational difference. It's a difference in
> value proposition. This whole discussion is predicated on the idea that
> encrypting r2a is valuable; if it's not, we can just go home.
>
>
I agree with EKR. (Try not to be shocked, anyone.)


>
> Also, because the DNS is hierarchical, even a short-lived authentication
>> failure at a particular server will take out the ability to get data for
>> all zones beneath that one; this is not an issue in the web.
>>
>
> As a practical matter, a TLS failure at a site like Google or Facebook has
> a similar kind of impact. But those sites have figured out how to run with
> high availability, and I anticipate that the big DNS servers who have a lot
> of zones beneath them could do so as well.
>
>
I agree with EKR again.

I think the document we're discussing may need to be reworked in terms of
the way the optional ("opportunistic") encryption (DoTA) is controlled,
managed, and signalled. With a re-orientation of the perspective on that, I
think the choices become a lot clearer.

First, a simple assertion: DoTA is only possible/available if it is
configured by the authoritative DNS operator.
Thus, the control of the state of whether DoTA is available for zones
operated by that operator, resides entirely with the operator.
This also means that, depending on how DoTA availability is signalled or
detected, the methods of correcting faults in the DoTA operation can vary.
Thus, selecting signalling/detection mechanisms should take the corrective
actions available into consideration. IMHO this should actually dominate
the design.

Second, some analysis on the DNS operator's NS names, compared to the zone
names, is relevant, regardless of whether the operator is the zone
registrant or some other party.
Understanding this can help motivate elements of the design, or deciding
whether those are reasonable choices.
This includes costs, scaling, and operational practices, particularly for
which zones have (or require) DNSSEC, TLS certificates including TLSA
types, and operational practices.

Third, I'll restate it here: The important characteristic is that whatever
method(s) are used, they need to be completely downgrade resistant to all
attack mechanisms, and they need to fail safe.

Lastly, there is the standards process issue of whether any specification
for DoTA can or should be done without significant input from authoritative
DNS operators and implementers.
Clearly, any system needs to interoperate between recursives and
authoritatives, but my impression thus far is that the current document
hasn't yet adequately received or incorporated enough input from the latter
group.
Fortunately, that's easy to fix, and that's what I think this whole
conversation is about, and I'm hopeful that this input is considered
constructive, and can result in a much stronger document that will reach
consensus.
I do think this is valuable work, if it gets it right, and am happy to
participate/contribute to the process.

Apologies for the wall of text, BTW.

I'll start with the second item first.
I was originally thinking of discussing the impact of QNAME minimization
and contrasting that with zones whose NS names are the beneath the zone
name itself. But that's really irrelevant to this analysis, IMHO,
What is worth observing is that for any zone, the NS names and their
corresponding A/AAAA records are typically very stable (often not changing
for years at a time).
By comparison, the content of zones may be extremely large or very dynamic
or both, and may present potential challenges to implement DNSSEC signing
for such zones.
It is also worth observing that there is very little difficulty or cost
involved in obtaining and managing a small, static zone with an arbitrary
(mostly irrelevant) name, and to manage the DNSSEC signing of such a zone.
Put these two observations together and you get: it is possible to have a
large, dynamic, unsigned zone, whose NS names are in a different zone which
is small, static, and DNSSEC signed, with little to no cost.
A small static zone used for NS names, would only be used for the A/AAAA
record VALUES, plus any ancillary records such as TLSA records.
Who operates that NS name zone, is ORTHOGONAL to who operates the large
dynamic zone.
And, it is also worth noting, that at least some DNS operators offer
services where the zone owner manages the zone content on a hidden primary,
and the DNS operator is a secondary which also handles all the DNSSEC
operations.
So, the operational complexity of a DNSSEC-signed NS zone is as close to
the same level of complexity as managing a normal zone.

Now regarding the third item.
What does it mean for a signaling mechanism to be completely downgrade
resistant to all attack mechanisms, and to fail safe?
IMNSHO, this means the only reliable mechanism for signaling is the use of
DNSSEC.
The signaling is orthogonal to the TLS validation used for the certificates
on the authoritative server on port 853.
However, there is real value in leveraging the signaling itself for use on
certificate validation, in terms of security, performance, and flexibility.
The simplest signal is the mere presence of a DNS record that unambiguously
asserts that port 853 is to be used for any client wanting to do DoTA.
Any client which supports DoTA, upon validating the signal, must not fall
back to any other transport. This is what downgrade resistance means.

It is the responsibility of the authoritative operator to ensure the
operational state of the server matches the signal.
The signal should be present IFF (if and only if) the server can be reached
on port 853 and the TLS validation is correct and DNSSEC checks return a
state of valid.
The most unambiguous signal possible, is the presence of a TLSA record on
_853._tcp.<NS_name>.
This also relates to the first item: how to correct operational errors, if
anything in the signal vs TLS validation breaks.
Removing the TLSA record(s) turns off the signal, and the signal persists
only for the TTL of the TLSA record.
This is a potentially very fast response mechanism, for any of a variety of
situations.
This also provides support for the need to roll a TLS certificate rapidly
for security reasons (e.g. private key compromise).
If the TLSA record is used for validation, other mechanisms (e.g. OCSP or
CRL) are not strictly necessary. They are, however, still optional,
depending on the TLSA type selected by the operator.

Note that the signal presence is technically orthogonal to the decision to
USE the TLSA record for TLS verification.
However, if the resolver has already obtained the TLSA record to confirm
the use of DoTA, it would involve extremely little effort to then use the
TLSA record itself for TLS certificate verification.
This may actually improve TLS validation performance, particularly if the
TLSA record has been cached by the DNS resolver.
Reminder: these TLSA records and TLS certificates are ONLY used for
securing the DNS resolution step from the resolver to the authoritative
server.
This has nothing to do with the zone contents served by the authoritative
server, including whether the zone itself is DNSSEC-signed.

Finally, a word on managing TLSA records. TLSA records MUST be served on a
DNSSEC-signed zone.
However, the TLSA records themselves can be managed on an unsigned hidden
primary if there is a DNSSEC-signing secondary server.

So, to summarize:

   - Using NS names in a separate zone or zones (for each DNS operator) is
   scalable, and facilitates DNSSEC signing, at little to no incremental cost
   and little to no operational complexity
   - Using TLSA records at _853._tcp.<NS_NAME> in a signed zone provides an
   unambiguous signal to use optionally TLSA, in a downgrade-resistant manner.
   - TLSA records also provide TLS certificate information which is signed
   and can be (I'd suggest this as a SHOULD) used for validating the
   certificate(s) used for DoTA
   - Any failure is fail-safe, as all of the failures cannot result in
   fallback to non-853 connections, or acceptance of bogus DNS records, or
   bypass of TLS validation.
   - DNSSEC signing operations can be outsourced without requiring
   outsourcing the primary hosting of the NS name zone. Outsourcing both is
   also possible (hosting NS name zone on DNSSEC-supporting DNS operator).
   - Resolvers wanting to opt-in to DoTA would need to check for TLSA
   records (and DNSSEC validate them) as a signal
   - Resolvers wanting to opt-in to DoTA would have the option to use
   traditional CA validation alone, but this is highly recommended against.
   - TLSA records for TLS certificates can be any of the four types that
   the TLSA spec supports: 2 x CA-validation-also (EE or intermediate), 2 x
   non-CA-validation-also (EE or intermediate).
   - The non-CA-validation-also TLSA record type DOES NOT preclude use of
   certs from a public CA; it only "loosens" the validation of those certs to
   the TLSA record itself, which IMNSHO is actually stronger than the WebPKI
   validation.
   - This creates a possible DoTA signaling and TLS validation path that is
   not strictly reliant on WebPKI (meaning WebPKI failures would not break DNS)
   - The TLSA record type (and thus validation mechanisms and cert choices)
   are exclusively under the control of the owner of the zone containing the
   NS names (which may or may not be the operator of those NS name zones!!)
   - All of the signaling and validation would use existing DNS mechanisms
   and infrastructure. No new cache types would be required.
   - This is also compatible with multiple-operator DNS zones which may
   include a hybrid of TLS and non-TLS supporting operators.
      - In particular, this means different resolver policies can be
      implemented, including prefer-DoTA-but-use-non-DoTA-if-necessary or
      only-use-DoTA-servers

I don't think any of this is particularly controversial, and exactly
mirrors what already has been deployed for SMTP use of TLSA.
The success of SMTP and operational experience IMNSHO strongly supports
this as a viable way of implementing opt-in DoTA.


>
>
>> > Sure, there can be misconfigurations of various kinds, but good
>> operational practices can minimize these, and in return you get strong
>> security.
>>
>> What extra value is the "strong security"? Is that value worth the risk
>> of inability to get data from a zone? In the web world, the decision that
>> the value was greater than the risk was based heavily on being able to
>> authenticate the data using TLS. We don't have that same balance in the DNS.
>>
>
> The value proposition here is the confidentiality of the query. Defending
> that against active attacks requires authenticating the server.
>

This is the crux of the issue, in a nutshell.

Brian