Re: [OAUTH-WG] MTLS and SAN

Justin Richer <jricher@mit.edu> Thu, 04 April 2019 20:36 UTC

Return-Path: <jricher@mit.edu>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B69551201B3 for <oauth@ietfa.amsl.com>; Thu, 4 Apr 2019 13:36:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 rC7k3Jw5EZaZ for <oauth@ietfa.amsl.com>; Thu, 4 Apr 2019 13:36:28 -0700 (PDT)
Received: from outgoing-exchange-3.mit.edu (outgoing-exchange-3.mit.edu [18.9.28.13]) (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 E340F12016D for <oauth@ietf.org>; Thu, 4 Apr 2019 13:36:27 -0700 (PDT)
Received: from w92exedge4.exchange.mit.edu (W92EXEDGE4.EXCHANGE.MIT.EDU [18.7.73.16]) by outgoing-exchange-3.mit.edu (8.14.7/8.12.4) with ESMTP id x34KaSrF030269; Thu, 4 Apr 2019 16:36:39 -0400
Received: from w92expo18.exchange.mit.edu (18.7.74.72) by w92exedge4.exchange.mit.edu (18.7.73.16) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 4 Apr 2019 16:35:14 -0400
Received: from oc11expo18.exchange.mit.edu (18.9.4.49) by w92expo18.exchange.mit.edu (18.7.74.72) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Thu, 4 Apr 2019 16:36:06 -0400
Received: from oc11expo18.exchange.mit.edu ([18.9.4.49]) by oc11expo18.exchange.mit.edu ([18.9.4.49]) with mapi id 15.00.1365.000; Thu, 4 Apr 2019 16:36:06 -0400
From: Justin Richer <jricher@mit.edu>
To: Filip Skokan <panva.ip@gmail.com>
CC: oauth <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] MTLS and SAN
Thread-Index: AQHU6yPYm24VQsQf0UuOqTG8+b1fiqYstUSAgAADkAA=
Date: Thu, 04 Apr 2019 20:36:06 +0000
Message-ID: <42790363-5D79-411C-BE4E-D99A90E36951@mit.edu>
References: <220488FB-C7EB-42A3-85D6-BD3756786550@mit.edu> <CALAqi_-0wXCurgqQq5=YfD0XhjeeoqPE=TX2XkDpgM2ci8E7qw@mail.gmail.com>
In-Reply-To: <CALAqi_-0wXCurgqQq5=YfD0XhjeeoqPE=TX2XkDpgM2ci8E7qw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [71.174.62.56]
Content-Type: multipart/alternative; boundary="_000_427903635D79411CBE4ED99A90E36951mitedu_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/e_dplJ-whEaVytL1HL5tdFc6AlM>
Subject: Re: [OAUTH-WG] MTLS and SAN
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <oauth.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/oauth>, <mailto:oauth-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/oauth/>
List-Post: <mailto:oauth@ietf.org>
List-Help: <mailto:oauth-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/oauth>, <mailto:oauth-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Apr 2019 20:36:31 -0000

Thank you, I did miss that text. This should be called out more explicitly in §2.1, perhaps by specifying that it is only one field. This still doesn’t set precedence, but it implies that it’s an error for a client to have more than one field set of the available options. Is that your read on this as well?

— Justin

On Apr 4, 2019, at 4:23 PM, Filip Skokan <panva.ip@gmail.com<mailto:panva.ip@gmail.com>> wrote:

Justin, I had the exact same question off list and believe draft 13 clarified this.

https://tools.ietf.org/html/draft-ietf-oauth-mtls-13#section-2.1.2

A client using the "tls_client_auth" authentication method MUST use exactly one of the below metadata parameters to indicate the certificate subject value that the authorization server is to expect when authenticating the respective client.

Then it lists the different dn/san properties.

S pozdravem,
Filip Skokan


On Thu, 4 Apr 2019 at 22:20, Justin Richer <jricher@mit.edu<mailto:jricher@mit.edu>> wrote:
We’ve just started implementation of SAN-based certificate authentication, based on the changes in version -13 of the draft. I believe this addition is a bit unclear, due to it being added so late in the document process.

My question is how does an AS determine whether to DN or SAN for certificate checking? Corollary, are these mutually exclusive or can they be used together? Currently, the specification text lists DN and SAN as an “or” with no indication whether this is an inclusive or exclusive “or”, and what to do when there’s overlap.

This has implications both for the implementation of the server processing the request as well as the client metadata model, since the client fields are all in parallel to each other. I can see a few ways of handling this.


1) One of the fields takes precedence over the other. Say for example you choose the DN field: if it’s set, then you do DN matching and ignore the SAN fields entirely, both in the cert and in the client’s registration. Inverse is true if you choose the SAN fields over the DN but the principle is the same. We should be explicit if there’s an intended precedence between these two, and even more explicit if the DN and SAN are at equal level and the AS gets to choose. We also need to be clear if it’s an error condition if both are set simultaneously, like the way that jwks and jwks_uri are mutually exclusive.
2) You set an explicit switch in your client model that says whether to use the DN or the SAN fields in comparison, and your code branches based on that to either DN or SAN processing. This could also be added as an explicit client metadata field, or it could be an internal detail. If an internal detail, we should be explicit about there not being a predefined precedence between the fields.
3) If it’s allowable to use them together, you match everything that’s set in the client, and at least one field MUST be set.


What’s the intended behavior for implementers, and should we be more explicit about this? We are starting our implementation with (1) pending the outcome of this thread, and I’d be curious to know how others are implementing this in their systems.

Thanks,
— Justin

_______________________________________________
OAuth mailing list
OAuth@ietf.org<mailto:OAuth@ietf.org>
https://www.ietf.org/mailman/listinfo/oauth