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

Neil Madden <> Tue, 02 January 2018 17:02 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id B86F3127863 for <>; Tue, 2 Jan 2018 09:02:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id jF8E7YDEaLUJ for <>; Tue, 2 Jan 2018 09:01:58 -0800 (PST)
Received: from ( [IPv6:2a00:1450:400c:c0c::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A71B2124319 for <>; Tue, 2 Jan 2018 09:01:57 -0800 (PST)
Received: by with SMTP id l19so36753542wrc.2 for <>; Tue, 02 Jan 2018 09:01:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=y+uio8lzeQEkZc+TXfNBYv86JtihFjm0r5JYm5A2FZ4=; b=h8hd3J3SseIBUTK0rZDdEuR4ldef8bgZxwb4P3Dyf6Vgs0G3sOmw2oplyDJuhmKUlj WiAFR26FQzow0PlUpWD7YGFmmxGr7b9taRVoX5yR1JA0sakEP+I7XH8QK6p2H1PKj5La iLSMnFNZB2s9BYcEBM4EtGGA9F2+jj+JUtl/4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=y+uio8lzeQEkZc+TXfNBYv86JtihFjm0r5JYm5A2FZ4=; b=gdzBkEHadmatM/dxe7CVHMdDsDPg4v5YQ1ejdQMKP1K4/+miP4CUS4B+kQNCR30LSE skdpqImq0rZ5rPdKl1zz/UPIHcBrv8j0a6FY7BopDinyqH+nuSjoo4YvwqzyLl9IbM2E AK4wXWoeG5XoAnpdFhvK/eHdnx6yz6Hae2IjUCffe3GLBI404iu4ounQ7fES5dKf2OTD 6V6KbLqQg4eagfpKDe/c6aVliDvLsBiTYgMbTr8LFVwa3AapGvmAhU0VCgSmYkWkRhCF dcp6VEkulNYKChre/rOIDHd0ECGxPaFda5xcAeahbu6ZbYnrgUoqTZfUyn9uV7RyQpMl yyxg==
X-Gm-Message-State: AKGB3mI7ulrq6ivd9lllJVYKt1kSUb7FQ/l/U7B3YVq2adoti7hd4FM6 SaXX06PrmeAuIyZ+5Yy/zkXC0g/bEbs=
X-Google-Smtp-Source: ACJfBouhS+pveMQ5C6NyOZ5ux8mRyeZHXp0523anw/lHqQWOeF44mDkSvqhQylruNxTRANpME7m2VA==
X-Received: by with SMTP id g22mr49110343wra.267.1514912516061; Tue, 02 Jan 2018 09:01:56 -0800 (PST)
Received: from guest2s-mbp.home ( []) by with ESMTPSA id a69sm16218874wma.25.2018. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 09:01:54 -0800 (PST)
From: Neil Madden <>
Message-Id: <>
Content-Type: multipart/signed; boundary="Apple-Mail=_E93FC5C2-CE2A-4D7A-86F2-2EF4C9293A1E"; protocol="application/pgp-signature"; micalg=pgp-sha256
Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\))
Date: Tue, 2 Jan 2018 17:01:40 +0000
In-Reply-To: <>
Cc: OAuth WG <>
To: John Bradley <>
References: <> <>
X-Mailer: Apple Mail (2.3445.5.20)
Archived-At: <>
Subject: Re: [OAUTH-WG] Token scanning attacks in RFC 7662
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 02 Jan 2018 17:02:01 -0000

The requirement on 128-bit entropy is a MUST in RFC 6749. There is a SHOULD for the stronger 160-bit level. How does authentication address the problem?


> On 2 Jan 2018, at 15:06, John Bradley <> 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 <> 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 ( 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) []. 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:     PGP: 90F8 43DF 4EDD AC5D
>> Bugs/Reports: PGP: 6D19 AD77 1F43 ADAD
>> _______________________________________________
>> OAuth mailing list