Re: [TLS] I-D Action: draft-ietf-tls-snip-01.txt

Ben Schwartz <bemasc@google.com> Tue, 22 February 2022 22:32 UTC

Return-Path: <bemasc@google.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 621513A0942 for <tls@ietfa.amsl.com>; Tue, 22 Feb 2022 14:32:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -22.599
X-Spam-Level:
X-Spam-Status: No, score=-22.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] 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 boi55QKJ6vim for <tls@ietfa.amsl.com>; Tue, 22 Feb 2022 14:32:05 -0800 (PST)
Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 918863A093B for <tls@ietf.org>; Tue, 22 Feb 2022 14:32:05 -0800 (PST)
Received: by mail-io1-xd29.google.com with SMTP id c18so19672056ioc.6 for <tls@ietf.org>; Tue, 22 Feb 2022 14:32:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BSf5lQ64GHoQiDVrgq2lVJByOfV+hJBDO10pROdk3j0=; b=RG9kB73BOKovVAyavG7VVO+xU+YqwroCV0Xic27JwfczyiHEq5atKRVaYbsdyOMI3r nlvVRih/xGjws2+aADSv/AxTmu+AYAVls6+PXYhLMnuj4hLHemDg3eLcTuQvGPfv0AYR giZbniVFWB6BtlLnUflp/7mmjem/1r/oOboxXTEnrhS0sSls90N+enulWGmtb67WT+j5 TcwcNCNAyB4/xDFR7j/2RX7fh2pzU3NVYWr2KyCP4r7nhEdm+hq+rKv1npMUSMfx06z8 oG9hTbCqY8CnC/lPjw013GP+P9ut6jOxYqhMPbLTDkuyTGOnUEFc7JMg2dBmWBNmk6Qe 4pcg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BSf5lQ64GHoQiDVrgq2lVJByOfV+hJBDO10pROdk3j0=; b=Tc/efooZR+tANgTLe6mDfZ+CNhpfDtNNjpcKdsd4apx+FOwtspBnuiUcaKCmL44SxY 5eETFtY/zYgihte1FZrVeVyeY3/Lq/Wg9adKGaO6yOhFbfbiHUDrH0xDDN8Uu6mw7luS Qo3zK/35KnxSl0uHUQNcyAG6q8GszAwC/qgnTnEEnYVcj7dyDmfDhv2YHHVT5HsoBWzI zp4jQJePUrpj94HHF7ujKG2YDxCXrTmyjmERkSvQaKSvbPm82O8iUPdKgByz2yP/1Et9 +aQhaseWRfiSUkpSSQUMAnVVWDPAbTXdYadITSGp/L15Q4A6PZ8aa6nimwr1tsS8JIgy ZWCA==
X-Gm-Message-State: AOAM531WiX86O1QkXXVPukfSdfXcPn4OaUcM+3bjR2S8wO1IqghpQXa4 zIL1C5ZijR0KJwUmAVD0gCUnVxSwJ35Ao+d37FbfdA==
X-Google-Smtp-Source: ABdhPJznN9SfPsuMpjysHdYH1o1XGYbrtxaoh68oFuBjxm2CVRHeHgr+ttx0puWjhBYXr+ETBwIcuhlp/VzpGai32Uc=
X-Received: by 2002:a02:c779:0:b0:314:8531:8fc5 with SMTP id k25-20020a02c779000000b0031485318fc5mr20544133jao.107.1645569124386; Tue, 22 Feb 2022 14:32:04 -0800 (PST)
MIME-Version: 1.0
References: <164498945328.29432.3195675407975344546@ietfa.amsl.com> <3032eda1-a666-4c02-93df-7e311f5dc8e7@beta.fastmail.com> <CAHbrMsDKz7r+vP9vEiORrPGXnnjkUWZxSefOZzqDLZqwbLmBSA@mail.gmail.com> <CAF8qwaAKihmgWp7arVxd0CkE+nUD5h=-vqdQrOZVqakyGgtWcQ@mail.gmail.com>
In-Reply-To: <CAF8qwaAKihmgWp7arVxd0CkE+nUD5h=-vqdQrOZVqakyGgtWcQ@mail.gmail.com>
From: Ben Schwartz <bemasc@google.com>
Date: Tue, 22 Feb 2022 17:31:53 -0500
Message-ID: <CAHbrMsAYG0iNAcEk7L0zJmcpbghBRisZKhA6bNcvu_xgfs8dOQ@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>
Cc: Martin Thomson <mt@lowentropy.net>, "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="00000000000023d89d05d8a2eb6a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/G6sL-UYszPTd0b-CvtC4xFFBGt8>
Subject: Re: [TLS] I-D Action: draft-ietf-tls-snip-01.txt
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Feb 2022 22:32:11 -0000

On Tue, Feb 22, 2022 at 4:23 PM David Benjamin <davidben@chromium.org>
wrote:

> On Tue, Feb 22, 2022 at 3:58 PM Ben Schwartz <bemasc=
> 40google.com@dmarc.ietf.org> wrote:
>
>> I continue to support this draft.
>>
>> I am puzzled by the requirement that "A server MUST omit any compatible
>> protocols from this extension".  Including them seems harmless, and
>> omitting them seems to impose an unstated requirement that (1) both parties
>> also include the ALPN extension and (2) the implementations of these
>> extensions must be intertwined.  I would change this to SHOULD.
>>
>
> We shouldn't add variation to protocols just because they are
> (immediately) harmless. Unless there's a strong reason for some
> implementations to include them and others to omit them, we shouldn't use a
> SHOULD.
>

In TLS, I think "MUST" means "recipients should validate this if possible
and fail the handshake if there is a mismatch".  Consider a client
implementation.  Upon receipt of a SNIP response, is it supposed to
cross-check the SNIP answer vs. the ALPN offer, and fail if there is
intersection?  This seems needlessly complicated.

Appendix C assumes that SVCB records are not authenticated.  That's allowed
>> by SVCB, but it's not required.  A client with authenticated SVCB records
>> (e.g. via DNSSEC) is not vulnerable to these attacks, and SNIP would
>> arguably be redundant in that case.  I don't think it's fair to claim that
>> DNSSEC is "impractical", as implied by this text.  ("often impractical"
>> might be fine.)
>>
>
> SNIP would still not be redundant because of the deployment issues listed
> below.
>
>
>> Also, the bullets underneath have some issues:
>>
>> > it is not possible to ensure that all server instances in a deployment
>> have the same protocol configuration, as deployments for a single name
>> routinely include multiple providers that cannot coordinate closely;
>>
>> This is not a problem.  The differently-configured servers would be
>> represented by different RRs in the RRSet.
>>
>
> The bullet point is correct, though the "multiple providers" explanation
> may not be the best one. When a change is rolled out or rolled back across
> a server deployment, there will unavoidable a period when the server
> deployment is non-uniform.
>

Neither SNIP nor authenticated SVCB can defend against an incompatible
downgrade of transport X until all RRs in the SVCB response support
transport X.  (An attacker can force fallback between SVCB RRs.)  The
bullet point is accurate, but it's not something that SNIP addresses, so it
doesn't help to explain why authenticated SVCB is "impractical".

> the ability to provide a subset of valid DNS records is integral to many
>> strategies for managing servers
>>
>> Perhaps, but only the authoritative server is allowed to make these
>> judgments, and it must happen before DNSSEC signing (which signs the entire
>> RRSet as an indivisible unit).
>>
>> > ensuring that cached DNS records are synchronized with server state is
>> challenging in a number of deployments.
>>
>> SVCB contents are required to be accurate.  They might be conservative
>> (not offering all supported protocols), but they can't be optimistic
>> (promising protocols that aren't actually supported everywhere).  Perhaps
>> there is some SNIP use case where the client is excited to learn that this
>> server supports some as-yet-unannounced protocol, but it's not the main
>> SNIP use case.
>>
>
> DNS is too far removed from the true server state for that to be
> plausible. Indeed we went through quite a lot of trouble in ECH
> specifically to tolerate inaccurate SVCB contents. I don't think the
> conservative vs. optimistic classification works either. A service may need
> to rollback a change due to an unanticipated issue somewhere in the system.
> In addition to the period of non-uniformity above, the cached SVCB record
> will be "optimistic" post-rollback.
>

I should have said "SVCB ALPN contents".  A SVCB record that claims an ALPN
that is not actually supported by all the servers it points to is
non-compliant.  This means you can't start offering a new ALPN in SVCB
until you're sure it's fully rolled out and going to stay that way for at
least a few minutes-hours.  I really can't imagine a situation where that
is a problem.

But this is fine because we do *not* require SVCB ALPN lists to be
> perfectly accurate. We fixed the broken Alt-Svc ALPN rules in SVCB to
> effectively remove SVCB's influence on the authoritative protocol
> selection. That must stay in TLS, for security and deployment reasons.
>

Yes, SVCB's ALPN list does not affect the list of ALPNs offered by the
client once a transport is selected.


> If SVCB says a server supports {h2, http/1.1} but it really only supports
> {http/1.1}, it will continue working because "h2" and "http/1.1", at this
> layer, effectively don't fix the exact protocol, just the set of compatible
> protocols.
>

No, because HTTP/2 clients are not obligated to implement HTTP/1.1.  As a
server operator, suppose I offer two RRs:
1. An H1-only endpoint mislabeled as supporting H2 and H1.
2. An H2-only endpoint labeled as H2-only.

An H2-only client is permitted to try the first one, detect ALPN failure,
and abandon the whole connection attempt.  (It has at most a SHOULD-level
recommendation to fall back to another RR.)  Thus, in order to be
compatible with all compliant clients, each RR must contain only ALPN
values that are actually fully supported.

Optimistic claims about ALPN support are likely to be tolerated in
practice, but they are not spec-compliant.


> That is, they are mostly just a funny way to say "TCP + TLS + HTTP/??".
>

Yes, except that they're also an advertisement about which RRs are
compatible with you, and this advertisement is required to be accurate.