Re: [OAUTH-WG] Conflicting definitions in JWT Response for OAuth Token Introspection

Filip Skokan <panva.ip@gmail.com> Wed, 04 March 2020 18:18 UTC

Return-Path: <panva.ip@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 B26093A1408 for <oauth@ietfa.amsl.com>; Wed, 4 Mar 2020 10:18:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.086
X-Spam-Level:
X-Spam-Status: No, score=-2.086 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, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01, 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 9PLjJQbYB-DJ for <oauth@ietfa.amsl.com>; Wed, 4 Mar 2020 10:18:19 -0800 (PST)
Received: from mail-yw1-xc30.google.com (mail-yw1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) (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 BCCC03A1406 for <oauth@ietf.org>; Wed, 4 Mar 2020 10:18:18 -0800 (PST)
Received: by mail-yw1-xc30.google.com with SMTP id y62so2872005ywd.13 for <oauth@ietf.org>; Wed, 04 Mar 2020 10:18:18 -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; bh=519V70MMHcXz/Ku92LJ1K6JnVZHny3UTDs1+m7uAJnE=; b=ct61LHB8B/ihq7ENQQspC59fXckgQYzZir/Sl9BKLR2kA/j+kETcGm40B3oieXx/4X mBx0tkhVYrxa0jzmYch0MX+A5rlKygDwg3CHE356v7/PGNi12ozCfz+gYD/2HXbvdrvU 5AH8aqZpYLZIXxIXPTAz9StbmEDzewUaKTHyt9WLNZJVNbBy+yljYMbqYDOv5Xmxd7n+ 3BcykAJIgDuOdBOHvB7JJ0BBXjHnEeyKrOxTcfNcQeYEJJ5EubZnHmSfdpL0l8sUYllZ rOs0uzDG803Bk/RZ8rbFxF3QtcuKvj975G3zAADWzqREp6XFansb6ap7wg18MbW0tTAy cQdQ==
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; bh=519V70MMHcXz/Ku92LJ1K6JnVZHny3UTDs1+m7uAJnE=; b=FlgfQl9VEWp3c5tqKUp2gZ5thHGYTIAqXe7pqpHeNUaGGIo2oZ0P9jajSbAx2a1KBG GPtKzrpJV5W49+0ReuZo/Oix/9wRM/j0+78y8KiCx9Ogi2jjEXolENwhgRl7dKD1soiZ no4H+wgUfD698B+qYE3PxlIj7ay1Z3LLvJ5R+U+w4OlHAyTcVZJ3QAuHBkUtzrRRw9d8 HbggYsIHiEme4KY+T3w4iPj8ShUhz4CkBfEREPbSp7rZ2HS2F1a6psca/wrPOhtdwrse g6f6WeJk9gUc0yShor20cDGFEfj/8NPYU2ZA8MJ5lGugTo4B1tTC8/NUgNLcuvyUS74t YuBg==
X-Gm-Message-State: ANhLgQ1U6LLWExD5UybZa5kHMj9esJy9I+U1qc6FsYr46SGuCu560mkj 5gMCkywKDXNq8KPfeYXtTXQ8HUBVrB+rKDgeMw==
X-Google-Smtp-Source: ADFU+vtr0ub3Texef5yQdJ7z33CsqvUnoYM2j+HTFi8YV/VguRt/W3JXTpVwzW3yekYRT/DgEJwNN0xzPJr2SCBGfiA=
X-Received: by 2002:a81:9e02:: with SMTP id m2mr3872213ywj.99.1583345897317; Wed, 04 Mar 2020 10:18:17 -0800 (PST)
MIME-Version: 1.0
References: <CAHdPCmPCMJqH-aOC2SjFhGd9sjd01xw=VEj5y1jA5nRNRhu4EA@mail.gmail.com> <CAHdPCmMP5=wQSq_YW3+honto==s_bZpCas+=bxJqfqJh24gTzQ@mail.gmail.com> <CALAqi_-Nj6rfFJThH3H-r1oivKCFFW3Wwhhfbephq4f9OMTTQw@mail.gmail.com> <B9BFA279-0C95-410E-8DAC-72DD8B080B79@mit.edu> <CC9A4A69-A918-45E7-AA2A-2E0964A75F65@lodderstedt.net> <CALAqi_9eC=5Lh636bzUjxnQ3ixENUeskp88p2j80AfJ26V7HfA@mail.gmail.com>
In-Reply-To: <CALAqi_9eC=5Lh636bzUjxnQ3ixENUeskp88p2j80AfJ26V7HfA@mail.gmail.com>
From: Filip Skokan <panva.ip@gmail.com>
Date: Wed, 04 Mar 2020 19:17:40 +0100
Message-ID: <CALAqi__3RXxMyKp7dPjQK-eD+E4duY1y2SVWqC-Xnr3twh8HeA@mail.gmail.com>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Cc: oauth <oauth@ietf.org>, Justin Richer <jricher@mit.edu>, Benjamin Kaduk <kaduk@mit.edu>, Takahiko Kawasaki <taka@authlete.com>, Vladimir Dzhuvinov <vladimir@connect2id.com>
Content-Type: multipart/alternative; boundary="000000000000c4286f05a00b71d6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/F2gwSKxHRn1YhtVIyl2VZAiJrJA>
Subject: Re: [OAUTH-WG] Conflicting definitions in JWT Response for OAuth Token Introspection
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, 04 Mar 2020 18:18:25 -0000

Sorry, i meant - is top level jti required as well?

S pozdravem,
*Filip Skokan*


On Wed, 4 Mar 2020 at 19:15, Filip Skokan <panva.ip@gmail.com> wrote:

> Torsten, let's make sure we call out the required top level JWT claims -
> iss, iat, aud, what else? is top level iat required as well?
>
> S pozdravem,
> *Filip Skokan*
>
>
> On Wed, 4 Mar 2020 at 17:19, Torsten Lodderstedt <torsten@lodderstedt.net>
> wrote:
>
>> Hi all,
>>
>> based on the recent feedback, Vladimir and I propose the following
>> changes to draft-ietf-oauth-jwt-introspection-response:
>>
>> - the token data are encapsulated in a container element “_token_data”
>> - beyond this, the top-level container only contains meta data pertinent
>> to the JWT representing the signed (encrypted) introspection response
>> - we need to add text to the spec to point out that replay detection must
>> be based on the jti in the “_token_data” container not the top level claim
>>
>> That’s example of how it would look like:
>>
>> {
>>    "iss":"https://as.example-bank.com",
>>    "aud":"6a256bca-1e0b-4b0c-84fe-c9f78e0cb4a3",
>>    "iat":1532452100,
>>    "_token_data":{
>>       "active":true,
>>       "iss":"https://as.example-bank.com",
>>       "aud":"6a256bca-1e0b-4b0c-84fe-c9f78e0cb4a3",
>>       "jti":"53304e8a-a81e-4bc7-95e3-3b298d283512",
>>       "iat":1532452084,
>>       "exp":1532453100,
>>       "client_id":"3630BF72-E979-477A-A8FF-8A338F07C852",
>>       "cnf":{
>>          "x5t#S256":"YzEcNvUV3QXA5Bi9IB66b8psyqZBQgW4500ZGvNRdis"
>>       },
>>       "sub":"123456789087632345678"
>>    }
>> }
>>
>> The response for inactive tokens would look like this:
>>
>> {
>>    "iss":"https://as.example-bank.com",
>>    "aud":"6a256bca-1e0b-4b0c-84fe-c9f78e0cb4a3",
>>    "iat":1532452100,
>>    "_token_data":{
>>       "active":false
>>    }
>> }
>>
>> What do you think?
>>
>> best regards,
>> Torsten.
>>
>> > On 4. Mar 2020, at 16:37, Justin Richer <jricher@mit.edu> wrote:
>> >
>> > +1, this encapsulation is much cleaner.
>> >
>> >> On Mar 2, 2020, at 2:25 AM, Filip Skokan <panva.ip@gmail.com> wrote:
>> >>
>> >> Perhaps we should consider leaving the root level JWT claims as-is per
>> JWT and push the introspection response unmodified as if it was regular
>> json response to a JWT claim called "introspection". Since regular
>> introspection uses the same claim names as JWT this would get around all
>> the conflicts.
>> >>
>> >> Last time i brought it up the authors didn't want to consider it
>> because of existing implementations.
>> >>
>> >> S pozdravem,
>> >> Filip Skokan
>> >>
>> >>
>> >> On Mon, 2 Mar 2020 at 07:52, Takahiko Kawasaki <taka@authlete.com>
>> wrote:
>> >> Thank you, Tatsuo Kudo, for showing me that Justin Richer expressed
>> the same concerns in this mailing list about 6 months ago (on Sep. 4,
>> 2019). RFC 8707 didn't exist then, though.
>> >>
>> >> Re: [OAUTH-WG] Question regarding
>> draft-ietf-oauth-jwt-introspection-response-05
>> >>
>> https://mailarchive.ietf.org/arch/msg/oauth/LmMAxd35gW5Yox0j4MmU2rI_eUA/
>> >>
>> >> A JWT puts both (a) information about itself and (b) other data in its
>> payload part. When the "other data" have the same claim names as are used
>> to express information about the JWT itself, conflicts happen.
>> >>
>> >> Also, it should be noted that Ben pointed out in other thread that the
>> requirement for "jti" in draft-ietf-oauth-jwt-introspection-response, which
>> says "jti" is a unique identifier for the access token that MUST be stable
>> for all introspection calls, contradicts the definition of "jti", which
>> should be unique for each JWT.
>> >>
>> >> Re: [OAUTH-WG] Benjamin Kaduk's Discuss on
>> draft-ietf-oauth-jwt-introspection-response-08: (with DISCUSS and COMMENT)
>> >>
>> https://mailarchive.ietf.org/arch/msg/oauth/S4q7cF0TMZMzFO61I5M4QXCUWCM/
>> >>
>> >> draft-ietf-oauth-jwt-introspection-response needs to be modified to
>> solve the conflicts.
>> >>
>> >> Taka
>> >>
>> >> On Sun, Mar 1, 2020 at 4:10 PM Takahiko Kawasaki <taka@authlete..com>
>> wrote:
>> >> Hello,
>> >>
>> >> I'm wondering if the following conflicts in "JWT Response for OAuth
>> Token Introspection" (draft 8) have already been pointed out.
>> >>
>> >> RFC 8707 (Resource Indicators for OAuth 2.0) requires that 'aud' in an
>> introspection response hold the values of the 'resource' request
>> parameters, whereas "JWT Response for OAuth Token Introspection" says that
>> 'aud' MUST identify the resource server receiving the token introspection
>> response. The definitions conflict.
>> >>
>> >> RFC 7662 (OAuth 2.0 Token Introspection) requires that 'iat' in an
>> introspection response indicate when the access/refresh token was issued,
>> whereas "JWT Response for OAuth Token Introspection" says that 'iat'
>> indicates when the introspection response in JWT format was issued. The
>> definitions conflict.
>> >>
>> >> Best Regards,
>> >> Takahiko Kawasaki
>> >> Authlete, Inc.
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> OAuth mailing list
>> >> OAuth@ietf.org
>> >> https://www.ietf.org/mailman/listinfo/oauth
>> >> _______________________________________________
>> >> OAuth mailing list
>> >> OAuth@ietf.org
>> >> https://www.ietf.org/mailman/listinfo/oauth
>> >
>> > _______________________________________________
>> > OAuth mailing list
>> > OAuth@ietf.org
>> > https://www.ietf.org/mailman/listinfo/oauth
>>
>>