[TLS] Re: draft-ietf-tls-trust-anchor-ids-00

David Benjamin <davidben@chromium.org> Wed, 12 March 2025 19:20 UTC

Return-Path: <davidben@google.com>
X-Original-To: tls@mail2.ietf.org
Delivered-To: tls@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id D9963A82684 for <tls@mail2.ietf.org>; Wed, 12 Mar 2025 12:20:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -9.499
X-Spam-Level:
X-Spam-Status: No, score=-9.499 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cyM4kCP7lK4X for <tls@mail2.ietf.org>; Wed, 12 Mar 2025 12:20:06 -0700 (PDT)
Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id CD460A8267D for <tls@ietf.org>; Wed, 12 Mar 2025 12:20:06 -0700 (PDT)
Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5e6c18e2c7dso219355a12.3 for <tls@ietf.org>; Wed, 12 Mar 2025 12:20:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1741807206; x=1742412006; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hvKemTbw7fJbg9dZTvJM7UaWJIAqsHLVPG8BVdFARBE=; b=M5U4sByiD2IrWMr31cLfWj5sYblhrG2M2+bpZuqtgupp9loDHcVB8QtLygRfSfmarN 9/8rjnUfITyM7q2BWiDLbtllwmR5O4LB6YPF3JwNKC85EwPFfnWZE5gda/RHZJ6W9Pbz djpU9CCbEYwqReOO+94IPspSG4o7bVTz58XmE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741807206; x=1742412006; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hvKemTbw7fJbg9dZTvJM7UaWJIAqsHLVPG8BVdFARBE=; b=Lt5hMhFtpJPgIelx9MZxeY536nEhp0BKKiwPgnL4fpcYRLM3iwXcc30h+u0KG5xga4 jDcvNJKbk6NMdvefR6z3Z885vp8RytxxsPqxs0zbxNiWAoFIa9t6G+nXPuvkMezTbcEz htR2WNVkYpmcwOeLxZIMQrm3KLsvQ9uKSlke3zVS6fL4NQzcMMFeYxzl9wRS3AXXD5jV y8wJ+RcEexS/+8rZDn+zrRnfASsNhMcNYREQl4EQn8FHHFUxJGqfmUN1kj/VmxWM//YH KJsSLpUmGa1g3Hwlp+vycEGSyx2U1YliKUEbRsh+GR0m5TZED7AP9mqrC9aAKcEKpeu8 t8wQ==
X-Gm-Message-State: AOJu0YyJJJ3nFeTS9l23wo/UQ2l9b+xSJBxXC1MTfpz3tA1uqZ4GZA4t /8LAusB2dDZxlo10hZY95DxIwbvD0gAnAcF1W4CrHdkbWteTjPkHfNtjJKaKGucfNQtuvm/0c0I fGVD6Evbb/G1UdkMWRMym+qRgFjAMXBS3joM=
X-Gm-Gg: ASbGncuIGI3KF79HzgM1aY1bAt0fyscY/S4B0fRBQuhAB+32eJ3xppDwzeg/ODWrmwa g76PE5CHtvVDWX+nFHQ2rOpg43Sk8htcTrgLen4/XdGHe9QnhSns15zvrRtXUoZpmSlpyDNQeW+ 51tqX68z0qYdVTon6pP28evBYz
X-Google-Smtp-Source: AGHT+IHAw3+dPxoVdfFKeNZ99jdJGx2S6AIZ7AUWUuZFVhK9KVsE1ondhWAhTQnJkC7Zv28yI+mKi/jzPt0d8B8ogFM=
X-Received: by 2002:a17:907:60c9:b0:ac2:dfdb:755a with SMTP id a640c23a62f3a-ac2dfdb7773mr510759866b.4.1741807205347; Wed, 12 Mar 2025 12:20:05 -0700 (PDT)
MIME-Version: 1.0
References: <CWLP123MB34607D198FC67A1E1C995C43F8D12@CWLP123MB3460.GBRP123.PROD.OUTLOOK.COM>
In-Reply-To: <CWLP123MB34607D198FC67A1E1C995C43F8D12@CWLP123MB3460.GBRP123.PROD.OUTLOOK.COM>
From: David Benjamin <davidben@chromium.org>
Date: Wed, 12 Mar 2025 15:19:47 -0400
X-Gm-Features: AQ5f1Joo5ymFP42pYDPkJ_96Vck3r7W0KTiDKHiz9LgcmhPzmaQN4frENbKNYr8
Message-ID: <CAF8qwaAkeCUeQxF=YqSXtqLzPw3AiknP5mVqZKwMNi2OBbU6vQ@mail.gmail.com>
To: Luke T2 <Luke.T2@ncsc.gov.uk>
Content-Type: multipart/alternative; boundary="000000000000be9de106302a178f"
Message-ID-Hash: P7SHYEO4L7SSDZ5RPMZUKKP6AS5YOITH
X-Message-ID-Hash: P7SHYEO4L7SSDZ5RPMZUKKP6AS5YOITH
X-MailFrom: davidben@google.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tls.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "tls@ietf.org" <tls@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [TLS] Re: draft-ietf-tls-trust-anchor-ids-00
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/gNdOdljj6c_Kc_b0MJQqUhz2LkE>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Owner: <mailto:tls-owner@ietf.org>
List-Post: <mailto:tls@ietf.org>
List-Subscribe: <mailto:tls-join@ietf.org>
List-Unsubscribe: <mailto:tls-leave@ietf.org>

Hi Luke! Thanks for the thoughts!

I don't remember if there was a particular reason originally, probably just
an artifact of them being in separate sections. :-) Reusing it makes sense,
although there are some differences here:

Regarding mismatching signatures and whatnot, the original thinking with
the EncryptedExtensions retry was that the server would filter the list
down based on all its other selection criteria. If the server knows the
client doesn't support ECDSA, there is no point in saying you have a trust
anchor that has only signed an ECDSA key. The server already has all that
information available by way of the ClientHello. But it looks like we
half-forgot to write that. (Half because there's one sentence that only
makes sense if the text were there, but the text itself is missing.) I
filed a bug to track this:
https://github.com/tlswg/tls-trust-anchor-ids/issues/97

Assuming the WG ends up sticking with that design, that should avoid the
sigalg issues described in Section 5.3, but not things being out of sync if
you got routed to a different server instance. In that case, yeah, I could
see the client wanting to offer a couple of them a la Section 5.3. (Though
there are other ways to solve this, including the client trying a couple
times or an in-handshake retry. This is basically the same problem space as
in the ECH retry, except that we can offer multiple and ECH cannot.)

If we go with the client offering multiple options, there is an added input
to the procedure: did the client like the *particular certificate* that the
server already presented? If not, the client may want to specifically
exclude that trust anchor in the retry and use this mechanism as a way to
iterate over what the server has. This can be useful in corner cases when
the client imposes custom policies like SCTNotAfter[0] or name-constraining
a trust anchor, e.g. as part of a partial distrust. While those are broadly
invisible, you can hit a corner case if *all* of the following happen:
- The client has put some trust anchor under a constraint
- The server has some certificate A from the trust anchor that breaks the
constraint (and is thus not useful to the client)
- But certificate A may be useful to some *other* client (e.g. an older
one), which is why the server still wants to keep getting certs from the
trust anchor for now. (I'm very interested in helping server operators
de-risk configuration changes as PKIs evolve, and being able to retain your
previous cert profile while transitioning in your new one helps do that.)
- The server has some certificate B from some other trust anchor that would
satisfy the client
- For some reason, when offered both, the server picked A instead of B

In that case, the client might say "well, you have A and B available, but
you gave me A and I see now that that is unacceptable, let me try again
asking just for B". The retry mechanism then lets you repair mishaps in
these kinds of complicated corner cases that can arise, without the
complexity of encoding the ad-hoc policies into the protocol. Of course,
the cost is that we repair mishaps with an expensive retry, but as long as
these are exceptional cases, I think that's fine.

To that end, the client here might want to tweak the Section 5.3 behavior
where, if it sees two trust anchors in DNS, one of which it has constrained
and another which it has not, it may wish to only ask for the unconstrained
one to direct the server to pick the one that's more likely to be
acceptable. I.e. only request constrained trust anchors as a last resort.
That should avoid the retry most of the time. The server adjusting its
preference order to put B over A would also avoid it.

(This allowance wasn't actually an original design goal, rather a happy
accident that fell out of inverted selection order. We then also got
feedback from another client that this sort of thing was useful for
something else they were doing, though I don't know the specific details
and wouldn't want to speak on their behalf.)

Anyway, clearly the draft should give some more guidance here. To go full
circle, more guidance means more reason to share the underlying text
sections so we don't have to write similar guidance twice. I'll file a bug
referencing this thread to keep track of all this. :-)

David

[0] https://dadrian.io/blog/posts/sct-not-after/


On Tue, Mar 11, 2025 at 11:10 AM Luke T2 <Luke.T2@ncsc.gov.uk> wrote:

> Hey David,
>
> Thanks for the draft! I had some thoughts about how Relying Parties build
> their list of Trust Anchor IDs to send to the Authenticating Parties. In
> the draft currently there is different behaviour by the Relying Party
> depending on whether it is a retry connection or not.
> When a relying party receives the tls-trust-anchors in the DNS Service
> Parameter they compute the intersection of the received trust anchors with
> their configured trust anchors, then they use that information to determine
> their trust_anchors list - in this case relying parties should offer
> multiple options.  In the other case, when retrying a connection, relying
> parties should choose a single Trust Anchor ID from the EncryptedExtensions
> to send.
> Could you talk me through your reasoning for the different mechanisms?  I
> would suggest using the same mechanism for calculating the trust_anchors on
> retry as when using the DNS Service Parameter, so the client has consistent
> behaviour and then the authenticating party has the final choice of the
> certificate chain to serve.
> Otherwise, the issue described in Section 5.3 of the draft could occur on
> retry with the client picking a trust anchor which includes a certificate
> in the chain it doesn’t support the signature for.
>
> Cheers,
> Luke
>
>