Re: [Uta] New proposal: SMTP Strict Transport Security

Daniel Margolis <dmargolis@google.com> Tue, 22 March 2016 07:58 UTC

Return-Path: <dmargolis@google.com>
X-Original-To: uta@ietfa.amsl.com
Delivered-To: uta@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D391112D781 for <uta@ietfa.amsl.com>; Tue, 22 Mar 2016 00:58:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 taLeeKoa2Ii5 for <uta@ietfa.amsl.com>; Tue, 22 Mar 2016 00:58:27 -0700 (PDT)
Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (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 D598012D541 for <uta@ietf.org>; Tue, 22 Mar 2016 00:58:26 -0700 (PDT)
Received: by mail-ig0-x231.google.com with SMTP id l20so4891981igf.0 for <uta@ietf.org>; Tue, 22 Mar 2016 00:58:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=KAJDd2x4tg9N0qXz8lkr7z2DpFUC9WHRVv49Thz13k4=; b=fFPRE0lbEM2oQeQJEjItBTbGmJTP2YdMN09swO60U40tea463UJ5DFrepwAaiBKjlq 1Xzf+G/owbDNO0P1wQKXUKdBtMPp5AN9/MUYyPZueKOYR/SSyKSltxN44nikmccxA6qL Z1ksnYXi8ItJDPWqcteGD4CxxS2MXw5fE78k9xK4wpwlcw/0gUMvJCNItFuDvtRYhP+c bz1jRQNkCgwiu0ustnfJ7WGW1J11pAI1hTqbGGqaJfB3MgaNjUOoA3/SUlXGOxKKmMXM XqnNEx2sRZmkSmD9hixEOJZIDe+5fvJ+xbCkNXM7V3LkqelTIOP4gINQDioaimzGDG5j SKbw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=KAJDd2x4tg9N0qXz8lkr7z2DpFUC9WHRVv49Thz13k4=; b=cDVWsotuQWvIjsY1krQNda0jx/+8btv9LvQ8MRk/c/9BbQudC3xNU7GLBwh2+KG+q3 e02vzQd9xT3hSOM0hcGry7cQfVenLYZH+iOD4/TrUP75nA1zPczmhKFotsbDNSZcV7oI Xa1r2t8w5+eSw/CGJuGI2RDtOFWcD4MYA4Axhos1G7pkE407paFNI6lpxTYqOqMMJfKF 3kUEbW/8UfS+uxv0jjiMkKV+/sHs4N9kPIvX327hdX/D44tMKeMpuGBJEU6swKq03lOg hvNL49rsAB1OBgjFNjUXlPs+ioOBXdA70zNqON7qhcwD/4Qn5knQRCTMLfxA13fXLgIu HjEg==
X-Gm-Message-State: AD7BkJI47XosczcRO9ai6xUCFDIytPTULHYwxUJQnwKxhI/B1v5B6FWTZhXxcmI03mFnq88YptTh2cHpsstdYCdn
MIME-Version: 1.0
X-Received: by 10.50.27.41 with SMTP id q9mr16708913igg.66.1458633506111; Tue, 22 Mar 2016 00:58:26 -0700 (PDT)
Received: by 10.64.251.136 with HTTP; Tue, 22 Mar 2016 00:58:25 -0700 (PDT)
In-Reply-To: <20160322063527.GD6602@mournblade.imrryr.org>
References: <CAB0W=GS2PXF-divC+SNs+A-jH1-_BBA889-TbQXHvrVsrbKLEA@mail.gmail.com> <CAB0W=GSQ4oTLT+qepMi7Pj5=UmBD70D_uW7c193RY-gw818ORA@mail.gmail.com> <CAB0W=GRB_6LhqEGYzeYq-srnM99wqwZrdjUEm=vJ7+oFiKbYoA@mail.gmail.com> <CAB0W=GTGja5JtxGuCzhD6O3B2Ow-wLN-B6WQ8XUDyvQRqdFZxw@mail.gmail.com> <20160322063527.GD6602@mournblade.imrryr.org>
Date: Tue, 22 Mar 2016 08:58:25 +0100
Message-ID: <CANtKdUeh8LV1uaWAyRqQ2ou4pdTNvKgzuJ5kKsQLwPFORqrDQA@mail.gmail.com>
From: Daniel Margolis <dmargolis@google.com>
To: uta@ietf.org
Content-Type: multipart/alternative; boundary="047d7b10cdaffdb986052e9e93ad"
Archived-At: <http://mailarchive.ietf.org/arch/msg/uta/PsBaR0s-QW0L3rsFGtYRClbEtUU>
Subject: Re: [Uta] New proposal: SMTP Strict Transport Security
X-BeenThere: uta@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: UTA working group mailing list <uta.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/uta>, <mailto:uta-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/uta/>
List-Post: <mailto:uta@ietf.org>
List-Help: <mailto:uta-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/uta>, <mailto:uta-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Mar 2016 07:58:36 -0000

Hi Viktor,

Thanks for all the thoughtful comments. I'll respond to what (at a glance)
seems to be the most significant three first.

On Tue, Mar 22, 2016 at 7:35 AM, Viktor Dukhovni <ietf-dane@dukhovni.org>
wrote:

>     A significant obstacle to a successful roll-out of WebPKI with
>     SMTP is not such much that obtaining and deploying CA certs is
>     onerous (enabling DNSSEC is likely more difficult at present),
>     but rather that there is no single set of CAs that sending and
>     receiving systems can (or perhaps should) reasonably agree on.
>     On the one hand, because MTAs employing STS are non-interactive
>     background processes with no human-operator in the loop to
>     "click OK" for each exception, the set of CAs a sending system
>     that employs STS would need to trust would need to be "comprehensive
>     enough" to include all the CAs used by all the domains one
>     might need to send email to.


This is of course a big topic, but I don't think we should assume that in
common deployment web browsers *do* rely upon a user to make some sound
human decision about whether to trust a CA. For example, here's the
multi-stage process to get Chrome to accept an untrusted certificate:
https://docs.oracle.com/cd/E24628_01/install.121/e39876/img/scrnshot_advanced.gif.
It's not insignificant to me that Oracle felt the need to document this
process for the users with screenshots: we *don't* expect the common
browser user to make a personal determination of what CAs to accept, so the
"background process" argument is, I think, based on a false premise.

In truth, we expect browser users to defer to their platform vendors to
make sane decisions for them, and we expect the owners of large websites to
be able to pick a CA that is widely trusted. With the rise of Let's Encrypt
and other free CAs, this doesn't seem overly burdensome.


    This requires domains that publish STS records to duplicate
>     their MX records in the STS RRset.  It is not clear why that's
>     useful.  If the STS record itself is not DNSSEC-validated, the
>     payload is not more secure than the MX RRset.  If the payload
>     is DNSSEC-validated, then the MX RRset in the same zone would
>     (barring unexpected zone cuts) be equally secure.  I posit that
>     this field is both onerous and superfluous.


There are two differences with the MX records here:

1. A (most likely) longer TTL on the STS policy versus the MX record
2. The option for wildcard's or broader patterns than merely a list of
valid hosts

This permits the publishing domain to declare that "for the next year, I
plan to always host my mail at example.com" without publishing specific MX
records that have a 1-year TTL (which of course could be brittle).


    It would be expensive for MTAs to attempt repeated HTTPS
>     connections that timeout trying to connect to port 443 at
>     the majority of domains which have not deployed STS.
>
>     All that's needed in DNS to support a pure WebPKI STS is a
>     boolean value to signal the existence of the STS resource URI.
>     This data can be obtained efficiently.  If the "_smtp-sts" RR
>     exists (pick a suitable RRtype and fixed short payload) then
>     the HTTPS URI should be consulted, otherwise the HTTPS URI is
>     not consulted (at first contact), or is consulted asynchronously,
>     in parallel with the first mail delivery (with appropriate spacing
>     between probes, ...).
>
>     Thus some MTAs might compress the STS DNS record to zero bits,
>     and just use asynchronous suitably spaced HTTPS probes to the
>     domains for which no policy is presently known.  However the
>     1-bit encoding is likely better.
>

I also dislike the copying of the policy into two places, for the reasons
Dave noted here:
https://mailarchive.ietf.org/arch/msg/ietf-smtp/nqWeUTe03mxJLltC-wHOsVvfbKo
.

The only real reason to do this is to allow MTAs to cheaply see if the
policy has been updated. This seems like a silly thing, since in normal
usage they never need to check as long as they have a cached policy, but
it's exactly that asymmetry that worries me: Since in normal usage the
traffic to the HTTPS endpoint will be minuscule compared to the SMTP
traffic to the domain, hosts are likely to dramatically underprovision the
former versus the latter. Unfortunately, then, in the case of a validation
*failure*, the HTTPS endpoint would (absent some other policy TTL separate,
and shorter from, the expiration lifetime) be bombarded with an HTTP GET
*once* *per* email.

So all we're really doing here (in the webpki case) is leveraging DNS as a
sort of caching layer. An alternative solution would be what I hinted at
above: to simply embed a short "TTL" in the policy. Or to say we don't care
and encourage the use of HEAD.

If we are willing to force the webpki validation method (as you assumed, I
think, above) and don't mind making senders handle this short-term TTL
logic,  I think we could make the publishing process simpler, with the
advantage Dave noted in the above-linked thread (i.e. an easier deployment
for customers of hosted mail services).

I'm somewhat on the fence about this trade-off myself, but I don't think
it's unreasonable. Thoughts?