Same-site Cookies
draft-west-first-party-cookies-05

The information below is for an old version of the document
Document Type Active Internet-Draft (httpbis WG)
Last updated 2016-01-21
Replaced by draft-ietf-httpbis-cookie-same-site
Stream IETF
Intended RFC status (None)
Formats plain text pdf html bibtex
Stream WG state Candidate for WG Adoption
Document shepherd No shepherd assigned
IESG IESG state I-D Exists
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
HTTPbis                                                          M. West
Internet-Draft                                               Google, Inc
Updates: 6265 (if approved)                                   M. Goodwin
Intended status: Standards Track                                 Mozilla
Expires: July 23, 2016                                  January 20, 2016

                           Same-site Cookies
                   draft-west-first-party-cookies-05

Abstract

   This document updates RFC6265 by defining a "SameSite" attribute
   which allows servers to assert that a cookie ought not to be sent
   along with cross-site requests.  This assertion allows user agents to
   mitigate the risk of cross-origin information leakage, and provides
   some protection against cross-site request forgery attacks.

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 http://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 July 23, 2016.

Copyright Notice

   Copyright (c) 2016 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
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   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

West & Goodwin            Expires July 23, 2016                 [Page 1]
Internet-Draft             first-party-cookies              January 2016

   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Goals . . . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.2.  Limitations . . . . . . . . . . . . . . . . . . . . . . .   3
     1.3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .   4
   2.  Terminology and notation  . . . . . . . . . . . . . . . . . .   4
     2.1.  "Same-site" and "cross-site" Requests . . . . . . . . . .   5
       2.1.1.  Document-based requests . . . . . . . . . . . . . . .   5
       2.1.2.  Worker-based requests . . . . . . . . . . . . . . . .   6
   3.  Server Requirements . . . . . . . . . . . . . . . . . . . . .   8
     3.1.  Grammar . . . . . . . . . . . . . . . . . . . . . . . . .   8
     3.2.  Semantics of the "SameSite" Attribute (Non-Normative) . .   8
   4.  User Agent Requirements . . . . . . . . . . . . . . . . . . .   8
     4.1.  The "SameSite" attribute  . . . . . . . . . . . . . . . .   8
     4.2.  Monkey-patching the Storage Model . . . . . . . . . . . .   9
     4.3.  Monkey-patching the "Cookie" header . . . . . . . . . . .   9
   5.  Authoring Considerations  . . . . . . . . . . . . . . . . . .  10
     5.1.  Mashups and Widgets . . . . . . . . . . . . . . . . . . .  10
   6.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .  10
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  10
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  10
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  11
   Appendix A.  Acknowledgements . . . . . . . . . . . . . . . . . .  12
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  12

1.  Introduction

   Section 8.2 of [RFC6265] eloquently notes that cookies are a form of
   ambient authority, attached by default to requests the user agent
   sends on a user's behalf.  Even when an attacker doesn't know the
   contents of a user's cookies, she can still execute commands on the
   user's behalf (and with the user's authority) by asking the user
   agent to send HTTP requests to unwary servers.

   Here, we update [RFC6265] with a simple mitigation strategy that
   allows servers to declare certain cookies as "same-site", meaning
   they should not be attached to "cross-site" requests (as defined in
   section 2.1).

   Note that the mechanism outlined here is backwards compatible with
   the existing cookie syntax.  Servers may serve these cookies to all
   user agents; those that do not support the "SameSite" attribute will
   simply store a cookie which is attached to all relevant requests,
Show full document text