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

Martin Thomson <> Tue, 03 April 2018 06:19 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 8124D12E038 for <>; Mon, 2 Apr 2018 23:19:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Status: No, score=-1.999 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id EA1dR6uCgfuX for <>; Mon, 2 Apr 2018 23:19:11 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4003:c0f::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id E600F12E03A for <>; Mon, 2 Apr 2018 23:19:10 -0700 (PDT)
Received: by with SMTP id a14-v6so8561otf.6 for <>; Mon, 02 Apr 2018 23:19:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tRS/bLPtHtSE4kdz8yoqe46K1J+p8QdNQZ6/wC2tAPY=; b=GTfV3YFtj5MFpLQzfhIl/DlkDbAjnrPqytXbK+qOwwRdm++zypH5Ti3/htt4DA8+qe yvbh2/BozQoAkFeanR9x6r0naZdCOJQKloHUwb6phN2QlW0iSi7PkA+Mbw452C8go2yx RpPPCOWm4Vsfdn1Cmr8PxRP5wnctGu4FxkqWKjjjAKJSPDGv7F+ugfq66PWBGo2QS6aD WSMQGzJHrBI62olV/Ysyjly/jl/Xu3ks7OFp8l60InUVqB9he/DjD1tgoXbEOJ0+SfMA YLbCRQWt/5PPVnFWaZ1bBIe6Fz3WflEYKcDPUdiDn7VafE/dyZd3xsI3HN4JNy31sRKv rxWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tRS/bLPtHtSE4kdz8yoqe46K1J+p8QdNQZ6/wC2tAPY=; b=Ld35hM4my6VOwf3MDUKE2Kz2bozw2Kp1ZYkVOqsG2F5Dy+klqDFCNVQv7AreRXXHwd upaeLqXjFWBxbJ1hrymWevsPmulrUThpglAIFmkktQWC7r3Iwb7i4RARhp1Oy8hSm1Qp r6feRaoT33GXqAmTUXJGeJvZ0obbqbAGx3VPxS0MJ06hTpoO8lcM8mcETGdF9CpU9Nyl Ow7b0b5VndkE7sA35o/5CEkoqyqQ99wIAGZPoJaU934wIG/sEAEq+Me1G3+KrZ7E4ctV 68mC/n/gBwybVg2ZUv8mA+zPX54fk4rA/+SUXDV3TKxdXY/vC7J2dMJ5fw0TeLonN47A NoSg==
X-Gm-Message-State: ALQs6tBj55EFIh9Paol6nGIoMfH9CkzsmKHZczKbfqJ3L2J7H/GeC0LK HHCA2ejx9dH/8RI4KEpcWiwQYNC2saAdXMAgyV4=
X-Google-Smtp-Source: AIpwx48A9XgPMYWq/qUZesWDkXWCfnHSjL424nvcP7n4FH8RbwLAXr0kFkLsGxrLtruWFls7WCabrE0Mk+Vbbgl0k7s=
X-Received: by 2002:a9d:2a09:: with SMTP id t9-v6mr6948193ota.392.1522736350209; Mon, 02 Apr 2018 23:19:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9d:ac7:0:0:0:0:0 with HTTP; Mon, 2 Apr 2018 23:19:09 -0700 (PDT)
In-Reply-To: <>
References: <>
From: Martin Thomson <>
Date: Tue, 03 Apr 2018 16:19:09 +1000
Message-ID: <>
To: Nick Harper <>
Cc: IETF Tokbind WG <>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <>
Subject: Re: [Unbearable] Sec-Token-Binding header and Vary
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.\"" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 03 Apr 2018 06:19:14 -0000

...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 <> 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 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 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 Now, the
> browser needs to check that if it were to make a request to
> 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