Re: [TLS] [EXTERNAL] Re: Request mTLS Flag

Andrei Popov <Andrei.Popov@microsoft.com> Mon, 23 October 2023 17:40 UTC

Return-Path: <Andrei.Popov@microsoft.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 6E44DC1519B0 for <tls@ietfa.amsl.com>; Mon, 23 Oct 2023 10:40:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 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, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=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] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.com
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 6mc9NM1qy9Q3 for <tls@ietfa.amsl.com>; Mon, 23 Oct 2023 10:40:02 -0700 (PDT)
Received: from DM6FTOPR00CU001.outbound.protection.outlook.com (mail-centralusazon11020014.outbound.protection.outlook.com [52.101.61.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7643BC151545 for <tls@ietf.org>; Mon, 23 Oct 2023 10:40:02 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b+H0qt1OJdMbi6zxyEhYNJGgyqgVuKeUbsd5CFIV0rZkfjmGWwWt0qWZ8PblCeTjPOQX1RwMS4jqNOSuqKH3Rsy0QtJwi9wOKSS72Y6rsafZVEFngRoy1UpUYPDPKR2D83Gt781mPaxhw/xFeNTWbV5qu1PXWc540lL7M3l7BtVH3S94zyTOjmosozeVA4GR9+Ao+0+10ZSeIpNmE8LDf96iGb4FpPA0pplE67cHaSX/BKZZ8prvpQIR3PbGZQ3zcHOWgKig/C/9NpZOOCXxQ7BLnm3ij6QboUEYxGqSbN+8GW7CfR5tjPjHGG5BZ9SrYoTHNHRDDFC6PNVIooWFxw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WKXYucwIRSZVzepS1lWpznqsCrlT8uBBxdeBiCDd9WU=; b=O8zboxkVJREm9PMrIexzwKarQXXkEux6XjzxdOzpwaShmCQowHkrFKrpiherIYsFdPTh7I4k+vpeklqn5nPFL9G0nnoyWqcRAIGCHPYJjKuF9wRZDcsU+jqv334By5TL9Rn6KBscivnDwgyfgN9fUstl1dq5IhNoelNoDlID81oo6GuCtmNmwn1X1ZpHNgL60JyaJSN8G5XTHtteanbVfY1cWN7MNeUePL7v6AU2J4OMY+qJMoTsxbGDutF2HZhTIXM5c7UIiTSoKwaY4xFrNR1eKJf/hKHIfp9P6gAyJ7IDpR2NNgJXZAKfg09FxGEbYDBpRSMp4YMpfzey66wDRQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WKXYucwIRSZVzepS1lWpznqsCrlT8uBBxdeBiCDd9WU=; b=JkUQCvsOYklaqtQkQmdSKRqhMkeZUOvrqvbUCUfVio4D9Un/554MW3gJX+/WFHKDFcXGwPd0DxguzmgJbYBNGD4l+b3Dqueevtu+czfLb4K19NwvmnQgUQAtaCliifeVbJqsimh0okP3iO6y3kp3tqBg3arxr7SdsufysnCcOps=
Received: from CH0PR00MB1416.namprd00.prod.outlook.com (2603:10b6:610:fa::22) by SA1PR00MB1437.namprd00.prod.outlook.com (2603:10b6:806:29d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6965.0; Mon, 23 Oct 2023 17:39:58 +0000
Received: from CH0PR00MB1416.namprd00.prod.outlook.com ([fe80::f40:d761:f3ce:560e]) by CH0PR00MB1416.namprd00.prod.outlook.com ([fe80::f40:d761:f3ce:560e%2]) with mapi id 15.20.6967.000; Mon, 23 Oct 2023 17:39:58 +0000
From: Andrei Popov <Andrei.Popov@microsoft.com>
To: David Benjamin <davidben@chromium.org>, Jonathan Hoyland <jonathan.hoyland@gmail.com>
CC: "<tls@ietf.org>" <tls@ietf.org>
Thread-Topic: [EXTERNAL] Re: [TLS] Request mTLS Flag
Thread-Index: AQHaBccMS2oJ9FUE+UaJTZUCi8bpDbBXh+iAgAAHxICAAA1W4A==
Date: Mon, 23 Oct 2023 17:39:57 +0000
Message-ID: <CH0PR00MB1416653E50FEA08D4C0E72B78CD8A@CH0PR00MB1416.namprd00.prod.outlook.com>
References: <CACykbs3TMM6W_K2zHnOjPwuuhxa8ZUnSz2BqvgSGfEpNs71Edg@mail.gmail.com> <CAF8qwaDc_Moj_mXJHqRxzi995eA8T3uFNJmvHCfDboq5LG42mA@mail.gmail.com> <CACykbs2hMVgR=AoA1yXmnAn3Knuy_B9NgCvjRvc6xd5YKYby-Q@mail.gmail.com> <CAF8qwaAb98Ck8A+t=prVfMyAMWU7iTES-zXP2RyhpdJz-WjAVg@mail.gmail.com>
In-Reply-To: <CAF8qwaAb98Ck8A+t=prVfMyAMWU7iTES-zXP2RyhpdJz-WjAVg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=d42541cc-fded-46ab-aa9f-e6d97d795e9c; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-10-23T17:13:46Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CH0PR00MB1416:EE_|SA1PR00MB1437:EE_
x-ms-office365-filtering-correlation-id: b84d1586-ef10-4c70-1699-08dbd3ef138e
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: xLcGU7bvWph4SFHNOleuPoyyF8CA5gajFl9Lnlk6bZouPiuycVDAl00JGx5SVaN45glmCqFTSVMPzKnoM9eeuLuIHhyOQbwgCckBrHjgjyGzUC5X8CpT/MEafS6RXue6lSVCd93BnhBWSfdoabJ1DCKmYDH2DBlAfuHDpYGITsvLHdfuaKZ34CB2xZQXhgflFE/oCozwk7wHaqmEQol4TDnBYlyNJYsWerQiqWxbLRaG/TH1H4ZJE7ZrlWWYc2FlRf3xnhx+7xKdu6ltrozZGix2SVUMH2DmlHD3GevNn/EEI4+259fYoYatQO3EE/abODeG1kXBhvBaoEHaYOlQUJ7n9YCWahd8AOLlyeahk+JUnwf2+BJ0+ySh9ZD59NeR4PVPRzFfRg50y7+hFGfbLC+wbzyGyPrIULPf6raRPcjgjz/4VcFGiKp2Fwr5Damh80ume+gj9zG0GAEieqZz+f3v3bBUQa+qWk3v7SNGjSJCNlPQMXdvXSCqOAhzkCFa6fKztGcXTsIccnLylmKMPRYo4ZbTngDSkiNVm924SvPrOiCVbut8/mU6cx2e5KVvVs83lWr7AlJgXbEEwWHwSDbGp3vEHUeHlpXgLn9lSp2d+IvzXJ5B4eUx1v+EY2Al1ydhxDW8bEwyA5MxxZD5/g==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR00MB1416.namprd00.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(376002)(366004)(346002)(396003)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(66476007)(316002)(66446008)(66556008)(8990500004)(110136005)(55016003)(64756008)(66946007)(76116006)(86362001)(66899024)(9686003)(966005)(10290500003)(478600001)(6506007)(71200400001)(53546011)(26005)(7696005)(33656002)(66574015)(83380400001)(166002)(38100700002)(38070700009)(82950400001)(82960400001)(2906002)(122000001)(52536014)(8676002)(41300700001)(5660300002)(8936002)(4326008); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: sEPBEUhIkoGaG14dHAqJw0eNcXIAGiNjlbYRKy0SY0OAozrKE7CuxbDKbppSaE/wG2QgzEkMInIs1WSoagNS1NmYQ1BeMtS7foFMXPiKhMyvOhLv2mChr3/aN7XTAngt8Yy1buJBeAMpTA2P2H9msI4dpL3v3DQPMfPesfBxHZ6S7GAPx27MvGZSHo4pEJasIlyeNv/HnjuGMDieLXA+WY0s1+Z1avjzdTvS8MMW/ezVZvhzUvoW7luF3EyAY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iewzX6eGKBSZXISs21fn2oDrHSsoNfxuANEsksUAoaqRii8jE9EiD3GcgIQxuwJ8GnFsh0tXoWNCzSO4qOUNVpQAmMKxBT42SSItDZB6mr+Mt+QW1rvpCsi5fS/mVFy69i2RCQ4pCZ4FVLTqPTftvjalcy2q/h7crYbqJj/icyO1+2zVmjplJJo2BlIdktLP2vn7rd2Vpguvfa1GI+giI5LhygT0jP4K4Z/HckS47+AsqZ0vieeMBJrXpq40/1wK7pWpAuRT4ACyj0ik
Content-Type: multipart/alternative; boundary="_000_CH0PR00MB1416653E50FEA08D4C0E72B78CD8ACH0PR00MB1416namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CH0PR00MB1416.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b84d1586-ef10-4c70-1699-08dbd3ef138e
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2023 17:39:58.1165 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: kuumwX/G1r2kF2LtVzWGP6TSoticX6LB5NfAMbs7PPys8t8TW9kR+E9i3lSGVT2wzksCBCMJzorlfMQACbdOtg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR00MB1437
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/97GY0GassCmIqnsl8lsNjwyJeVI>
Subject: Re: [TLS] [EXTERNAL] Re: 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 17:40:04 -0000

The use-case is not very clear to me: when is the decision whether to authenticate a client or not based on the availability of a pre-configured client certificate?
If the client says they have a pre-configured cert, the server authenticates them; otherwise, the connection succeeds without client auth (and, presumably, the server returns a different response at the application layer)?

The draft says:
>>Sometimes a server does not want to negotiate mTLS with every client, but might wish to authenticate a subset of them.
Yes, there are a number of scenarios of this nature, but in the use-cases I’ve seen, the decision is made post-handshake, based on what happens at the application layer. Something like a public landing page with some protected links that require client auth if the user chooses them.

From a TLS client’s perspective, let’s say the client certificate is preconfigured. Before receiving a CertificateRequest, the TLS client does not know whether the preconfigured cert even satisfies the request. The client could be coded to go look for a better-matching cert, based on the CertificateRequest.

>>This is aimed at bots, both internal and external. For example identifying a web crawler, and either allowing or disallowing it.
As soon as servers start rejecting bots based on the absence of this flag, won’t bots figure out to send the flag?

>>If the server unexpectedly requests a certificate from a human user, most users wouldn’t know what to do.
Sure, but there also bots that can select a certificate dynamically in response to a CertificateRequest. Should they send this proposed flag or no?

Cheers,

Andrei

From: TLS <tls-bounces@ietf.org> On Behalf Of David Benjamin
Sent: Monday, October 23, 2023 9:26 AM
To: Jonathan Hoyland <jonathan.hoyland@gmail.com>
Cc: <tls@ietf.org> <tls@ietf.org>
Subject: [EXTERNAL] Re: [TLS] Request mTLS Flag

> 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<mailto: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<mailto: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<mailto: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<mailto:TLS@ietf.org>
https://www.ietf.org/mailman/listinfo/tls