Re: [TLS] Request mTLS Flag

David Benjamin <davidben@chromium.org> Mon, 23 October 2023 16:26 UTC

Return-Path: <davidben@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 7A5BDC16F3F8 for <tls@ietfa.amsl.com>; Mon, 23 Oct 2023 09:26:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.256
X-Spam-Level:
X-Spam-Status: No, score=-9.256 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.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cXGXjKwqbvok for <tls@ietfa.amsl.com>; Mon, 23 Oct 2023 09:26:29 -0700 (PDT)
Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1078FC15257D for <tls@ietf.org>; Mon, 23 Oct 2023 09:26:24 -0700 (PDT)
Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-5ac376d311aso10049807b3.1 for <tls@ietf.org>; Mon, 23 Oct 2023 09:26:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1698078383; x=1698683183; 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=SFTfPH3nV7c9O7pbkru/cbZlGbOhZ9lTsrLNJJ0bkxE=; b=nI0RDH1nSI5SojDQss4aiQe4prUgpfi6D68F0EfV6mKOLk2sn0E2oo+NwoTP1JMTij AcHaqOaW7CSQBzSJtLfGqZwAeQ2oa/54cgR3xylahWnmSNqaDgQFp9k1TOyjkjTqlShG J1L5SOebt4NtC/tW4cD7tx4y8MbGZsh7wWxms=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698078383; x=1698683183; 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=SFTfPH3nV7c9O7pbkru/cbZlGbOhZ9lTsrLNJJ0bkxE=; b=eF8ojXeRCUyBy/C4DUeeTmRoQxocijSImVuXJw98n5NNzvhJZ5ZmdYqWOsDZlNOtF4 KthE1zsR3tyT0T0fw7rEaztxykFAVS/5/1LnXNcPAP43Hx7m7BrpvnslsNXvVvvIh+zv rqKkbsziNpRkF6AQkfqoWiZcPDkh2gKLBoaFrvsnfUCPJ1IoicINASqQ4kJF0f/KDIVw o1O9A8x+z+keimpDakRUN95ll5XDcAR+l2brN+5hZgPQiaC5xURxWV6VZQDzFW1UCPkQ haxLEray503fgVO3HkFjf8Nb2C/Decqk20Au1ZdAuQeQWBGgoJsIx1Bd7ZofQ5fyq38L 5rLA==
X-Gm-Message-State: AOJu0YzKcZ1V8sGA4b59gFBsNnsTwZDTxlugZc14rEtdJyfQANQ2KK4e ZcxatkPc/oPc2SP8gOT9FpNakLdfYbCe4VGPwTtx7Y8TAjkoMuwnBmJ9
X-Google-Smtp-Source: AGHT+IEf6E53kD+wQZ1Ds80b0djJ3kHB6VbA+paPA4FAHX50FWVtIWUVBh8P7grnNSg/q2tQeZKDaozv/nyEWnmwFRI=
X-Received: by 2002:a25:410b:0:b0:d7f:af26:2c7e with SMTP id o11-20020a25410b000000b00d7faf262c7emr8493407yba.20.1698078382908; Mon, 23 Oct 2023 09:26:22 -0700 (PDT)
MIME-Version: 1.0
References: <CACykbs3TMM6W_K2zHnOjPwuuhxa8ZUnSz2BqvgSGfEpNs71Edg@mail.gmail.com> <CAF8qwaDc_Moj_mXJHqRxzi995eA8T3uFNJmvHCfDboq5LG42mA@mail.gmail.com> <CACykbs2hMVgR=AoA1yXmnAn3Knuy_B9NgCvjRvc6xd5YKYby-Q@mail.gmail.com>
In-Reply-To: <CACykbs2hMVgR=AoA1yXmnAn3Knuy_B9NgCvjRvc6xd5YKYby-Q@mail.gmail.com>
From: David Benjamin <davidben@chromium.org>
Date: Mon, 23 Oct 2023 12:26:03 -0400
Message-ID: <CAF8qwaAb98Ck8A+t=prVfMyAMWU7iTES-zXP2RyhpdJz-WjAVg@mail.gmail.com>
To: Jonathan Hoyland <jonathan.hoyland@gmail.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d0ec55060864aef5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/sM1SJDqjHs7pvbTAaO6bWZjX0_I>
Subject: Re: [TLS] Request mTLS Flag
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
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: Mon, 23 Oct 2023 16:26:34 -0000

> So in my mind this is something that will (almost) never be sent by
browsers.

What cases would the "(almost)" kick in? This extensions model just doesn't
match how client certificates work in browsers. I'm not seeing any
interpretation beyond "always send" or "never send".

> For example identifying a web crawler, and either allowing or disallowing
it.

I'm not following how this identifies web crawlers, unless perhaps we're
using the term to mean different things? I would expect web crawlers to
typically not do much with client certificates, and to typically *want* to
index the web in the same way that humans with web browsers see it.

> I don't think this leaks more info than a dedicated endpoint (even
accounting for ECH), and from a security perspective is just a hint.

The difference is the dedicated endpoint case only kicks in once you are
actually talking to a site that is deployed that way. A ClientHello flag
would likely be sent unconditionally, because it's too early to condition
it on much.

On Mon, Oct 23, 2023 at 11:58 AM Jonathan Hoyland <
jonathan.hoyland@gmail.com> wrote:

> Hi David,
>
> So in my mind this is something that will (almost) never be sent by
> browsers.
>
> This is aimed at bots, both internal and external. For example identifying
> a web crawler, and either allowing or disallowing it.
>
> Currently we identify many bots by IP range and user agent (and a bunch of
> ML), which isn't always reliable.
>
> The web crawler case is where the dedicated endpoint falls over, because
> crawlers are indexing the human visible web.
>
> I don't think this leaks more info than a dedicated endpoint (even
> accounting for ECH), and from a security perspective is just a hint.
>
>
> Regards,
>
> Jonathan
>
>
> On Mon, 23 Oct 2023, 16:36 David Benjamin, <davidben@chromium.org> wrote:
>
>> Would you expect a browser user to send this flag? On the browser side,
>> we don't know until the CertificateRequest whether a client certificate is
>> configured. We have to do a moderately expensive query, dependent on
>> information on the CertificateRequest of the OS's cert and key stores to
>> get this information. This query may even call into things like 3p
>> smartcard drivers, which may do arbitrarily disruptive things like showing
>> UI.
>>
>> And if we could somehow predict this information, this would leak into
>> the cleartext ClientHello when, starting TLS 1.3, the whole client
>> certificate flow is in the encrypted portion of the handshake.
>>
>> So, practically speaking, I don't think browsers could do anything
>> meaningful with this extension. We'd either always send it, on grounds that
>> we have code to rummage for client certs on request, or never send it on
>> grounds that we're not preconfigured with a client cert at the time of
>> ClientHello. Either way, it seems likely to interfere with someone's
>> assumptions here.
>>
>> The dedicated endpoint strategy seems more straightforward.
>>
>> David
>>
>>
>> On Mon, Oct 23, 2023, 11:22 Jonathan Hoyland <jonathan.hoyland@gmail.com>
>> wrote:
>>
>>> Hey TLSWG,
>>>
>>> I've just posted a new draft
>>> <https://www.ietf.org/archive/id/draft-jhoyla-req-mtls-flag-00.html>
>>> that defines a TLS Flag
>>> <https://www.ietf.org/archive/id/draft-ietf-tls-tlsflags-12.html> that
>>> provides a hint to the server that the client supports mTLS / is configured
>>> with a client certificate.
>>>
>>> Usually the server has no way to know in advance whether a given inbound
>>> connection is from a client with a certificate. If the server unexpectedly
>>> requests a certificate from a human user, most users wouldn’t know what to
>>> do. To avoid this many servers never send the CertificateRequest message in
>>> the server’s first flight, or set up dedicated endpoints used only by bots.
>>> If client authentication is necessary it can be negotiated later using a
>>> higher layer either through post-handshake auth or with an Exported
>>> Authenticator, but both of those options add round trips to the connection.
>>>
>>> At Cloudflare we’re exploring ways to quickly identify clients. Having
>>> an explicit signal from the client that it has an mTLS certificate on offer
>>> reduces round-trips to find out, avoids unnecessarily probing clients that
>>> have no certificate, etc. I think this would be an ideal use case for the
>>> TLS Flags extension.
>>>
>>> I have a pair of interoperable implementations (one based on boringssl
>>> and one based on Go TLS) which I plan to open source before Prague.
>>> Obviously these include implementations of the TLS Flags extension, which
>>> hopefully will help drive that work forward too.
>>>
>>> Regards,
>>>
>>> Jonathan
>>> _______________________________________________
>>> TLS mailing list
>>> TLS@ietf.org
>>> https://www.ietf.org/mailman/listinfo/tls
>>>
>>>