Re: [OAUTH-WG] Recommendations for browser-based apps
Josh Mandel <jmandel@gmail.com> Wed, 20 September 2017 03:58 UTC
Return-Path: <jmandel@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 079CB1321B6 for <oauth@ietfa.amsl.com>; Tue, 19 Sep 2017 20:58:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-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 P1ve_pSOY_tX for <oauth@ietfa.amsl.com>; Tue, 19 Sep 2017 20:58:49 -0700 (PDT)
Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::22d]) (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 0E34013219F for <oauth@ietf.org>; Tue, 19 Sep 2017 20:58:49 -0700 (PDT)
Received: by mail-yw0-x22d.google.com with SMTP id w9so1080621ywi.11 for <oauth@ietf.org>; Tue, 19 Sep 2017 20:58:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PpbckVBZ03xcGEIWydI19cYzTIgVW8eHYkNyTF1DxYM=; b=n0VWTMW2dWbuEPaOz6di3V9Dq1wFZ6ZLoI4mltekRR3RQLDOd98aQHqIyDKhJN3FrZ aVDNBgfor4YMXBeluMJ0yYqF5AVZfJqBrU35DyXM6Pi7fXR5CX3wplGaj5YG8R3ZInGC UzTmkh8++WR/1CuZzhTMl91M35ahUjUcoJtZtOJUat1swDuTUTVVtthOTz8ZRZIp+w4Z zZAHZfqsL/zpzvMhvvF+JbWb9u7SJXjHL9RgXiRYkgGDUFNpxOrC7kHSx3N4zVb0OZPi EH3SsoQkXSYIJpBOIuTjV0Q1ceoD7bLIQnVTfhST2Ky+XQ82TMuTI9BCWG2WrjgZ0mPl BAOg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PpbckVBZ03xcGEIWydI19cYzTIgVW8eHYkNyTF1DxYM=; b=S8pE8NQ1NsglSnYlNrv64tZfDJySHBBywv8wjbJC3hpRmN15RDV9ZDiKHEzKTPH29t hB8PCeU0DDecow2mtMDGJ7EvcfrRnRvuXjKPFfXlEzB8dvzRw2QDQ3mtag9kcaYlDLp3 Pse0zlga+qlNe90T03uSTOQl8MIoR+/H63RnNSrxeGVLfxJEwj+VMnT3mX+Ryja3l31t 9RFA7HvYrbr+CI9rCX5gsuGd2dbCYVZEQUBcW5xg4RPr0+e6s0UNt3pDJSrhOi8R3ytw 514o5m+ctbSMD/O89hrV+GLBABrtF8Rjn32NKAJ5LJ6ewfxAGXbqhhOPQ2RFEE8L4VEk 5OTA==
X-Gm-Message-State: AHPjjUiT+0no5FaNPovJKZv5ZUE7Nm34OE/udQEkJj++rBEWafR8AtWn tcptqySLZHOLgi0W/W08MpTyFzlrAVQcnr/wgYs=
X-Google-Smtp-Source: AOwi7QC163ttePfXzsZW7bhv4FJztLMP3cgmQ2x6h/8ZX3wdHWJPfs0n8VUKqw1/iZ6BJtAFF7Da8dCDna59dYU2+wI=
X-Received: by 10.37.186.197 with SMTP id a5mr2415829ybk.39.1505879928095; Tue, 19 Sep 2017 20:58:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.159.203 with HTTP; Tue, 19 Sep 2017 20:58:46 -0700 (PDT)
Received: by 10.129.159.203 with HTTP; Tue, 19 Sep 2017 20:58:46 -0700 (PDT)
In-Reply-To: <22DCF344-9723-453C-B997-9475521C3777@gmail.com>
References: <CAKAMr-Dws2RVRLv+xTa7j2zk+yhpCpYN-jUgxFos+j--Abv4uQ@mail.gmail.com> <CABRXCmwKDOSQQrDdCVBkDWSi85A7FL_R9d9sNzgdBTE_HyKDMw@mail.gmail.com> <14E11D6D-3CA4-4945-93B5-96F40D17463E@oracle.com> <CAOahYUwYT-mFrdN-FvZArNCmVMn8G6X8504Z9EFY_rZ7A328qA@mail.gmail.com> <7630385B-8366-4B11-A5CA-BEE18F96AB8B@ve7jtb.com> <5C40C2B2-A673-4940-8376-55D448271A4C@gmail.com> <CABRXCmwDQ_uZXDaaX6gxn_J_FnaCDucA-5uZwF6K1uHMQs6nzw@mail.gmail.com> <22DCF344-9723-453C-B997-9475521C3777@gmail.com>
From: Josh Mandel <jmandel@gmail.com>
Date: Tue, 19 Sep 2017 23:58:46 -0400
Message-ID: <CANSMLKFNZWarXORO8JpCJX1bN_jpMvu=uZzrs8-OB4kEZ9Qtjg@mail.gmail.com>
To: Nov Matake <matake@gmail.com>
Cc: Bill Burke <bburke@redhat.com>, "oauth@ietf.org WG" <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="f403043df198304a56055996fed8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/x2xmlfKhzaWcQJ_8GoelqeWZCZk>
Subject: Re: [OAUTH-WG] Recommendations for browser-based apps
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.22
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, 20 Sep 2017 03:58:53 -0000
Can anyone provide insight about what protection PKCE adds for browser based apps using the authorization code flow? The PKCE intro says that the specification is designed to mitigate an attack where: > the attacker intercepts the authorization code returned from the authorization endpoint within a communication path not protected by Transport Layer Security (TLS), such as inter-application communication within the client's operating system ... but for a browser based client, I'm not clear on why this is important. (I agree PKCE doesn't hurt, of course, but I'm trying to understand whether there is a specific advantage.) Thanks for any perspective that, Josh On Sep 19, 2017 21:11, "Nov Matake" <matake@gmail.com> wrote: > you have redirect uri restriction there. > > nov > > > On Sep 20, 2017, at 9:44, Bill Burke <bburke@redhat.com> wrote: > > > > Cookies are vulnerable to CXRF. > > > >> On Tue, Sep 19, 2017 at 7:48 PM, nov matake <matake@gmail.com> wrote: > >> Why not using http-only cookies instead of refresh tokens? > >> If the app can interact with AuthZ server through a hidden iframe with > >> prompt=none param, you shouldn’t need refresh tokens. > >> > >> If your SAP is running on a different domain with the backend server, > >> Safari’s Intelligent Tracking Prevention will break the hidden iframe > way > >> though. > >> > >> On Sep 20, 2017, at 7:32, John Bradley <ve7jtb@ve7jtb.com> wrote: > >> > >> Right, Refresh token is bearer for native apps, that is why we came up > with > >> PKCE to protect code. > >> > >> For Angular the code flow with PKCE is probably better than the token > >> response type. > >> > >> However with bearer tokens it is still riskier than code with a > confidential > >> client so the AS should take that into account and not allow refresh > tokens > >> to live forever. > >> > >> One future way to protect refresh tokens and perhaps Access tokens is > to use > >> token binding to bind the tokens to the user agent. You could do that > now > >> for refresh tokens in Edge (Chrome has TB off by default still). > >> > >> I think more work needs to be done to come up with a best practice for > SPA. > >> > >> John B. > >> > >> On Sep 19, 2017, at 7:02 PM, Adam Lewis <adam.lewis@motorolasolutions. > com> > >> wrote: > >> > >> Only for confidential clients. No authentication is required for public > >> clients. > >> > >> On Tue, Sep 19, 2017 at 4:47 PM, Phil Hunt (IDM) <phil.hunt@oracle.com> > >> wrote: > >>> > >>> Except a refresh token is not purely bearer. The client is required to > >>> authenticate to use it. > >>> > >>> Phil > >>> > >>>> On Sep 19, 2017, at 2:33 PM, Bill Burke <bburke@redhat.com> wrote: > >>>> > >>>> I'd be curious to the response to this too. > >>>> > >>>> Seems to me that refresh token has the same possible security risks in > >>>> an Angular app as an access token, except the refresh token is valid > >>>> longer....Still, if you did the implicit flow, you'd have to have > >>>> longer access token timeouts as it would be really annoying for the > >>>> user to have to login again and again in a long session with your > >>>> Angular app. > >>>> > >>>> We have a javascript adapter that does Authz Code Flow with PKCE for > >>>> our Angular app. It also does CORS checks on the code to token XHR > >>>> request just in case on the IDP side. > >>>> > >>>>> On Tue, Sep 19, 2017 at 9:27 AM, Stefan Büringer < > sbueringer@gmail.com> > >>>>> wrote: > >>>>> Hi, > >>>>> > >>>>> there were some discussions in January regarding recommendations for > >>>>> browser-based apps > >>>>> (https://www.ietf.org/mail-archive/web/oauth/current/msg16874.html) > >>>>> > >>>>> I'd just like to ask if the Authorization Code Flow with PKCE is a > >>>>> valid > >>>>> option for Single-Page-Applications (in our case Angular), because > >>>>> Implicit > >>>>> Flow cannot be used in our scenario. > >>>>> > >>>>> Authorization Code Flow with PKCE eliminates the necessity for client > >>>>> secrets, but our concern is that exposing the refresh token to the > SPA > >>>>> might > >>>>> be a security risk, compared to the Implicit Flow were no refresh > token > >>>>> is > >>>>> exposed. > >>>>> > >>>>> What's your take on this? > >>>>> > >>>>> Kind regards, > >>>>> Stefan Büringer > >>>>> > >>>>> P.S. I couldn't find that much on the internet regarding > Authorization > >>>>> Code > >>>>> Flow with PKCE in SPAs, if you have some recommendations for good > blog > >>>>> posts > >>>>> I would be grateful. > >>>>> > >>>>> _______________________________________________ > >>>>> OAuth mailing list > >>>>> OAuth@ietf.org > >>>>> https://www.ietf.org/mailman/listinfo/oauth > >>>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> Bill Burke > >>>> Red Hat > >>>> > >>>> _______________________________________________ > >>>> 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 > >> > >> > >> _______________________________________________ > >> 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 > >> > > > > > > > > -- > > Bill Burke > > Red Hat > > _______________________________________________ > OAuth mailing list > OAuth@ietf.org > https://www.ietf.org/mailman/listinfo/oauth >
- [OAUTH-WG] Recommendations for browser-based apps Stefan Büringer
- Re: [OAUTH-WG] Recommendations for browser-based … Bill Burke
- Re: [OAUTH-WG] Recommendations for browser-based … Phil Hunt (IDM)
- Re: [OAUTH-WG] Recommendations for browser-based … Jim Manico
- Re: [OAUTH-WG] Recommendations for browser-based … Adam Lewis
- Re: [OAUTH-WG] Recommendations for browser-based … John Bradley
- Re: [OAUTH-WG] Recommendations for browser-based … nov matake
- Re: [OAUTH-WG] Recommendations for browser-based … Bill Burke
- Re: [OAUTH-WG] Recommendations for browser-based … Jim Manico
- Re: [OAUTH-WG] Recommendations for browser-based … Neil Madden
- Re: [OAUTH-WG] Recommendations for browser-based … Jim Manico
- Re: [OAUTH-WG] Recommendations for browser-based … Jim Manico
- Re: [OAUTH-WG] Recommendations for browser-based … Bill Burke
- Re: [OAUTH-WG] Recommendations for browser-based … Nov Matake
- Re: [OAUTH-WG] Recommendations for browser-based … Josh Mandel