Summary
Require user gesture for sandboxed iframe w/ 'allow-top-navigation' to navigate top-level page, and the top-level navigation will be blocked if there is no user gesture. This change would enable more use cases of sandboxing untrusted third-party contents (eg., ads) by allowing top navigation while blocking malicious auto-redirecting, and thus help building a safer internet (eg., a safer ads ecosystem in which all ads are sandboxed to prevent unexpected malicious behaviors like plugin exploits, auto-redirects, file downloading, modal dialogs, etc).
Motivation
Iframe sandbox has been used on securing untrusted third-party contents (eg., ads) on web sites, which could eg., disallow top-level navigation or block plugin from loading (and thus prevent popular plugin exploits using vulnerabilities of Flash, Silverlight, PDF, etc).
However, iframe sandbox either blocks all (including user-gesture-triggered) top-level navigation or allow all kinds of top-level navigation with "allow-top-navigation" including auto-redirecting w/o user gesture (which has been heavily abused eg., by malicious ads). This has prevented iframe sandbox from being more widely used to protect users eg., by those ads navigating top-level page after user click which is unfortunately quite common in the current ads ecosystem.
This has a similar purpose to another effort (which is still in an experimental stage): "Require a user gesture for a cross-origin frame to navigate the top-level page" (github link, intent email), but complementary to it, since this would cover different use cases and might break less pages and thus less risky.
Per UseCounter, an <iframe> navigates its top browsing context on 0.017% of page loads. We still need to collect (work-in-progress) the metrics on what percentages of these navigations are from sandboxed iframe w/ 'allow-top-navigation' & w/o a user gesture, but it is considered a low risk change since it should affect much less pages than the other effort on requiring user gesture on cross-domain iframe.
Another option we discussed is to add a new flag called say "allow-top-navigation-with-gesture" for opt into this intended behavior (or a new flag called say "allow-top-navigtion-without-gesture" to opt out this), but this one of changing the default behavior of "allow-top-navigation" is preferred since it's simpler & less confusing to developers. But if this breaks many pages, we should revisit the other option of adding a new flag.
OWP launch tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=678759
https://www.chromestatus.com/feature/5629582019395584
Requesting approval to ship?
Yes, initially as a Finch trial behind a feature flag.
Joe, do you look for all the launch bugs with OWP-Type-ChangeAPI or just OWP-Type-Deprecation? Or do you use the, unfortunately somewhat redundant, data from chromestatus?
.. we need some more compat data before we give it a try. Eg. do we have UMA stats on what fraction of page visits involve a sandboxed iframe with allow-top-navigation set?
Can we report a console warning in this case for at least a milestone ("deprecate") before we change the behavior ("remove")?
Thanks Rick and Joe for the replies... we need some more compat data before we give it a try. Eg. do we have UMA stats on what fraction of page visits involve a sandboxed iframe with allow-top-navigation set?Just submitted a CL to collect metrics on the % of page views that do top navigations in sandboxed iframes w/ or w/o 'allow-top-navigation' and user gesture.It should give us a good idea on the risk of this change although it's supposed to be quite low.Can we report a console warning in this case for at least a milestone ("deprecate") before we change the behavior ("remove")?Since we will do it as a Finch trial behind a feature flag, how about we turn it off by default and turn it on later when we have collected data to confirm the risk is low?This might save us a release cycle since we'd like this to be shipped fast so we can experiment in our ads implementation.Make sense?
Can you add a deprecation message as well now so that even with the trial off, there's warning that something is expected to break?
Perhaps you want to have the finch config setup to keep it enabled (at least at 50%) in canary and dev channel (no launch approval necessary AFAIK) to help collect the other sort of compat data?
I'm guessing the metrics will be low but not so tiny as to eliminate the compat concerns completely (afterall, there is active abuse we're trying to disable - right?). If that's true then we probably won't want to flip it on late in beta or something - we rely on some exposure during beta to help collect reports of issues from the wild.The main thing that would buy us time is merging the new metrics / deprecation warning back to M56, but perhaps it's too late for that now?
Can you add a deprecation message as well now so that even with the trial off, there's warning that something is expected to break?
The main thing that would buy us time is merging the new metrics / deprecation warning back to M56, but perhaps it's too late for that now?
I'm guessing the metrics will be low but not so tiny as to eliminate the compat concerns completely (afterall, there is active abuse we're trying to disable - right?). If that's true then we probably won't want to flip it on late in beta or something - we rely on some exposure during beta to help collect reports of issues from the wild.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
SGTM
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.