Re: [OAUTH-WG] New Version Notification for draft-fett-oauth-dpop-03.txt

"Richard Backman, Annabelle" <richanna@amazon.com> Fri, 22 November 2019 13:21 UTC

Return-Path: <prvs=2222bf29d=richanna@amazon.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 9B9F8120876 for <oauth@ietfa.amsl.com>; Fri, 22 Nov 2019 05:21:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazon.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 w8CSKdA_k0wa for <oauth@ietfa.amsl.com>; Fri, 22 Nov 2019 05:21:26 -0800 (PST)
Received: from smtp-fw-9101.amazon.com (smtp-fw-9101.amazon.com [207.171.184.25]) (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 8CDA71208FE for <oauth@ietf.org>; Fri, 22 Nov 2019 05:21:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1574428887; x=1605964887; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=KQ8BhcECMNISjISC1pFNHzAMvHJp3AKoWoZ1JwC2duo=; b=G1Z+OvyBTkkV5B7J3Hu6ubUDVhOUTMLu/HrG2DaRaDMtVHA/ExM2uePI MhMDJJ3n5IDsihCcBXm/WcUm250q7LbbuARuKEVo2kDLxe1QQ1NtzN/SU ny2Gl8sxOe/O13WBOUi/GfOIVD4yh+NnJFLysv0ESPJXohkvj/8+xDSgw s=;
IronPort-SDR: PRZN/Lt6eoyxplOUoQ4tRF7gAbJ42SULXBqVf57ou7MCjlcUzGZcD15KhkSz9rmfl8kb5KW8jZ krqX3WQ+YFCw==
X-IronPort-AV: E=Sophos;i="5.69,229,1571702400"; d="scan'208";a="861440"
Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-119b4f96.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 22 Nov 2019 13:21:15 +0000
Received: from EX13MTAUWC001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-119b4f96.us-west-2.amazon.com (Postfix) with ESMTPS id E991C1A1D21; Fri, 22 Nov 2019 13:21:14 +0000 (UTC)
Received: from EX13D11UWC003.ant.amazon.com (10.43.162.162) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 22 Nov 2019 13:21:14 +0000
Received: from EX13D11UWC004.ant.amazon.com (10.43.162.101) by EX13D11UWC003.ant.amazon.com (10.43.162.162) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 22 Nov 2019 13:21:14 +0000
Received: from EX13D11UWC004.ant.amazon.com ([10.43.162.101]) by EX13D11UWC004.ant.amazon.com ([10.43.162.101]) with mapi id 15.00.1367.000; Fri, 22 Nov 2019 13:21:13 +0000
From: "Richard Backman, Annabelle" <richanna@amazon.com>
To: Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org>, "Neil Madden" <neil.madden@forgerock.com>
CC: oauth <oauth@ietf.org>
Thread-Topic: [OAUTH-WG] New Version Notification for draft-fett-oauth-dpop-03.txt
Thread-Index: AQHVmt2iG9RAznniNkuvKQ6riy594aeSJFIAgAD4+QCAAhU5gIAA7zqAgADa3AD//9TtAIAAAUqAgAADQoCAAAgdgIAAJayAgAAjj4CAAJhigA==
Date: Fri, 22 Nov 2019 13:21:13 +0000
Message-ID: <D6F0034F-7F70-442C-8334-733359DE44A9@amazon.com>
References: <2EF412B8-AF8C-4642-9BE0-1B528B0C63D5@amazon.com> <288343F2-ACF0-43E0-8577-26AF45330E5C@forgerock.com> <CAD9ie-u_SM+1hRuBWR7zBGSi4Ex59Ht0SzoVTeFuWTRc3cFJXw@mail.gmail.com> <6DECA422-AACC-4DAA-8CD2-FF57CE02DE3E@mit.edu> <0235F8A2-83C4-4804-8805-F50305E263BB@lodderstedt.net> <D43D3929-F1B7-4A2C-ABEC-1326F3F0926C@forgerock.com> <1FD6E2DF-013A-4F42-862B-ADEF45EAE689@lodderstedt.net>
In-Reply-To: <1FD6E2DF-013A-4F42-862B-ADEF45EAE689@lodderstedt.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1b.0.190715
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.43.162.54]
Content-Type: text/plain; charset="utf-8"
Content-ID: <7A7C999E958DB1498F0DD70FC44B206E@amazon.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/IznL6dIUIf9TYbPh7MCtUT22DIU>
Subject: Re: [OAUTH-WG] New Version Notification for draft-fett-oauth-dpop-03.txt
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: Fri, 22 Nov 2019 13:21:32 -0000

The dichotomy of "TLS working" and "TLS failed" only applies to a single TLS connection. In non-end-to-end TLS environments, each TLS terminator between client and RS introduces additional token leakage/exfiltration risk, irrespective of the quality of the TLS connections themselves. Each terminator also introduces complexity for implementing mTLS, Token Binding, or any other TLS-based sender constraint solution, which means developers with non-end-to-end TLS use cases will be more likely to turn to DPoP. If DPoP is intended to address "cases where neither mTLS nor OAuth Token Binding are available" [1], then it should address this risk of token leakage between client and RS. If on the other hand DPoP is only intended to support the SPA use case and assumes the use of end-to-end TLS, then the document should be updated to reflect that.

[1]: https://tools.ietf.org/html/draft-fett-oauth-dpop-03#section-1

– 
Annabelle Richard Backman
AWS Identity
 

On 11/22/19, 8:17 PM, "OAuth on behalf of Torsten Lodderstedt" <oauth-bounces@ietf.org on behalf of torsten=40lodderstedt.net@dmarc.ietf.org> wrote:

    Hi Neil,
    
    > On 22. Nov 2019, at 18:08, Neil Madden <neil.madden@forgerock.com> wrote:
    > 
    > On 22 Nov 2019, at 07:53, Torsten Lodderstedt <torsten=40lodderstedt.net@dmarc.ietf.org> wrote:
    >> 
    >> 
    >> 
    >>> On 22. Nov 2019, at 15:24, Justin Richer <jricher@mit.edu> wrote:
    >>> 
    >>> I’m going to +1 Dick and Annabelle’s question about the scope here. That was the one major thing that struck me during the DPoP discussions in Singapore yesterday: we don’t seem to agree on what DPoP is for. Some (including the authors, it seems) see it as a quick point-solution to a specific use case. Others see it as a general PoP mechanism. 
    >>> 
    >>> If it’s the former, then it should be explicitly tied to one specific set of things. If it’s the latter, then it needs to be expanded. 
    >> 
    >> as a co-author of the DPoP draft I state again what I said yesterday: DPoP is a mechanism for sender-constraining access tokens sent from SPAs only. The threat to be prevented is token replay.
    > 
    > I think the phrase "token replay" is ambiguous. Traditionally it refers to an attacker being able to capture a token (or whole requests) in use and then replay it against the same RS. This is already protected against by the use of normal TLS on the connection between the client and the RS. I think instead you are referring to a malicious/compromised RS replaying the token to a different RS - which has more of the flavour of a man in the middle attack (of the phishing kind).
    
    I would argue TLS basically prevents leakage and not replay. The threats we try to cope with can be found in the Security BCP. There are multiple ways access tokens can leak, including referrer headers, mix-up, open redirection, browser history, and all sorts of access token leakage at the resource server
    
    Please have a look at https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-4.
    
    https://tools.ietf.org/html/draft-ietf-oauth-security-topics-13#section-4.8 also has an extensive discussion of potential counter measures, including audience restricted access tokens and a conclusion to recommend sender constrained access tokens over other mechanisms.
    
    > 
    > But if that's the case then there are much simpler defences than those proposed in the current draft:
    > 
    > 1. Get separate access tokens for each RS with correct audience and scopes. The consensus appears to be that this is hard to do in some cases, hence the draft.
    
    How many deployments do you know that today are able to issue RS-specific access tokens?
    BTW: how would you identify the RS?
    
    I agree that would be an alternative and I’m a great fan of such tokens (and used them a lot at Deutsche Telekom) but in my perception this pattern needs still to be established in the market. Moreover, they basically protect from a rough RS (if the URL is used as audience) replaying the token someplace else, but they do not protect from all other kinds of leakage/replay (e.g. log files).
    
    > 2. Make the DPoP token be a simple JWT with an "iat" and the origin of the RS. This stops the token being reused elsewhere but the client can reuse it (replay it) for many requests.
    > 3. Issue a macaroon-based access token and the client can add a correct audience and scope restrictions at the point of use.
    
    Why is this needed if the access token is already audience restricted? Or do you propose this as alternative? 
    
    > 
    > Protecting against the first kind of replay attacks only becomes an issue if we assume the protections in TLS have failed. But if DPoP is only intended for cases where mTLS can't be used, it shouldn't have to protect against a stronger threat model in which we assume that TLS security has been lost.
    
    I agree. 
    
    best regards,
    Torsten. 
    
    > 
    > -- Neil