Incrementally Better Cookies
draft-west-cookie-incrementalism-01

Document Type Active Internet-Draft (individual)
Last updated 2020-03-15
Stream (None)
Intended RFC status (None)
Formats plain text pdf htmlized (tools) htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                            M. West
Internet-Draft                                                    Google
Intended status: Standards Track                          March 15, 2020
Expires: September 16, 2020

                      Incrementally Better Cookies
                  draft-west-cookie-incrementalism-01

Abstract

   This document proposes a few changes to cookies inspired by the
   properties of the HTTP State Tokens mechanism proposed in
   [I-D.west-http-state-tokens].  First, cookies should be treated as
   "SameSite=Lax" by default.  Second, cookies that explicitly assert
   "SameSite=None" in order to enable cross-site delivery should also be
   marked as "Secure".  Third, same-site should take the scheme of the
   sites into account.  Fourth, cookies should respect schemes.  Fifth,
   cookies associated with non-secure schemes should be removed at the
   end of a user's session.  Sixth, the definition of a session should
   be tightened.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 16, 2020.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents

West                   Expires September 16, 2020               [Page 1]
Internet-Draft            cookie-incrementalism               March 2020

   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Conventions and Definitions . . . . . . . . . . . . . . . . .   4
     2.1.  Conformance . . . . . . . . . . . . . . . . . . . . . . .   4
     2.2.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  Monkey-Patches against RFC6265bis . . . . . . . . . . . . . .   4
     3.1.  "Lax" by Default  . . . . . . . . . . . . . . . . . . . .   4
       3.1.1.  "Lax-Allowing-Unsafe" Enforcement . . . . . . . . . .   6
     3.2.  Requiring "Secure" for "SameSite=None"  . . . . . . . . .   8
     3.3.  Schemeful Same-Site . . . . . . . . . . . . . . . . . . .   8
     3.4.  Scheming Cookies  . . . . . . . . . . . . . . . . . . . .   9
     3.5.  Evict Non-Secure Cookies  . . . . . . . . . . . . . . . .  11
     3.6.  Session Lifetime  . . . . . . . . . . . . . . . . . . . .  11
   4.  Security and Privacy Considerations . . . . . . . . . . . . .  13
     4.1.  CSRF  . . . . . . . . . . . . . . . . . . . . . . . . . .  13
     4.2.  Secure Transport  . . . . . . . . . . . . . . . . . . . .  13
     4.3.  Tracking  . . . . . . . . . . . . . . . . . . . . . . . .  14
   5.  Implementation Considerations . . . . . . . . . . . . . . . .  14
     5.1.  Sequencing  . . . . . . . . . . . . . . . . . . . . . . .  14
     5.2.  Deployment  . . . . . . . . . . . . . . . . . . . . . . .  15
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  15
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  15
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  15
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  16
   Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . .  17
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  17

1.  Introduction

   The HTTP State Tokens proposal ([I-D.west-http-state-tokens]) aims to
   replace cookies with a state management mechanism that has better
   security and privacy properties.  That proposal is somewhat
   aspirational: it's going to take a long time to come to agreement on
   the exact contours of a cookie replacement, and an even longer time
   to actually do so.

   While we're debating the details of a new state management primitive,
   it seems quite reasonable to reevaluate some aspects of the existing
   primitive: cookies.  When we can find consensus on some aspect of
Show full document text