Re: [OAUTH-WG] DPoP followup I: freshness and coverage of signature

Neil Madden <neil.madden@forgerock.com> Sun, 13 December 2020 12:45 UTC

Return-Path: <neil.madden@forgerock.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 0FFD33A16E3 for <oauth@ietfa.amsl.com>; Sun, 13 Dec 2020 04:45:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.198
X-Spam-Level:
X-Spam-Status: No, score=-0.198 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=forgerock.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 HGQPCpmVD6Mz for <oauth@ietfa.amsl.com>; Sun, 13 Dec 2020 04:45:40 -0800 (PST)
Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 58C853A16E1 for <oauth@ietf.org>; Sun, 13 Dec 2020 04:45:39 -0800 (PST)
Received: by mail-ed1-x536.google.com with SMTP id c7so14247975edv.6 for <oauth@ietf.org>; Sun, 13 Dec 2020 04:45:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=forgerock.com; s=google; h=from:mime-version:subject:date:message-id:references:cc:in-reply-to :to:content-transfer-encoding; bh=OPe6qOkwphDpGYNDZZF6A6PMUbRlKNSaSJ7NEaLKQYs=; b=Bi5jQeEPkOV4h+H5ULa5dfypv1w23lANyGxOb7L8dxOjkM9ip8EzgTo9svwt8KiBb7 lCwSqL8mGlr+IGg5F8e0V1GgLtZePLfCZ379yfz3YNt0GNrM12ZPwwxgKs99lPoD7FH5 dMPfcFYVgYlZQIkeRV4QNkItM0RQcq2/033GU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to:content-transfer-encoding; bh=OPe6qOkwphDpGYNDZZF6A6PMUbRlKNSaSJ7NEaLKQYs=; b=DBv88bhgil9B9UGok0GLzQI6oaGuusAC8Q1RoSLjTRdmiX97ZMJoZgFICS8JtJYXzV 8SPrCT//uEA1o5s0/CScYDK1Hg1GY9QdLVgtYGrnO90j/7m+a3iYCZp3IohxXLPECGJh vUrlz3xTRLshtv2BfoBxoMH/647JJv0J5DIUt9PJd47opkcOHckCi+XqKnmAQ98eyE+l FchZaIOb2kR49WKXiBv79kTN6V6VKSH4AcgqlXamnSeDbv4BItTC9Wctx87l+V2VdgSw It7ruy3Lu7DQNAyzhrrD6s1F/A9+hnzwopXLwMxhOdLlmYw+cH3eZvW7kd/5wdA9HXu8 xffw==
X-Gm-Message-State: AOAM531wrEgty16sqI3c++kD3JRgmMuyGQdU9mGdx3wkA4ZS2XN70akL 8FiStKM1Rb43qEi8mWF9Of5fdRNl7hcxH2ko/pZvNddWfiGEaRLbltXhzz2kAwCpo1NaEoT+DA= =
X-Google-Smtp-Source: ABdhPJziDazNq009+tGPMYf8Hdm5vtQYb76xBdBcDB4tuVCwY0IzSW8SCRF7DG9/YKENSRL9Seq7Jg==
X-Received: by 2002:a05:6402:c0b:: with SMTP id co11mr19909367edb.180.1607863538119; Sun, 13 Dec 2020 04:45:38 -0800 (PST)
Received: from [10.0.0.17] (251.207.159.143.dyn.plus.net. [143.159.207.251]) by smtp.gmail.com with ESMTPSA id j7sm13259719edp.52.2020.12.13.04.45.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Dec 2020 04:45:37 -0800 (PST)
From: Neil Madden <neil.madden@forgerock.com>
Mime-Version: 1.0 (1.0)
Date: Sun, 13 Dec 2020 12:45:35 +0000
Message-Id: <16638B24-4C8B-4758-8CCF-0BD20C1C608C@forgerock.com>
References: <A876EA98-80AF-495F-9388-D99D79194F4F@lodderstedt.net>
Cc: Brian Campbell <bcampbell=40pingidentity.com@dmarc.ietf.org>, oauth <oauth@ietf.org>
In-Reply-To: <A876EA98-80AF-495F-9388-D99D79194F4F@lodderstedt.net>
To: Torsten Lodderstedt <torsten@lodderstedt.net>
X-Mailer: iPhone Mail (18B92)
Content-Type: multipart/alternative; boundary=Apple-Mail-DBC38558-8515-4D69-B89C-F762ABA674E6
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/oauth/yQ0L4vvRYm3y6WVfegf1bcTHVo4>
Subject: Re: [OAUTH-WG] DPoP followup I: freshness and coverage of signature
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: Sun, 13 Dec 2020 12:45:43 -0000

> On 13 Dec 2020, at 09:11, Torsten Lodderstedt <torsten@lodderstedt.net> wrote:
> [...]
>> 
>>> - generating (self contained) or using (handles) per URL access tokens might be rather expensive. Can you sketch out how you wanna cope with that challenge?
>> 
>> A decent HMAC implementation takes about 1-2 microseconds for typical size of token we’re talking about. 
> 
> The generation of a self contained access token typically requires querying claim values from at least a single data source. That might take more time. For handle based tokens/token introspection, one needs to add the time it takes to obtain the token data, which requires a HTTPS communication. That could be even more time consuming.

This is typically true of identity-based tokens, where access to a resource is based on who is accessing it. But in a capability-based model this is not the case and the capability itself grants access and is not (usually) tied to an individual identity. 

Where you do want to include claims in a token, or tie capabilities to an identity, then there are more efficient strategies than looking up those claims every time you create a new capability token. For example, in my book I implement a variant in which simple capability URIs are used for access but these are bound to a traditional identity-based session cookie that can be used to look up identity attributes as required. This provides security benefits to both the cookie (CSRF protection) and the capability URIs (linked to a HttpOnly cookie makes them harder to steal). 

If you use macaroons then typically you’d mint a single token with the claims in it and then derive lots of individual tokens from it by appending caveats. For example, when generating a directory listing in a Dropbox-like app you’d mint a single token with details of the user etc and then derive individual tokens to access each file by appending a caveat like “file = /path/to/specific/file”. 

— Neil
-- 
ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>