Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit

Vittorio Bertocci <vittorio.bertocci@auth0.com> Wed, 05 December 2018 19:33 UTC

Return-Path: <vittorio.bertocci@auth0.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 8C19B128A6E for <oauth@ietfa.amsl.com>; Wed, 5 Dec 2018 11:33:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=auth0.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 cnKrF_B2KMmn for <oauth@ietfa.amsl.com>; Wed, 5 Dec 2018 11:33:18 -0800 (PST)
Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (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 7FDA012D4EB for <oauth@ietf.org>; Wed, 5 Dec 2018 11:33:17 -0800 (PST)
Received: by mail-lj1-x236.google.com with SMTP id k15-v6so1964189ljc.8 for <oauth@ietf.org>; Wed, 05 Dec 2018 11:33:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=auth0.com; s=google; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=y6uOOHQrMAAHcBfp6+9bokyjlIFzHPCTtaXGk0wEmpk=; b=FGxxJfflFjEAqWvyMIZX5FTKH8D76WtZJK3qQM0Wee7DH9X6RwNTP0GZPcqZcu7INI K9sZerJg7I9BjxDH6DJeVbeuyaTP6WSDoDjMssfz4hfYGEofTuLylZRRO5NE6HZsNGcM 1V0Zd6tUSY4WHExVwq8qz5cEZTUdmZ5vPPT+1whXVN/xJIGIFcBbQzUu9XPI+Mevhmqs F8NvMII9h/9HZ090Xdn+7UIiJ6RPZJwN/7S3Cd4apIC6dAh7ONaYda7dWyv2BoGXt5GJ o1QsjtcH1fGq9WhASI+2DUUjmfoEKO/IC9KxBW5jBFhiFYE3EIxqQV6Iufe7KtetUWJf JPjw==
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:reply-to :from:date:message-id:subject:to:cc; bh=y6uOOHQrMAAHcBfp6+9bokyjlIFzHPCTtaXGk0wEmpk=; b=itx1q4KwLvxlmFaVWbXnSIFM1COQJs6DReu+OU46RfrfpKrL30MfnD9r3DXOqK+MFc +KX4U8G3cg00hP67edO7i0xfJMjgmPvWRk1f+sbzlFl6mvVSPYZQu92h/Z25RmOD4MKt Y464I8nuBLDutOdZr75jbi+7BgQAwj33o95CRoL2Oiek8RrevM80wnVAFZP68Q2uRBCq jX5EjZv840QA025cHtx9/7eB9iIkacQ+6fz/8ZRpwpjAk6B8wVw62bmAci0s+xZs5eLg 8e3ezbtj3Z8dYG4CoFdkVzAa7I5qbjifOyr+Dye9gMrzt3GcWYT9LCI43njfLWi0sqcx ZirA==
X-Gm-Message-State: AA+aEWY3foYqB4W7b5aE61SIKKyU5BkaqZN1d3BZ5QOcciwsrGBJG1dd r0UCDT9gF+F0zKyoZBk9UpXsMxV//4o9rUg0usvx8g==
X-Google-Smtp-Source: AFSGD/WO43Zq8A9q8Za560C4UneitvxOUZrFBBDt/pOdU1Kh2R9UUVQmpfUssfVnavBaCpux/wNUQ2+OqgabdzqY8yU=
X-Received: by 2002:a2e:568b:: with SMTP id k11-v6mr16928180lje.105.1544038395348; Wed, 05 Dec 2018 11:33:15 -0800 (PST)
MIME-Version: 1.0
References: <VI1PR0801MB211266BA6F6E06FFB3081425FAD80@VI1PR0801MB2112.eurprd08.prod.outlook.com> <CAD9ie-v3onmKc498cg_-a0AD58ZV=aZANtz=UV+Q0f=9N3nSzQ@mail.gmail.com> <OSBPR01MB2869E83F37046C7FCD4463DDF9D10@OSBPR01MB2869.jpnprd01.prod.outlook.com> <9FF3F589-0423-4CBC-B323-481F771D097C@lodderstedt.net> <OSBPR01MB28690F77DFFB2A85BDB83FBAF9D10@OSBPR01MB2869.jpnprd01.prod.outlook.com> <D6C66E6A-687B-4997-B830-980BE25994C2@lodderstedt.net> <CAANoGhL9aD75AV9QQRdeGE1=4ynjTnULNVr0PXXvt20ipsb4Rw@mail.gmail.com> <FE51CE20-7A49-4A13-A180-6A7C481F3965@lodderstedt.net> <CAGBSGjrzeeR5QQ=nA=gTj0q7sRvRVc0DDacbxB+ED87ymHSOuA@mail.gmail.com> <VI1PR0801MB21120AA6CC9437E237F481A2FAAC0@VI1PR0801MB2112.eurprd08.prod.outlook.com> <EA38C666-2325-430A-91B0-C02AAC65FCC8@lodderstedt.net> <CAO_FVe7j_79sPrRSFXvQJax3vDjT_0=ZaWHW9aan9rJnLUftkA@mail.gmail.com> <CAO7Ng+vsQ2i4=V0nq+ymO6aNCvurb02+Zt7HHwp4=FnWCO4pUQ@mail.gmail.com> <CAANoGhLx42Noqw4WN-THXbGYvS3t1Z2_EmPs+z641-cNovFNvw@mail.gmail.com> <CAANoGh+1wRzz5x7jJrMy-KzCpeK0KN3fK2Qo62KEhz+9SE83=g@mail.gmail.com> <CA+k3eCRjET6gJjX+G7pq-kwFUDgppTK-mrXCAgMtYtW+gVrCbw@mail.gmail.com> <CAD9ie-t=wM6D_zwz0kuPkR19xGfFwfYP=0vjX8uGd4oKsukAOg@mail.gmail.com> <458858450.1398445.1543913404101@mail.yahoo.com> <9DF33F99-E78A-4197-BCEA-AC715761FE87@lodderstedt.net> <942315098.1664424.1543946581453@mail.yahoo.com> <FAFC4820-982B-49B9-9CC5-AFD5CFC4CA3B@lodderstedt.net> <E7BB7964-B8E4-4E96-84E3-DCBCACA308E3@alkaline-solutions.com>
In-Reply-To: <E7BB7964-B8E4-4E96-84E3-DCBCACA308E3@alkaline-solutions.com>
Reply-To: Vittorio@auth0.com
From: Vittorio Bertocci <vittorio.bertocci@auth0.com>
Date: Wed, 05 Dec 2018 11:33:03 -0800
Message-ID: <CAO_FVe4v7mXDm=TCMEnTzHSd=Cfoby+4w-wt9+kpnzFiFQQuug@mail.gmail.com>
To: David Waite <david@alkaline-solutions.com>
Cc: Torsten Lodderstedt <torsten@lodderstedt.net>, tstojecki@yahoo.com, Daniel Fett <fett@danielfett.de>, Brian Campbell <bcampbell@pingidentity.com>, IETF oauth WG <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000131cea057c4b7439"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/DPuZYDYm8hpCk_CCfkG5U2N_nFY>
Subject: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization code instead of implicit
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, 05 Dec 2018 19:33:20 -0000

David, I think you are hitting on something really important here.
For non-identity experts, the SPA umbrella covers every app updating the UX
via JS instead of postbacks- regardless of the underlying topology. Does
the app have its own backend and that backend has no other clients? Does it
call its own backend AND other APIs? Does it call 3rd party APIs only? Is
the current set of requirement stable for the foreseeable future, or will
the app evolve to change its use case?
Those are all questions that can be dismissed by advising the developer to
use the most generic approach possible, e.g. getting tokens in the browser,
however that comes at a complexity price that might be unnecessary if in
their particular case just using cookies against their own backed (an
extremely common setup, in my experience) would be enough. Even when
wrapped in SDKs, that complexity is not entirely free- think ITP and the
like.
Per the above, just giving a blanket advice for all SPA subtypes might not
be the simplest solution for a large number of developers.

The question I don't have a good answer for is- how do we help developers
with no identity experience (and no interest in acquiring it) to determine
in what pattern they fall into, and pick the guidance relevant to their
scenario? Maybe by formally enumerating those topologies and giving them
names? Do you guys have ideas?

On Wed, Dec 5, 2018 at 9:29 AM David Waite <david@alkaline-solutions.com>
wrote:

>
>
> > On Dec 5, 2018, at 5:16 AM, Torsten Lodderstedt <torsten@lodderstedt.net>
> wrote:
> >
> > Hi Tomek,
> >
> >> Am 04.12.2018 um 19:03 schrieb Tomek Stojecki <tstojecki@yahoo.com>:
> >>
> >> Thanks Torsten!
> >> So if I am putting myself in the shoes of somebody who sets out to do
> that - switch an existing SPA client (no backend)
> >
> > I would like to ask you a question: how many SPAs w/o a backend have you
> seen in your projects?
>
> Pivoting to apps with local domain business logic (aka a backend):
>
> Setup - the developer is building a browser-targeted app and at least one
> mobile app - their backend would likely be identical across all three.
>
> In that case, would they want client access to that backend to be secured
> with access tokens? Or should that backend to be the client to the AS, and
> communication from the javascript to the backend be secured with some
> non-OAuth method like cookies or API keys?
>
> I push for OAuth in most of these cases, unless their strategy for mobile
> apps is to “wrap” the browser code and content into a native app - in which
> case more flexible access to that backend can be deferred if desired until
> there is stronger business need.
>
> -DW
>
>