[OAUTH-WG] DPoP - access token hash format

Dmitry Telegin <dmitryt@backbase.com> Wed, 27 October 2021 13:25 UTC

Return-Path: <dmitryt@backbase.com>
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 B248D3A0B6E for <oauth@ietfa.amsl.com>; Wed, 27 Oct 2021 06:25:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=backbase.com
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 EWczFYHlceHV for <oauth@ietfa.amsl.com>; Wed, 27 Oct 2021 06:25:13 -0700 (PDT)
Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0ABF63A0B69 for <oauth@ietf.org>; Wed, 27 Oct 2021 06:25:12 -0700 (PDT)
Received: by mail-lf1-x12a.google.com with SMTP id bi35so6144497lfb.9 for <oauth@ietf.org>; Wed, 27 Oct 2021 06:25:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=backbase.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=Hf70RRUunizINT9CBIoNO1V/izadOlPPwQBARxOd/So=; b=Rb8U5F0QyTzXw/Cfo6EYeLePE8Ylvn3B3P+LobkCnJkQe4ZFJHWkE1snEFsc0okpzM W7vV9QCaYixvwSGcQu9tc1WTtgkzoQosP+Gs1rUf/h97McpVB8x6hbzbu8xzkiCJWEs+ v2aNlN31iPj3pZQEI+vxdhI5IvBLNVJ6fWGVVNWMa16i6Bd1UQPOtN6EANu1NZ0wbZRL l2SCxrY9URT62JRmuW+rlKSjvvcu5zU6vUVRwRqu+OPinXzJnydimv8B+0xDXfDo8bI4 DotBVZ4PZfGWQ2QJnRidh7OF+8d1zGMxQ7g7PAvSi9vpAJHhygbHaANIwj0O6WNP6CSx pYQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Hf70RRUunizINT9CBIoNO1V/izadOlPPwQBARxOd/So=; b=tsudpw82NvXp/KT3cfUQY8JTpaVRqI0dRb73hffRve1B59WuBuw+Xj0MGbOkRuWiYP g8YXAtWAEdUZO5J8ktBx/Yl16h3XSLp0s19//OkaMvkwmYpAw77NF3EuYjPaXzKuwq+5 u1ros2NT+VAuRNmeFcFIKf9qh7k8VTnuXu10uO9WnDDN+vCCOQ+x34v5WKMn3twD8bkc 1WZiAGNsNbB/YF+Fl1BmI/yJYQCkHHLP4bQ+ClQQbKkurZY1JLvaAAnSceVUUEwnr9NG UxpTB266U4uDDgyGbXXUlhMweE1A9YbqMYWNWsotGqnQK6fV7pKRjhmXYmTryd0yqsTM y/7Q==
X-Gm-Message-State: AOAM530OkJT4kwSYK1vqktJfn75oEc7X/Ykt5+TccF9DsC/uA2t27AxG oR4TCTQnsOSi9s5PCUTpQZgaaNATQnIralyJW+FZ1HNWkV60KA==
X-Google-Smtp-Source: ABdhPJyBENYlnnptgMP0yXqydJbPOuHI39cK6s+NT+UXgJq1PqIGJhWg6cAn00dPCQn5napLUvqsEwtsI+IOW+OpQew=
X-Received: by 2002:a05:6512:3d0e:: with SMTP id d14mr2762140lfv.20.1635341109985; Wed, 27 Oct 2021 06:25:09 -0700 (PDT)
MIME-Version: 1.0
From: Dmitry Telegin <dmitryt@backbase.com>
Date: Wed, 27 Oct 2021 16:24:59 +0300
Message-ID: <CAOtx8DnriUGYX_Fv7b388bEzh-d0r10Msez+QpdT6csfS0nb7Q@mail.gmail.com>
To: oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000f298c005cf558511"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/g_Z4_UIf3MQs6Us-G1muL3pzJVk>
Subject: [OAUTH-WG] DPoP - access token hash format
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: Wed, 27 Oct 2021 13:25:18 -0000

As of -03, the "ath" DPoP proof claim has been introduced:

ath: hash of the access token (REQUIRED). The value MUST be the result of a
> base64url encoding (with no padding) the SHA-256 hash of the ASCII encoding
> of the associated access token's value.
>

OpenID Connect has a similar concept used to bind ID token to access token:

at_hash OPTIONAL. Access Token hash value. Its value is the base64url
> encoding of the left-most half of the hash of the octets of the ASCII
> representation of the access_token value, where the hash algorithm used
> is the hash algorithm used in the alg Header Parameter of the ID Token's
> JOSE Header. For instance, if the alg is RS256, hash the access_token
> value with SHA-256, then take the left-most 128 bits and base64url encode
> them. The at_hash value is a case sensitive string.
>
>
OIDC derives the hashing algorithm from the token header, while DPoP uses
SHA-256 unconditionally. OIDC uses the left-most half of the hash, while
DPoP uses the whole hash. Would it make sense to be aligned with OIDC on
this?

Regards,
Dmitry
Backbase