Re: Cookies and schemes.

Martin Thomson <> Mon, 09 March 2020 22:07 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D25623A043D for <>; Mon, 9 Mar 2020 15:07:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.751
X-Spam-Status: No, score=-2.751 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key) header.b=kHyTRkwo; dkim=pass (2048-bit key) header.b=EPMIHrTh
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Zo9_nQ6vdOGD for <>; Mon, 9 Mar 2020 15:07:10 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 800DD3A0776 for <>; Mon, 9 Mar 2020 15:07:09 -0700 (PDT)
Received: from lists by with local (Exim 4.92) (envelope-from <>) id 1jBQV5-0006aW-ES for; Mon, 09 Mar 2020 22:03:51 +0000
Resent-Date: Mon, 09 Mar 2020 22:03:51 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <>) id 1jBQUE-0006NT-Ti for; Mon, 09 Mar 2020 22:02:58 +0000
Received: from ([]) by with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <>) id 1jBQUD-0005fQ-5R for; Mon, 09 Mar 2020 22:02:58 +0000
Received: from compute2.internal (compute2.nyi.internal []) by mailout.nyi.internal (Postfix) with ESMTP id D6960220F4 for <>; Mon, 9 Mar 2020 18:02:45 -0400 (EDT)
Received: from imap2 ([]) by compute2.internal (MEProxy); Mon, 09 Mar 2020 18:02:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=+SPejzKw+zQViZNW5B2oNegVYPBjiie NXO2mbaOMyE0=; b=kHyTRkwoetIUZVN3Km+1hlGH+g8KD2s8HKjPZCpvyH7qqrA DhsdSwx6ASpBl8kSbCXBFNJUPUkvD16gpZ//BXvblLRX4kwxU30+pdvc5uNUuWvA YAy7GPRgLuJiQiWnShrLcOUuu48AgagQaGGWsXAMoI45UwPTrbClSMtMShebcdnh 7hcWqSlnRZTuN2vNnASxMLX6VzFILx0xWKqVpzlhAQJLfkCHtUPGp1uSGG9BoWek OfCguVYQ3I5m4xxSlCrFIyvxYMezIdGeU2in2tHmAGhLuZEhFWMAOAU7btTLV4bH JSn4caWzm3RixnLiVtnUsad9M7N7/GTxXq9n3qg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+SPejz Kw+zQViZNW5B2oNegVYPBjiieNXO2mbaOMyE0=; b=EPMIHrTh+OCdXzIQuBQFmJ kUR1fTX97lreH4yIGlXMV3wp4QLHDafzkkq9mlsNj/P67Ofex2EV7G8HchK7zhLa DksYYb2WBRb7TsSyaxBWIfzBbieDBb0L3nwYemRinOFjZUjoJyU4ivcyHQrfcFwG CyoR3bpLoKVOEjHONbcCeoma9fXrRwj8hR85qMz0aVhLF9YvfghSDn38DspdsviW 8viM8vaQkD94u4p1BjWVO+c/FlwS4ffLJ3FwIcdvDlvu8OVo+T1MbKhsGiyHyBTG wcmCuWm3vJdSM7ytMrecYjPfwzvXkNUaE43TCcVT7D497eTPdXN7ya8o0ajTUIaw ==
X-ME-Sender: <xms:Bb1mXnJbYckk_QKcnKUNUF0GgK5xSL9xnnhVwX5NmmgY9WBKRH3MfA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddukedgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesth dtredtreertdenucfhrhhomhepfdforghrthhinhcuvfhhohhmshhonhdfuceomhhtsehl ohifvghnthhrohhphidrnhgvtheqnecuffhomhgrihhnpehgihhthhhusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmtheslhho figvnhhtrhhophihrdhnvght
X-ME-Proxy: <xmx:Bb1mXqWr0Uuqc_XfOTr2g1A9o6VghyU9ar0vZDYgr9LP-thl8iV-qw> <xmx:Bb1mXl6wCnu4N9wMv-j6W3Zc7z4iQClEGSRoBZ4ErM181r8VXTSc6g> <xmx:Bb1mXh7WXtKhaKpMvf-xXctxHZDDqYo5OPDwHOFsgaEuJ46gXyszxg> <xmx:Bb1mXmmqBwwkTov6VxEB5fpKBc0XGYLrbanmo_GDk2Qp1Nbu9oWfLQ>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7A3ABE00EF; Mon, 9 Mar 2020 18:02:45 -0400 (EDT)
X-Mailer: Webmail Interface
User-Agent: Cyrus-JMAP/3.1.7-991-g5a577d3-fmstable-20200305v3
Mime-Version: 1.0
Message-Id: <>
In-Reply-To: <>
References: <>
Date: Tue, 10 Mar 2020 09:02:25 +1100
From: Martin Thomson <>
Content-Type: text/plain
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-9.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: 1jBQUD-0005fQ-5R db66422666d9834f6e0f17bcfe709bb8
Subject: Re: Cookies and schemes.
Archived-At: <>
X-Mailing-List: <> archive/latest/37426
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

On Mon, Mar 9, 2020, at 19:51, Mike West wrote:
> proposes two changes:
> 1. We teach cookies about schemes, and lock them to the scheme that set 
> them (just like every other web-facing storage mechanism).


To Willy's point about transfer, perhaps we can allow any cookies that are set on an http:// response to follow a redirect to https://  The Sec-Nonsecure-Cookie header field seems like it might not be great long term.

Tf the goal is to support temporally-constrained transfer, then binding the cookies to the redirect avoids pulling from previous state.  Also, the redirector could have just packed this information into the target URL, so it's not a new tracking vector.

Have I missed a key piece of information?  Willy, could this work in the cases you understand?

> 2. We curtail non-secure schemes' cookies' lifetime by agreeing on a 
> set of heuristics for a user's "session" on a given site, and culling 
> cookies when a site's session expires.

Also good.  The need for heuristics is unfortunate, but I appreciate that you have to do that.