WEBSEC                                                           D. Ross
Internet-Draft                                                 Microsoft
Intended status: Standards Track                              T. Gondrom
Expires: September 8, 2011                                 March 7, 2011


                       HTTP Header Frame Options
                     draft-gondrom-frame-options-00

Abstract

   To improve the protection of web applications against Cross Site
   Request Forgery (CSRF) and Clickjacking this standards defines a http
   response header that declares a policy communicated from a host to
   the client browser whether the transmitted content MUST NOT be
   displayed in frames of other pages from different origins or a list
   of trusted origins which are allowed to frame the content.

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 September 8, 2011.

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



Ross & Gondrom          Expires September 8, 2011               [Page 1]


Internet-Draft                Frame-Options                   March 2011


   described in the Simplified BSD License.


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . . . 3
   2.  Frame-Options Header  . . . . . . . . . . . . . . . . . . . . . 3
     2.1.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . 3
     2.2.  Backus-Naur Form (BNF)  . . . . . . . . . . . . . . . . . . 4
     2.3.  Examples of Frame-Options Headers . . . . . . . . . . . . . 4
   3.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 4
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 5
     4.1.  Registration Template . . . . . . . . . . . . . . . . . . . 5
   5.  Security Considerations . . . . . . . . . . . . . . . . . . . . 5
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 5
     6.1.  Normative References  . . . . . . . . . . . . . . . . . . . 5
     6.2.  Informative References  . . . . . . . . . . . . . . . . . . 5
   Appendix A.  Description of a Clickjacking attack . . . . . . . . . 6
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . . . 6































Ross & Gondrom          Expires September 8, 2011               [Page 2]


Internet-Draft                Frame-Options                   March 2011


1.  Introduction

   In 2009 and 2010 many browser vendors introduced the use of a non-
   standard http header RFC 2616 [RFC2616] "X-Frame-Options" to protect
   against Clickjacking [Clickjacking] and Cross Site Request Forgery
   (CSRF) [CSRF].  This standard is to replace the non-standard header.

   With Clickjacking and CSRF an attacker tricks a user into clicking on
   a button or link to another page and by thus executing an unintended
   command in the context of a different web application.  For example
   with Clickjacking the attacker might use transparent or opaque layers
   to integrate and obscure a button to another page so that the user
   may click on it in the expectation of a different action.  So, in
   this way the attacker is "hijacking" the "Click" on a button meant by
   the user to be sent to host A, while clicking the button in effect
   sends a message to host B. If the user does for example also have an
   open session with host B this can lead to a CSRF attack and executing
   a command in the session context of the user (using the user's
   authentication and authorization) on host B without his intention or
   knowledge.

   The by "Frame-Options" provided defense mechanism against
   Clickjacking is to allow a secure web page from host B to declare
   that its content (for example a button, links, text, etc.) must not
   be displayed in a frame of another page (e.g. from host A).  In
   principle this is done by a policy declared in the HTTP header and
   obeyed by conform browser implementations.

1.1.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].


2.  Frame-Options Header

   The Frame-Options HTTP response header indicates a policy whether a
   browser MUST NOT allow to render a page in a <frame> or <iframe> .
   Hosts can declare this policy in the header of their HTTP responses
   to prevent clickjacking attacks, by ensuring that their content is
   not embedded into other pages or frames.

2.1.  Syntax

   The header field name is:
   Frame-Options




Ross & Gondrom          Expires September 8, 2011               [Page 3]


Internet-Draft                Frame-Options                   March 2011


   There are three different values for the header field.  These values
   are exclusive, that is NOT more than one of the three values MUST be
   set.

   DENY
         A browser receiving content with this header MUST NOT display
         this content in any frame.

   SAMEORIGIN
         A browser receiving content with this header MUST NOT display
         this content in any frame from a page of different origin than
         the content itself.

   TRUSTED  (followed by a list of URIs of trusted origins)
         A browser receiving content with this header MUST NOT display
         this content in any frame from a page of different origin than
         any of the listed origins.  This allows deployment with multi-
         domain sites, as the webmaster can define a whitelist of
         origins that are allowed to frame the page.  While this can
         expose the page to risks by the trusted origins, in some cases
         it may be necessary to use content from other domains or more
         than one origin (hostname).

2.2.  Backus-Naur Form (BNF)

   The RFC 822 [RFC0822] EBNF of the Frame-Options header is:

         Frame-Options = "Frame-Options" ":" "DENY"/ "SAMEORIGIN" /
                                 ("TRUSTED" ":" Origin-List)
             Origin-List = 1*URI


   [TBD] with URI as defined in the websec-origin draft
   [TBD] Or should we use the ABNF (RFC 2234) alternatively or in
   addition?

2.3.  Examples of Frame-Options Headers


3.  Acknowledgements

   This document was derived from input from specifications published by
   various browser vendors like Microsoft (Eric Law, David Ross),
   Mozilla, Google, Opera and Apple.







Ross & Gondrom          Expires September 8, 2011               [Page 4]


Internet-Draft                Frame-Options                   March 2011


4.  IANA Considerations

   This memo a request to IANA to include the specified HTTP header in
   registry as outlined in Registration Procedures for Message Header
   Fields [RFC3864]

4.1.  Registration Template


   PERMANENT MESSAGE HEADER FIELD REGISTRATION TEMPLATE:

   Header field name: Frame-Option

   Applicable protocol: http [RFC2616]

   Status: Standard

   Author/Change controller: IETF

   Specification document(s): draft-gondrom-frame-options

   Related information:

                                 Figure 1


5.  Security Considerations

   The introduction of the http header FRAME-OPTIONS does improve the
   protection against Clickjacking, however it is not self-sufficient on
   its own but MUST be used in conjunction with other security measures
   like secure coding and Content Security Policy (CSP)


6.  References

6.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

6.2.  Informative References

   [CSRF]     OWASP (Open Web Application Security Project), "OWASP
              Top-10: Cross-Site Request Forgery (CSRF)", 2010,
              <http://www.owasp.org/index.php/Top_10_2010-A5>.

   [Clickjacking]



Ross & Gondrom          Expires September 8, 2011               [Page 5]


Internet-Draft                Frame-Options                   March 2011


              OWASP (Open Web Application Security Project),
              "Clickjacking", 2010,
              <http://www.owasp.org/index.php/Clickjacking>.

   [RFC0822]  Crocker, D., "Standard for the format of ARPA Internet
              text messages", STD 11, RFC 822, August 1982.

   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
              Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.

   [RFC3864]  Klyne, G., Nottingham, M., and J. Mogul, "Registration
              Procedures for Message Header Fields", BCP 90, RFC 3864,
              September 2004.


Appendix A.  Description of a Clickjacking attack

   More detailed explanation of a Clickjacking attack


Authors' Addresses

   David Ross
   Microsoft
   U.S.

   Phone:
   Email:


   Tobias Gondrom
   Kruegerstr. 5A
   Unterschleissheim,
   Germany

   Phone: +44 7521003005
   Email: tobias.gondrom@gondrom.org













Ross & Gondrom          Expires September 8, 2011               [Page 6]