Re: [OAUTH-WG] Device Code expiration and syntax

William Denniss <wdenniss@google.com> Sun, 12 March 2017 21:42 UTC

Return-Path: <wdenniss@google.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 D035512943A for <oauth@ietfa.amsl.com>; Sun, 12 Mar 2017 14:42:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 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_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.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 5WzZUIXeGDhK for <oauth@ietfa.amsl.com>; Sun, 12 Mar 2017 14:42:52 -0700 (PDT)
Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::230]) (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 B19BD1293DA for <oauth@ietf.org>; Sun, 12 Mar 2017 14:42:51 -0700 (PDT)
Received: by mail-qt0-x230.google.com with SMTP id x35so20540010qtc.2 for <oauth@ietf.org>; Sun, 12 Mar 2017 14:42:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KaBUsXxF9xzGnNBiFBxPsHmoauHCVpV7kjXxRNFsGOU=; b=TYZSRbmTnv9hdtWXCkzqf3fpZwZdjiH0Xh8nJgBmPTJdD8B1CFHNJgbBabxQGRfSLg L6rxfnIpPIpYUs3Vl5+G/bn+at2x+u1HQ+kxzeSEoIQ313YbrTwDuMl/QFj5twGbFYQP SkDwOhY1um5Ejd04PHNWsLDY1t4OPXfELyEcP/1rKMOlM6okIwT0OGuHH/ZVpeLu0mkc kduNMaYn3XYD5f4+D07QNlX42wkGI9VywMoFDrGjEjapizY0cOngTc1ps+Yo52LzG83Z 7XWUQZh/SyuqO8jAO29Kt0nyUqchpmMjVvjfspXypEY3lYePVCSf86A4Cdt4XMdpHJML RKDQ==
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=KaBUsXxF9xzGnNBiFBxPsHmoauHCVpV7kjXxRNFsGOU=; b=V+50N8YA3zr4n4fB79xsHr91XuJ/zH/NS2uZOmc8AR9cg+rnJbABPDUt4dUmqJsnwE 3SrhJwpFvcXrTOOJaJOJ9/tYWB/YFly0PoK/ej1zP/kw+jPTggylf9Wnhlbf04KbM3ec An8LqSYkLrrRp/LE8kbk7UDk8ficpi0AtviHGm3TSmf2n/4Qjc81hIFv8Vp2vlh6myFQ kx5ODDtYJ5LfiVQuAfclqDMoB63oui9T+HCSnC9T8SSbXQmxrlyDDCDOp6zEpWMBKxIi GBDqDWRwEzC+EGbDDUTmSlP9YFNGJ8bdm8V4FeED2uTk2Prz3Q9mNLgY5EVKfPaVJFdv Ebhw==
X-Gm-Message-State: AMke39m7yaIGEeG0b+7UdanvYnAn5xUAlsJaqGiqlkvIdKaKTq4xlcCapZ0Q7/Luyiet3BbwtBV07dRwCSj0owvb
X-Received: by 10.200.40.178 with SMTP id i47mr29487982qti.259.1489354970590; Sun, 12 Mar 2017 14:42:50 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.36.203 with HTTP; Sun, 12 Mar 2017 14:42:30 -0700 (PDT)
In-Reply-To: <CY4PR21MB050417103B692C096AD66F80F5220@CY4PR21MB0504.namprd21.prod.outlook.com>
References: <AEE72C0E-6FFA-4BE5-87EB-D2EBF891211E@mit.edu> <CAAP42hBAaAMf0ojSBYL55O1GiUZ4Hx2Z43jRoWZqsm6=HVCVNQ@mail.gmail.com> <0CAB3A6D-5B80-41DF-9499-35D21D98F7B7@mit.edu> <CAAP42hCUBKt=cHRQ8jKETRzmLxZsnKbxthtSE=xmXhLpGkH+rg@mail.gmail.com> <CY4PR21MB05041D4776423586F0B1EA32F5230@CY4PR21MB0504.namprd21.prod.outlook.com> <CAAP42hDF=86Atz+NO=HaJM8Vm9pi9JhaAihueu-W=nQ3OAXhmg@mail.gmail.com> <CY4PR21MB050417103B692C096AD66F80F5220@CY4PR21MB0504.namprd21.prod.outlook.com>
From: William Denniss <wdenniss@google.com>
Date: Sun, 12 Mar 2017 14:42:30 -0700
Message-ID: <CAAP42hATwrm9kbb+-0JuGhhfJC6QbBMx54wOAaVY26VST5V4Pw@mail.gmail.com>
To: Mike Jones <Michael.Jones@microsoft.com>
Content-Type: multipart/alternative; boundary="001a113f20baf7ce7a054a8f79e7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/uChcyVSKry8BTb4LoQvVBAIG_pw>
Cc: "<oauth@ietf.org>" <oauth@ietf.org>
Subject: Re: [OAUTH-WG] Device Code expiration and syntax
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.17
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: Sun, 12 Mar 2017 21:42:54 -0000

Thanks for your review Mike, the PR
<https://github.com/WilliamDenniss/draft-ietf-oauth-device-flow/pull/3> has
been updated to address your comment.

On Sun, Mar 12, 2017 at 12:28 PM, Mike Jones <Michael.Jones@microsoft.com>
wrote:

> Thanks for doing this, William.  I added one comment to the pull request.
> After addressing it, I support this new version being published.
>
>
>
>                                                        -- Mike
>
>
>
> *From:* William Denniss [mailto:wdenniss@google.com]
> *Sent:* Saturday, March 11, 2017 6:59 PM
> *To:* Mike Jones <Michael.Jones@microsoft.com>
> *Cc:* Justin Richer <jricher@mit.edu>; <oauth@ietf.org> <oauth@ietf.org>
>
> *Subject:* Re: [OAUTH-WG] Device Code expiration and syntax
>
>
>
> Sure thing. Changes are staged here: https://github.com/Willi
> amDenniss/draft-ietf-oauth-device-flow/pull/3/files
>
>
>
> Includes the normative change suggested by Justin. PTAL.
>
>
>
> On Sat, Mar 11, 2017 at 1:46 PM, Mike Jones <Michael.Jones@microsoft.com>
> wrote:
>
> The pre-Chicago submission deadline is Monday afternoon (see
> http://ietf.org/meeting/important-dates.html#ietf98).  Would you have
> time to check proposed edits into GitHub for the editors to review before
> that, William?
>
>
>
>                                                        -- Mike
>
>
>
> *From:* OAuth [mailto:oauth-bounces@ietf.org] *On Behalf Of *William
> Denniss
> *Sent:* Saturday, March 11, 2017 12:54 PM
> *To:* Justin Richer <jricher@mit.edu>
> *Cc:* <oauth@ietf.org> <oauth@ietf.org>
> *Subject:* Re: [OAUTH-WG] Device Code expiration and syntax
>
>
>
>
>
> On Sat, Mar 11, 2017 at 12:40 PM, Justin Richer <jricher@mit.edu> wrote:
>
>
>
> On Mar 11, 2017, at 2:54 PM, William Denniss <wdenniss@google.com> wrote:
>
>
>
> On Sat, Mar 11, 2017 at 11:10 AM, Justin Richer <jricher@mit.edu> wrote:
>
> We’re implementing support for the device code draft and had a question on
> what the “expiration” of the code refers to. Obviously, once the code has
> expired it can no longer be used. But when should the expiration count
> from? Say I have a code that’s good for 60 seconds, do I start the timer as
> soon as I issue the code to the client? Do I reset the timer when the user
> approves the client, to another 60 seconds? Or does that 60 seconds count
> for the entire transaction?
>
> My read on it is the latter-- one timeout for the entire lifetime of the
> code regardless of its current state, with no resets. But I didn’t find
> good guidance in the document itself.
>
>
>
> It's the expiry of the user_code and device_code pair, at which point the
> device will need to start-over with a new device authorization request.
> The device wouldn't *have* to start a timer, as they will get an error
> during polling:
>
>
>
>    expired_token
>
>       The "device_code" has expired.  The client will need to make a new
>
>       Device Authorization Request.
>
>
>
> We should add some guidelines around expiry behavior.
>
>
>
> OK, so it really is one expiration for the whole thing. The device doesn’t
> need to care (and I’ll bet you right now that, just like with access
> tokens, the overwhelmingly vast majority of devices won’t care about
> expires_in), but the authorization server certainly does, and we wanted to
> know the right place to set the timers.
>
>
>
>
>
> You're probably right that most ignore expires_in, and I think that's
> fine. As long as the client handles errors correctly, it'll work out OK.
>
>
>
> Agree that we should add some documentation. One piece of advice for the
> AS would be not to make it too short, else users won't be able to complete
> the flow in time.
>
>
>
> We use a 30 minute expiry.
>
>
>
>
>
> Secondly, I had a question about the “response_type” parameter to the
> device endpoint. This parameter is required and it has a single, required
> value, with no registry or other possibility of extension. What’s the
> point? If it’s for “parallelism”, I’ll note that this is *not* the
> authorization endpoint (as the user is not present) and such constraints
> need not apply here.
>
>
>
> Good points here. At a guess, it bled in from the OAuth spec. If it's not
> needed, we should remove it.
>
>
>
>
>
> I’d vote for removal, I don’t see the point.
>
>
>
>  — Justin
>
>
>
>
>
>
>