Summary: | Support for X-Frame-Options: Allow-From [uri] | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Phil Ames <philames> | ||||||||
Component: | Frames | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, adam, ap, beidson, bfulgham, marcoos+bwo, mike.hemesath, mjs, philames, sam, syoichi, webdev | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=154345 | ||||||||||
Attachments: |
|
Description
Phil Ames
2012-08-23 12:55:10 PDT
Created attachment 160219 [details]
Patch
[trying to cc myself] Note: We're still discussing this feature in the IETF websec working group. Generally, our position has been that we shouldn't be adding new features to X-Frame-Options. Instead, we should create a CSP directive that satisfies these use cases. Created attachment 161116 [details] Updated patch. FYI: I managed to get the layout tests passing, and also addressed that this would accept something like "Allow-Fromhttp://foo.com" instead of "Allow-From http://foo.com". @Phil: I appreciate your enthusiasm, but it's unlikely that we'll accept this patch until the standards issues are resolved. Understood, I just figured it made sense to have something up-to-date and attached here rather than something broken. Created attachment 197858 [details]
X-F-O Allow From implementation
I noticed this code had been refactored, so I've updated the patch.
In radar as <rdar://problem/13658368> I'll try to take a look at this patch soon. (In reply to comment #8) > In radar as <rdar://problem/13658368> > > I'll try to take a look at this patch soon. You should be aware that this feature is controversial in the W3C WebAppSec working group. Before implementing it, you might want to confer with the working group. (In reply to comment #9) > (In reply to comment #8) > > In radar as <rdar://problem/13658368> > > > > I'll try to take a look at this patch soon. > > You should be aware that this feature is controversial in the W3C WebAppSec working group. Before implementing it, you might want to confer with the working group. Interesting. We were looking at it because it's been in the IETF draft for some time (http://tools.ietf.org/html/draft-ietf-websec-x-frame-options-01) and has utility we're interested in. I'm failing at finding relevant threads in the webappsec archives that demonstrate this controversy. Have any pointers? > We were looking at it because it's been in the IETF draft for some time (http://tools.ietf.org/html/draft-ietf-websec-x-frame-options-01) and has utility we're interested in. The IETF websec working group has not addressed my WGLC feedback on this aspect of draft-ietf-websec-x-frame-options: http://www.ietf.org/mail-archive/web/websec/current/msg01459.html > I'm failing at finding relevant threads in the webappsec archives that demonstrate this controversy. Have any pointers? I couldn't find a good email thread in quick search. The basic issue is that allow-from is basically the same thing as a source-expression from CSP but uses an incompatible syntax. The current agreement in both the IETF websec working group and the W3C WebAppSec working group is to not add any new features to X-Frame-Options (including allow-from) and instead make frame-options into a CSP directive. The final point of controversy is whether to let the web site specify multiple values for the frame-options directive (i.e., whether to allow a source-list like other CSP directives or whether to restrict frame-options to a single source-expression). I'd recommend not implementing allow-from in X-Frame-Options until these issues are resolved. I'd expect the likely outcome to be a frame-options CSP directive that either takes a source-list or a source-expression. The W3C WebAppSec working group has a face-to-face meeting on April 25-26 where I'd expect these issues to be hammered out. If you're interested in these topics, I'd encourage you to attend. I'll try to be on IRC. Has the standards process stalled here? In October 2013, IETF published http://tools.ietf.org/html/rfc7034 (informative) related to X-Frame-Options. Meanwhile, the CSP working draft shows nothing but a TODO: https://dvcs.w3.org/hg/content-security-policy/raw-file/5b353a8ac072/csp-specification.dev.html#frame-options--experimental Allow-From solves a real problem. Because WebKit ignores it, websites can be forced to abandon X-Frame-Options altogether. Given there's an RFC on the topic, could we please have Allow-From? CSP 1.1 now supports this use case, directive name is frame-ancestors. It's not implemented in WebKit yet. Is there an issue logged for implementing frame-ancestors in webkit? (In reply to comment #15) > Is there an issue logged for implementing frame-ancestors in webkit? Yes. This work was done under Bug 154345, and is now complete. Since the new CSP feature has been implemented, this issue is resolved. |