Implement stricter sandboxing for amp-ad
M66+ now has feature detection of the 'allow-top-navigation-by-user-activation' sandbox feature too.
@jasti was the idea to add this constraint to all 3P ad frames? Or do we let pub/ad network opt-in?
@keithwrightbos is it something used by doubleclick in non-AMP world? I'm bit worried if this could cause false alarm if the creative implementation somehow delayed the navigation after a click.
@lannka my idea was to make it the default across all 3P ad frames.
in #13146 @coreybyrnes was also suggesting to set allow-scripts allow-popups to limit the top window navigation.
@keithwrightbos I want to learn what doubleclick does, and what's the risks of enabling it now.
I want to learn what doubleclick does, and what's the risks of enabling it now.
@lusilva knows how doubleclick works, and has been doing sandboxing for a while. I can start a thread about it.
Do we expect this to get done in Q3?
I decided to implement this in #18003 on my morning commute :)
But I will need help launching it by the core team.
Super fast! Thanks @cramforce. Looking forward to the launch.
@keithwrightbos I saw that fast-fetch-3p-frame already has a sandbox implementation. What is the state on that experiment? Do we even ever use the case I changed and could run an experiment there?
My implementation feature detects the new sandbox APIs. You may want to consider porting that code over since the current code would prevent all navigation in e.g. iOS<11 or, I believe, Microsoft Edge, and possibly also Firefox (not sure about that one).
In the current implementation, we have other feature detection methodologies to determine where sandboxing is available and apply it as such. I will create a PR that removes the FF 3p frame sandboxing code, uses yours, and augment getIframe to take a disable sandboxing parameter so that we can keep parity for now and start an experiment where we allow sandboxing for all AdSense/Doubleclick FF traffic. Thanks
Thanks!
I did some research and at least for the navigation-on-load there should be an intervention in Chrome since 69 that prevents it by default. Safari, however, is still vulnerable to the attack.
@keithwrightbos any updates from your experiment? If things look good, we will go forward for all 3P ad networks.
Google Ad Manager experiment looks neutral. We should go ahead and turn it on.
@ampproject/a4a
to protect user experience, we plan to leverage the stricter sandboxing features available on Chrome 66+ for amp-ad. According to Google Ad Manager's experiment, no noticeable revenue impact was seen.
We plan to turn on the feature on the week after Thanksgiving (12/4). Please let us know if you have any concerns.
/cc @jasti do you want to add anything?
All good from my end.