Re: [OAUTH-WG] Token Mediating and session Information Backend For Frontend (TMI BFF)

Warren Parad <wparad@rhosys.ch> Mon, 15 February 2021 10:54 UTC

Return-Path: <wparad@rhosys.ch>
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 475913A113B for <oauth@ietfa.amsl.com>; Mon, 15 Feb 2021 02:54:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.188
X-Spam-Level:
X-Spam-Status: No, score=-0.188 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=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=rhosys.ch
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 DXvZc_y5SNwG for <oauth@ietfa.amsl.com>; Mon, 15 Feb 2021 02:54:29 -0800 (PST)
Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 7B52E3A113A for <oauth@ietf.org>; Mon, 15 Feb 2021 02:54:25 -0800 (PST)
Received: by mail-io1-xd2f.google.com with SMTP id n201so6268381iod.12 for <oauth@ietf.org>; Mon, 15 Feb 2021 02:54:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rhosys.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7+X1XX8gVLa91RHry9CTWykogw2qEIJea5e3CLXmA/I=; b=SzIULa2mbsfGp/xjg+HLOirR+PUKt8p74aLTMO9Y8fCuDhrhJkDBSrnfNstN5Q9Kr5 bnsK1JdtEuQNu+OT4fyGhRvGnq9pLxkAjjFhW/+13jUCJWv5mhfu5PqPve83no8ZQiy2 i/guZ+GATwZG9G43EbslTSNL+T0mDVqmrASZTKSRPtfxVUIQJi4nOc+nEHsOStXaqMQm nIO591p4eYvZlwlnq92UGiGSdsgLp8mj8RdE9yfSDWp1dmdT3/cHYfunE/rOuMKL21Mq m+CvNsdKpszjbcQw59NpVEHPCG1zghfEbuhqhY/MhlaBcdomYLGAXRU7AKnMQnL2W88h co6w==
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=7+X1XX8gVLa91RHry9CTWykogw2qEIJea5e3CLXmA/I=; b=OEXsbONokFrCCfYp9XMD6VvkQWNofwEdeYBuo0YN0ZiYzTt65eY0t1L6S3vqht6j2p Ehr9Vj9qJFXloS0MiqcZZ54+gq6U87ahzNjtNNA9Yn8FdzLTSe8+ieJhss1ZXfqnVebi 1aM3Hh7m47IxcO145aM4CguZ160vETr7mB6Qkd+UcVMzlsi8G8kKVC385yByctQzWtTu ry+HmrgvlqZJw1s7knglXnDQyDfdyD2tdvRi16/QgxSI7hFXkxj6QYOAoc8ogSw8qPto CPieaOv3eaVGALfY3gpGEKWlXqqUNxd+isUCUhbnu23Rlv668iUvt7oqlsxZ/GfN6DuI iYOQ==
X-Gm-Message-State: AOAM531s5ZntEnevIZ1lY7xByJE+p+HFWUUJ9OrJc9e+/O6uacBB+C+Z x2LhdvMrXlM5D4AFUCFseUMLLZerO/DkFZuw+gDZqz0ntBiHHkI=
X-Google-Smtp-Source: ABdhPJzlQHyqmbEQPS3ALMPCs7h7f5jRmL8WgnPWz9b3ApLyClvxDOfJ6vpWUQAIHm/ZycpJeHvCZIEzCDDxe6s4oZo=
X-Received: by 2002:a02:3541:: with SMTP id y1mr14453584jae.66.1613386464599; Mon, 15 Feb 2021 02:54:24 -0800 (PST)
MIME-Version: 1.0
References: <2FBBB341-B8FB-4CAA-B1F1-5CC16AB47857@pragmaticwebsecurity.com> <072DEFFF-134E-4946-9CAD-35EA12DEC802@forgerock.com>
In-Reply-To: <072DEFFF-134E-4946-9CAD-35EA12DEC802@forgerock.com>
From: Warren Parad <wparad@rhosys.ch>
Date: Mon, 15 Feb 2021 11:54:13 +0100
Message-ID: <CAJot-L0WUsgt7hHHYfx5q2s8+96uyTcg3FQUBH3h_hodkhrRSw@mail.gmail.com>
To: Neil Madden <neil.madden@forgerock.com>
Cc: Philippe De Ryck <philippe@pragmaticwebsecurity.com>, Vittorio Bertocci <vittorio.bertocci@auth0.com>, oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000001bb73305bb5dcf12"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/aAH7wGmYcEZz1vwP5U_l_Rv_Nug>
Subject: Re: [OAUTH-WG] Token Mediating and session Information Backend For Frontend (TMI BFF)
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: Mon, 15 Feb 2021 10:54:31 -0000

Totally agree.

Warren Parad

Founder, CTO
Secure your user data with IAM authorization as a service. Implement
Authress <https://authress.io/>.


On Mon, Feb 15, 2021 at 11:51 AM Neil Madden <neil.madden@forgerock.com>
wrote:

>
>
> On 15 Feb 2021, at 10:26, Philippe De Ryck <
> philippe@pragmaticwebsecurity.com> wrote:
>
> 
>
> On 15 Feb 2021, at 11:14, Neil Madden <neil.madden@forgerock.com> wrote:
>
> On 15 Feb 2021, at 08:32, Philippe De Ryck <
> philippe@pragmaticwebsecurity.com> wrote:
>
> [...]
>
> *Compared to using a worker for handling RTs, I believe the TMI-BFF only
> adds a single security benefit: an attacker is no longer able to run a
> silent flow to obtain a fresh set of tokens (since the client is now a
> confidential client). *
>
>
> But they can just call the bff-token endpoint to do the same. If there is
> a security advantage, IMO it is as a defence in depth against open
> redirects, unicode normalisation attacks (ie not validating the
> redirect_uri correctly at the AS), etc.
>
>
> A Web Worker and the TMI-BFF both encapsulate the RT and only expose the
> (short-lived) AT.
>
>
> I don’t think this distinction matters at all from a security point of
> view. It’s the AT that attackers are after - why bother with a RT if I can
> just call the bff-token endpoint to get a new AT every time?
>
>
> With the worker-based approach, the client is a public client that
> completes the code exchange without authentication. This allows an attacker
> to run an independent silent flow in an iframe within the legitimate
> application. This flow relies on the existing cookie-based session with the
> AS to obtain an AT and RT, independent of the tokens of the client
> application. A confidential client does not suffer from this problem (a
> stolen code cannot be exchanged without client authN, and when done through
> the BFF, the RT is not exposed).
>
> And as you state, there are other benefits as well.
>
> Philipp
>
> —
> *Pragmatic Web Security*
> *Security for developers*
> https://pragmaticwebsecurity.com/
>
>
> ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>