idnits 2.17.1 draft-ietf-httpbis-cookie-same-site-00.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 (June 20, 2016) is 2867 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 HTTP Working Group M. West 3 Internet-Draft Google, Inc 4 Updates: 6265 (if approved) M. Goodwin 5 Intended status: Standards Track Mozilla 6 Expires: December 22, 2016 June 20, 2016 8 Same-Site Cookies 9 draft-ietf-httpbis-cookie-same-site-00 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 Note to Readers 21 Discussion of this draft takes place on the HTTP working group 22 mailing list (ietf-http-wg@w3.org), which is archived at 23 https://lists.w3.org/Archives/Public/ietf-http-wg/ . 25 Working Group information can be found at http://httpwg.github.io/ ; 26 source code and issues list for this draft can be found at 27 https://github.com/httpwg/http-extensions/labels/cookie-same-site . 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on December 22, 2016. 46 Copyright Notice 48 Copyright (c) 2016 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 64 1.1. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 1.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 4 66 2. Terminology and notation . . . . . . . . . . . . . . . . . . 4 67 2.1. "Same-site" and "cross-site" Requests . . . . . . . . . . 5 68 2.1.1. Document-based requests . . . . . . . . . . . . . . . 5 69 2.1.2. Worker-based requests . . . . . . . . . . . . . . . . 6 70 3. Server Requirements . . . . . . . . . . . . . . . . . . . . . 7 71 3.1. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 7 72 3.2. Semantics of the "SameSite" Attribute (Non-Normative) . . 8 73 4. User Agent Requirements . . . . . . . . . . . . . . . . . . . 8 74 4.1. The "SameSite" attribute . . . . . . . . . . . . . . . . 8 75 4.1.1. "Strict" and "Lax" enforcement . . . . . . . . . . . 9 76 4.2. Monkey-patching the Storage Model . . . . . . . . . . . . 9 77 4.3. Monkey-patching the "Cookie" header . . . . . . . . . . . 10 78 5. Authoring Considerations . . . . . . . . . . . . . . . . . . 10 79 5.1. Defense in depth . . . . . . . . . . . . . . . . . . . . 10 80 5.2. Top-level Navigations . . . . . . . . . . . . . . . . . . 10 81 5.3. Mashups and Widgets . . . . . . . . . . . . . . . . . . . 11 82 6. Privacy Considerations . . . . . . . . . . . . . . . . . . . 11 83 6.1. Server-controlled . . . . . . . . . . . . . . . . . . . . 11 84 6.2. Pervasive Monitoring . . . . . . . . . . . . . . . . . . 12 85 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 86 7.1. Normative References . . . . . . . . . . . . . . . . . . 12 87 7.2. Informative References . . . . . . . . . . . . . . . . . 13 88 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 14 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 91 1. Introduction 93 Section 8.2 of [RFC6265] eloquently notes that cookies are a form of 94 ambient authority, attached by default to requests the user agent 95 sends on a user's behalf. Even when an attacker doesn't know the 96 contents of a user's cookies, she can still execute commands on the 97 user's behalf (and with the user's authority) by asking the user 98 agent to send HTTP requests to unwary servers. 100 Here, we update [RFC6265] with a simple mitigation strategy that 101 allows servers to declare certain cookies as "same-site", meaning 102 they should not be attached to "cross-site" requests (as defined in 103 section 2.1). 105 Note that the mechanism outlined here is backwards compatible with 106 the existing cookie syntax. Servers may serve these cookies to all 107 user agents; those that do not support the "SameSite" attribute will 108 simply store a cookie which is attached to all relevant requests, 109 just as they do today. 111 1.1. Goals 113 These cookies are intended to provide a solid layer of defense-in- 114 depth against attacks which require embedding an authenticated 115 request into an attacker-controlled context: 117 1. Timing attacks which yield cross-origin information leakage (such 118 as those detailed in [pixel-perfect]) can be substantially 119 mitigated by setting the "SameSite" attribute on authentication 120 cookies. The attacker will only be able to embed unauthenticated 121 resources, as embedding mechanisms such as "