Re: [OAUTH-WG] Token scanning attacks in RFC 7662

Vladimir Dzhuvinov <vladimir@connect2id.com> Wed, 03 January 2018 07:07 UTC

Return-Path: <vladimir@connect2id.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 DD20A12D862 for <oauth@ietfa.amsl.com>; Tue, 2 Jan 2018 23:07:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.918
X-Spam-Level:
X-Spam-Status: No, score=-1.918 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 w3vkY7O31TZm for <oauth@ietfa.amsl.com>; Tue, 2 Jan 2018 23:07:10 -0800 (PST)
Received: from p3plsmtpa11-08.prod.phx3.secureserver.net (p3plsmtpa11-08.prod.phx3.secureserver.net [68.178.252.109]) (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 CF324120227 for <oauth@ietf.org>; Tue, 2 Jan 2018 23:07:10 -0800 (PST)
Received: from [192.168.0.107] ([78.130.190.73]) by :SMTPAUTH: with SMTP id Wd8meX0mNf3JYWd8nesyy9; Wed, 03 Jan 2018 00:07:10 -0700
To: oauth@ietf.org
References: <AF1C81BC-485C-4BAB-9415-D85FAF50977D@forgerock.com> <665AE14D-F8A4-444E-88BF-B596937FF855@ve7jtb.com> <15B4232D-F137-426D-B9B3-D33DF9B5B7A2@forgerock.com>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
Organization: Connect2id Ltd.
Message-ID: <7594cea3-ea12-ffa7-6696-0e2347e70be6@connect2id.com>
Date: Wed, 03 Jan 2018 09:07:08 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <15B4232D-F137-426D-B9B3-D33DF9B5B7A2@forgerock.com>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms090205070400000704030006"
X-CMAE-Envelope: MS4wfN3NsqsJQeNwTyNas961YBtzNtE2P6chEPKBC8AlXsG5/orN7LpemSNS61wOUNb0Mqo+ybVidRbIGnPlOlg8XYI0AN08p4Uq9hFDq7JORg+ES/qtvGJI LZhIU6ygUpZzOqyL/iEj9LNp8RPKqVX+95yUH94MGayDZeYJ9a7gqcgj
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/rW05N5oFxXJwvgaDrJgtE25Hc0U>
Subject: Re: [OAUTH-WG] Token scanning attacks in RFC 7662
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: Wed, 03 Jan 2018 07:07:13 -0000

On 02/01/18 19:01, Neil Madden wrote:
> How does authentication address the problem?
Authentication increases the effective entropy. An attacker fist has to
be break the client secret, then successfully guess the token.

Vladimir

>
> Neil
>
>> On 2 Jan 2018, at 15:06, John Bradley <ve7jtb@ve7jtb.com> wrote:
>>
>> In reality people developers may not always be putting that much entropy into a token.   It is only a SHOULD and hard to enforce.  I may have come up with the min entropy number.
>>
>> There may also be side channel attacks if you allow introspection of encrypted or signed tokens.
>>
>> There is also a potential privacy issue if you return a bunch of PII in the token response.  If the token leaked it perhaps can’t be used if it isa POP token but you may still leak PII via introspection.
>>
>> In general I am not a big fan of introspection.  We didn’t include it in Connect.  However the pattern is used in a number of commercial products to have the RS introspect tokens at the AS.
>> It was decided by the WG that having a standard would reduce the number of things people need to support when you have things like a DataPower talking to Ping Fed or something like that.
>>
>> Given that this is mostly used by RS I think the decision was made to err on the side of caution, as authentication is not a huge burden.
>> I recall it being discussed and some people didn’t want to do authentication.
>>
>> It is not cut and perhaps in some cases it might not be required, however that would introduce a option that people may get wrong in implementations.
>>
>> Happy New Year
>> John B.
>>
>>> On Jan 2, 2018, at 9:42 AM, Neil Madden <neil.madden@forgerock.com> wrote:
>>>
>>> Greetings, and Happy New Year!
>>>
>>> I was just re-reading the OAuth 2.0 token introspection RFC 7662, and I am a bit confused by the rationale for requiring client (RS) authentication when making calls to this endpoint. The stated rationale in Section 2.1 (https://tools.ietf.org/html/rfc7662#page-5) is:
>>>
>>> “To prevent token scanning attacks, the endpoint MUST also require
>>>  some form of authorization to access this endpoint, such as client
>>>  authentication as described in OAuth 2.0 [RFC6749] or a separate
>>>  OAuth 2.0 access token such as the bearer token described in OAuth
>>>  2.0 Bearer Token Usage [RFC6750].”
>>>
>>> This rationale is elaborated in the Security Considerations:
>>>
>>> "If left unprotected and un-throttled, the introspection endpoint
>>>  could present a means for an attacker to poll a series of possible
>>>  token values, fishing for a valid token.  To prevent this, the
>>>  authorization server MUST require authentication of protected
>>>  resources that need to access the introspection endpoint and SHOULD
>>>  require protected resources to be specifically authorized to call the
>>>  introspection endpoint.”
>>>
>>> However, RFC 6749 already requires that access tokens be unguessable with a probability of successful guesses being at most 2^(-128) [https://tools.ietf.org/html/rfc6749#section-10.10]. Assuming that this means something like: if an attacker makes 2^n guesses then they have a maximum chance of guessing a particular access token of at most 2^(n-128), then I think the token scanning attacks are already taken care of aren’t they? It is not feasible for an attacker to make that many queries. Even if you consider that the attacker only needs to guess one out of the set of all valid access tokens, then I still don’t think this attack is feasible in any realistic time-frame, especially if you follow the “SHOULD" recommendation to require at most 2^(-160) probability.
>>>
>>> Is there some other threat model being considered here? Timing side-channels maybe?
>>>
>>> Also, I cannot find a justification in the RFC for how this threat is mitigated by requiring authentication. Is the assumption that this is a closed ecosystem where malicious parties cannot get valid credentials?
>>>
>>> Kind regards,
>>>
>>> Neil
>>>
>>> --
>>> Neil Madden
>>> Security Director, ForgeRock Engineering.
>>> Email: neil.madden@forgerock.com     PGP: 90F8 43DF 4EDD AC5D
>>> Bugs/Reports: security@forgerock.com PGP: 6D19 AD77 1F43 ADAD
>>>
>>> _______________________________________________
>>> OAuth mailing list
>>> OAuth@ietf.org
>>> https://www.ietf.org/mailman/listinfo/oauth
>
>
> _______________________________________________
> OAuth mailing list
> OAuth@ietf.org
> https://www.ietf.org/mailman/listinfo/oauth