[OAUTH-WG] Error Responses in JWT Profile for OAuth 2.0 Access Tokens

Aaron Parecki <aaron@parecki.com> Wed, 25 March 2020 19:08 UTC

Return-Path: <aaron@parecki.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 A7C3D3A0F50 for <oauth@ietfa.amsl.com>; Wed, 25 Mar 2020 12:08:56 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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=parecki-com.20150623.gappssmtp.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 K52tuvLacW66 for <oauth@ietfa.amsl.com>; Wed, 25 Mar 2020 12:08:53 -0700 (PDT)
Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (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 4066B3A0CB7 for <oauth@ietf.org>; Wed, 25 Mar 2020 12:07:28 -0700 (PDT)
Received: by mail-io1-xd2c.google.com with SMTP id q7so3731iot.10 for <oauth@ietf.org>; Wed, 25 Mar 2020 12:07:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parecki-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=pi5hJURHk0YwYGbcJOrLzDScqv97sxYWIfNFxUL3cdM=; b=pydidXUgnMyxgtcsiD5sDi6PIqV1SE/eJV0Y6Dz5m75L16MybQiCCt3K+BnAuB0nCk m28aGUxiNo2dZ7P9Gpdhc29BFEIUJxrKlMdsSsAzt4dKen7WQF6REQpq6yGqFycQFJt4 psIleMaJhVIptBXt7+5HDOYGq7obebxQTaNywVaKQ0MIJ/grGjjuEFj+fRkaoC9DxV89 uG+xFd5sKpoG5J2Uay2p2VSou5X72wm+4OMAawcEYVzyXdwdw2Yjb6R1YZWVrOQkG1wy O2S5WuYH0kxjguZmlw8DIpwjIi0391XeyIu/IwXOVHQ+6ytV2UHQBnuiECVWwFMiqGU1 UjMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pi5hJURHk0YwYGbcJOrLzDScqv97sxYWIfNFxUL3cdM=; b=n/Ry9nA7DJnvPxCe9wuoe6sG75Myn6QJXopB9QHGKIoCQ1JqdmyeTjooEGtzztSbUh T7XNVncXzWgMqZ+3WuwiGt4892nVnw9G2rlMSR+v3QWDxEOXey1IfFntx55VCaC12cg9 j3QYm9wjfS6fWRNv/caizsH4tWKuWgXerAS6l28PIVGA8FJeH/Tvu5NYNH+B409gdU0O Q3eCsJiAKUApSmOoWJdOWsfSgCOf4BkGzEzbHmwvDl7wBWN4ToEfVnrVQeFsrP2nyAo+ B2XjqAJQWQjixmJ4nAZfFMQ1HdKF/eFXyZ54XnWHVHk1hYiWiIPYbIBXcBaRtvVs5O9z Ys+Q==
X-Gm-Message-State: ANhLgQ3u7ytTcTS5v+991wF+Pqyon/15m2kx4h+fJzKojIctoY9/oNwq DVDAHK3N7q8riBkmvtnz0KWb9doxxUc=
X-Google-Smtp-Source: ADFU+vs71RHFJB3TzUsl+myuzvOh+jMcqN4WG9STjswwhtzdo4gYDPgMSOAUzkIW777TZ+P+oXBcyw==
X-Received: by 2002:a5d:9315:: with SMTP id l21mr1429519ion.122.1585163246988; Wed, 25 Mar 2020 12:07:26 -0700 (PDT)
Received: from mail-io1-f49.google.com (mail-io1-f49.google.com. [209.85.166.49]) by smtp.gmail.com with ESMTPSA id p70sm17314ilk.53.2020.03.25.12.07.26 for <oauth@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Mar 2020 12:07:26 -0700 (PDT)
Received: by mail-io1-f49.google.com with SMTP id a20so3395558ioo.13 for <oauth@ietf.org>; Wed, 25 Mar 2020 12:07:26 -0700 (PDT)
X-Received: by 2002:a02:e81:: with SMTP id 123mr4415340jae.0.1585163246093; Wed, 25 Mar 2020 12:07:26 -0700 (PDT)
MIME-Version: 1.0
From: Aaron Parecki <aaron@parecki.com>
Date: Wed, 25 Mar 2020 12:07:15 -0700
X-Gmail-Original-Message-ID: <CAGBSGjrzYcLaHY3n01rxpaYvDMiM1s9fdbpC6Wj67F7p7kex6g@mail.gmail.com>
Message-ID: <CAGBSGjrzYcLaHY3n01rxpaYvDMiM1s9fdbpC6Wj67F7p7kex6g@mail.gmail.com>
To: OAuth WG <oauth@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/x7u5GR-2yMlNqpoUhayz_ODQNDs>
Subject: [OAUTH-WG] Error Responses in JWT Profile for OAuth 2.0 Access Tokens
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, 25 Mar 2020 19:09:06 -0000

Section 4 talks about validating JWT Access Tokens

https://tools.ietf.org/html/draft-ietf-oauth-access-token-jwt-04#section-4

It has a list of things the RS MUST do when validating a request made
with a JWT access token. This section contains phrases like "...and
reject tokens..." and "MUST be rejected if...", without clear
instructions on *how* to reject this request. For these, I could infer
that the RFC6750 error code "invalid_token" is the correct response,
but these could benefit from being more explicit about that here.

Step 7 says:  "the resource server SHOULD check the auth_time value
and request re-authentication..." But there are no instructions on how
the RS should respond to indicate that the client should request
re-authentication. This sounds like a different response than
"invalid_token" to me, but in any case, regardless of what the correct
response is, Section 4 really needs a description of how to respond in
these error cases.

----
Aaron Parecki
aaronparecki.com
@aaronpk