Re: Harmonizing draft-west-cookie-prefixes-05 with the web origin concept

Mike West <mkwst@google.com> Thu, 07 January 2016 15:45 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4FDDA1A8FD3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 7 Jan 2016 07:45:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.389
X-Spam-Level:
X-Spam-Status: No, score=-6.389 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 6D9kerKaSUJA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 7 Jan 2016 07:45:18 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5B92D1A8F50 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 7 Jan 2016 07:45:18 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aHChz-0007Vd-8F for ietf-http-wg-dist@listhub.w3.org; Thu, 07 Jan 2016 15:42:39 +0000
Resent-Date: Thu, 07 Jan 2016 15:42:39 +0000
Resent-Message-Id: <E1aHChz-0007Vd-8F@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <mkwst@google.com>) id 1aHChw-0007U3-6m for ietf-http-wg@listhub.w3.org; Thu, 07 Jan 2016 15:42:36 +0000
Received: from mail-lb0-f171.google.com ([209.85.217.171]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <mkwst@google.com>) id 1aHChu-0001sb-76 for ietf-http-wg@w3.org; Thu, 07 Jan 2016 15:42:35 +0000
Received: by mail-lb0-f171.google.com with SMTP id sv6so202310270lbb.0 for <ietf-http-wg@w3.org>; Thu, 07 Jan 2016 07:42:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=fJ6lAIpJT105cfHG8gdRap8VoES5Ah+wY+UdK6ufPlc=; b=cS8p8/BRPO9E0XfP73091N9nFWirwwxrkrpHD4rE5ol9n/A4ATtVFmhQ4bRNDEXV6w qoD7zG+ZaGTS8wdk5SeJs7f4QwVJ6T3vMw/onIihhnHwKlajmA2sL0xXAc6KB+HQMPjm Ia4xM8rllcZuB1t7+CtdXdBVyIkcN8IxKXQu7WyRxZqbhLSaiAJRkWHBwjWAkW/+7h7W NvNQjJK/Axu8gEXv1eL+sPbpHLMEBKmidqewG9JanPbb7AWYWr2PqVVLri2DN82xlUS6 jBl4kODKQy/uSjmMWbp7eBErz61Feuxli5FffwtiX5wz0l8bnUdgxzkz5y5ATr5XS1l1 VSaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=fJ6lAIpJT105cfHG8gdRap8VoES5Ah+wY+UdK6ufPlc=; b=SHxX5RcRkPt+rTDzTq3r2g3NI7kjAzYqm6Pkyk6ZhwJcgV2c0GI7f7s0W6thdUrs+1 xwzLRnohjXBRYyuM14C67KOMYz8h5wbi9LvsEFW1ar52SC3O9Xl7kEnTy+284lUMD9aj VtMj7xyY2VBcqUwPlT1r6b7RElpj+hVE7/q6ZZjcMJF5crLQWJ4Pv5Fe835dFqPgE6Lt OwMR1oQDTpoznnwSAK12ZqeYZJjAirEPOT8I2ubSJ+f0A3muru5Otya2mcx0Q36XfMqI srhWl6zp8HLwg4cwJ1EKMxUZ6Ym6vlVKAy2Lw40jXr/tqmGAbsXnww3KrXaYHac4IaPe AaGg==
X-Gm-Message-State: ALoCoQnAAbr26FkcJWMCAjikBiVTjJl9UdX59dYdzcMkFNI68hlPFHcjD3m6g1A58NyMcaCFQrStWHQHwFYkwOSnjvtO699+shfcKEv4ZxCr37QlQHv+HP0=
X-Received: by 10.112.137.129 with SMTP id qi1mr4559785lbb.31.1452181327062; Thu, 07 Jan 2016 07:42:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.112.42.20 with HTTP; Thu, 7 Jan 2016 07:41:47 -0800 (PST)
In-Reply-To: <20151223054826.GB8547@1wt.eu>
References: <CADBiRd373aPUXeZ+6ZrYM1273H3-AVDSpLJxXLMUaj9Nvixypg@mail.gmail.com> <20151223054826.GB8547@1wt.eu>
From: Mike West <mkwst@google.com>
Date: Thu, 07 Jan 2016 16:41:47 +0100
Message-ID: <CAKXHy=cz9x5VLfQd1S3PooGfdRWu00aMxxhW8fNq+MNi-5YsPQ@mail.gmail.com>
To: Willy Tarreau <w@1wt.eu>, "Emily Stark (Dunn)" <estark@google.com>, Elliott Sprehn <esprehn@google.com>
Cc: Adam Barth <w3c@adambarth.com>, httpbis <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="089e01160de62669230528c05046"
Received-SPF: pass client-ip=209.85.217.171; envelope-from=mkwst@google.com; helo=mail-lb0-f171.google.com
X-W3C-Hub-Spam-Status: No, score=-7.9
X-W3C-Hub-Spam-Report: AWL=1.843, 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, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1aHChu-0001sb-76 8b429887431c1edbc89da075ce4fac5f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Harmonizing draft-west-cookie-prefixes-05 with the web origin concept
Archived-At: <http://www.w3.org/mid/CAKXHy=cz9x5VLfQd1S3PooGfdRWu00aMxxhW8fNq+MNi-5YsPQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30860
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Wed, Dec 23, 2015 at 6:48 AM, Willy Tarreau <w@1wt.eu> wrote:

> Based on Mike's and your proposal, I'm wondering if a solution would not
> be to use special name cookies in addition to the regular ones to pass
> back *all* attributes and even to help define new attributes. We could
> have something like this :
>
>   Set-Cookie: __SID=12345; secure; path=/; domain=example.com;
>
>   Cookie: __SID=12345; __attr_secure__SID=1; __attr_path__SID=/;
> __attr_domain__SID=example.com; __attr_origin__SID=https://example.com
>
> etc... The idea being that "__attr_<attribute_name>" being prefixed in
> front of the cookie name in requests so that the client can pass the
> attributes it learned. This way, a cookie learned from the wrong
> location (eg: injected from HTTP, JS or anything) could be detected
> and replaced by the server. And it still provides unicity on the cookie
> names and value in the request.
>

Elliott (CC'd) proposed something similar in
https://groups.google.com/a/chromium.org/d/msg/blink-dev/IU5t6eLuS2Y/H6HJ-j6TBwAJ,
with a special cookie being sent along with the request that contained all
the attributes (and presumably scopes) of the rest of the cookies. We
didn't spend a whole lot of time with that proposal, as our intuition was
that such a scheme would require some amount of work for each developer to
parse and enforce on their own, while prefixes were a pragmatic solution
that the user agent could enforce for everyone. It might well be worth
picking up (in addition to prefixes?) if there's interest in this group.

-mike