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

Nick Harper <> Fri, 30 March 2018 02:31 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id B3338124B18 for <>; Thu, 29 Mar 2018 19:31:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.71
X-Spam-Status: No, score=-2.71 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 tO9kvCy2r0c4 for <>; Thu, 29 Mar 2018 19:31:32 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:400d:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 10DB31241F5 for <>; Thu, 29 Mar 2018 19:31:32 -0700 (PDT)
Received: by with SMTP id o5so7967531qki.11 for <>; Thu, 29 Mar 2018 19:31:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YnRJK5cWl1B0mAQlXPc9oN+X6FghuROd6ipq/R+66ng=; b=WNEFVOvq/XWRV5D5BYJBUYIbsumgafOfi9p6mRXSYqZqVaizY+TlDqaMWXvDTxfDsn p59TRnNcJ3aYhIEa8oxVGX1yF7yOurfGgum6QYT08BFGUc4K3etn4AqCvX/c5mlOOGf/ wkFRkrxSLFedAxgcoZ2ZWVA6nRcXsmQCDCvRNhWIRaHfInqG+XkfwaSFWp1YIGWDFM73 MWgR167wndxatMGjlI0DWrGZng8bI0DQtYvZZ7/GjLUR4QIU1ld/xzmRWs+K6BfIPrh2 YMhpWShkbf1hSksi3zF8KF0hcci3s32DgsM5MPT/5S8nELmntsj0pP6Wc5D2TI4T6HDe uN3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YnRJK5cWl1B0mAQlXPc9oN+X6FghuROd6ipq/R+66ng=; b=MehHVkNUfpC7Djf9hT6mjF3fqr1VR980xHjKTv9MbaEw+fk5eNLEtnfwzrA652ZAZk Pn/x/7jMaAOv3MSiCxLW1I2hRvRXAls9tPw12hJEQ6oimR4MIBZVfv1mCjpJY6AsYvWY YDelf6BoaF600jwIVutoOuqrIeyaepc1+7wIrFERlZryZjtySkI06pSvudJT1rwdnj8X jqxd7IfKLWZpq6QF52vZPnScl7KDNYv+4hTInAnke4qhJJUqA3X1SonMys807rH/Qm/D pfsW48sSE0pj9nS7+WtcA6aLEZgU2uUcPNip06nIoAHzSbVcpg8fHfBgRKh1ekeQSb4i KAVA==
X-Gm-Message-State: AElRT7EiRIFXTrMm0A4is5ujeQgwrbIvLXFRH7MRAGqpHOE1MuEdZu+E QO5j+MXzsyQiyhNdZEpYN3CGOc6jyOki+M026ir8EAec
X-Google-Smtp-Source: AIpwx49R+XU3MnNR+xB+3Z9nuZ0Ss5n7xFnQ2XI03Nck5iHNwpf0xbfVQDl5ZohQPDnMPd5AAwLoT49nvHCBny2AKzg=
X-Received: by with SMTP id z125mr14714534qkb.178.1522377090837; Thu, 29 Mar 2018 19:31:30 -0700 (PDT)
MIME-Version: 1.0
References: <> <>
In-Reply-To: <>
From: Nick Harper <>
Date: Fri, 30 Mar 2018 02:31:20 +0000
Message-ID: <>
To: Amos Jeffries <>
Content-Type: multipart/alternative; boundary="94eb2c05b112b72ee40568980951"
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: Fri, 30 Mar 2018 02:31:35 -0000

On Thu, Mar 29, 2018 at 19:16 Amos Jeffries <> wrote:

> On 30/03/18 10:20, 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.
> That is exactly why Vary is permitted. The whole purpose of token
> binding is to bind a token in the TLS connection (session) to the Cookie
> etc in the HTTP(S) message.
> The intended use case for token binding is to ensure that HTTP response
> headers are only valid when used in conjunction with a specific TLS
> connection / session.
> If session resume is used the TLS connection over different TCP
> connection should have the same security token that has been bound for
> the response in question.
> If an entirely new session has been negotiated the token has changed and
> new HTTP response header is needed. That may require;
>  a) a new Cookie header only (CC:no-cache and revalidation is all that
> is needed) or
>  b) a new payload (Vary is relevant).
> For example, consider the new AES payload encodings using a bound token
> value as (part of) their encoding key to enforce one-time access to
> resources - perhapse a secure live stream.
> >
> > 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:
> If one assumes the case where Vary is unnecessary one of course can
> circle around to find that Vary is unnecessary.
> Assume the other case: that caching controls were sent but ignored
> (and/or removed) by one or more HTTP agents along the delivery path.
> Vary is now useful as a backup mechanism to protect against injection
> attacks.

The Sec-Token-Binding header is only relevant when there is end-to-end
security. How can there be any parties changing HTTP headers in the
delivery path without the permission of the server?

It is a corner case thus the weak MAY.

> It wouldn’t make sense for it to be any stronger than a MAY.

> Amos
> _______________________________________________
> Unbearable mailing list