Re: [OAUTH-WG] OAuth 2.0 Token Introspection in RFC7662 : Refresh token?

Andrii Deinega <andrii.deinega@gmail.com> Sun, 01 March 2020 07:12 UTC

Return-Path: <andrii.deinega@gmail.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 8BE063A0918 for <oauth@ietfa.amsl.com>; Sat, 29 Feb 2020 23:12:46 -0800 (PST)
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, FREEMAIL_FROM=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=gmail.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 l6Tz25wCSLpK for <oauth@ietfa.amsl.com>; Sat, 29 Feb 2020 23:12:44 -0800 (PST)
Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 5A5A83A091E for <oauth@ietf.org>; Sat, 29 Feb 2020 23:12:44 -0800 (PST)
Received: by mail-wr1-x42a.google.com with SMTP id n7so552903wrt.11 for <oauth@ietf.org>; Sat, 29 Feb 2020 23:12:44 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=B0sfCalBUlmmDvtPf6FqmGKWgtIjl5JZf6aoP1BfFhQ=; b=geB058TsBYKRKifwQtTlhj1RtN7WvESj1c6ttW36CjVmJDPnnv9zmEIPnCd8RQICog 3XC93wlbz9bm54SQ1dwqWhGRkuCZNM1ud0uExkhLL8Htp9JG6E9LWuwlmoda8p/a4vQ9 q8TChDkVd+0jLx02ffearPCV4uWpn9ZXftvQu/8KrEOfJTAAhUJZJSpHOgPBxSv5HSLN GISHa9tN6sYgHcCGMbZNqKudpFaco7ektShGqbFryFRQfx3VG9Y8WoZb42cCNZcAMs72 5wM4+/10B9C4jqxDdIoiYRO+lZql4Oj5sOjK7R6LEex2BPNWNmtP4VFqthW6YvxznQJN 2Ilw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=B0sfCalBUlmmDvtPf6FqmGKWgtIjl5JZf6aoP1BfFhQ=; b=kW6Li1L4282/LJpujhkZO7VIKHvvRhP1tTxltDvyXLeVUyKRk7gD5fOwfuCPt4kOz6 ITb7MpnKw9ScueSrtuoO6g6+6qiyivW8H76d32cEnTYLyyhRUmdp1go0wI5H6H46wWz9 U1G/fjYh5xEscbcXs2GTkW55Ax9xCekq6WCzwGMcywAQQKq20qh1zm1gTt3iKAPXXRiX kpokagCbD9HWUCaPrArkkMoURxehZHMmDFftYmNzrvT7GpaxhRHuyjT+nYbFM9JXPAQL 4Yh2dpD14qPCCLHCvnkRfReEfnZWaiY2isP6SpRdf+gx7EQugROC5LuHnGmGfdV0JlYF T7gg==
X-Gm-Message-State: APjAAAV0YLoClmXCyC6KjlXR756yzmOaNrm5uJnX2IoVIb44GZnKitgs neUfYtJht1zIWTg4Qwt6jZdKndtG0bXy7GGYK3ZgdqFznoc=
X-Google-Smtp-Source: APXvYqzdIc7Mmdlwx2H3mSEHPqGNH5ZzOSCwWZjt2y8RU8nMhuHGfZMAf0XRTIwcqaDT10qXHZcESFqDDQkY0xaqh3I=
X-Received: by 2002:a5d:5301:: with SMTP id e1mr13949796wrv.44.1583046762777; Sat, 29 Feb 2020 23:12:42 -0800 (PST)
MIME-Version: 1.0
References: <CAErhd0OLTMKxXnT-_X6DyWYUxe==gTXdcHKLjOEDTmXCUZNxrg@mail.gmail.com>
In-Reply-To: <CAErhd0OLTMKxXnT-_X6DyWYUxe==gTXdcHKLjOEDTmXCUZNxrg@mail.gmail.com>
From: Andrii Deinega <andrii.deinega@gmail.com>
Date: Sat, 29 Feb 2020 23:12:31 -0800
Message-ID: <CALkShcuLTd02iu309dCZ8PtnzbKd5b9PsVS_DWUMGWXgFovwMg@mail.gmail.com>
To: Bill Jung <bjung=40pingidentity.com@dmarc.ietf.org>
Cc: oauth@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/ehGvUgSkaya2bo2S9CvklUwWAMs>
Subject: Re: [OAUTH-WG] OAuth 2.0 Token Introspection in RFC7662 : Refresh token?
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: Sun, 01 Mar 2020 07:12:47 -0000

Hello Bill,

I'm just thinking out loud about possible scenarios for a protected
resource here... It may decide to revoke a refresh token if a client
application tried to use it instead of an access token when the
protected resource is paranoid about security. In order to do that an
introspection response should include a non-standard parameter which
indicates that the requested token is refresh_token.

A user of the introspection endpoint should rely only on a value of
the active parameter (which is a boolean indicator) of the endpoint
response. This applies to both types of tokens. Note, the expiration
date, as well as other parameters, are defined as optional in the
specification. Both token types can be revoked before the expiration
date comes even if this parameter is presented as part of the
response. In my opinion, there are a number of reasons why this check
(for a refresh token) can be useful on the client application side.

--
Regards,
Andrii


On Fri, Feb 28, 2020 at 1:59 AM Bill Jung
<bjung=40pingidentity.com@dmarc.ietf.org> wrote:
>
> Hello, hopefully I am using the right email address.
>
> Simply put, can this spec be enhanced to clarify "Who can use the introspection endpoint for a refresh token? A resource provider or a client app or both?"
>
> RFC7662 clearly mentions that the user of introspection endpoint is a 'protected resource' and that makes sense for an access token. If we allow this to client apps, it'll give unnecessary token information to them.
> However, the spec also mentions that refresh tokens can also be used against the endpoint.
> In case of refresh tokens, user of the endpoint should be a client app because refresh tokens are used by clients to get another access token. (Cannot imagine how/why a resource server would introspect a refresh token)
>
> Is it correct to assume that the endpoint should be allowed to client apps if they want to examine refresh token's expiry time? Then the RFC should clearly mention it.
>
> Thanks in advance.
>
> <Details from the spec>
> In https://tools.ietf.org/html/rfc7662
> In '1.  Introduction' section says,
> "This specification defines a protocol that allows authorized
> protected resources to query the authorization server to determine
> the set of metadata for a given token that was presented to them by
> an OAuth 2.0 client."
> Above makes clear that user of the endpoint is a "protected resource".
>
> And under 'token' in '2.1.  Introspection Request' section says,
> "For refresh tokens,
> this is the "refresh_token" value returned from the token endpoint
> as defined in OAuth 2.0 [RFC6749], Section 5.1."
> So looks like a refresh token is allowed for this endpoint.
>
>
> Bill Jung
> Manager, Response Engineering
> bjung@pingidentity.com
> w: +1 604.697.7037
> Connect with us:
>
> 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
> https://www.ietf.org/mailman/listinfo/oauth