Re: [OAUTH-WG] Benjamin Kaduk's Discuss on draft-ietf-oauth-jwt-introspection-response-08: (with DISCUSS and COMMENT)

Torsten Lodderstedt <> Fri, 28 February 2020 14:44 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 041A83A195F for <>; Fri, 28 Feb 2020 06:44:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Status: No, score=-2.099 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id qV-asGCt8O5Y for <>; Fri, 28 Feb 2020 06:44:10 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4864:20::32b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B506D3A1904 for <>; Fri, 28 Feb 2020 06:44:09 -0800 (PST)
Received: by with SMTP id m10so9512950wmc.0 for <>; Fri, 28 Feb 2020 06:44:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=wuESfpBQ/o97HkizzwAqptio6FzYmLmZud5v6bqdn14=; b=xoz0wkE4FIDVQUF1ZxQUKuJ7RtFPonFJwr6InDYPs9RmSLY40LlkgfrXt0F3cKZw+M Tgnh1S/YUfzJU39szaEqC+8woZktbrokcLjNM9kCLdCLqV5hWE4ySuznOGguWbB3/K++ VZMvJYwVjggx3zv33SoTZY6ovMOTUVkIJObRD+/JSr0zmWd7zf6GqpI8xtuJ+VxgY05W xtc2CEKh5j6m8LBAkVrisc6zLiBX+LifrRDmjnaTNQIBBpscCzDGFswg+U+gF2XYBg/L HuyJLeYk65yuD9D1gOCY4uwFXms7MozrJUKOVhrxmONSGqTYUuCMiTh5WpL1Xduz1cJ8 8R2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=wuESfpBQ/o97HkizzwAqptio6FzYmLmZud5v6bqdn14=; b=oBd2Hi/M+2K5HBRweSt2c4+ZtxrXzFc9768zN3mBZs5ydu6mRMc5myWEDmETa/w8cD LmWseoNVlUymnbdJn8jbhNn1soj6lTTnu4ONN2xU/V/Znle/mqo6ujWB2uaK03I+lupX wujPjj+iF3ogvR1mrc3Zo7Ni46KDN+orDFPVLYPh9eIr7M/p6CqzAxNR1DGMew2zae0P xk5iOCQXOXdbazCf4Jdy4K4ozf6LSK9DZGO2CqhO0Au7UPfGxU899c0FgZzMTulMK1rG CM1C2VFQUak2Itm6t+CoWi5h/fqnWcJT7VENG9AwGzXqOK55qMc3cic4SFTmOis3f5PE ApbQ==
X-Gm-Message-State: APjAAAUJPRbkjUmJ2BeIBVD+4gEwLUlaUYC0KTbq9wMWnj7J4UF7XkPz D7IP3sY6Pgm5W9SliLEBkUoR4w==
X-Google-Smtp-Source: APXvYqyDzuy707O00WFRxkJnY6EZxsseW2Brsip/2f7Ts2ycVGUhaw/WDeDDCIO7V6b3avYCMlNraA==
X-Received: by 2002:a7b:cc88:: with SMTP id p8mr5056372wma.141.1582901047255; Fri, 28 Feb 2020 06:44:07 -0800 (PST)
Received: from ( [2003:eb:8f11:fd30:144d:505b:7f77:dad]) by with ESMTPSA id g7sm12691931wrq.21.2020. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2020 06:44:06 -0800 (PST)
From: Torsten Lodderstedt <>
Message-Id: <>
Content-Type: multipart/signed; boundary="Apple-Mail=_2BA6DE8D-4FCE-49A7-94E6-D822C356A39A"; protocol="application/pkcs7-signature"; micalg="sha-256"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.\))
Date: Fri, 28 Feb 2020 15:44:05 +0100
In-Reply-To: <>
Cc: The IESG <>,,, oauth <>, Rifaat Shekh-Yusef <>, Roman Danyliw <>
To: Benjamin Kaduk <>
References: <>
X-Mailer: Apple Mail (2.3608.
Archived-At: <>
Subject: Re: [OAUTH-WG] Benjamin Kaduk's Discuss on draft-ietf-oauth-jwt-introspection-response-08: (with DISCUSS and COMMENT)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 28 Feb 2020 14:44:21 -0000

Hi Ben, 

> On 25. Feb 2020, at 23:52, Benjamin Kaduk via Datatracker <> wrote:
> Benjamin Kaduk has entered the following ballot position for
> draft-ietf-oauth-jwt-introspection-response-08: Discuss
> When responding, please keep the subject line intact and reply to all
> email addresses included in the To and CC lines. (Feel free to cut this
> introductory paragraph, however.)
> Please refer to
> for more information about IESG DISCUSS and COMMENT positions.
> The document, along with other ballot positions, can be found here:

This post focuses on clarifying your DISCUSS comments in order to get the process moving again. 

> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> Thank you for the updates in the -08; they address the bulk of the
> substantive issues!  I have a few points remaining on the -08 text but I
> think there are more localized issues to resolve.
> Can IANA please confirm that the new allocations in the -08 have
> received appropriate Expert (e.g., media type) review?  I see some
> updates in the datatracker history relating to the -08 but nothing in
> the email archives.
> It looks like we need to register 'active' as a JWT claim?

That’s correct. Will add this. 

> I don't think the new semantics for "jti" in the introspection response
> are compatible with the RFC 7519 definition.  Specifically, we say that
> "jti" will be tied to the input access token, but 7519 says that "jti"
> has to change when the contents of the JWT change ("MUST be assigned in
> a manner that ensures that there is a negligible probability that the
> same value will be accidentally assigned to a different data object"),
> and we admit at least the possibility of "active" and "iat" changing.

I think the key word is “accidentally”. This spec causes the AS to purposefully issue JWTs with the same “jti” in order to allow replay detection with respect to the introspected access token. “iat” is changed in order to give the RS an indication and proof when the introspection response was minted by the AS.

“Active" does not really change, since the introspection response of an inactive token is empty except the “active” element. 

So I don’t see issues regarding RFC 7519.

> Section 5 says that:
>   If the access token is considered active, it MUST contain the claims
>   "iss" and "aud" in order to prevent misuse of the JWT as an ID or
>   access token (see Section 8.1).
> But I don't think the predicate is correct -- misuse is still possible
> by services that do not check the "active" claim's value.  Shouldn't the
> "iss"+"aud" requirements be unconditional?

Introspection responses for inactive tokens won’t contain any data except “active”:false. I don’t see how they could be misused and therefore think the text is ok.

Please let me know whether you agree with my statements. I would then quickly publish a new revision (including changes to address your comments).

best regards,

> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> [New comments on the added text in the diff from -07 to -08.]
> Section 3
>   To support encrypted token introspection response JWTs, the
>   authorization server MUST also be provided with the respective
>   resource server encryption keys and algorithms.
> IIRC, based on some list discussion this text was going to be tweaked to
> avoid implying that JWE is mandatory.  (Unfortunately, this is the
> thread that evolved into "client certs and TLS Terminating Reverse
> Proxies", so it's hard to be sure whether I saw any other followups.)
>   The AS MUST restrict the use of client credentials by a RS to the
>   calls it requires, e.g. the AS MAY restrict such a client to call the
>   token introspection endpoint only.  How the AS implements this
>   restriction is beyond the scope of this specification.
> This should probably be clarified a bit more, in the context of "client
> credentials tend to be used by privileged, fixed endpoints, and the
> default may just be to allow them all access to all endpoints".  Right
> now it's not clear what's being restricted (and who "it" is that
> requires calls)
> Section 5
>   This specification registers the "application/token-
>   introspection+jwt" media type, which is used as value of the "typ"
>   header parameter of the JWT to indicate that the payload is a token
>   introspection response.
> Do we also want to note that checking 'jti' is not mandatory and so this
> does not necessarily provide full protection?  (I guess Section 8.1
> covers this in more detail.)
>   The value of the "aud" claims MUST identify the resource server
>   receiving the token introspection response.
> We may want to dig into this a bit more: should there be any
> relationship between this "aud" value and the "client_id" that an RS
> might be using (as obtained from dynamic registration)?
> Does this value need to be different from the audience that is used in
> access tokens for which this RS is the audience?  (Should it be the
> same?)  My instincts lean towards "different" but I would like broader
> input.
>   exp     The "exp" claim indicates when the access token passed in the
>           introspection request will expire.
> On the face of it this seems divergent from RFC 7519's "the expiration
> time on or after which the JWT MUST NOT be accepted for processing",
> though upon further examination the distinction is not quite so large.
> That is, it's in effect saying that the introspection response should
> not be accepted for processing after the base token has expired, which
> usually makes sense.  There is a bit of a complication, though, in that
> the "active" claim implies that we might still have RSes that plan to
> use the introspection response after the "exp" date has passed, which
> sounds a lot like a DISCUSS-level internal inconsistency.
>   If possible, the AS MUST narrow down the "scope" value to the scopes
>   relevant to the particular RS.
> This sounds kind of like a "SHOULD"...
>   The example response header contains the following JSON document:
> I think this is the JOSE header in the HTTP response (body), not the
> (HTTP) response header.
> Section 8.1
>   As an alternative approach, such an attack can be prevented like any
>   other token substitution attack by restricting the audience of the
> I'd suggest avoiding describing these as "alternatives"; they seem more
> like complementary approaches as part of a defense-in-depth solution
> (especially since we are basically mandating both of them).
>   "aud" value set to the resource server's identifier.  Any recipient
>   of an JWT MUST check these values in order to detect substitution
>   attacks.
> This "MUST" might be out of place -- this is a requirement from RFC
> 7519, and not an attempt by this document to make new requirements on
> the behavior of all JWT consumers (if it was, that would be a DISCUSS
> point!).
>   Resource servers MUST additionally apply the countermeasures against
>   replay as described in [I-D.ietf-oauth-security-topics], section 3.2.
> In a similar vein, which set of resources servers is this normative
> "MUST" intended to be binding upon?
> Section 9
>   In any case, the AS MUST ensure that the scope of the legal basis is
>   enforced throughout the whole process.  The AS MUST retain the scope
>   of the legal basis with the access token, e.g. in the scope value,
>   and the AS MUST determine the data a resource server is allowed to
>   receive based on the resource server's identity and suitable token
>   data, e.g. the scope value.
> I suspect I'm just being dense, but could you walk me through how the
> access token "scope" value can encode the legal basis for data transfer?