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

Neil Madden <> Sun, 13 December 2020 12:45 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 0FFD33A16E3 for <>; Sun, 13 Dec 2020 04:45:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.198
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: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id HGQPCpmVD6Mz for <>; Sun, 13 Dec 2020 04:45:40 -0800 (PST)
Received: from ( [IPv6:2a00:1450:4864:20::536]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 58C853A16E1 for <>; Sun, 13 Dec 2020 04:45:39 -0800 (PST)
Received: by with SMTP id c7so14247975edv.6 for <>; Sun, 13 Dec 2020 04:45:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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 [] ( []) by with ESMTPSA id j7sm13259719edp.52.2020. (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Dec 2020 04:45:37 -0800 (PST)
From: Neil Madden <>
Mime-Version: 1.0 (1.0)
Date: Sun, 13 Dec 2020 12:45:35 +0000
Message-Id: <>
References: <>
Cc: Brian Campbell <>, oauth <>
In-Reply-To: <>
To: Torsten Lodderstedt <>
X-Mailer: iPhone Mail (18B92)
Content-Type: multipart/alternative; boundary="Apple-Mail-DBC38558-8515-4D69-B89C-F762ABA674E6"
Content-Transfer-Encoding: 7bit
Archived-At: <>
Subject: Re: [OAUTH-WG] DPoP followup I: freshness and coverage of signature
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OAUTH WG <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 13 Dec 2020 12:45:43 -0000

> On 13 Dec 2020, at 09:11, Torsten Lodderstedt <> 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 <>