Return-Path: <dross@microsoft.com>
X-Original-To: websec@ietfa.amsl.com
Delivered-To: websec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix)
 with ESMTP id 62B0C21F8999 for <websec@ietfa.amsl.com>;
 Thu,  7 Jul 2011 19:19:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.561
X-Spam-Level: 
X-Spam-Status: No, score=-10.561 tagged_above=-999 required=5 tests=[AWL=0.038,
 BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com
 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bv78jcVZM7q4 for
 <websec@ietfa.amsl.com>; Thu,  7 Jul 2011 19:19:58 -0700 (PDT)
Received: from smtp.microsoft.com (mailb.microsoft.com [131.107.115.215]) by
 ietfa.amsl.com (Postfix) with ESMTP id 5222E21F8995 for <websec@ietf.org>;
 Thu,  7 Jul 2011 19:19:58 -0700 (PDT)
Received: from TK5EX14HUBC102.redmond.corp.microsoft.com (157.54.7.154) by
 TK5-EXGWY-E802.partners.extranet.microsoft.com (10.251.56.168) with Microsoft
 SMTP Server (TLS) id 8.2.176.0; Thu, 7 Jul 2011 19:19:56 -0700
Received: from TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com
 (157.54.71.68) by TK5EX14HUBC102.redmond.corp.microsoft.com (157.54.7.154)
 with Microsoft SMTP Server (TLS) id 14.1.289.8; Thu, 7 Jul 2011 19:19:56 -0700
Received: from TK5EX14MBXW651.wingroup.windeploy.ntdev.microsoft.com
 ([169.254.1.52]) by TK5EX14MLTW652.wingroup.windeploy.ntdev.microsoft.com
 ([157.54.71.68]) with mapi id 14.01.0289.008; Thu, 7 Jul 2011 19:19:56 -0700
From: David Ross <dross@microsoft.com>
To: Devdatta Akhawe <dev.akhawe@gmail.com>
Thread-Topic: [websec] FYI: New draft draft-gondrom-frame-options-01
Thread-Index: AQHMPQqs25ue1XmKxUOxDyUVQzUsxZThqf5Q
Date: Fri, 8 Jul 2011 02:19:55 +0000
Message-ID: <F94D1172DEEC714BBD7F76476442D7151FD3BCB9@TK5EX14MBXW651.wingroup.windeploy.ntdev.microsoft.com>
References: <F94D1172DEEC714BBD7F76476442D7151FD3AD46@TK5EX14MBXW651.wingroup.windeploy.ntdev.microsoft.com>
 <CAPfop_0LNvpxtxPuZDVUGOYH-05ZKYNvu0Os1Tjr6TWdPjFg-g@mail.gmail.com>
In-Reply-To: <CAPfop_0LNvpxtxPuZDVUGOYH-05ZKYNvu0Os1Tjr6TWdPjFg-g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [157.54.51.42]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "websec@ietf.org" <websec@ietf.org>
Subject: Re: [websec] FYI: New draft draft-gondrom-frame-options-01
X-BeenThere: websec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport
 <websec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/websec>,
 <mailto:websec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/websec>
List-Post: <mailto:websec@ietf.org>
List-Help: <mailto:websec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/websec>,
 <mailto:websec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Jul 2011 02:19:59 -0000

I think that if the multi-origin syntax is available and common in examples=
, web developers won't really have an incentive to implement the design pat=
tern for server-side validation.  It won't even be particularly obvious tha=
t it's an option.  So I worry that we'd begin to see a whole lot of (1), (2=
), and (4) out on the web.

(3) below is a little confusing because the draft RFC doesn't actually cove=
r this, sorry about that.  I was just anticipating the suggestion of wildca=
rd support as an alternative to a static list.

Your foo.example.com and bar.example.com scenario is probably the most comp=
elling case for the origin list.  Add a few more sites to the example thoug=
h and the origin list looks less optimal.  I'm optimistic that frameworks c=
ould help with the backend complexity of the single-origin scheme.

David Ross
dross@microsoft.com


-----Original Message-----
From: Devdatta Akhawe [mailto:dev.akhawe@gmail.com]=20
Sent: Thursday, July 07, 2011 6:02 PM
To: David Ross
Cc: websec@ietf.org; Tobias Gondrom (tobias.gondrom@gondrom.org)
Subject: Re: [websec] FYI: New draft draft-gondrom-frame-options-01

I don't understand. A list of origins also allows a list of only one, right=
? (1), (2), (4) don't seem to be an issue: a server concerned about them ca=
n just use a single origin for each response.

With regards to (3), why do we even have wildcard support? Why not just a l=
ist with no wildcard support ?

If a site wants to allow foo.example.com and bar.example.com, it can just r=
eply with both in the list instead of having to figure out when to reply wi=
th foo and when to reply with bar (with the concomitant programming hassle/=
bugs those cases) or worse reply with *.example.com


thanks
devdatta




> 1) =A0For privacy / security purposes, it would be preferable for the ser=
ver not to have to explicitly expose the full list of possible frame hostin=
g URLs.
>
> 2) =A0Responses may become bloated when there are a lot of sites in the A=
LLOW-FROM list.
>
> 3) =A0Support for wildcards as a solution to list bloat would introduce a=
 new level of complexity w.r.t. parsing, etc. =A0Even dealing with the deli=
miter between static URLs in a list can get slightly problematic.
>
> 4) =A0Servers would have to enumerate a list of sites in advance and ensu=
re that the list is actively maintained.
>
> Relying on custom server-side validation logic instead of permitting list=
s of origins in ALLOW-FROM would help alleviate these problems. =A0Eg: Serv=
er-side code validating URLs are of the form: https://[five alpha-numeric c=
haracters].contoso.com.
>
> Given this, I would suggest a single-origin syntax for ALLOW-FROM similar=
 to X-FRAME-OPTIONS:
> http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-click
> jacking-with-x-frame-options.aspx
>
> ---
> Note that the Allow-From token does not support wildcards or listing of m=
ultiple origins. For cases where the server wishes to allow more than one p=
age to frame its content, the following design pattern is recommended:
>
> 1) =A0The outer IFRAME supplies its own origin information, using a query=
string parameter on the Inner IFRAME's src attribute. This can obviously be=
 specified by an attacker, but that's OK.
>
> 2) =A0The server for the Inner IFRAME verifies the supplied Origin inform=
ation meets whatever criteria business practices call for. For example, the=
 server that serves the IFRAME containing a social network's "Like" button,=
 might check to see that the supplied Origin matches the Origin expected fo=
r that Like button, and that the owner of the specified Origin has a valid =
affiliate relationship, etc.
>
> 3) =A0If satisfied with the information supplied, the server for the=20
> Inner IFRAME sends an X-FRAME-OPTIONS: allow-from suppliedorigin=20
> header
>
> 4) =A0The Browser then enforces the X-FRAME-OPTIONS directive.
>
> If an attacker had specified an origin in step #1 different than the actu=
al origin of the outermost page, he'd be blocked at step #4 when the browse=
r actually enforces the origin.
> ---
>
> David Ross
> dross@microsoft.com
>
> _______________________________________________
> websec mailing list
> websec@ietf.org
> https://www.ietf.org/mailman/listinfo/websec
>

