-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feature policy control over sandbox features #339
Comments
Am I correct in my interpretation of the specification and explainer links that the material this review is about is covered by the linked explainer, but hasn't yet been edited into the spec? |
Yes, that's correct; the spec hasn't been updated yet. |
Hey @clelland, Thanks for filing for a review. A few questions from today's F2F discussion with @torgo, @sideshowbarker, @ylafon, @torgo, and @alice. This work appears to be a follow-up from our suggestions in #159 that the allow attribute superset the set of sandbox attributes. Thanks for doing this.
|
Just expanding on that meta-point, it would be good to also give an indication or example of what end-user benefit is derived, following on from the developer problem solved. |
Sandboxing only prevents things by not mentioning them -- an example of sandbox preventing modal dialogs, for instance, and FP enabling it would look like
I believe in that case the developer would expect the feature to be allowed. The model, in my head at least, is that:
Does that make sense? (TAG input appreciated here, at least for ergonomics. This matches the way that FP handles the legacy
+1, will do.
They share some identifiers (permission-features are a subset of feature policy features), but the semantics are different -- the permissions API will only return true if the user has explicitly granted permission, while the JS API (#292) will return true if access the feature has been allowed by the browser / embedding page (and hence whether a permission prompt could even potentially be shown to a user.) I would expect developers to use the FP API to decide whether to even advertise that permission controlled features could be used -- for instance, deciding whether to include a "turn camera on" button on a page, based on the embedding context. If allowed by FP, then the permissions API would could be used to present the user with a prompt, and determine the user's response. (This should probably be continued on #292, if there's more to discuss, or even on w3c/webappsec-permissions-policy#166)
Good question -- unless we can enshrine it in specs, TAG vigilance might be the way we have to go -- any proposals for new sandbox flags should probably prompt the question "Should this just be a policy-controlled feature instead?", quickly followed by "Should we disable it by default in sandboxes?" I suspect that the answer to the first question is going to be yes in most cases. |
That "TAG vigilance" may be related to w3ctag/design-principles#41, which we need to address at some point... |
@clelland is the explainer available at a URL in w3c or w3c github space? If so can you update the issue above to reflect that location? |
Though based on our discussions this morning about trying to avoid the TAG being a bottleneck for others: perhaps this is work that the TAG isn't the most suitable body to drive. In particular, it seems like perhaps some folks in the webappsec WG could take the lead in drafting something that explains how these pieces (sandbox, allow, other things mentioned in that issue) fit together and how new things are meant to be added to them. I think this is important because we'd like it to be clear how to add things to the platform -- and I think if others write such a document there are folks on the TAG who would be interested in reviewing it -- but maybe we should avoid giving you the impression that you should be waiting for us to write it! |
The answers in #339 (comment) seem reasonable to me -- I think the biggest concern about them is that these are complicated issues and those things are going to need to be clear to developers -- so something is probably going to need to do a better job of explaining them. I'm not sure whether that's the explainer (which may eventually drive other documentation like what ends up on MDN), or the spec, or something else. But it may at least be a good start to make those things clearer in the explainer if they're not clear already, and also making sure that the explainer is reachable from the spec (since it seems like this is an explainer for a specific addition to an existing spec, so people may not go looking for this explainer in particular to understand that part of the spec). It's not clear to me whether we want to leave this issue open to remind us to look into that, or into my previous comment, or whether we should close this issue now (and maybe re-review later once there's a solid spec, if that's appropriate). |
@torgo and I are just looking at this in a breakout at the TAG face-to-face meeting. I'm curious if you had any reaction to my previous #339 (comment) -- just because I think the area of how to distinguish when things should be feature-policy flags, allow attribute values, sandbox features, or a few other things that I can't keep track of is something that I think most if not all TAG members are confused by -- so I think we need to get to a state where it's documented better for people adding features to the web platform. (See w3ctag/design-principles#41.) It would be great to get something started on that and have folks like you and others in webappsec and the HTML community who have the relevant expertise contribute to it. |
Sorry for missing that, @dbaron -- let me see if I can get the TAG up to speed here: The biggest news is certainly the evolution of feature policy, and splitting Document Policy off of it. I expect that document policy is the place that sandbox-y features would eventually end up. The explainer goes into what that would look like, but I can answer any questions you may have on that. I believe that the processing model for document policy, specifically around required document policies, matches the existing sandbox quite closely. Re: #339 (comment), we've certainly given that a lot of thought. I would suggest that these models make sense for different kinds of features:
As far as TAG feedback, I think that I'm looking for guidance in these areas:
And yes, I'll be at TPAC, and Feature Policy / Document policy / sandboxing are on the agenda for WebAppSec. |
We discussed and agreed to close this as the real activity should be going on in w3ctag/design-principles#41. |
こんにちはTAG!
I'm requesting a TAG review of:
Further details (optional):
We'd prefer the TAG provide feedback as (please select one):
The text was updated successfully, but these errors were encountered: