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

William Denniss <wdenniss@google.com> Sun, 12 March 2017 02:59 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 C96A312986A for <oauth@ietfa.amsl.com>; Sat, 11 Mar 2017 18:59:45 -0800 (PST)
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 fAAKcGIy860Y for <oauth@ietfa.amsl.com>; Sat, 11 Mar 2017 18:59:43 -0800 (PST)
Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::231]) (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 AC6A51294CC for <oauth@ietf.org>; Sat, 11 Mar 2017 18:59:43 -0800 (PST)
Received: by mail-qt0-x231.google.com with SMTP id n21so13038209qta.1 for <oauth@ietf.org>; Sat, 11 Mar 2017 18:59:43 -0800 (PST)
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=oYAvuSzfOuBrrieA2nLorpvkJu1mtiLu8zvWy5Rq1PI=; b=fowNB4NE9kk4RrJlZ7K2eODjwbSYPr4LzfZity4jqpM2v2DH/fG94iRUMWZxnlsKs+ DwdWkdSfY4KSsZFXBREqI1PLjkBhEIoHJABzy3HfK1geFxWQX0V+h0psM1cIooTMQKtg f/vl/9m2Yy2x/suj5pawUyARmrA4uaNqFEs9w6Pvv8mhzQ6XvCqQ9l8+WkiqMDpxEKdi XoU1hUQe8s/I3ndftuKj4I9qrF7H24XsaUrMd0ti9i+goi3eWYiSRQWBRoOG24h+XIUR eotfKdnWt01X/JF06UD2HwhutsQBcEs3lXrWnazksVEnYe3Fp5Thwp6gPFbOmiCkflNK vJAQ==
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=oYAvuSzfOuBrrieA2nLorpvkJu1mtiLu8zvWy5Rq1PI=; b=hNEc1mHjYOVofuFqCNCqxF1phk5myEEQMeVL+OjSBTVPGrSDqYYzb9MU08CemYpmkp WkiejBcJnFkttn2dZ/03PbXsZPGO4F6Q9UScsy6TMKOT39MiqBv/c5sxuZItHEdFa1eK px3eVDLaJYDra1Rj//8iYrY/MtYGFP3V98Db2IVjYtzSxPVA3wyE7S+ondDiAxGjU9M2 kKBQ6RVR8dHgsuObTRYpH3zWmW4e+EYNuA5ocgg7nTTKWmtTditZztn5i81LgBPHtFKF 112F/Oj577FaGiZFgu1Cbl0zZKTXUlARWd3Q+3boCLAOPZl1cPwBFS5znme79M2RSzVI 5KCA==
X-Gm-Message-State: AMke39m+h/vbxfmPt8h061XCjUjKYTm8Zqt0ULR4hsUltoMVmcP3Qcf5RiRhYb2dqqNVJiSIdfnSd6+z2mUdNLqn
X-Received: by 10.200.42.78 with SMTP id l14mr28345721qtl.15.1489287582347; Sat, 11 Mar 2017 18:59:42 -0800 (PST)
MIME-Version: 1.0
Received: by 10.140.36.203 with HTTP; Sat, 11 Mar 2017 18:59:21 -0800 (PST)
In-Reply-To: <CY4PR21MB05041D4776423586F0B1EA32F5230@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>
From: William Denniss <wdenniss@google.com>
Date: Sat, 11 Mar 2017 18:59:21 -0800
Message-ID: <CAAP42hDF=86Atz+NO=HaJM8Vm9pi9JhaAihueu-W=nQ3OAXhmg@mail.gmail.com>
To: Mike Jones <Michael.Jones@microsoft.com>
Content-Type: multipart/alternative; boundary="001a11403d8650c977054a7fc948"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/OONSA6EphVjS6R_KoVoivSts8Tw>
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 02:59:46 -0000

Sure thing. Changes are staged here:
https://github.com/WilliamDenniss/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
>
>
>
>
>