-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TAG] Unify with sandbox
attribute?
#74
Comments
Yes! There has been some agreement that most sandbox features could/should eventually move to feature policy. We haven't specifically proposed this yet, but that's mostly just trying not to distract from the conversation around the basic mechanism of Feature Policy first. I think that the fundamental feature of sandbox -- to isolate frames as if they were cross-origin from all other frames -- will remain, but that almost all of the flags could be migrated. (I like the suggestion for the transition state, btw) I'll put a note in the "other and related mechanisms" section of the spec, but the actual migration proposal should probably be written up separately. (I though there was already an open issue for this, but I can't see it now). |
I've written up a proposal for this here: https://docs.google.com/document/d/1KsCFmugEAZf1LT_C3ZCj8FfkkljZV3D3EoMenX7yQto/edit# Also, I've just submitted a PR to update the spec with a longer discussion of the current relationship between sandbox and FP: #82 |
Does Feature Policy have the same model as sandboxing when it comes to navigation and opening new windows and such? Is that specified? |
Tee navigation model should be the same, by design (any discrepancies should be resolved in favour of matching sandbox behaviour, I think) The pop-up model is currently different, but we should find a way to unify them. Currently:
I think that the second point could be improved, so I've suggested that popups which do not disown their opener should inherit their opener's feature policy. This is obviously different than the sandbox approach, so now I'm wondering if we need to do more. Generally, popups -- if allowed at all -- should be as restricted as their openers. However, there should be some way for sandboxed / restricted content to open new windows to unrestricted content. (Think of clicking on an ad in an iframe opening a new window to the advertiser's home page) The issues I see are these:
So I think that we need to do a few things:
At that point, I think we could merge sandbox into feature policy. We would make all of the sandbox features, including 'allow-popups-to-escape-sandbox', into policy-controlled features (with default allowlist of
The sandbox attribute itself would remain (for backwards compatibility), and would be the mechanism to cause the frame to have an opaque origin. Does this make sense? It's possibly a breaking change to make that |
From TAG review
There appears to be some overlap between the
sandbox
andallow
attributes. Have the designers considered migratingsandbox
directives to Feature Policy? This might enable equivalence between these, and eventual deprecation of sandbox in favour of allow:With the transitionary, compatible use of:
The text was updated successfully, but these errors were encountered: