idnits 2.17.1 draft-west-first-party-cookies-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 6, 2016) is 2934 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'FETCH' -- Possible downref: Non-RFC (?) normative reference: ref. 'HTML' -- Possible downref: Non-RFC (?) normative reference: ref. 'PSL' ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) -- Possible downref: Non-RFC (?) normative reference: ref. 'SERVICE-WORKERS' Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HTTPbis M. West 3 Internet-Draft Google, Inc 4 Updates: 6265 (if approved) M. Goodwin 5 Intended status: Standards Track Mozilla 6 Expires: October 8, 2016 April 6, 2016 8 Same-site Cookies 9 draft-west-first-party-cookies-07 11 Abstract 13 This document updates RFC6265 by defining a "SameSite" attribute 14 which allows servers to assert that a cookie ought not to be sent 15 along with cross-site requests. This assertion allows user agents to 16 mitigate the risk of cross-origin information leakage, and provides 17 some protection against cross-site request forgery attacks. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at http://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on October 8, 2016. 36 Copyright Notice 38 Copyright (c) 2016 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents 43 (http://trustee.ietf.org/license-info) in effect on the date of 44 publication of this document. Please review these documents 45 carefully, as they describe your rights and restrictions with respect 46 to this document. Code Components extracted from this document must 47 include Simplified BSD License text as described in Section 4.e of 48 the Trust Legal Provisions and are provided without warranty as 49 described in the Simplified BSD License. 51 Table of Contents 53 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 54 1.1. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 1.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 3 56 2. Terminology and notation . . . . . . . . . . . . . . . . . . 4 57 2.1. "Same-site" and "cross-site" Requests . . . . . . . . . . 4 58 2.1.1. Document-based requests . . . . . . . . . . . . . . . 5 59 2.1.2. Worker-based requests . . . . . . . . . . . . . . . . 6 60 3. Server Requirements . . . . . . . . . . . . . . . . . . . . . 7 61 3.1. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 7 62 3.2. Semantics of the "SameSite" Attribute (Non-Normative) . . 8 63 4. User Agent Requirements . . . . . . . . . . . . . . . . . . . 8 64 4.1. The "SameSite" attribute . . . . . . . . . . . . . . . . 8 65 4.1.1. "Strict" and "Lax" enforcement . . . . . . . . . . . 8 66 4.2. Monkey-patching the Storage Model . . . . . . . . . . . . 9 67 4.3. Monkey-patching the "Cookie" header . . . . . . . . . . . 10 68 5. Authoring Considerations . . . . . . . . . . . . . . . . . . 10 69 5.1. Defense in depth . . . . . . . . . . . . . . . . . . . . 10 70 5.2. Top-level Navigations . . . . . . . . . . . . . . . . . . 11 71 5.3. Mashups and Widgets . . . . . . . . . . . . . . . . . . . 11 72 6. Privacy Considerations . . . . . . . . . . . . . . . . . . . 11 73 6.1. Server-controlled . . . . . . . . . . . . . . . . . . . . 11 74 6.2. Pervasive Monitoring . . . . . . . . . . . . . . . . . . 12 75 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 76 7.1. Normative References . . . . . . . . . . . . . . . . . . 12 77 7.2. Informative References . . . . . . . . . . . . . . . . . 13 78 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 14 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 81 1. Introduction 83 Section 8.2 of [RFC6265] eloquently notes that cookies are a form of 84 ambient authority, attached by default to requests the user agent 85 sends on a user's behalf. Even when an attacker doesn't know the 86 contents of a user's cookies, she can still execute commands on the 87 user's behalf (and with the user's authority) by asking the user 88 agent to send HTTP requests to unwary servers. 90 Here, we update [RFC6265] with a simple mitigation strategy that 91 allows servers to declare certain cookies as "same-site", meaning 92 they should not be attached to "cross-site" requests (as defined in 93 section 2.1). 95 Note that the mechanism outlined here is backwards compatible with 96 the existing cookie syntax. Servers may serve these cookies to all 97 user agents; those that do not support the "SameSite" attribute will 98 simply store a cookie which is attached to all relevant requests, 99 just as they do today. 101 1.1. Goals 103 These cookies are intended to provide a solid layer of defense-in- 104 depth against attacks which require embedding an authenticated 105 request into an attacker-controlled context: 107 1. Timing attacks which yield cross-origin information leakage (such 108 as those detailed in [pixel-perfect]) can be substantially 109 mitigated by setting the "SameSite" attribute on authentication 110 cookies. The attacker will only be able to embed unauthenticated 111 resources, as embedding mechanisms such as "