This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13348 - I was wondering if it would be possible to extend the iframe sandbox attribute to provide additional functionality. We've been developing a HTML5 digital signage solution where the playback application is a HTML5 web page. When the solution is displaying
Summary: I was wondering if it would be possible to extend the iframe sandbox attribut...
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: contributor
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords: Disagree, needsReview
Depends on:
Blocks:
 
Reported: 2011-07-25 05:10 UTC by contributor
Modified: 2011-12-02 17:14 UTC (History)
8 users (show)

See Also:


Attachments

Description contributor 2011-07-25 05:10:09 UTC
Specification: http://www.w3.org/TR/html5/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
I was wondering if it would be possible to extend the iframe sandbox attribute
to provide additional functionality.
We've been developing a HTML5 digital signage solution where the playback
application is a HTML5 web page.

When the solution is displaying web pages we use a sandboxed iframe however it
doesn’t quite meet our needs.

The problem is that many pages have click-jacking prevention where they use
javascript to ensure the page is not in an iframe and the HTTP X-Frame-Options
header to prevent the display of the page in the latest browsers.

So whilst we believe our approach to digital signage is by far the most
ubiquitous in terms of platform support, we have the lowest support for
displaying web pages.
What we are thinking is that it would be good to have an ‘isolated’ flag
on the iframe sandbox attribute that allows:
1.	the inline frame to act like a pop-up window
2.	limited JS interaction. Access to height, width, src properties for
example (like a pop-up window)
3.	top == self in JS and browsers ignore the X-Frame-Options
4.	Prevents click jacking as the page is truly sandboxed like a pop-up
window

This would allow us to display pages like facebook in our HTML5 solution in
the same way our desktop software based competitors can.

I believe this addition would greatly benefit the HTML5 standard as a platform
and other legitimate uses could be:
•	HTML5 based web desktops such as http://eyeos.org/
•	HTML5 web browsers (Chrome OS where the browser chrome is a browser.
Tabs and all are HTML)
•	Tutorial sites with instructions around the live frame


Posted from: 129.78.32.22
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.825.0 Safari/535.1
Comment 1 Aryeh Gregor 2011-07-25 20:45:53 UTC
I think this would have a hard time meeting security review.  Clickjacking would still be possible here as long as the site can add or remove the iframe.  Suppose it lures the user into clicking in some consistent pattern, like in a game that involves trying to click in particular places at particular times.  Then when you can predict the user is about to click, briefly replace the game with the iframe, quickly enough so they don't notice in time to stop clicking.

Opening a new window doesn't have this issue because once you open it, you can't control its position or whether it's focused.  If the user clicks on your page, you can't reliably transfer the click to the new window no matter what.  Nothing that's inside the page content will be secure.  Yes, this is a disadvantage of web apps compared to desktop apps, but such disadvantages are necessary, since web apps run without the user's knowledge or consent.

CC'ing some implementers to get confirmation on whether this is an unacceptable security problem given the benefit.
Comment 2 Adam Barth 2011-07-25 20:59:31 UTC
We've been kicking around some ideas for addressing some of these use cases, but we've been approaching the problem as giving web pages a way to create a "lightbox"-like UI using something that's really a popup window under the covers.  The idea being that popup windows are always rendered "on top" and they're not subject to interference by the page that creates them.  The limitation is that they're ugly and difficult for users to manage.  In some sense, you could address these use cases with a chromeless popup window that was constrained to the parent web page, much like alert dialogs are in recent versions of Firefox.

Anyway, we haven't got much past the "hallway discussion" phase, but I think there's some potential for addressing these use cases.  Of course, we'd have to do it carefully because these are tricky security issues.
Comment 3 Stephen von Takach 2011-07-26 05:51:22 UTC
A pop-up windows position can be controlled from JavaScript and most browsers give it focus instantly too.

I thought about the idea of rendering the iframe as always on top too. However this would limit animation (a rotating cube for instance) and other cool effects.

What may be a good compromise is that the iframe would have to be focused before clicks are sent to it (like a pop-up window), a focused iframe is always on top and any clicks sent to the iframe are not registered on the outer page. Browsers could also enforce a minimum size before any content is rendered.

I personally can't see how these restrictions would be any more dangerous than a pop-up window.
Comment 4 Michael[tm] Smith 2011-08-04 05:17:14 UTC
mass-move component to LC1
Comment 5 Stephen von Takach 2011-08-16 07:19:11 UTC
What additional information do you need?

From my perspective the iframe sandbox doesn't go far enough if browsers are not ignoring X-Frame-Options on sandboxed content.
Browser developers should be confident that click-jacking is preventable when using a sandbox under certain conditions.

I believe, in this context, there is enough of a case for extending the functionality of the sandbox attribute.
Comment 6 Ian 'Hixie' Hickson 2011-12-02 17:13:53 UTC
Why can't you just use a popup?
Comment 7 Ian 'Hixie' Hickson 2011-12-02 17:14:59 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Seems like a rather narrow use case to add a feature with such security implications.