[OAUTH-WG] Access Token Hash for DPoP

Justin Richer <jricher@mit.edu> Tue, 16 March 2021 14:08 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 1A08C3A0EBD for <oauth@ietfa.amsl.com>; Tue, 16 Mar 2021 07:08:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.919
X-Spam-Level:
X-Spam-Status: No, score=-1.919 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-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 QJw9uwu2mOSF for <oauth@ietfa.amsl.com>; Tue, 16 Mar 2021 07:08:12 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 C27303A0EBF for <oauth@ietf.org>; Tue, 16 Mar 2021 07:08:12 -0700 (PDT)
Received: from [192.168.1.22] (static-71-174-62-56.bstnma.fios.verizon.net [71.174.62.56]) (authenticated bits=0) (User authenticated as jricher@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 12GE8Aee032529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <oauth@ietf.org>; Tue, 16 Mar 2021 10:08:11 -0400
From: Justin Richer <jricher@mit.edu>
Content-Type: multipart/alternative; boundary="Apple-Mail=_6AC9E94B-21F2-4C6D-B933-040F8004338C"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Message-Id: <A46B824E-7BEE-4C5D-BF53-13519330F1FC@mit.edu>
Date: Tue, 16 Mar 2021 10:08:10 -0400
To: oauth <oauth@ietf.org>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/C2G9cUetGSj6WnNcRdZE8wLR19I>
Subject: [OAUTH-WG] Access Token Hash for DPoP
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: Tue, 16 Mar 2021 14:08:15 -0000

As discussed on the call yesterday, I have put together a modest proposal for adding access token hash to the DPoP draft.

https://github.com/danielfett/draft-dpop/pull/62 <https://github.com/danielfett/draft-dpop/pull/62>

Instead of using the existing OpenID Connect “at_hash” claim and definition, I opted for a new claim “ath” with a fixed hash method. While we could re-use the existing claim definition, I think it makes more sense to have the function be simpler. I made this decision based on years of feedback from developers on dealing with the OpenID definition: most of the confusion and errors come from deciding which hash algorithm to use and from the “left-bytes” truncation, both of which can fail in unsafe ways under the right error conditions. 

If SHA256 is obsoleted or another method is more appropriate given the space, then a new claim can be invented with defined semantics tied to a new hash method, obsoleting the “ath” method for “ath_but_better_this_time”. 

If people want to use the “at_hash” claim, this definition doesn’t actually get in the way of using that alongside “ath". We might want to change the normative requirement to something like “MUST include ‘ath’, ‘at_hash’, or another token hash method” instead, but I didn’t go that far here.

And finally, as I said on the call, I think this is a good idea and one I’ve implemented support for in a test project, but not something I consider make-or-break for publication of DPoP. 

 — Justin