Re: [Unbearable] Sec-Token-Binding header and Vary

Martin Thomson <martin.thomson@gmail.com> Wed, 04 April 2018 06:47 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: unbearable@ietfa.amsl.com
Delivered-To: unbearable@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E6CA612708C for <unbearable@ietfa.amsl.com>; Tue, 3 Apr 2018 23:47:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 hjJV7P5Z2ZSJ for <unbearable@ietfa.amsl.com>; Tue, 3 Apr 2018 23:47:52 -0700 (PDT)
Received: from mail-ot0-x22d.google.com (mail-ot0-x22d.google.com [IPv6:2607:f8b0:4003:c0f::22d]) (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 8D1B4124B17 for <unbearable@ietf.org>; Tue, 3 Apr 2018 23:47:52 -0700 (PDT)
Received: by mail-ot0-x22d.google.com with SMTP id a14-v6so4018395otf.6 for <unbearable@ietf.org>; Tue, 03 Apr 2018 23:47:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pZclXENlc0ARDifgRTEnoFqg1jjZ3XnjEf0EARXB03k=; b=XnaU1LdblXCe/lTOMGuM/TUx6M3dtZs9WM5LPpQnNSqP65d3FoR7/wxbODLo0HE78Z UXvUPavP79KHTur5QqWWNaoUAjbiGM7lZ/aHtBYupK7DGbVLkTa+5iwN+GHOd6C3rBjb RPcRb52fpfjnJrKWZj/OnyKEDOi8gD101Hn5eX0Gr43BIgVtASFCr18rJRaK42Pelstk W6zR1M05BVQFGrRWKHlM5GBijTiP9U1OgJAGrB4bAryUK7QffAouMXEKR5lWxFCoyx6y usfSmaPt3NSU9aiOf2eqJTloWJhs+TLbVU0OjPEeJ9NS59J9LF5tHYp/Bw3KgIcz3P8M KkTg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pZclXENlc0ARDifgRTEnoFqg1jjZ3XnjEf0EARXB03k=; b=XssNjZpJ8fgt9b3F0IJ8nZohub/rbKzcqzDh2U7/Qim5SEWfw/DTUKY2zBU0R56SD3 iC6fAU7yOGmV8iO134sO12g8eQt+Nv8uHkZl7h6ntPkp2uiS106XWeb7jSdKB+MnWFSD VVpr2tGEA5JTeyVJts1FOlbAavboNyHeAv0A6ivxXTy7XI9g03j40YRFk5cCpHiQDcNA EStkmibAMmLi36YIkZyzeObjdfcDoj7QxNhFt00p/J6YpugeX94Kkarjnb726RvRgVm7 pSd3ZegcaUiz4WAfrdPd/3ID3HRDhx3dD37wNEC7ZKgz6v12XwoBP4z2iIbVWBNvjvE3 0Vqw==
X-Gm-Message-State: ALQs6tCHaX+Sp8KhkLC35qJ7KYDmyZifzeDm8mke9UCEc7CwfLoYIOSY Jy31pnuhRdO8W9iys/TdSpzw4q6jPZbZcsj5GSg=
X-Google-Smtp-Source: AIpwx4/du+rUBdG/QJdsD4evotXEnFVFgyKHD1rz8nRgU6JzCwwSfAulgRoZuQAIewS9+jOGjYW4ECDPyasTG6OpkrI=
X-Received: by 2002:a9d:29ea:: with SMTP id g39-v6mr10441284otd.241.1522824471762; Tue, 03 Apr 2018 23:47:51 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9d:ac7:0:0:0:0:0 with HTTP; Tue, 3 Apr 2018 23:47:51 -0700 (PDT)
In-Reply-To: <CACdeXi++6CghWpymzMKhFwnpqCHzV0_BSXoGmifcBwoH1H-Rsw@mail.gmail.com>
References: <CACdeXiKHWmRxai1WST2BnW1BfjTWRZOAM6BRE3ZoS5De4FiQ5Q@mail.gmail.com> <CABkgnnU5hBmTM_ucXcfqXOgJQR_rQ-PVNOvAv+H=vUMFK76tUg@mail.gmail.com> <CACdeXi++6CghWpymzMKhFwnpqCHzV0_BSXoGmifcBwoH1H-Rsw@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Wed, 04 Apr 2018 16:47:51 +1000
Message-ID: <CABkgnnXuhcoYvgr+1k0suuNOUr6DEzvYFTyC+RH+_C_eKTcoCA@mail.gmail.com>
To: Nick Harper <nharper@google.com>
Cc: IETF Tokbind WG <unbearable@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/unbearable/FyAMAtzDxcjuk21UvWHCBqkmy5I>
Subject: Re: [Unbearable] Sec-Token-Binding header and Vary
X-BeenThere: unbearable@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "\"This list is for discussion of proposals for doing better than bearer tokens \(e.g. HTTP cookies, OAuth tokens etc.\) for web applications. The specific goal is chartering a WG focused on preventing security token export and replay attacks.\"" <unbearable.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/unbearable>, <mailto:unbearable-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/unbearable/>
List-Post: <mailto:unbearable@ietf.org>
List-Help: <mailto:unbearable-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/unbearable>, <mailto:unbearable-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Apr 2018 06:47:55 -0000

That doesn't require any more text than what is already in RFC 7234 though :)

On Wed, Apr 4, 2018 at 4:04 AM, Nick Harper <nharper@google.com> wrote:
> Sure, I think it's reasonable to assume that most resources depending
> on token bindings (or in response to a request with Sec-Token-Binding)
> would be marked Cache-Control: private, or at least not have Vary:
> Sec-Token-Binding, but even if that's the common case, spec-compliant
> implementations still need to handle Vary: Sec-Token-Binding (rare as
> it is) if that's something the spec allows.
>
> On Mon, Apr 2, 2018 at 11:19 PM, Martin Thomson
> <martin.thomson@gmail.com> wrote:
>> ...or say nothing.
>>
>> ...or observe that most resources that depend on token bindings will
>> be marked Cache-Control: private.
>>
>> On Fri, Mar 30, 2018 at 8:20 AM, Nick Harper <nharper@google.com> wrote:
>>> The Vary HTTP header specifies a list of headers whose values must
>>> match for a resource to be served from the cache. HTTPSTB specifies
>>> that a server MAY list Sec-Token-Binding in a Vary response header. I
>>> think this behavior is silly, and we should disallow Sec-Token-Binding
>>> in Vary.
>>>
>>> The reason why this is silly is that the Sec-Token-Binding header's
>>> value is dependent on the underlying connection, and it will be
>>> different for requests on different connections.
>>>
>>> Consider a request to example.com for resource foo, sent with the
>>> Sec-Token-Binding header, that gets a response with "Vary:
>>> Sec-Token-Binding", and a browser caches this response. The browser
>>> then visits some page that includes resource foo, so it goes to see if
>>> it can use it from cache. (Assume arguendo that all other caching
>>> properties are such that if there weren't this Vary header the
>>> response would be served from cache.) There are two options now:
>>>
>>> 1) The browser has no connection open to example.com. Any attempted
>>> request for resource foo would have a different Sec-Token-Binding
>>> header (because it cannot possibly match the header of the request
>>> sent on a different connection), so the resource cannot be loaded from
>>> cache because the Sec-token-Binding header can't match.
>>> 2) The browser does have a connection open to example.com. Now, the
>>> browser needs to check that if it were to make a request to
>>> example.com for foo, whether the Sec-Token-Binding header it would
>>> generate matches - if so it can serve the response from cache; if not,
>>> it needs to continue sending the request on the network.
>>>
>>> A main reason for caching responses is so that they can be served
>>> without ever going to the network. This now requires binding a request
>>> to a particular network connection before evaluating whether it can be
>>> served from the cache, which seems backwards and somewhere between
>>> annoying and impossible to implement.
>>>
>>> I suggest changing the "MAY" to "MUST NOT": Under "Additionally, the
>>> Sec-Token-Binding header field:" where it says "MAY be listed by a
>>> server in a Vary response header field", change this to a "MUST NOT".
>>>
>>> _______________________________________________
>>> Unbearable mailing list
>>> Unbearable@ietf.org
>>> https://www.ietf.org/mailman/listinfo/unbearable