[OAUTH-WG] Comments on draft-ietf-oauth-security-topics-06.txt

Denis <denis.ietf@free.fr> Tue, 22 May 2018 13:05 UTC

Return-Path: <denis.ietf@free.fr>
X-Original-To: oauth@ietfa.amsl.com
Delivered-To: oauth@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id 80A9212EB32 for <oauth@ietfa.amsl.com>; Tue, 22 May 2018 06:05:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.618
X-Spam-Status: No, score=-2.618 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id lskmRhwZTJO0 for <oauth@ietfa.amsl.com>; Tue, 22 May 2018 06:05:56 -0700 (PDT)
Received: from smtp6-g21.free.fr (smtp6-g21.free.fr []) (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 8070212EB31 for <oauth@ietf.org>; Tue, 22 May 2018 06:05:56 -0700 (PDT)
Received: from [] (unknown []) by smtp6-g21.free.fr (Postfix) with ESMTP id 497B57803C8 for <oauth@ietf.org>; Tue, 22 May 2018 15:05:54 +0200 (CEST)
To: oauth@ietf.org
References: <152681629717.2793.15028642368623108299@ietfa.amsl.com> <34B9FBE9-788E-4B1C-B2A4-08FD14EC2BD5@lodderstedt.net>
From: Denis <denis.ietf@free.fr>
Message-ID: <1fe04f5e-b968-5a6d-efe8-b47da5e28592@free.fr>
Date: Tue, 22 May 2018 15:05:53 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <34B9FBE9-788E-4B1C-B2A4-08FD14EC2BD5@lodderstedt.net>
Content-Type: multipart/alternative; boundary="------------96BEB17147E3C74C7C3E1AD3"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/M8Xu_EUhVOA98cTdU8VQC3q8MuU>
Subject: [OAUTH-WG] Comments on draft-ietf-oauth-security-topics-06.txt
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 22 May 2018 13:06:00 -0000

Comments on OAuth 2.0 Security Best Current Practice 

The text is scaring ! It is quite hard to understand under which 
/context(s) /and conditions OAuth 2.0 could be safely used.

1° A "Privacy considerations" section should be added. It is important 
to place the AS at the center of the picture
and to observe whether it would be able to act as Big brother (or not). 
Several counter-measures are not 'privacy friendly'.

As an example, in section the text states:

The audience can basically be expressed using logical names or physical 
addresses (like URLs).

Since this URL will be known to the AS, the AS will be able to act as 
Big Brother. There are cases where this will not be important
but there are cases where it will be. The text states later on:

      Instead of the URL, it is also possible to utilize the fingerprint 
of the resource server’s X.509 certificate as audience value.

This is obviously better, but it is not a panacea. The AS will know how 
often a particular user accesses a particular server.
The AS would have also plenty of time to try various URLs and to check 
whether they match with the fingerprint and hence
might be able to discover the URL.

As another example, in section, the text states:

An authorization server could provide the client with additional 
information about the location where it is safe
     to use its access tokens. In the simplest form, this would require 
the AS to publish a list of its known resource servers,
     illustrated in the following example using a metadata parameter 

This is not "privacy friendly" since relying parties will know with 
which resource servers the AS has made an agreement
and the AS will know at the minimum where the access tokens it issues 
can be used.

2° There is one important threat that was not discussed in the OAuth 2.0 
"Threat Model and Security Considerations from 2013" [RFC6819]:
collusion between users. In particular, when a user got an access token 
that does not allow to fully identify him and where he would allow
another user to use it. A typical case would be an access token only 
stating that the user is over 18. This case should be mentioned.
My current belief is that OAuth 2.0 is unable to counter this kind of 
attack, even when private ore secret keys are protected by a secure element.

In section 3.5.1. Token Binding is mentioned "as a secure and convenient 
mechanism (due to its browser integration)".
However, it should also be mentioned that this mechanism is inefficient 
in case of a collusion attack.

3° Section2 describes the set of security mechanisms the OAuth working 
group recommended to OAuth implementers.
However, the text that follows uses the verb" shall", hence it is no 
more a recommendation but a requirement.
The use of the verb "should" should be considered instead.

In particular, the text states:

"Clients shall use PKCE [RFC7636] in order to (with the help of the 
authorization server) detect and prevent attempts
         to inject (replay) authorization codes into the authorization 

This is incorrect, since RFC7636 should be used when the authorization 
code is returned from the authorization endpoint
within a communication path that is _not protected_ by Transport Layer 
Security (TLS).

Instead of placing requirements one after another, the document should 
be restructured to highlight the contexts
where these recommendations are being done, in particular for:

    - static relationships between client, authorization server and 
resource servers, and
- dynamic establishment relationships between clients on one side and 
authorization servers and resource servers on the other side.