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

Vittorio Bertocci <vittorio.bertocci@auth0.com> Mon, 03 December 2018 04:14 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 CCAC91277C8 for <oauth@ietfa.amsl.com>; Sun, 2 Dec 2018 20:14:38 -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 D9Ca-B0dHucp for <oauth@ietfa.amsl.com>; Sun, 2 Dec 2018 20:14:35 -0800 (PST)
Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (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 6B11A127133 for <oauth@ietf.org>; Sun, 2 Dec 2018 20:14:34 -0800 (PST)
Received: by mail-lj1-x229.google.com with SMTP id 83-v6so10004873ljf.10 for <oauth@ietf.org>; Sun, 02 Dec 2018 20:14:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=auth0.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TskD8Io26hIGldM2Gk5nsZ35mbKbzf6tqxiW7/mh9Qc=; b=HhE/vREU1w3T6edkaq2u0l96PA2FU8zZH9u4tg9H9cfesbK9p1PkDqc2sGebL+YSvR dVf7SmDYa2IKJ16qySeQJOqTujOwinnHX25HLSgNXp/sg7SW4UjV4f9R2hzapu4fi2AG L/O/28uelAv59Vh1pHMxzPZhub7qX192vPIBhR4yIb3vOlwT5PgrrJs8yUO/EdGs1JTl 5SiSKn8+XbiLWLowjsCyGF7mulJB/Vl3J6ttYzoAf295m9ynpZ8W0JOwG26kV0id/dK3 Wy4E26+MYNkSS6NA6pCFKlx+dx80RPJhzW4tJIXUO57bzhb7egEoTxsiOTy4ylJX19Nb xeiA==
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=TskD8Io26hIGldM2Gk5nsZ35mbKbzf6tqxiW7/mh9Qc=; b=YogTx0hn+GlsohZIP/2zHg1D1ESnWSr9bsueBRbXSzw3xqTABdL7q4lt5Z50/GH+be ahdXVCT/6mnNf6wPxXhuPQDeAtFHBp0mKhk3GJm9LPTrQhRsJ8ALhBXBN4xvXhsBLTht 9SmhQwVjl4dzKSQdv9YfYs9FWGVGsCoFQ/qDdXj6aiMw4w2IUw/fY7y0MQEzbbSj64r4 IUVweoWFDYmAGp7/WMM8UtADpEpxCH1GyHfLuNDwvrwWdrB11bMSWtw/eh8QnVoGHQf2 faUsnwQ0AmUCCol4P8USkvx/isd54aTJth4NbjQtWxNtN02aGRyg0YKrbizWWg99Mbx1 Xhdg==
X-Gm-Message-State: AA+aEWah8tuIuzRDhA2E2Ly4116vFt03bPD+FndCZa73zzGBv+AZF+fs PAQn7xj2f+Wu71C5Rdf21Y4f7kTZyaxwge18uP0ulQ==
X-Google-Smtp-Source: AFSGD/Xj75HMl27OWiePK6B3z/AcN5kQyOlWC3CZC6bTNIhgclUBGbw3h8+ewTXHEJFm/xLQUaiIzAYo/mKaNSbepo0=
X-Received: by 2002:a2e:302:: with SMTP id 2-v6mr3946929ljd.137.1543810472182; Sun, 02 Dec 2018 20:14:32 -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>
In-Reply-To: <EA38C666-2325-430A-91B0-C02AAC65FCC8@lodderstedt.net>
From: Vittorio Bertocci <vittorio.bertocci@auth0.com>
Date: Sun, 02 Dec 2018 20:14:19 -0800
Message-ID: <CAO_FVe7j_79sPrRSFXvQJax3vDjT_0=ZaWHW9aan9rJnLUftkA@mail.gmail.com>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
Cc: Daniel Fett <fett@danielfett.de>, Hannes Tschofenig <Hannes.Tschofenig@arm.com>, IETF oauth WG <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000cb9be0057c1662f0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/L6EA_SNTblDHTZDuf5fGbtPBglM>
X-Mailman-Approved-At: Mon, 03 Dec 2018 02:59:30 -0800
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: Mon, 03 Dec 2018 04:23:13 -0000

Hi all,
Sorry for stepping a bit back from the level of detail the discussion
already reached. I do have some specific comments on the document, but
before bringing those up I wanted to raise a general problem I am
experiencing with this initiative.

I have a number of customers that are reacting to the news with distress.
The language used in some of the communications associated with this
initiative made them feel like some new vulnerability was discovered,
calling for immediate action.
The fact is that as far as I can tell, no new, previously unknown fact
informed this decision: no new vulnerability, nor any new technology that
wasn’t available before (the sender constrain is still not actionable for
most customers). The risks of the implicit flow aren’t bigger now than they
were in October.
That doesn’t mean that we cannot improve guidance, of course- and now is as
good as any other moment to do so: but at the same time, I think we need to
be cognizant of the *immense* investment in existence today in form of SDKs
and applications built on those SDKs that are predicated on implicit flow,
with our blessing: until very recently the official position was “implicit
is bad but it’s the best we have noawadays”.
To me, being cognizant of that means that we should help people to
formulate action proportionate to the risk. And if until yesterday we were
ok with them using implicit, we cannot realistically expect anyone to start
changing all of their apps today, but that’s the message many customers are
getting.
TL;DR, I think the community would be well served by clarifying in the
security document that there is no new risk and their existing codebase
didn’t suddenly become less secure and in *urgent* need to update.
To attempt a metaphor. We discovered a new drug against headache with
milder side effects than the one we were prescribing them until now, but
that doesn’t mean that they should throw away all the stash they have of
the older drug. The old drug will keep working as it worked until now. Once
they run out of their stash, they should get the new one; or if the old
side effects were particularly bad for them, perhaps they should consider
switching today. But this isn’t a recall.

And if in fact this group thinks it should be a recall and get everyone off
the old one right now, I think we’ll need to make a much stronger case than
we have done so far.

Thoughts?

Thanks
V.


On Sat, Dec 1, 2018 at 04:01 Torsten Lodderstedt <torsten@lodderstedt.net>
wrote:

> Hi Hannes,
>
> > Am 01.12.2018 um 10:06 schrieb Hannes Tschofenig <
> Hannes.Tschofenig@arm.com>:
> >
> > I agree with Aaron here and I think Section 3.8.1.2 of
> draft-ietf-oauth-security-topics-10  already does a pretty good job.
>
> my proposal is to add the following definition (based on 3.8.1.2) to a new
> „Terminology" section or to section 2.1.2:
>
> A sender constrained access token scopes the applicability of an access
> token to a certain sender.  This sender is
> obliged to demonstrate knowledge of a certain secret as prerequisite for
> the acceptance of that token at the recipient (e.g. a resource server).
>
> >
> > I was, however, wondering about the subtle implication of the
> requirement for sender constrained tokens. My understanding of the token
> binding discussion, which is one of the ways to provide sender-constrained
> tokens, is that we don’t have good faith in seeing deployment anytime soon.
> Hence, we are essentially (reading in between the lines of Section 3.8.1.2)
> saying that you cannot use implicit grant in a practical setup for the web*.
>
> The text shall convey that implicit must not be used at all. The main
> reason being it is unprotected against token injection and additionally
> also cannot sender constrain tokens.
>
> The second part of the statement relates to other response types and
> conditionally opens the MUST NOT in case they are protected against
> injection (which is true for the listed response types) and can issue
> sender constrained tokens (which does not work today but might work in the
> future).
>
> kind regards,
> Torsten.
>
> >
> > Am I misunderstanding it?
>
> >
> > Ciao
> > Hannes
> >
> > PS: The IoT case is likely different.
> >
> > From: OAuth <oauth-bounces@ietf.org> On Behalf Of Aaron Parecki
> > Sent: Saturday, December 1, 2018 3:18 AM
> > To: Torsten Lodderstedt <torsten@lodderstedt.net>
> > Cc: Daniel Fett <fett@danielfett.de>; IETF oauth WG <oauth@ietf.org>
> > Subject: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization
> code instead of implicit
> >
> > +1
> >
> > I would also like to ensure there is a clear definition of "sender
> constrained" tokens in this BCP.
> >
> > Aaron
> >
> >
> > On Thu, Nov 29, 2018 at 10:06 AM Torsten Lodderstedt <
> torsten@lodderstedt.net> wrote:
> > Hi all,
> >
> > based on your feedback on the list and off list, Daniel and I polished
> the text. That’s our proposal:
> >
> > —
> > In order to avoid these issues, clients MUST NOT use the implicit
> > grant (response type "token") or any other response type issuing access
> > tokens in the authorization response, such as "token id_token" and "code
> token id_token“,
> > unless the issued access tokens are sender-constrained and access token
> injection in
> > the authorization response is prevented.
> > —
> >
> > Explantation:
> > - we wanted to have the right balance between a generic definition of
> the response types we do not recommend/allow to be used and a
> concrete/actionable list of the affected response types.
> > - we changed from SHOULD NOT to MUST NOT as suggested by Nat and
> supported by William
> >
> > We look forward to seeing your feedback.
> >
> > kind regards,
> > Torsten.
> >
> > > Am 29.11.2018 um 15:15 schrieb John Bradley <ve7jtb@ve7jtb.com>:
> > >
> > > I am ok with that.
> > >
> > > On Wed, Nov 28, 2018, 8:03 PM Torsten Lodderstedt <
> torsten@lodderstedt.net wrote:
> > >
> > > > Am 28.11.2018 um 23:50 schrieb n-sakimura <n-sakimura@nri.co.jp>:
> > > >
> > > > That works.
> > >
> > > Good!
> > >
> > > I just realized this text has an issue with „token“ (only). It would
> allow „token“ to be used if the token would sender constrained. This
> completely ignores the fact implicit also shall be abandoned because of its
> vulnerability for access token injection.
> > >
> > > I therefore propose a modified text:
> > >
> > >    In order to avoid these issues, Clients SHOULD NOT use the implicit
> > >    grant. Furthermore, clients SHOULD only use other response types
> causing the authorization server to
> > >    issue an access token in the authorization response, if the
> particular response type detects access token
> > >    injection and the issued access tokens are sender-constrained.
> > >
> > > Or we just state:
> > >
> > >   In order to avoid these issues, Clients SHOULD NOT use the response
> type „token". The response types
> > > „token id_token“ and „code token id_token“ SOULD NOT be used, if the
> issued access tokens are not
> > > sender-constrained.
> > >
> > > >
> > > > In fact, I would further go and say MUST NOT but that probably is
> too much for a security consideration.
> > > >
> > >
> > > Mike suggested to go with a SHOULD NOT to get the message out but give
> implementors time to move/change.
> > >
> > > > Best,
> > > >
> > > > Nat
> > > >
> > > > Nat Sakimura / n-sakimura@nri.co.jp / +81-90-6013-6276
> > > >
> > > >
> このメールには、本来の宛先の方のみに限定された機密情報が含まれている場合がございます。お心あたりのない場合は、誠に申し訳ございませんが、送信者までお知らせ頂き、また受信されたメールは削除してくださいますようお願い申し上げます。
> > > >
> > > > PLEASE READ :This e-mail is confidential and intended for the named
> recipient only.
> > > > If you are not an intended recipient, please notify the sender and
> delete this e-mail.
> > > >
> > > > 差出人: Torsten Lodderstedt <torsten@lodderstedt.net>
> > > > 送信日時: 水曜日, 11月 28, 2018 11:38 午後
> > > > 宛先: n-sakimura
> > > > Cc: Dick Hardt; Hannes Tschofenig; oauth@ietf.org
> > > > 件名: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization
> code instead of implicit
> > > >
> > > > Hi Nat,
> > > >
> > > >> Am 28.11.2018 um 21:10 schrieb n-sakimura <n-sakimura@nri.co.jp>:
> > > >>
> > > >> I would support
> > > >>
> > > >> 1) clearly defining Implicit as the flow that returns access token
> from the authorization endpoint ( some people confuses implicit as the flow
> that returns ID Token in the front channel)
> > > >
> > > > That’s the current text:
> > > >
> > > > In order to avoid these issues, Clients SHOULD NOT use the implicit
> > > >    grant or any other response type causing the authorization server
> to
> > > >    issue an access token in the authorization response.
> > > >
> > > > What would you like to modify?
> > > >
> > > >>
> > > >> 2) Banning the returning of the access token that are not sender
> constrained from the authorization endpoint
> > > >
> > > > In order to avoid these issues, Clients SHOULD NOT use the implicit
> > > >    grant or any other response type causing the authorization server
> to
> > > >    issue an access token in the authorization response, if this
> access tokens is not sender-constraint.
> > > >
> > > > What about this?
> > > >
> > > > kind regards,
> > > > Torsten.
> > > >
> > > >>
> > > >> Best,
> > > >>
> > > >> Nat
> > > >>
> > > >>
> > > >> Outlook for iOS を入手
> > > >>
> > > >> 差出人: OAuth <oauth-bounces@ietf.org> (Dick Hardt <
> dick.hardt@gmail.com> の代理)
> > > >> 送信日時: 水曜日, 11月 28, 2018 8:58 午後
> > > >> 宛先: Hannes Tschofenig
> > > >> Cc: oauth@ietf.org
> > > >> 件名: Re: [OAUTH-WG] OAuth Security Topics -- Recommend authorization
> code instead of implicit
> > > >>
> > > >> +1
> > > >>
> > > >> While there are various mechanisms to alleviate some of the issues
> of implicit, I don't think we can recommend specifics, and there may be
> future ones in the future. I think we all agree that implicit without any
> mitigation is problematic.
> > > >>
> > > >> How about we recommend against using implicit alone?
> > > >>
> > > >>
> > > >> On Mon, Nov 19, 2018 at 2:34 AM Hannes Tschofenig <
> Hannes.Tschofenig@arm.com> wrote:
> > > >> Hi all,
> > > >>
> > > >> The authors of the OAuth Security Topics draft came to the
> conclusion that it is not possible to adequately secure the implicit flow
> against token injection since potential solutions like token binding or
> JARM are in an early stage of adoption. For this reason, and since CORS
> allows browser-based apps to send requests to the token endpoint, Torsten
> suggested to use the authorization code instead of the implicit grant in
> call cases in his presentation (see
> https://datatracker.ietf.org/meeting/103/materials/slides-103-oauth-sessb-draft-ietf-oauth-security-topics-01
> ).
> > > >>
> > > >> A hum in the room at IETF#103 concluded strong support for his
> recommendations. We would like to confirm the discussion on the list.
> > > >>
> > > >> Please provide a response by December 3rd.
> > > >>
> > > >> Ciao
> > > >>
> > > >> Hannes & Rifaat
> > > >>
> > > >>
> > > >>
> > > >> IMPORTANT NOTICE: The contents of this email and any attachments
> are confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
> > > >> _______________________________________________
> > > >> 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
> > --
> > ----
> > Aaron Parecki
> > aaronparecki.com
> > @aaronpk
> >
> > IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth
>