Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best Current Practice"
Torsten Lodderstedt <torsten@lodderstedt.net> Sat, 09 November 2019 20:08 UTC
Return-Path: <torsten@lodderstedt.net>
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 4CFAF1200B7 for <oauth@ietfa.amsl.com>; Sat, 9 Nov 2019 12:08:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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=lodderstedt.net
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 haS993C0rrR6 for <oauth@ietfa.amsl.com>; Sat, 9 Nov 2019 12:08:30 -0800 (PST)
Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 05F2B1200CE for <oauth@ietf.org>; Sat, 9 Nov 2019 12:08:30 -0800 (PST)
Received: by mail-wm1-x32b.google.com with SMTP id t26so9510970wmi.4 for <oauth@ietf.org>; Sat, 09 Nov 2019 12:08:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lodderstedt.net; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=KcyY3oWfFPnjsP/f6zx7P1yTSglOMAZqfspwpi50YVw=; b=1kX1S9tup/IY9+hdgbdIkXOzA8EX4LjqxXreFI0CtQNARvces56ZOn7IU9q2kNvNjK 7oeZpSxPtiq7Rgh/9j7PEQixJR26u+i3O0XYyXTjyHmMMPCwMBFHP2jsPqXstwU8cAvg RHNRZQqa9tS+mtKDzJEMb/zJnOLOh07Di7by2AMD32JElwY0KCJIPYJ6AN1/Jpj5spAh Vok8M7KHG4bHJLboN1piPt4vqj6rLMpxQDXA38DoUNvwJGsWP5Cgg30rot1yg0uZMsV2 Z/WnZtB/Ua/Ajtklb9mKt1Vm25drpdOSrXJfiurfSw7SemzTmh4k39Ccf5svDWWR07Md yP9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=KcyY3oWfFPnjsP/f6zx7P1yTSglOMAZqfspwpi50YVw=; b=k3MNtBBv0/m+JgPkbqoe48kUoRnkYAwS3LY56sQc/JW4ELK9WKmmMRq2NnB2kEWwe0 24XomK6zHnNiMQq2btp7u0+jk5srXj1XE078BmsqU0SWcN+Jrb4Ry4ATf3Po+TXy16cT QiGhNESK0mwEoFWHMdi6ICm1ndIeY+sii51eKwzj74dcHNFMyzd/FJR1PEkhdsWcEZQo 3/rd0bYQv5glQ4ku+Nkuc8aXD+XKTMi0Gt2KY34hZbT1fLY9U2VsVcARCjtg4cD4M/aR eX03iFWGeticUoe+ycisjt61eFk13raz1+3CD0RHlCfzOsD12tmyUxOOZD2lrbfGfhG3 iBCg==
X-Gm-Message-State: APjAAAXJyfVmUdDA2Edn03UNyDS8c366YLq3LwnCoSqxi04JNuL/kyHD R9fgngGOwOXTWE/qjHecDz3rBUsqan7Lpg==
X-Google-Smtp-Source: APXvYqzrehdZs3GeKT7m2nSZK4FYuN6Z/e3mt1HGjrql1SrP2qXHcj1TfJCGYxR7oFbyMywwfon+JA==
X-Received: by 2002:a05:600c:230d:: with SMTP id 13mr12733087wmo.159.1573330108161; Sat, 09 Nov 2019 12:08:28 -0800 (PST)
Received: from [192.168.71.116] (p549EE7F4.dip0.t-ipconnect.de. [84.158.231.244]) by smtp.gmail.com with ESMTPSA id h205sm11761680wmf.35.2019.11.09.12.08.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Nov 2019 12:08:27 -0800 (PST)
Content-Type: multipart/alternative; boundary="Apple-Mail-8EB01663-90B3-455E-967A-8A61F063F069"
Content-Transfer-Encoding: 7bit
From: Torsten Lodderstedt <torsten@lodderstedt.net>
Mime-Version: 1.0 (1.0)
Date: Sat, 09 Nov 2019 21:08:25 +0100
Message-Id: <1399DBC5-B92B-4F76-B657-386C0AF93672@lodderstedt.net>
References: <CAF2Zz1Sy3Ut9fPRQ7WUV=DjJGaJAAwzLdwZkxKXSHdH=O9D0ug@mail.gmail.com>
Cc: David Waite <david@alkaline-solutions.com>, "oauth@ietf.org" <oauth@ietf.org>
In-Reply-To: <CAF2Zz1Sy3Ut9fPRQ7WUV=DjJGaJAAwzLdwZkxKXSHdH=O9D0ug@mail.gmail.com>
To: Daniel Roesler <daniel=40utilityapi.com@dmarc.ietf.org>
X-Mailer: iPad Mail (17A860)
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/lzCuvftKVAUG0NmIPiMeqXVfqUw>
Subject: Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best Current Practice"
X-BeenThere: oauth@ietf.org
X-Mailman-Version: 2.1.29
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, 09 Nov 2019 20:08:33 -0000
Hi Daniel, > Am 09.11.2019 um 18:44 schrieb Daniel Roesler <daniel=40utilityapi.com@dmarc.ietf.org>: > > I realize that it's open to the authorization server to issue > authorization codes how they see fit. It just strikes me as odd that > there's not a lot of guidance around when transparent redirects are > safe, when user interaction should occur, and the risks and > implications of both behaviors. User consent is more difficult than it looks on first sight. That’s the reason why it is hard to come up with general guidance. To start with, user consent is not a security measure per se. It is a measure to establish the legal basis for access to services and data on behalf of the resource owner. It is important to gather the consent but also to enforce this consent (typically by the RS) and ensure that only the legit client is able to use the tokens issued based on a certain consent (scope). That’s were various security pieces come into play. If AS and client belong to the same legal entity, there is typically no need to gather consent since the user already consented to the terms and privacy policy of the respective service provider. So automatic code issuance is fine as long as the user is sufficiently authenticated (policy determine by RS). If AS and client belong to different legal entities, the AS can ask every time - that’s on the super safe side but inconvenient. That’s why ASs may store the consent and avoid another dialog, if the same client asks again for the same scope. But what does „same client“ mean? Is it the client_id? Sounds reasonable for a web app, but would also mean instances of the same native app residing on different devices could share the consent. That’s great from a convenience perspective but the AS has to really make sure it’s the same user on the other device using the 3rd party app and it’s the same app again otherwise an attacker could easily abuse the grant. This in turn would call for client authentication, which in this case (same client_id shared among instances) means the OAuth dialog must happen in a backend otherwise the secret could be obtained by an attacker from the installed app. I hear “dynamic client registration” to give every instance client_id and secret? Well, looks like an alternative, but one needs to establish the relationship to the legal entity in a secure manner, otherwise sharing the consent is dangerous. Software statements or registration access tokens are the means at hand but both are shared secrets one would need to deploy with all app instances ... not advisable at all. Let’s talk about “same scope”: equality can be defined as byte level string equality or by interpreting the scope. The first approach will cause another user consent dialog if the order of the scope values change (or just a space is added). The latter approach is highly implementation specific since left undefined in RFC 6749. In the case of Open Banking and similar scenarios, this scope will be fine grained, dynamic or even transactional meaning storing a consent and issuing another code in subsequent authorization transactions might be possible but scope value specific. Constraints regarding the duration of a consent can easily be enforced by the AS. It just won’t issue further codes or access tokens (in case of refresh token grant) if the consent needs to be refreshed. bottom line: to define when an AS can issue an authorization code without asking for user consent again is easy. Implementing a policy that is secure and convenient is not. We are working on more sophisticated ways to represent and compare scopes (https://tools.ietf.org/html/draft-lodderstedt-oauth-rar-03) The client identification problem will most likely stay. kind regards, Torsten.
- [OAUTH-WG] WGLC for "OAuth 2.0 Security Best Curr… Hannes Tschofenig
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Jared Jennings
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Justin Richer
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Denis
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Daniel Fett
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Denis
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Hans Zandbelt
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Denis
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Hans Zandbelt
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Daniel Fett
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Denis
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Daniel Roesler
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … David Waite
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Daniel Roesler
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Torsten Lodderstedt
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … David Waite
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Lee McGovern
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … David Waite
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Vineet Banga
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Torsten Lodderstedt
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Vineet Banga
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Torsten Lodderstedt
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Vineet Banga
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … Torsten Lodderstedt
- Re: [OAUTH-WG] WGLC for "OAuth 2.0 Security Best … n-sakimura