Re: [OAUTH-WG] JWT Response for OAuth Token Introspection and nonce

Andrii Deinega <andrii.deinega@gmail.com> Tue, 09 February 2021 22:04 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 BB18A3A0DAE; Tue, 9 Feb 2021 14:04:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, 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 vcGntX4Zod_2; Tue, 9 Feb 2021 14:04:06 -0800 (PST)
Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 244463A0DAC; Tue, 9 Feb 2021 14:04:05 -0800 (PST)
Received: by mail-ej1-x633.google.com with SMTP id i8so80465ejc.7; Tue, 09 Feb 2021 14:04:05 -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=jmi9DwYJwMrbWQ5xyrPCkTWBnQqVxoYKX23x4JrPX/4=; b=dG7DmCMaUL9mg3Xx20TZZEvdosv6zl1tmafiu4s8NuMRzB6uIJwX9GkxVPa0MgfeVV jBrmEAdyODnoZ5jQd/eAPZqSyA4naP+D4YvGbyBm7FIp+dOHYWipiRmk0L1aODDY+CSP AGzgcwE3/Puuf+/zkQM5hvhlfQCVahLyy6hERlPY6iQbJOQi++XBZ9zwwz7ya6eNIAgf BKYmMralh4aYaXC9//kGhkzrinaF4adIOBnAmfWz3tLD9Ie8F8bQ4Cj1mbWyP5wYKuVC ohnJAw+F8L5czDkaCS71/00SDu531hz5kRzbl+0wYhl5+myKQyZfwXSHsZ0KkW5iP63K tUiA==
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=jmi9DwYJwMrbWQ5xyrPCkTWBnQqVxoYKX23x4JrPX/4=; b=IGtpjRqtvlAHRrTU24ngwLGbfXNpYihx9OXZuDRa249BFxqYoVcI/5wXVyE7C4ytpM k+D3jjShV58GyGnhb1ZBIqCqswK+e+eJtihNTuvIcnZnxCo5MTm6l1VBq1qKGMwOnod9 hoLb3WSOYlX9zZ8gKIjSaX1wr0BC3X0YTRTQ/5o5bYNutSoSCXnXBebWwVdmv8akhqf3 nuNq+Wp7P5dimno6IyaWo8u10m8GW6n+9iasMTvlwZ0k5Pu4vRrkNl18lo+Pi3/MUtPZ vpLbkcd082X6kxfI+RHuoeo9Rkm9Kuf7zh1bSOhFNLEERivyYfVV7KRsb4ELtLIKaTak 6GFA==
X-Gm-Message-State: AOAM533IF+LKK51RsyNC/5gxJaEFMqKEe/Xfz9RMnctJD72XEIt2n+ya ufuUl/2w8YNEAtnTE5PzOXLjVrwxcNl+pxxH1Kc=
X-Google-Smtp-Source: ABdhPJwlzXuoNhCNxgRM9faM7A4Qnwv/5ikD+SkMxm2VgNCl4U2t8eQ6Ti2McKn5Hr4GvTIN93NzOVqwAVQOdeHSVE4=
X-Received: by 2002:a17:906:259a:: with SMTP id m26mr24986531ejb.399.1612908244237; Tue, 09 Feb 2021 14:04:04 -0800 (PST)
MIME-Version: 1.0
References: <CALkShcsnubMRK4_F7rcUF-g1_=Sukux9W=dsjQMP3CpwUXvBww@mail.gmail.com> <ABEDB249-8AE5-4966-9D9D-297659F86AD1@forgerock.com>
In-Reply-To: <ABEDB249-8AE5-4966-9D9D-297659F86AD1@forgerock.com>
From: Andrii Deinega <andrii.deinega@gmail.com>
Date: Tue, 09 Feb 2021 14:03:53 -0800
Message-ID: <CALkShcsVGaqfmbimpaVdJS-r1yDpJhunjMi2UGV6+5tt4ZG_rA@mail.gmail.com>
To: Neil Madden <neil.madden@forgerock.com>
Cc: oauth <oauth@ietf.org>, draft-ietf-oauth-jwt-introspection-response@ietf.org
Content-Type: multipart/alternative; boundary="000000000000f4002c05baee7606"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/UNqHQk3AQ8YzkHMPywkJlJKPnkU>
Subject: Re: [OAUTH-WG] JWT Response for OAuth Token Introspection and nonce
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: Tue, 09 Feb 2021 22:04:11 -0000

I still don't see how your #1 and #3 points mitigate the replay attack when
an attacker somehow eavesdrops a successful response from an AS (yes, it's
signed by a public key) and then starts to replay it for other requests
from the same client.

The main problem here is that the client doesn't have a way to correlate
the introspection response with the initial introspection request.

Regarding #2, it's true that there are many proxies that do this and that.
In practice, you don't always have control over the infrastructure where
you may run your AS as I was saying before.

Regards,
Andrii


On Tue, Feb 9, 2021 at 1:30 PM Neil Madden <neil.madden@forgerock.com>
wrote:

> Three points:
>
> 1. In many cases the JWT will be verified using a public key fetched over
> the same TLS channel.
>
> 2. Many proxies can now also produce and consume JWTs for downstream
> services, so end-to-end JWT is no more guaranteed than end-to-end TLS.
>
> 3. The JWT response already contains an iat claim which is sufficient to
> judge freshness.
>
> It would be better to concentrate on ensuring end-to-end TLS rather than
> trying to reinvent the same mechanisms in JWT form on top.
>
> — Neil
>
> On 9 Feb 2021, at 20:38, Andrii Deinega <andrii.deinega@gmail.com> wrote:
>
> 
> How can you guarantee that there are always direct TLS connections between
> a client and an AS hosted say some cloud provider where you have a little
> control on their infrastructure?
>
> Even without all those cloud providers, how can you guarantee the same
> when there are a bunch of different (software and hardware) components that
> legitimately perform SSL offloading / DPI in front of an AS...  or the
> client may just use the proxy server?
>
> Regards,
> Andrii
>
> On Tue, Feb 9, 2021 at 12:43 AM Neil Madden <neil.madden@forgerock.com>
> wrote:
>
>> On 9 Feb 2021, at 06:55, Andrii Deinega <andrii.deinega@gmail.com> wrote:
>>
>>
>> 
>> Hi WG,
>>
>> I wonder if there are any particular reasons to not make nonce a
>> mandatory parameter for the current JWT Response for OAuth Token
>> Introspection draft. Or, at least, force an AS to include the nonce claim
>> in a JWT response when nonce is presented in the introspection request
>> similar to what happens with the similar scenario in the OpenID Connect ID
>> Token?
>>
>>
>> https://openid.net/specs/openid-connect-core-1_0.html#:~:text=If%20present%20in%20the%20Authentication%20Request%2C,value%20sent%20in%20the%20Authentication%20Request.
>>
>> This will allow to mitigate replay attacks because clients can correlate
>> the response with the initial request
>>
>>
>> ID tokens involve flows using an insecure channel (the browser). This is
>> not the case for introspection requests which happen over a direct TLS
>> connection and so are already protected against replay attacks.
>>
>> — Neil
>>
>> ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>
>
>
> ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>