datatracker.ietf.org
Sign in
Version 5.4.0, 2014-04-22
Report a bug

The Web Origin Concept
RFC 6454

Internet Engineering Task Force (IETF)                          A. Barth
Request for Comments: 6454                                  Google, Inc.
Category: Standards Track                                  December 2011
ISSN: 2070-1721

                         The Web Origin Concept

Abstract

   This document defines the concept of an "origin", which is often used
   as the scope of authority or privilege by user agents.  Typically,
   user agents isolate content retrieved from different origins to
   prevent malicious web site operators from interfering with the
   operation of benign web sites.  In addition to outlining the
   principles that underlie the concept of origin, this document details
   how to determine the origin of a URI and how to serialize an origin
   into a string.  It also defines an HTTP header field, named "Origin",
   that indicates which origins are associated with an HTTP request.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc6454.

Copyright Notice

   Copyright (c) 2011 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
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Barth                        Standards Track                    [Page 1]
RFC 6454                 The Web Origin Concept            December 2011

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Conventions  . . . . . . . . . . . . . . . . . . . . . . . . .  3
     2.1.  Conformance Criteria . . . . . . . . . . . . . . . . . . .  3
     2.2.  Syntax Notation  . . . . . . . . . . . . . . . . . . . . .  4
     2.3.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  4
   3.  Principles of the Same-Origin Policy . . . . . . . . . . . . .  4
     3.1.  Trust  . . . . . . . . . . . . . . . . . . . . . . . . . .  5
       3.1.1.  Pitfalls . . . . . . . . . . . . . . . . . . . . . . .  5
     3.2.  Origin . . . . . . . . . . . . . . . . . . . . . . . . . .  6
       3.2.1.  Examples . . . . . . . . . . . . . . . . . . . . . . .  7
     3.3.  Authority  . . . . . . . . . . . . . . . . . . . . . . . .  7
       3.3.1.  Pitfalls . . . . . . . . . . . . . . . . . . . . . . .  8
     3.4.  Policy . . . . . . . . . . . . . . . . . . . . . . . . . .  8
       3.4.1.  Object Access  . . . . . . . . . . . . . . . . . . . .  8
       3.4.2.  Network Access . . . . . . . . . . . . . . . . . . . .  9
       3.4.3.  Pitfalls . . . . . . . . . . . . . . . . . . . . . . .  9
     3.5.  Conclusion . . . . . . . . . . . . . . . . . . . . . . . . 10
   4.  Origin of a URI  . . . . . . . . . . . . . . . . . . . . . . . 10
   5.  Comparing Origins  . . . . . . . . . . . . . . . . . . . . . . 11
   6.  Serializing Origins  . . . . . . . . . . . . . . . . . . . . . 11
     6.1.  Unicode Serialization of an Origin . . . . . . . . . . . . 12
     6.2.  ASCII Serialization of an Origin . . . . . . . . . . . . . 12
   7.  The HTTP Origin Header Field . . . . . . . . . . . . . . . . . 13
     7.1.  Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 13
     7.2.  Semantics  . . . . . . . . . . . . . . . . . . . . . . . . 13
     7.3.  User Agent Requirements  . . . . . . . . . . . . . . . . . 14
   8.  Security Considerations  . . . . . . . . . . . . . . . . . . . 14
     8.1.  Reliance on DNS  . . . . . . . . . . . . . . . . . . . . . 15
     8.2.  Divergent Units of Isolation . . . . . . . . . . . . . . . 15
     8.3.  Ambient Authority  . . . . . . . . . . . . . . . . . . . . 16
     8.4.  IDNA Dependency and Migration  . . . . . . . . . . . . . . 16
   9.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 17
   10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 17
     10.1. Normative References . . . . . . . . . . . . . . . . . . . 17

[include full document text]