Re: [OAUTH-WG] Benjamin Kaduk's Discuss on draft-ietf-oauth-device-flow-11: (with DISCUSS and COMMENT)

William Denniss <wdenniss@google.com> Thu, 02 August 2018 00:17 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 27575130EDB for <oauth@ietfa.amsl.com>; Wed, 1 Aug 2018 17:17:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.51
X-Spam-Level:
X-Spam-Status: No, score=-17.51 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=unavailable 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 g8YCpssr10iM for <oauth@ietfa.amsl.com>; Wed, 1 Aug 2018 17:17:17 -0700 (PDT)
Received: from mail-ua0-x22b.google.com (mail-ua0-x22b.google.com [IPv6:2607:f8b0:400c:c08::22b]) (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 AB84C130F09 for <oauth@ietf.org>; Wed, 1 Aug 2018 17:17:14 -0700 (PDT)
Received: by mail-ua0-x22b.google.com with SMTP id y10-v6so292456uao.4 for <oauth@ietf.org>; Wed, 01 Aug 2018 17:17:14 -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=G4+IsX6etd0Cma/5WiUm4gtDdo5yJt0sigZfs6+iI9U=; b=v1Rduyf9GwXCbgOjcvGvR9RCLt5r6EQBLVwcPdKW0u7dh/j+MqRlL12ybaRG6uWdiP QU4UZG/Tc6G5RvrELjj2ZzNMBC43Bi+DCBdACc4/NzdWPIWJfbIG3VH8UWSS150Af5so tnD6MdhWO7CTBcRzKOFD4kNsGGMwQteZOs9eahs8dRph0LURI76h0pnsw3rIBeDY+eAI AJDpjmpsjbauco8WyCXogy2p82BLRy5F8+kxXAaGdAhxfJhgvDBdOX7icdEEbZXEHN7I pH5AQYRT1GMegcPm+F0G9YrrXyY8W3pzhgNuVkXLe4xbBsiq7KTlUG4I8XnWJc7Iw2rQ wu4Q==
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=G4+IsX6etd0Cma/5WiUm4gtDdo5yJt0sigZfs6+iI9U=; b=FknjsgPz9HaRfFZdAkRXET3/lsMX/pZ3Zrl67h1RrAt8y/7m50cA+u/VVXcQbYc30I a8jNIlMK8H/DScBx5Eq14haIribOnPE2AIm9INAVTqyP1YuicsZzO7wvuBlyHpEIXOA3 sg510jhaRnGI/K1F5UOmTEzJOBsjhiCiU4eTQE9d3NSNXozJJ+/Whh53uWZsMfvySVua 1vlgvwNkffRGvBjxxLy+mBZumUmp6Iu+fcWCcSoS7g6JnLfMM4bi3RFVNLTlnuMhAE7+ 5XacH4dlUsV4o5SiqELlkqyK1ttItQamrYdY3tMogLDJZlYO28Qf1aZ8M0P3W+Nh+3q1 PktQ==
X-Gm-Message-State: AOUpUlHJlxp2GfHuvDvKije0DhBksdvAn0+zr9aBacieaT3TwIKVHfF2 DFHSuY9sBCnxje/3WRfZulV9mWZHm6j30MP7kYbwrg==
X-Google-Smtp-Source: AAOMgpdGQTX/goDmf8j5bb0TAtTkpi9TWhws5Q97veXOYbZKIeCLzluwd5bYE8t42LusDQWRNgaj1MMagOJ9+larD4M=
X-Received: by 2002:ab0:5c0c:: with SMTP id q12-v6mr417446uaf.134.1533169033256; Wed, 01 Aug 2018 17:17:13 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:ab0:185a:0:0:0:0:0 with HTTP; Wed, 1 Aug 2018 17:16:52 -0700 (PDT)
In-Reply-To: <153243911759.22454.13623930642678414831.idtracker@ietfa.amsl.com>
References: <153243911759.22454.13623930642678414831.idtracker@ietfa.amsl.com>
From: William Denniss <wdenniss@google.com>
Date: Wed, 01 Aug 2018 17:16:52 -0700
Message-ID: <CAAP42hBD3s+Ta26f-D7TkobEEzAXWEC9VgjbiC5y2G6fVM6zdQ@mail.gmail.com>
To: Benjamin Kaduk <kaduk@mit.edu>
Cc: The IESG <iesg@ietf.org>, draft-ietf-oauth-device-flow@ietf.org, Rifaat Shekh-Yusef <rifaat.ietf@gmail.com>, oauth-chairs@ietf.org, oauth <oauth@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000009c3bfe057268bbcc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/DP1A7_uWtoN6HxiqsB5_bi64pnE>
Subject: Re: [OAUTH-WG] Benjamin Kaduk's Discuss on draft-ietf-oauth-device-flow-11: (with DISCUSS and COMMENT)
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.27
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: Thu, 02 Aug 2018 00:17:19 -0000

Benjamin,

Thank you for the feedback. We just posted version 12 which addresses many
of your feedback points. Replies inline.

On Tue, Jul 24, 2018 at 6:31 AM, Benjamin Kaduk <kaduk@mit.edu> wrote:

>
> ----------------------------------------------------------------------
> DISCUSS:
> ----------------------------------------------------------------------
>
> Let me preface this by noting that I'm not sure that all of these points
> are actionable; I would, however, like to discuss them.
>
> I'm really unhappy to not see any hard numbers on the entropy needed
> in a user code to provide a reasonable security margin with given
> parameters, and how it compares to the guessability bounds considered best
> practices in general (across protocols).  For example, we think 128-bit
> symmetric keys are okay because an attacker has to put in 2**96 work to
> have a 2**-32 chance of guessing correctly via brute force; the rate
> limiting and finite lifetime on the user code places an artificial limit on
> the amount of work an attacker can "do", so if one uses a 8-character
> base-20 user code (with roughly 34.5 bits of entropy), the rate-limiting
> interval and validity period would need to only allow 5 attempts in order
> to get the same 2**-32 probability of success by random guessing.
> Section 5.1 would be a great place for such text, near the preexisting:
>    The user code SHOULD have enough entropy that when combined with rate
>    limiting and other mitigations makes a brute-force attack infeasible.
>
>
Thank you for the comment, the authors are still considering the right way
to address this feedback.



> We talk about "the authorization server", but any given *user* may have a
> relationship with multiple such ASes.  Can the Introduction make it more
> clear that the AS is associated with the device/client, and as such the
> it may not be the user's most-trusted AS?
>

Sometimes the device is really an app on the device. E.g. a Roku TV device
(a "tv stick") that has several apps. Hulu, where the AS is hulu, and
YouTube, where the AS is YouTube (these are both "first party" use-cases
where the app and the AS are owned by the same entity). The user may also
have a Canon printer, which has a device flow to Google, to authorize it to
print documents (a "third-party" use-case).

I'm not sure exactly what we should say in the introduction to address you
feedback here.

It also seems like a large latent risk with this flow is when the
> verification_uri_complete response is used along with an AS that assumes an
> authenticated user making such a verification request has approved the
> authorization (i.e., without an explicit user interaction to confirm), when
> that AS uses cookies or other persistent state to keep the user
> authenticated across multiple requests.  I could not find any MUST-level
> requirement for user interaction to confirm the device being authorized
> (even in Section 3.3, which covers the regular verificat_uri workflow!);
> please let me know if I missed something.  I would like to see some
> explicit text that (matching the flow described in Section 3.1 that
> requires the user to input the code) explicit user approval of the
> authorization is required.  (I do note that Section 5.3 has text about
> "SHOULD display information about the device.)
>

When verification_uri is used, the user has 2 steps (at least): 1. enter
code, 2. consent to the request. verification_uri_complete skips the first
step, but the presumption is that they would still consent to the request
in the second step. We can make this more clear if it isn't currently.

I'm also unhappy about the text in Section 1 that merely requires of the
> device the ability to "make outbound HTTPS requests", which leaves room for
> an awful lot of sins in certificate validation (and, potentially,
> ciphersuite selection).  Can we get a MUST-level requirement for
> authenticating the server and a cite to RFC 7525?
>

Reference to 7525 has been added.


> ----------------------------------------------------------------------
> COMMENT:
> ----------------------------------------------------------------------
>
> Please use the RFC 8174 boilerplate instead of the RFC 2119 one.
>

Done, thanks!


>
> Section 3.2
>
> The example expires in 30 minutes?  That seems longer than needed; wouldn't
> 5 minutes do?
>

Incidentally, 30 minutes is the value Google returns on the requests, which
was where this example came from.

In general I think it's good to have a reasonable window of time as the
user does need to find another device, open the browser, login to the AS
(possibly recover their passowrd), etc. There are some edge-cases in the
device flow too where if you enter the code right when it expires, you'll
get an error and need to start-over, and the longer the window of
opportunity the less this occurs.


>
> Section 3.3
>
> I agree with directorate reviewer that the MUST NOT requirement for
> displaying the device_code should justify that requirement by discussing
> the consequences of exposure.
>


Text has been updated, now reads:

   It is NOT RECOMMENDED for authorization servers to include the user
   code in the verification URI ("verification_uri"), as this increases
   the length and complexity of the URI that the user must type.  The
   next section documents user interaction with
   "verification_uri_complete", which is designed to carry this
   information.




>
> Section 3.5
>
>    authorization_pending
>       The authorization request is still pending as the end-user hasn't
>       yet completed the user interaction steps (Section 3.3).  The
>       client should repeat the Access Token Request to the token
>       endpoint.
>
> I feel like we want to mention the 'interval' here or some other discussion
> of an inter-request delay.
>

This text has been reorganized, with some duplication removed and I think
it reads better now.


> Also, please clarify "reasonable default polling interval", per multiple
> directorate reviews.
>

Done, we set it to 5s.


>
> Section 5.2
>
> Please clarify the entities involved in "the backchannel flow" that can be
> MITM'd.
>

The authors are still considering text to address this feedback.


>
> Section 5.6
>
> The "short-range" part of a "short-range wireless signal" partially depends
> on how big the receiver's antenna is.  So perhaps we should be careful
> about indicating that this has more security value than it does.
>

Dropped the reference to "short-range wireless signal".


>
> Section 6.1
>
> I'm not sure I understand the usage of "case-insensitive", here -- how
> would the user have an expectation of case-insensitivity?  Perhaps it is
> better to just say "majuscule" or "upper case" or whatever.
>
>
This section was reworded to hopefully address your feedback.

Best,
William