Re: [OAUTH-WG] I-D Action: draft-ietf-oauth-mtls-03.txt

Justin Richer <jricher@mit.edu> Mon, 07 August 2017 18:40 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 3FD01132455 for <oauth@ietfa.amsl.com>; Mon, 7 Aug 2017 11:40:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.19
X-Spam-Level:
X-Spam-Status: No, score=-4.19 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01] 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 fKOe0UVoL1TY for <oauth@ietfa.amsl.com>; Mon, 7 Aug 2017 11:40:29 -0700 (PDT)
Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu [18.7.68.35]) (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 B93661324AD for <oauth@ietf.org>; Mon, 7 Aug 2017 11:40:28 -0700 (PDT)
X-AuditID: 12074423-98dff70000002362-16-5988b41bb925
Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id F9.42.09058.B14B8895; Mon, 7 Aug 2017 14:40:27 -0400 (EDT)
Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id v77IeQgS000974; Mon, 7 Aug 2017 14:40:26 -0400
Received: from artemisia.richer.local (static-96-237-195-53.bstnma.fios.verizon.net [96.237.195.53]) (authenticated bits=0) (User authenticated as jricher@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id v77IeOns025907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 7 Aug 2017 14:40:25 -0400
From: Justin Richer <jricher@mit.edu>
Message-Id: <0B89EDED-DD66-42A0-A294-471B9EF2D522@mit.edu>
Content-Type: multipart/alternative; boundary="Apple-Mail=_10D20C43-D3F1-4FA7-9AF0-C73BB0F2418A"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Date: Mon, 07 Aug 2017 14:40:23 -0400
In-Reply-To: <CA+k3eCQQOBDz-z4MOenOLLfgMqQ7kzdYg3VvpPH00Hdx092sAA@mail.gmail.com>
Cc: "<oauth@ietf.org>" <oauth@ietf.org>
To: Brian Campbell <bcampbell@pingidentity.com>
References: <150126635076.25225.3854025136006448469@ietfa.amsl.com> <CA+k3eCThoxNM394K=it4vCL2k-BW68Lg73eTN=4Z3LrupbXtVw@mail.gmail.com> <AC43222A-BE6A-4577-9BFB-713054211E6A@mit.edu> <CA+k3eCQQOBDz-z4MOenOLLfgMqQ7kzdYg3VvpPH00Hdx092sAA@mail.gmail.com>
X-Mailer: Apple Mail (2.3273)
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLKsWRmVeSWpSXmKPExsUixCmqrCu9pSPSYF23hMXq/zcZLU6+fcXm wOSxZMlPJo+7Ry+yBDBFcdmkpOZklqUW6dslcGUc2fWDueDpdKaKWasvMDYw9r9l7GLk5JAQ MJE4Mu0IcxcjF4eQwGImialr+tkhnA2MEgebPrBAOA+YJFZt+s4O0sImoCoxfU0LE4jNK2Al 8W/mSzYQm1kgSaJ911SgBg6guL5E73OwDcICDhLXZp0FK2cRUJH4suA6WDmnQKDE3Nb9YOXM AuoS7SddQMIiQJ23n86BuqGJSWLv1cksEJfKStyafYl5AiP/LCTbZiFsgwhrSyxb+JoZwtaU 2N+9nAVTXEOi89tE1gWMbKsYZVNyq3RzEzNzilOTdYuTE/PyUot0zfRyM0v0UlNKNzGCQpvd RXkH48s+70OMAhyMSjy8DJkdkUKsiWXFlbmHGCU5mJREeeNXtEUK8SXlp1RmJBZnxBeV5qQW H2KU4GBWEuFV2wRUzpuSWFmVWpQPk5LmYFES5xXXaIwQEkhPLEnNTk0tSC2CycpwcChJ8PJv BmoULEpNT61Iy8wpQUgzcXCCDOcBGq4EUsNbXJCYW5yZDpE/xWjJ8WrC/29MHId+n/jOxHEM RAqx5OXnpUqJ824BuUYApCGjNA9uJihVJbw9bPqKURzoRWFeTpCxPMA0Bzf1FdBCJqCFbxJb QRaWJCKkpBoYJ04MNd+90/79kvLU94U8641UZ8+tnx2qyq9Xcf1Sy2/7zFPPLp2LWFR8o9t0 QW1Zx5QTievO2h2OdBdLOKIUIrW/bO/FO3nb90b6K/Nmh8//8c3SR0i74Hda3/WIoueNb60O XSt/WXwmqqndILlapOpjfsDnRTf0pPdIvFm+UVFd7GHQI0FPJZbijERDLeai4kQAu1hB+jAD AAA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/XtFPLh7XKnw2Pjehy9NLss_pUAU>
Subject: Re: [OAUTH-WG] I-D Action: draft-ietf-oauth-mtls-03.txt
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.22
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: Mon, 07 Aug 2017 18:40:32 -0000

Thanks for the explanation, Brian. I think the draft’s current structure helped me to erroneously conflate the two aspects of the document — in that it sounded like mTLS client authentication was required for an mTLS-bound (or really, certificate-bound) token. I see now that this isn’t the case, and the hashing approach makes more sense to me. Having the text separate these more clearly and stating that you don’t need the one to do the other (but it helps) would be a good move. I could see that the document was already trying to separate the two aspects of the spec, but I think it’s not quite there yet.

 — Justin

> On Aug 1, 2017, at 3:57 PM, Brian Campbell <bcampbell@pingidentity.com> wrote:
> 
> Thanks Justin. 
> 
> In my original announcement email, I should have given credit to Torsten as he made many of the updates in -03. So complements on improvements as well as blame for issues can be pointed to him as well!
> 
> Your point about document structure is taken and we will look to make the separation of the client authentication and resource access more clear in future revisions. The document was aiming for something conceptually along those same lines already. But it could be made more clear.
> 
> This could define a new “token_type” but other than having different token type names in messages, I don't know that a new token_type or HTTP auth scheme that would probably have to come along with it adds value to the use cases here. However, they would very likely make deployment of this stuff much more cumbersome and take longer.  Whereas many systems can likely plug in mutual TLS on top of the existing token_type and HTTP auth scheme without major changes. I'm strongly inclined to not introduce a new token_type and more inclined to not do a new HTTP auth scheme. 
> 
> Fair point about breaking out all the registered parameters into their own hanging list items. It is somewhat inconsistent in that regard now. Will look to address that in a future revision.
> 
> Using just a certificate hash for mTLS sender constrained access tokens was intentional to allow mTLS at the resource to be used as a proof-of-possession method only. It's part of the authorization check at resource access and deliberately not about authentication with the RS. Using the hash simplifies the check at the RS to one consistent way of doing things while allowing for different modes of doing client authentication at the AS. So the lack of parallelism with the client authentication at the token endpoint was very much intentional. Following from that, the need to do mTLS at the token endpoint in order to get mTLS-bound access tokens for an RS was also kind of intentional. Though, as §4.3 <https://tools.ietf.org/html/draft-ietf-oauth-mtls-03#section-4.3> attempts to describe, a public client could do mTLS at the token endpoint with a generated self-singed cert to have an access token bound but not actually authenticate to the token endpoint. You are certainly right that there are other ways an AS could decide on the certificate to bind the access token to. And other ways a cnf claim member could provide for such a binding. But we were aiming to not provide too many options in the doc. So my thinking here was that this draft is about mTLS and so saying how to use mTLS for the AS to do the access token binding seemed like the most appropriate and straightforward approach. It's not so much that mTLS authentication is needed for the client at the token endpoint to allow for bound access tokens. But rather that having mTLS at the token endpoint provides a strong signal of the certificate to which to bind the issued access token. 
> 
> 
> 
> 
> 
> 
> 
> On Mon, Jul 31, 2017 at 2:18 PM, Justin Richer <jricher@mit.edu <mailto:jricher@mit.edu>> wrote:
> Brian, thanks for the update. This is really coming along!
> 
> I think the spec would benefit from a more clear separation of the client authentication and resource access sections. They’re really almost two different but related specs, but there’s enough overlap that I think that keeping them in the same document is fine with some structural changes applied. I think the content is by and large all here, it’s just jumbled together.
> 
> To that end, I think there might be three major sections to this document (not counting the IANA, security, privacy, and other boilerplate bits). A suggested breakdown:
> 
> 1) Types of mTLS client auth under consideration. This is where the definition of public key vs. pki comes in, and where the two authentication methods are defined for both registration and discovery. Some implementor’s notes on what kinds of things you need to store here, including the tls_client_auth_ client metadata extensions. For better or worse, 7591 defines OAuth’s client model, and not just for dynamic registration.
> 
> 2) How to use mTLS to authenticate a client. This can be a relatively short section that says use (1) in the context of getting an access token at the token endpoint. Here is where you point out that you still need to send client_id and that the association with the cert’s DN and the client_id is done at the AS (there’s existing text for this).
> 
> 3) How to use mTLS to bind an access token. This is a bit more complicated because it’s the RS that needs to know the binding between the token and the cert’s DN, so that’s where you’d define the “cnf” stuff. An unfortunate side effect of spec history means that the “cnf” claim for 7662 also gets defined here. This is also where you’d put the bits about mutual_tls_sender_constrained_access_tokens for discovery and registration. Should this be a new “token_type”?
>  
> 
> A few more comments:
> 
> §2.3 really should break out all registered parameters into their own hanging list items (even if you break them up into different sections like suggested above)
> 
> §3 seems to say that you can only do mTLS-bound access tokens at an RS if you do mTLS authentication at the token endpoint. Is that an intentional restriction? To me these two functions seem to be more orthogonal than the spec is hinting at. Like, I could use private_key_jwt or PKCE or magic to authenticate at the RS but use mTLS at the RS, for whatever esoteric reason, like the AS and RS being in different security domains. Still, functionally, if the client’s registered parameters are enough to trust for token issuance, they should be enough to trust for token usage. In other words, have the RS depend on tls_client_auth_subject_dn etc. instead of "the same certificate that was used for mutual TLS at the token endpoint". 
> 
> Along those lines, §3 also depends entirely on matching a specific certificate hash instead of validating a certificate (and possibly it’s chain) and associated DN. This isn’t in parallel with the client authentication at the token endpoint, and I’d like to see these come together. Should we have a third certificate validation method in §2 for “certificate hash”? Or maybe we should have a separate list for “resource_server_auth_method” for the client?
> 
> In any event, it still feels like there are two things that are fighting for attention in this spec: cert-based authentication of the client at the token endpoint, and cert-based PoP of the token at the resource.
> 
>  — Justin
> 
>> On Jul 28, 2017, at 2:33 PM, Brian Campbell <bcampbell@pingidentity.com <mailto:bcampbell@pingidentity.com>> wrote:
>> 
>> A new draft of "Mutual TLS Profile for OAuth 2.0" has been published with the changes listed below based on comments and dissuasion in Prague. 
>> 
>>    draft-ietf-oauth-mtls-03 <https://datatracker.ietf.org/doc/html/draft-ietf-oauth-mtls-03>
>> 
>>    o  Introduced metadata and client registration parameter to publish
>>       and request support for mutual TLS sender constrained access
>>       tokens
>>    o  Added description of two methods of binding the cert and client,
>>       PKI and Public Key.
>>    o  Indicated that the "tls_client_auth" authentication method is for
>>       the PKI method and introduced "pub_key_tls_client_auth" for the
>>       Public Key method
>>    o  Added implementation considerations, mainly regarding TLS stack
>>       configuration and trust chain validation, as well as how to to do
>>       binding of access tokens to a TLS client certificate for public
>>       clients, and considerations around certificate bound access tokens
>>    o  Added new section to security considerations on cert spoofing
>>    o  Add text suggesting that a new cnf member be defined in the
>>       future, if hash function(s) other than SHA-256 need to be used for
>>       certificate thumbprints
>> 
>> 
>> ---------- Forwarded message ----------
>> From: <internet-drafts@ietf.org <mailto:internet-drafts@ietf.org>>
>> Date: Fri, Jul 28, 2017 at 12:25 PM
>> Subject: [OAUTH-WG] I-D Action: draft-ietf-oauth-mtls-03.txt
>> To: i-d-announce@ietf.org <mailto:i-d-announce@ietf.org>
>> Cc: oauth@ietf.org <mailto:oauth@ietf.org>
>> 
>> 
>> 
>> A New Internet-Draft is available from the on-line Internet-Drafts directories.
>> This draft is a work item of the Web Authorization Protocol WG of the IETF.
>> 
>>         Title           : Mutual TLS Profile for OAuth 2.0
>>         Authors         : Brian Campbell
>>                           John Bradley
>>                           Nat Sakimura
>>                           Torsten Lodderstedt
>>         Filename        : draft-ietf-oauth-mtls-03.txt
>>         Pages           : 17
>>         Date            : 2017-07-28
>> 
>> Abstract:
>>    This document describes Transport Layer Security (TLS) mutual
>>    authentication using X.509 certificates as a mechanism for OAuth
>>    client authentication to the token endpoint as well as for
>>    certificate bound sender constrained access tokens.
>> 
>> 
>> The IETF datatracker status page for this draft is:
>> https://datatracker.ietf.org/doc/draft-ietf-oauth-mtls/ <https://datatracker.ietf.org/doc/draft-ietf-oauth-mtls/>
>> 
>> There are also htmlized versions available at:
>> https://tools.ietf.org/html/draft-ietf-oauth-mtls-03 <https://tools.ietf.org/html/draft-ietf-oauth-mtls-03>
>> https://datatracker.ietf.org/doc/html/draft-ietf-oauth-mtls-03 <https://datatracker.ietf.org/doc/html/draft-ietf-oauth-mtls-03>
>> 
>> A diff from the previous version is available at:
>> https://www.ietf.org/rfcdiff?url2=draft-ietf-oauth-mtls-03 <https://www.ietf.org/rfcdiff?url2=draft-ietf-oauth-mtls-03>
>> 
>> 
>> Please note that it may take a couple of minutes from the time of submission
>> until the htmlized version and diff are available at tools.ietf.org <http://tools.ietf.org/>.
>> 
>> Internet-Drafts are also available by anonymous FTP at:
>> ftp://ftp.ietf.org/internet-drafts/ <ftp://ftp.ietf.org/internet-drafts/>
>> 
>> _______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>> https://www.ietf.org/mailman/listinfo/oauth <https://www.ietf.org/mailman/listinfo/oauth>
>> 
>> 
>> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you._______________________________________________
>> OAuth mailing list
>> OAuth@ietf.org <mailto:OAuth@ietf.org>
>> https://www.ietf.org/mailman/listinfo/oauth <https://www.ietf.org/mailman/listinfo/oauth>
> 
> 
> 
> CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.