Re: [Unbearable] Sec- prefix for Token-Binding headers

Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Tue, 30 June 2015 10:32 UTC

Return-Path: <ilari.liusvaara@elisanet.fi>
X-Original-To: unbearable@ietfa.amsl.com
Delivered-To: unbearable@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 430051ACD3A for <unbearable@ietfa.amsl.com>; Tue, 30 Jun 2015 03:32:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.002
X-Spam-Level:
X-Spam-Status: No, score=-0.002 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham
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 YM873jOTDBBD for <unbearable@ietfa.amsl.com>; Tue, 30 Jun 2015 03:32:03 -0700 (PDT)
Received: from emh01.mail.saunalahti.fi (emh01.mail.saunalahti.fi [62.142.5.107]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA0601ACE5D for <unbearable@ietf.org>; Tue, 30 Jun 2015 03:32:02 -0700 (PDT)
Received: from LK-Perkele-VII (a91-155-194-207.elisa-laajakaista.fi [91.155.194.207]) by emh01.mail.saunalahti.fi (Postfix) with ESMTP id D78569007D; Tue, 30 Jun 2015 13:32:00 +0300 (EEST)
Date: Tue, 30 Jun 2015 13:32:00 +0300
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Dirk Balfanz <balfanz@google.com>
Message-ID: <20150630103200.GA11277@LK-Perkele-VII>
References: <CADHfa2BeuZ0BZtD_59b5fDcnT3HKw+k0WKwbBiwfk-fx2_A-0A@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CADHfa2BeuZ0BZtD_59b5fDcnT3HKw+k0WKwbBiwfk-fx2_A-0A@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Sender: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Archived-At: <http://mailarchive.ietf.org/arch/msg/unbearable/QyzN8S23SQ5KAppmsZb2QnmP1mQ>
Cc: Tokbind WG <unbearable@ietf.org>
Subject: Re: [Unbearable] Sec- prefix for Token-Binding headers
X-BeenThere: unbearable@ietf.org
X-Mailman-Version: 2.1.15
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: Tue, 30 Jun 2015 10:32:05 -0000

On Tue, Jun 30, 2015 at 10:09:41AM +0000, Dirk Balfanz wrote:
> 
> following Leif's request to mirror discussions here, I wanted to point out
> one discussion we're having over there regarding the Sec- prefix for the
> Token-Binding header:
> https://github.com/TokenBinding/Internet-Drafts/issues/1
> 
> Anne favors a Sec- prefix (meaning it can't be set directly from
> Javascript), whereas Martin doesn't.

Because TokenBinding protects cookies, and cookies are already a
forbidden field (that is, Javascript can't set its own cookies
for request), I don't see use for non-Sec field.

Referred token bindings might be another matter (especially if not
actually validated), since the access token might not take the form
of cookie, and thus Javascript can control sending/receiving.


Being able to set TokenBinding header from Javascript might however
lead to weird behaviour:

Generate a key and valid signature with that key. Then override
TokenBinding header with that signature on request to another origin
with cookies sent.

If browser has cookies for the origin, those now get sent with
invalid TokenBinding. Which should be no problem, unless the server
does something dumb.

If the server sends cookies and browser stores those, the
TokenBinding for those cookies will be wrong and those cookies
presumably won't work.


-Ilari