Re: [OAUTH-WG] Confusion on Implicit Grant flow

Bill Burke <bburke@redhat.com> Tue, 10 February 2015 14:27 UTC

Return-Path: <bburke@redhat.com>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AA65B1A0270 for <oauth@ietfa.amsl.com>; Tue, 10 Feb 2015 06:27:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 3zPAAaNvkKfO for <oauth@ietfa.amsl.com>; Tue, 10 Feb 2015 06:27:23 -0800 (PST)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1A7B21A0267 for <oauth@ietf.org>; Tue, 10 Feb 2015 06:27:23 -0800 (PST)
Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1AERMK4023136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <oauth@ietf.org>; Tue, 10 Feb 2015 09:27:22 -0500
Received: from [10.10.58.35] (vpn-58-35.rdu2.redhat.com [10.10.58.35]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1AERMYW022475 for <oauth@ietf.org>; Tue, 10 Feb 2015 09:27:22 -0500
Message-ID: <54DA154C.2070700@redhat.com>
Date: Tue, 10 Feb 2015 09:27:24 -0500
From: Bill Burke <bburke@redhat.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: oauth@ietf.org
References: <BLUPR04MB6918C7701D0DB90B0FA6B0D95380@BLUPR04MB691.namprd04.prod.outlook.com> <CANSMLKFMUQsBfOo=i0ki8PF_8PjRf7W3t=PiPo7qnftN9gUyWg@mail.gmail.com> <54D91317.9010101@redhat.com> <1E340378-2D34-4AC8-906C-415EF025068E@ve7jtb.com> <54D91D87.8040303@redhat.com> <FD337176-C292-4688-9CFA-A3C7DF40FCA2@ve7jtb.com> <54D92A3C.4060106@redhat.com> <32B26B45-FB75-47DF-8E34-42943B13F0E0@ve7jtb.com> <54D93578.9050105@redhat.com> <61E85A1A-E52C-4709-A1A4-791E4141B8B1@ve7jtb.com> <54D9DA7E.8010606@gmail.com> <F5AB5DA8-8F07-4146-86E0-049B965ECAB3@ve7jtb.com>
In-Reply-To: <F5AB5DA8-8F07-4146-86E0-049B965ECAB3@ve7jtb.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Archived-At: <http://mailarchive.ietf.org/arch/msg/oauth/mTHhOi3yeoh5JiiQ6o-TyhkWJCM>
Subject: Re: [OAUTH-WG] Confusion on Implicit Grant flow
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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, 10 Feb 2015 14:27:25 -0000


On 2/10/2015 8:15 AM, John Bradley wrote:
> The issue is maintaining key material in the browser.
>
> Web Crypto will help with that , but is not deployed widely in browsers at the moment.
>
> Thinking about it a bit someone could make a more secure flow for JS clients using code and some Connect extensions now.
>
> If I were concerned about logging the AT, then I would have the JS make a CORS call to the authorization endpoint with:
> response_type=code+id_token              [http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html]
> code_challenge=(challenge value)        [ https://tools.ietf.org/html/draft-ietf-oauth-spop-02]
> code_challenge_method=S256
>

Excellent.  Thanks.


> In Connect the JS client crates a nonce value and sends that with the request.  That value comes back in the signed_id token allowing the JS to know that the code and id_token are in reply to it's request and not replayed from another session.
>

Why would you need the nonce if the IDP guarantees that the code can 
only be used once?  The code, state, and redirect-uri are all validated 
by the IDP with the access token request.

Bill

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com