idnits 2.17.1 draft-west-first-party-cookies-03.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 (May 13, 2015) is 3270 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. 'HTML' -- Possible downref: Non-RFC (?) normative reference: ref. 'PSL' ** Downref: Normative reference to an Informational RFC: RFC 7034 ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) -- Possible downref: Non-RFC (?) normative reference: ref. 'SERVICE-WORKERS' -- Possible downref: Non-RFC (?) normative reference: ref. 'WORKERS' Summary: 4 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) May 13, 2015 5 Intended status: Standards Track 6 Expires: November 14, 2015 8 First-Party-Only Cookies 9 draft-west-first-party-cookies-03 11 Abstract 13 This document updates RFC6265 by defining a "First-Party-Only" 14 attribute which allows servers to assert that a cookie ought to be 15 sent only in a "first-party" context. This assertion allows user 16 agents to mitigate the risk of cross-origin information leakage, and 17 provides some minimal protection against cross-site request forgery 18 attacks. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on November 14, 2015. 37 Copyright Notice 39 Copyright (c) 2015 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 1.2. Limitations . . . . . . . . . . . . . . . . . . . . . . . 3 57 1.3. Examples . . . . . . . . . . . . . . . . . . . . . . . . 4 58 2. Terminology and notation . . . . . . . . . . . . . . . . . . 4 59 2.1. First-party and Third-party Requests . . . . . . . . . . 5 60 2.1.1. Document-based requests . . . . . . . . . . . . . . . 5 61 2.1.2. Worker-based requests . . . . . . . . . . . . . . . . 7 62 3. Server Requirements . . . . . . . . . . . . . . . . . . . . . 8 63 3.1. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . 8 64 3.2. Semantics of the "First-Party-Only" Attribute (Non- 65 Normative) . . . . . . . . . . . . . . . . . . . . . . . 9 66 4. User Agent Requirements . . . . . . . . . . . . . . . . . . . 9 67 4.1. The "First-Party-Only" attribute . . . . . . . . . . . . 9 68 4.2. Monkey-patching the Storage Model . . . . . . . . . . . . 9 69 4.3. Monkey-patching the "Cookie" header . . . . . . . . . . . 10 70 5. Authoring Considerations . . . . . . . . . . . . . . . . . . 10 71 5.1. Mashups and Widgets . . . . . . . . . . . . . . . . . . . 10 72 6. Privacy Considerations . . . . . . . . . . . . . . . . . . . 10 73 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 74 7.1. Normative References . . . . . . . . . . . . . . . . . . 11 75 7.2. Informative References . . . . . . . . . . . . . . . . . 12 76 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 12 77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 12 79 1. Introduction 81 Section 8.2 of [RFC6265] eloquently notes that cookies are a form of 82 ambient authority, attached by default to requests the user agent 83 sends on a user's behalf. Even when an attacker doesn't know the 84 contents of a user's cookies, she can still execute commands on the 85 user's behalf (and with the user's authority) by asking the user 86 agent to send HTTP requests to unwary servers. 88 Here, we update [RFC6265] with a simple mitigation strategy that 89 allows servers to declare certain cookies as "First-party-only", 90 meaning they should be attached to requests if and only if those 91 requests occur in a first-party context (as defined in section 2.1). 93 Note that the mechanism outlined here is backwards compatible with 94 the existing cookie syntax. Servers may serve first-party cookies to 95 all user agents; those that do not support the "First-Party-Only" 96 attribute will simply store a cookie which is returned in all 97 applicable contexts, just as they do today. 99 1.1. Goals 101 These first-party-only cookies are intended to provide a solid layer 102 of defense-in-depth against attacks which require embedding an 103 authenticated request into an attacker-controlled context: 105 1. Timing attacks which yield cross-origin information leakage (such 106 as those detailed in [pixel-perfect]) can be substantially 107 mitigated by setting the "First-Party-Only" attribute on 108 authentication cookies. The attacker will only be able to embed 109 unauthenticated resources, as embedding mechanisms such as 110 "