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

William Denniss <wdenniss@google.com> Sat, 11 March 2017 19:54 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 DAE49129590 for <oauth@ietfa.amsl.com>; Sat, 11 Mar 2017 11:54:37 -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 GB7WuQfHyQMV for <oauth@ietfa.amsl.com>; Sat, 11 Mar 2017 11:54:36 -0800 (PST)
Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::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 590AA129468 for <oauth@ietf.org>; Sat, 11 Mar 2017 11:54:36 -0800 (PST)
Received: by mail-qk0-x231.google.com with SMTP id v125so196040695qkh.2 for <oauth@ietf.org>; Sat, 11 Mar 2017 11:54:36 -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=cz5F54PS/9ZUNwATF+C3P+1dWLIX+hW2Vj3RBGlwTdI=; b=DE1ewVUMxcusiR/dIku/wQ8Tyk8FUyevd4+1fpCuwlO26mUzvrt1jmwZShD7mSSSOl yYpGUXFgjRp/Ac0/LTZkyluqcwvBVs3zAygybeoCf9rN/e5YhXx6D56CajgBc1T448yG 7vteP8R+sFN7wX4M76QPHVbrS6V9s5gDJW1UUy2eqy3Zm/k1SfOUbfy9vruBRmrYaWAZ UHY5x2Ix03Yrh4B4i5WMUoI3OxEvZ+jRetNdWTLpacnkrEKEbqUN9jTm9hVRG/O3vse0 tpMjqj5SmYg+li+7FvXR0wwKFB/IxoIWqtD8zh4a6CJNupB003xfYRGoe18tYhZjm9eH dyjw==
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=cz5F54PS/9ZUNwATF+C3P+1dWLIX+hW2Vj3RBGlwTdI=; b=p10k1XWeeAvce9FN+hSvaUe7JM2Fc98DUI4T9mgHCQmpPQEA1+CoSAcU3Ojp+jDZXp AGLsMOvfNeKyqh8X68reaE8lrI8g7iq2hslgjzg9fMd7U7B7vruKy2AVsH8+5F3wRV/O MdntIgvXGJIhqea5q/Ud6boBNAFIGNihjWEUBqUSsMc7xawRtXDrFj6usdREvZHYfq03 RLmIvvE1VGi6xdGMKOud6nnXokKDKbllrcOGLed7VfekCR5kzXap661ZH6dyePgC9R3k 8IfyM/wGXzTeQFKvCzUBEP6v+vjC286GL2+Ou0MeOD3BoGv3lia5X1kOcbDCypXEowIe LYXw==
X-Gm-Message-State: AFeK/H3xzQKzjqDDnjKbid2yg8PUZOVMMjc7seVIV04V/7ZDtSnErAlfT6aLZaxxnqdUe68E6Q1hG9Cgd/pYEQQ0
X-Received: by 10.55.221.89 with SMTP id n86mr9736157qki.186.1489262075156; Sat, 11 Mar 2017 11:54:35 -0800 (PST)
MIME-Version: 1.0
Received: by 10.140.36.203 with HTTP; Sat, 11 Mar 2017 11:54:14 -0800 (PST)
In-Reply-To: <AEE72C0E-6FFA-4BE5-87EB-D2EBF891211E@mit.edu>
References: <AEE72C0E-6FFA-4BE5-87EB-D2EBF891211E@mit.edu>
From: William Denniss <wdenniss@google.com>
Date: Sat, 11 Mar 2017 11:54:14 -0800
Message-ID: <CAAP42hBAaAMf0ojSBYL55O1GiUZ4Hx2Z43jRoWZqsm6=HVCVNQ@mail.gmail.com>
To: Justin Richer <jricher@mit.edu>
Content-Type: multipart/alternative; boundary="001a1149a61af8012b054a79d85e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/5r4v6kWj-jBqUMNa0xlsEqQBJJ0>
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: Sat, 11 Mar 2017 19:54:38 -0000

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.

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.