Re: [dane] Servers which offer RPK but have no TLSA records for that key

Viktor Dukhovni <viktor1dane@dukhovni.org> Thu, 05 June 2014 23:25 UTC

Return-Path: <viktor1dane@dukhovni.org>
X-Original-To: dane@ietfa.amsl.com
Delivered-To: dane@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9CC401A032D for <dane@ietfa.amsl.com>; Thu, 5 Jun 2014 16:25:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.9
X-Spam-Level:
X-Spam-Status: No, score=-101.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, USER_IN_WHITELIST=-100] autolearn=ham
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 bBBxUdHyiukp for <dane@ietfa.amsl.com>; Thu, 5 Jun 2014 16:25:18 -0700 (PDT)
Received: from mournblade.imrryr.org (mournblade.imrryr.org [38.117.134.19]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3A8051A0307 for <dane@ietf.org>; Thu, 5 Jun 2014 16:25:18 -0700 (PDT)
Received: by mournblade.imrryr.org (Postfix, from userid 1034) id D18F22AAB4F; Thu, 5 Jun 2014 23:25:09 +0000 (UTC)
Date: Thu, 05 Jun 2014 23:25:09 +0000
From: Viktor Dukhovni <viktor1dane@dukhovni.org>
To: dane@ietf.org
Message-ID: <20140605232509.GQ27883@mournblade.imrryr.org>
References: <20140602022733.GK27883@mournblade.imrryr.org> <538C86C7.8000805@cs.tcd.ie> <20140602145215.GP27883@mournblade.imrryr.org> <20140602172922.GS27883@mournblade.imrryr.org> <alpine.LFD.2.10.1406030056500.19868@bofh.nohats.ca> <20140603130839.GY27883@mournblade.imrryr.org> <m3ppip5s57.fsf@carbon.jhcloos.org> <20140604025535.GJ27883@mournblade.imrryr.org> <m3bnu93yzc.fsf@carbon.jhcloos.org> <201406052227.s55MREBT016220@new.toad.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <201406052227.s55MREBT016220@new.toad.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Archived-At: http://mailarchive.ietf.org/arch/msg/dane/hqu_Ifgk9FIwBXnKlbAAOholQNs
Subject: Re: [dane] Servers which offer RPK but have no TLSA records for that key
X-BeenThere: dane@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: dane@ietf.org
List-Id: DNS-based Authentication of Named Entities <dane.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dane>, <mailto:dane-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dane/>
List-Post: <mailto:dane@ietf.org>
List-Help: <mailto:dane-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dane>, <mailto:dane-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Jun 2014 23:25:20 -0000

On Thu, Jun 05, 2014 at 03:27:14PM -0700, John Gilmore wrote:

> The TLS Raw Public Keys (RPK) draft RFC does not require clients to
> retry failed negotiations.  If it should, we had better fix it very
> soon, because it is a single approval from publication.

I think that's OK.  It is just DANE authentication "RPK" clients
that need to be aware of the potential reduction in "usable" TLSA
RRs when negotiating "RPK" and either avoid negotiating "RPK" when
authentication might fail, or be willing to retry without "RPK".

Therefore, this seems like a rather DANE-specific issue, to be
defined in a DANE document for interoperability with "RPK", so it
is not obvious that the DANE-specific issues need to be explicitly
stated in the "oob mechanism" independent RPK docuemnt.

There are also timing subtleties, are TLSA records located before
the TLSA handshake or during the handshake once the server provides
key material.  If the latter (which I don't recommend for reasons
that are TMI for this thread), then the client can only retry, it
is too late to suppress RPK in the TLS HELLO.  The short version
is of course that for clients capable of X.509 server gymnastics,
if the TLSA lookup is delayed, then the client might discover
complete lack of any "3 1 X" (or whatever compatible U/S/M applies)
RRs, and will have to retry without RPK simply because the lookup
is too late.

Assuming clients that support both certs and RPK are not silly
about TLSA record lookup timing, the issue becomes moot if there
is a new published requirement on servers to ensure that every
U/S/M combination contains some record that matches the server's
current chain.  I assume there'll be some further discussion about
the merits and sufficiency of such a requirement on servers to
obviate complications for clients.

> Should clients that lack any Trust Anchors never propose PKIX server
> certificates?

No, because with DANE server certificates are not necessarily PKIX.
Usages 2/3 don't require any TAs on the client side.  The default
Postfix configuration ignores all system provided TAs, and the TA
list is empty, and yet we do DANE with "PKIX" certificate chains
validated via DANE-TA(2) or DANE-EE(3) TLSA RRs.

> Currently, such clients *do* negotiate PKIX and then prompt
> the user to validate the certificate that arrived during the PKIX
> negotiation.  (You can verify this by emptying your browser's list of
> trust anchors and then accessing an TLS website.)

With DANE, authentication of cert chains is possible without any
PKIX CAs.

> Should clients that lack any way to validate a RPK never propose RPK?

DANE makes it possible to validate RPK via DANE-EE(3)/SPKI(1)
associations.  However, there are some subtleties we need not
repeat the details of when the server TLSA RRset is "mixed".

> For
> example, a client may not have a preconfigured public key for this
> server, but it may have a DNSSEC resolver and DANE support.  But when
> it starts the TLS session, it will probably not know whether there are
> any TLSA records that support Raw Public Keys.

The tentative consensus here (DANE WG) appears to be that there is no
new TLSA RR type that represents an RPK-specific association.  Rather,

	DANE-EE(3) SPKI(1) MTYPE(0|1|2)

is equally usable to match a public key embedded in a certificate
or a raw public key.

> It sends its server
> certificate format options in the very first message in the TLS
> exchange.  So, to positively know whether TLSA records exist and
> support RPK, it would have had to begin and finish a DNSSEC TLSA
> lookup, and evaluate the results with an eye toward RPK, before
> beginning *every* TLS exchange it initiates.  I think we want to avoid
> that.

The DNS lookup is necessary, but the results can be cached for the
TTL in any local resolver, or the application, or both.  Postfix
caches TLSA RRs in the application (for the shorter of the TTL,
100 seconds, or the lifetime of the SMTP delivery agent).

> Restating, the situation in question is when the client supports
> DNSSEC and DANE, has TLS software support for both PKIX and RPK, and so
> does the server, but the published TLSA records may not offer a way to
> verify the RPK that the server sends.

[ Or in some corner cases, the client might not be able to tell
whether the server can be authenticated with RPK, unless we place
new requirements on the server.  We can for now collapse this into
the above case. ]

> In such a situation, Viktor proposes (if I understand his messages)
> that the client should offer support for PKIX and RPK server
> certificates;

No, that's not my proposal.

I am proposing that the client should have the TLSA records on hand
*before* the handshake, it will always need them after, and doing
the lookup (with whatever caching is applicable) earlier makes
things much easier.  Therefore, I am also proposing that the client
in fact NOT offer RPK to the server, if success to authenticate
the servers TLSA RRset with RPK is a proper subset of case in which
it succeeds had it negotiated PKIX certs instead.

Alternatively, (don't know why this is attractive) the client might
be willing to reconnect and retry.  Finally, if we define server
TLSA RRsets that put clients into this position as "misconfiguration",
then perhaps we can relieve clients of the burden.

> This proposal adds a retry requirement that currently does
> not exist in either the TLS RFC or the TLS RPK RFC.

I am not at all fond of retries.  I am guessing you're not either.

> My proposal to handle this situation is that the client should offer
> support for PKIX and RPK server certificates; that the server should
> select PKIX and send a PKIX certificate chain, the client should then
> do the TLSA lookup, and that then the client should then validate the
> certificate chain using the TLSA records.

You're saying that the server should know the sorry state of its
DNS TLSA RRs as seen by the client.  This is likely impractical.
Servers just have key material and do TLS handshakes they are
DNSSEC/DANE agnostic.  They have no idea what mechanism if any the
client is planning to use to authenticate the server's keys/certs.

> If
> the server will choose to negotiate RPK but does not have a TLSA
> record published that can validate RPK, it is misconfigured.

The sentiment is well motivated, but this is likely rather impractical.

> Clients
> are not required to retry in order to attempt to bypass server
> misconfiguration.

Again, at the moment, the problem cases are NOT server misconfiguration,
we'd have to define new server configuration requirements to make
it so.  Requirements that burden the server with knowing what
authentication mechanisms clients might be using and with knowing
how their DANE TLSA records are configured, ... are I think not realistic.

Requirements on the content of the TLSA RRs as published are an
option.  I am planning to write up said server requirements as
strong recommendations, but for the moment at least, also publish
client recommendations that scale back "opportunistic RPK" (use of
RPK when either RPK or PKIX are options) when it doubt.  This avoids
retries, and has little impact on use of RPK (in most cases servers
will have either no or only RPK-compatible TLSA RRs).

"Opportunistic RPK" clients should perform TLSA lookups before the
handshake.

> Persistent client failure will (eventually) alert
> the server operator to their error, and they will either fix the
> TLS server to not offer a RPK, or will fix the domain to include TLSA
> records that authenticate the server's RPK.

Perhaps, though initially the volume of clients failing will be
rather low, and server operators will blame the bleeding-edge
clients (it works for everyone else).

-- 
	Viktor.