Re: [OAUTH-WG] JWT access tokens and the revocation endpoint

Nicolas Mora <nicolas@babelouest.org> Sat, 03 October 2020 17:18 UTC

Return-Path: <nicolas@babelouest.org>
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 A23273A0BA6 for <oauth@ietfa.amsl.com>; Sat, 3 Oct 2020 10:18:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.112
X-Spam-Level:
X-Spam-Status: No, score=-2.112 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.213, SPF_HELO_NONE=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 DPrvbBA1kzOA for <oauth@ietfa.amsl.com>; Sat, 3 Oct 2020 10:18:14 -0700 (PDT)
Received: from mail.babelouest.org (perceval.babelouest.org [5.135.181.15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E13C3A0B93 for <oauth@ietf.org>; Sat, 3 Oct 2020 10:18:13 -0700 (PDT)
Received: from [192.168.1.50] (bras-base-qubcpq0634w-grc-02-69-159-172-90.dsl.bell.ca [69.159.172.90]) by mail.babelouest.org (Postfix) with ESMTPSA id 3FDB32034C for <oauth@ietf.org>; Sat, 3 Oct 2020 13:18:10 -0400 (EDT)
To: oauth@ietf.org
References: <CALkShcsApoXc=4p_e5mbs9vQCDPHDLrdt-8bd5D_5XhLGYOOJA@mail.gmail.com>
From: Nicolas Mora <nicolas@babelouest.org>
Autocrypt: addr=nicolas@babelouest.org; keydata= mQINBFmJqr8BEADBhkCFzusIdcIn8V8+Maee1V+GhD/sNS/GuqDL5WwV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N+CGnDVGph/zBgCLx7v jAodyT+4A/pHWVzvABEBAAGJAh8EGAEIAAkFAlmJqr8CGwwACgkQ/oITlEC9IrljgA/9FvQX aWYHq4O7roGEJhftnaFye3j8tkrWFhvp9E7eadbxcKWe1g4ZsqgAYBANLc+sjHYQmRSvkWJY ymed5A9zB824vtWVKqVwV/A36SSNNywiOvDcoyAY1uONDzeMJTOJ3JDh6DXwAoprFvQ2sDxQ 1FO+0rSjNJOHGfMtnbSe7+ZT00mFwxXHZDMgRSIkrlqDe5eWL+vnYguV7lar0s/GM8SyXSga Wo0wZwJkuvbS0debRcutJUR6dYovyGNoS50811wowsFZWynRUhL92LV+xCDCG4n0L5/CG2po awvkOwoNiGtSjWIqLhq9fR/wh3N6dBIoWygl/636Qcibn9l1nyMw3TzVHOci/PynwHFY7NuD 4FkIKQ4iwLHKmZT1aAwwneFeBFrY4iFBlDcCcFz9Tzje5T/sdVEyF3h5/OM3D+/WOgN3goQk QedL+NP+z2PETKKQ61Bb2i0kEuBmmgQb71EUIo+7hNXxEH2RkIc4zmXBLCrsIjDBWW0XWkxG iSbpfuXJyVniIIS19kAzpm6839+HUZsgnF+36EhaoM+Ib1s+2hdkwCtSLXMJpKYV3Ntr/Xn4 /4HcTJpp1iJKNWf1YGF7qzLFnxZijR6G8kR7jYEsZwZFxCX6XYm3nsPcU8NhgkRSSXvawaGE puuDhgFV8Kha5yEPTBe9H0BFe0srkfg=
Message-ID: <805143ce-5b15-4944-eb12-80d4d3b365d3@babelouest.org>
Date: Sat, 03 Oct 2020 13:18:08 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0
MIME-Version: 1.0
In-Reply-To: <CALkShcsApoXc=4p_e5mbs9vQCDPHDLrdt-8bd5D_5XhLGYOOJA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/vYzf6b-6sm8yxxv355b6oz9IAcM>
Subject: Re: [OAUTH-WG] JWT access tokens and the revocation endpoint
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: Sat, 03 Oct 2020 17:18:17 -0000

My 2 cents,

Le 20-10-02 à 18 h 19, Andrii Deinega a écrit :
> 
> Here is what I would like to get a better understanding of:
> 1. How should a response of the introspection endpoint look like if the
> RS makes an attempt to introspect a JWT access token?

AFAIK, the RFC doesn't specify if the introspection should be different
between an opaque AT and a JWT AT, so my guess is the introspection
result shouldn't be different either.

> 2. How should a response of the OpenID Connect userinfo endpoint look
> like for a JWT access token?
>There should be no difference in userinfo response between an opaque AT
and a JWT AT.

The userinfo and the introspection endpoints have different goals, and I
don't expect the userinfo to return data based on the AT provided
(except to identify the sub it relates to). Instead, the userinfo must
return user claims based on the AS configuration and the claims requested.

> I assume that it’s expected to have no difference compared to a regular
> bearer token (given that a particular implementation of the AS provides
> these endpoints). Does it sound right?
> 
That's my opinion too, although I don't recall any specification talking
about it, so I guess it's a matter of implementation.

> If so, what are we going to get if the RS or the client revokes a valid
> JWT access token using the revocation endpoint (RFC 7009)?
> 
> Do you think there is a need to add more detailed information about
> these scenarios in the document? This way, we could refer back to these
> sections in the documentation in case any disputes around
> security-related topics come up.
> 
If a client revokes a valid AT, after that, the AS introspection should
answer an error response: https://tools.ietf.org/html/rfc7662#section-2.3

The problem here might be: how should the RS know if a JWT token has
been revoked on the AS?
I don't think there is a specified solution for this because it all
depends on the implementation.

The RS might use the introspection endpoint to check if a valid JWT AT
has been revoked or not.
- If the introspection endpoint is checked on some JWT AT use, it might
lead to an attack
- If the introspection endpoint is checked on every JWT AT use, then the
advantage of using a JWT AT is close to 0

There might be some kind of pushed events between the AS and the RS when
a JWT AT is revoked, to allow the RS not to introspect a JWT AT at all.
Like this, the RS knows if a JWT AT has been revoked or not.

If the client uses a proof of possession process, the revocation
endpoint may be useless, because if the client doesn't want an AT to be
used after a certain point, it just has not to use it anymore.

/Nicolas