-
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
Renaming Feature Policy #359
Comments
Delegation Policy? (I'm still hesitant to bind the spec tightly to permissions, as there are other features that follow the 'delegation' model for attribution and trust that don't necessarily fit the user-granted-permission model, but otherwise I'm open to change) |
I think the problem with "Delegation" is that at least as done today, it can also apply to your own document. What's a feature that we'd disable by default in third-parties and we'd not want to expose through |
Right now, that category includes fullscreen, paymentrequest, EME, idle-detection, USB, wake-lock, publickey-credentials (WebAuthn), serial, and xr-spatial-tracking. (There may be others proposed; I'd need to take a look to see what else is there) Are all of those candidates for |
I would go as far as saying that all of those should be permissions, if they are not already. cc @foolip |
Permissions are user agent territory (e.g. see web compat issues w/sites using Won't classifying these as "permissions" cede spec control over them to user agents? We recently removed the device-info permission from mediacapture for this reason. |
That's a good point, not all permissions are exposed through |
@annevk do you think Fullscreen should be a permission in the full sense? If memory serves it started out that way but implementations backed down to just requiring user activation. |
I'm not sure what "full sense" means. Permissions are a very broad concept and a lot of permissions have unique characteristics. I would expect sites to be able to delegate "Fullscreen" and users to be able to disable "Fullscreen". Beyond that it's a bit less clear to me. I guess the question raised in this thread is whether that's sufficient to count it as a permission. It doesn't seem too different from " |
The permissions registry would agree with you on that count.
They are. I'm still worried about what it would imply to say that all features controlled by this mechanism must also be in the permissions registry. I think that |
Yeah, so Firefox does not support requesting or revoking through a general API and it seems unlikely we'd add that. We support I also don't think we ever want to have a permission that is not a "Feature Policy", so the namespace is definitely shared. And given that it's shared and not all permissions are visibly exposed anyway, we might as well use that as a name. |
Actually, looking at the registry, few permissions appear to alter the base premise that, apart from feature policy, permission behavior is completely user agent dependent, almost by definition: "If there was a previous invocation of this algorithm with the same descriptor and settings, returning previousResult, and the UA has not received new information about the user’s intent since that invocation, return previousResult. As I recall, it was written like this to reflect the status quo of user permissions in browsers. I should say I'm personally a proponent of differentiation in this space, since I don't think we've seen the ideal permission UX yet. But, if we already have web compat around a feature that does not center around user settings, say fullscreen behavior, then I think it's fair to say that moving it to be a user permission, is not without consequence. I'd recommend looking at that decision on a case by case basis.
I think this is the key. If we want a user setting then sure. Permissions are user permissions. |
@annevk I mean at minimum that the feature would be exposed in the Permissions API and WebDriver endpoint, and most likely that there would be some UI around this. Neither of those are true for Fullscreen now. |
I guess I'm saying that the minimum is that it's exposed through |
Alright, if nothing beyond support in |
That makes sense to me, if "exposed through |
WFM. Note |
It sounds to me like what we actually have in that case, is
If the Feature Policy mechanisms (2 and 3) apply to all members of the registry (1), and the Permission mechanisms (4 and 5) apply to only some of them, I wonder if the registry should be separated from the Permissions spec, and made into a separate document. |
Well, I think 4 applies to all of them as well. The Fullscreen specification quite clearly allows user preferences to override whatever it dictates and for these features that generally applies I'd hope. Again, the exact UI is up to the user agent. User agents may decide to not have UI, but that doesn't mean it's a feature without user agency. Also, if we rename Feature Policy to Permissions Policy the odd one out might be
To me the criteria for a permission are:
|
@clelland what does vNext mean? It would be really great to get this resolved as it would unblock Firefox from shipping the header. |
vNext was a label that we were using to distinguish between the currently shipping Chrome behaviour and the stripped-down behaviour that we could get to after removing all of the ideas that ended up in Document Policy. I'd love to get Firefox unblocked here -- it looks like what we need is some combination of:
Also, we (Chrome) would need to figure out a migration plan for any change in the header, to ensure that we don't break existing content. That's on us to figure out, certainly, but affects timelines. |
I think the problem is that it's CSP-inspired and doesn't actually reuse that parser as suggested at one point. The one argument to keep the existing syntax is that For a structured header a dictionary would make sense I think. Something like:
You would still have to validate the resulting dictionary, but the overall setup would be simpler as we're adopting structured headers everywhere. I think @mikewest might also have thoughts. |
|
I think I've come around to Permission[s] Policy -- if I squint just right, I can see it as a site-driven policy for how permissions (in the vaguest sense) can propagate through the frame tree. Open questions, then:
|
Given API precedent in https://w3c.github.io/permissions/ I think Permissions would be okay. Singular would match "Feature", but is perhaps a bit weird as it is for multiple permissions? @sideshowbarker opinions between "Permission Policy" and "Permissions Policy"? Yeah, I think we should rename both and potentially merge with https://w3c.github.io/permissions/ down the line to ensure new additions to either are considered as part of the larger whole. Hope that helps. |
I think Permissions plural is right for this, because with that plural it’s essentially more precisely a term of art from the broader class of things its loosely related to — which include permissions as used in, e.g., UNIX file-system permissions https://en.wikipedia.org/wiki/File_system_permissions — and that’s loosely synonymous with privileges and rights. So for the same reason it’d make more sense to have a Rights Policy title rather than Right Policy, it makes more sense to have Permissions Policy rather than Permission Policy. |
I've put up a PR that makes this change:
I think that covers everything, but let me know if I've missed anything there. I won't merge this until we've handled all of the W3C process issues as well as well, so that the renamed spec can live in the correct place. |
Rename Feature Policy to Permissions Policy. This change renames "Feature Policy", and all associated concepts, interfaces and APIs, to "Permissions Policy". Closes: #359
…policy w3c/webappsec-permissions-policy#359 Update ABNF w3c/webappsec-permissions-policy@9830475 Rename featurePolicy member w3c/webappsec-permissions-policy@dfcf2c7 Rename FeaturePolicy interface w3c/webappsec-permissions-policy@44a7b9e Rename variables w3c/webappsec-permissions-policy@deb2fef Rename reporting concepts and interfaces w3c/webappsec-permissions-policy@fe5e6f1 Rename the feature policy concept w3c/webappsec-permissions-policy@1096ea8 Rename the header w3c/webappsec-permissions-policy@18a2f87 Rename the spec and API w3c/webappsec-permissions-policy@d6b23aa
Add flags for the work of renaming Feature Policy as Permissions Policy The rename discussion was at w3c/webappsec-permissions-policy#359. The PR that made the actual changes was w3c/webappsec-permissions-policy#379 committed as w3c/webappsec-permissions-policy@14898d1. Enable this in Chrome with --enable-features=PermissionsPolicyHeader Bug: 1095641 Change-Id: Iccb6114bfeddb219e2cfe1a788d530dbcd8ba179 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246870 Reviewed-by: Ian Clelland <[email protected]> Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Charlie Hu <[email protected]> Cr-Commit-Position: refs/heads/master@{#783959}
I know maybe too late... but this was not an amazing thing to do so late after implementations, tests, and specs had taken this up :( |
I want to say sorry for complaining above... I got frustrated because I've had to rename a lot things lately because of it. However, I know this was a right change to make for the platform, so I'll get over it. Short term pain, long term gains. |
Yeah :( It's not great right now, but it should be better in the long run. I'm going to try to fix up the spec situation with PRs everywhere that integrates, and to get WPT cleaned up. Let me know if there's any way that I can help to make it easier on you. |
Nothing immediate. I'm fixing things as I encounter them. When you do the updates, if you see anything that WebAppsWG owns, I'm happy to review. I'll update the Web Payments stuff also. |
HTTP Feature-Policy has been renamed to Permissions-Policy: * Original issue: w3c/webappsec-permissions-policy#359 * PR: w3c/webappsec-permissions-policy#379 * Doc: https://w3c.github.io/webappsec-permissions-policy/ Mozilla documentation has been updated on July 2020: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
HTTP Feature-Policy has been renamed to Permissions-Policy: * Original issue: w3c/webappsec-permissions-policy#359 * PR: w3c/webappsec-permissions-policy#379 * Doc: https://w3c.github.io/webappsec-permissions-policy/ Mozilla documentation has been updated on July 2020: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Feature-Policy
Add flags for the work of renaming Feature Policy as Permissions Policy The rename discussion was at w3c/webappsec-permissions-policy#359. The PR that made the actual changes was w3c/webappsec-permissions-policy#379 committed as w3c/webappsec-permissions-policy@14898d1. Enable this in Chrome with --enable-features=PermissionsPolicyHeader Bug: 1095641 Change-Id: Iccb6114bfeddb219e2cfe1a788d530dbcd8ba179 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246870 Reviewed-by: Ian Clelland <[email protected]> Reviewed-by: Dmitry Gozman <[email protected]> Commit-Queue: Charlie Hu <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#783959} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 5c8d90e6d4619fb874c68bfc6adc71856ed12710
As Feature Policy is for delegating permissions, it would be good if it had a name that made it not sound so encompassing. Permissions Policy?
This would also allow us to redo the header using Structured Headers.
The text was updated successfully, but these errors were encountered: