-
Notifications
You must be signed in to change notification settings - Fork 275
Add features for permissions policy and feature policy #2661
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b34c251
Add permissions policy feature
ddbeck 3a3ee24
Add `FeaturePolicy` interface to feature-policy
ddbeck cac762f
Merge branch 'main' into permissions-policy
ddbeck 2bea174
Merge branch 'main' into permissions-policy
ddbeck c7d71e1
Merge branch 'main' into permissions-policy
ddbeck d86be93
Add `Feature-Policy` header keys
ddbeck 6e50bcf
Move out of drafts
ddbeck 476f46f
Merge branch 'main' into permissions-policy
ddbeck b65c5e7
Add `allow` attribute to Permissions Policy feature
ddbeck f35cfef
Merge branch 'main' into permissions-policy
ddbeck 7296c34
Merge branch 'main' into permissions-policy
ddbeck 41397b9
Merge branch 'main' into permissions-policy
foolip 7ff9fcf
Enhance feature-policy.yml with status section
foolip f947217
Update feature-policy.yml.dist with browser support
foolip 4693bd5
Add discouraged reason
foolip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Feature policy | ||
| description: The `Feature-Policy` response header sets whether a policy-controlled feature, such as an API, may be used in a document. Not to be confused with permissions policy. | ||
| spec: https://www.w3.org/TR/2019/WD-feature-policy-1-20190416/ | ||
| caniuse: feature-policy | ||
| discouraged: | ||
| reason: Feature policy is superseded by permissions policy. | ||
| according_to: | ||
| - https://github.com/w3c/webappsec-permissions-policy/pull/379 | ||
| alternatives: | ||
| - permissions-policy | ||
| status: | ||
| compute_from: | ||
| - http.headers.Feature-Policy | ||
| - api.Document.featurePolicy | ||
| - api.HTMLIFrameElement.featurePolicy | ||
| compat_features: | ||
| - http.headers.Feature-Policy | ||
| - http.headers.Feature-Policy.accelerometer | ||
| - http.headers.Feature-Policy.ambient-light-sensor | ||
| - http.headers.Feature-Policy.attribution-reporting | ||
| - http.headers.Feature-Policy.autoplay | ||
| - http.headers.Feature-Policy.bluetooth | ||
| - http.headers.Feature-Policy.browsing-topics | ||
| - http.headers.Feature-Policy.camera | ||
| - http.headers.Feature-Policy.compute-pressure | ||
| - http.headers.Feature-Policy.cross-origin-isolated | ||
| - http.headers.Feature-Policy.deferred-fetch | ||
| - http.headers.Feature-Policy.deferred-fetch-minimal | ||
| - http.headers.Feature-Policy.display-capture | ||
| - http.headers.Feature-Policy.document-domain | ||
| - http.headers.Feature-Policy.encrypted-media | ||
| - http.headers.Feature-Policy.fullscreen | ||
| - http.headers.Feature-Policy.geolocation | ||
| - http.headers.Feature-Policy.gyroscope | ||
| - http.headers.Feature-Policy.hid | ||
| - http.headers.Feature-Policy.identity-credentials-get | ||
| - http.headers.Feature-Policy.idle-detection | ||
| - http.headers.Feature-Policy.local-fonts | ||
| - http.headers.Feature-Policy.magnetometer | ||
| - http.headers.Feature-Policy.microphone | ||
| - http.headers.Feature-Policy.midi | ||
| - http.headers.Feature-Policy.otp-credentials | ||
| - http.headers.Feature-Policy.payment | ||
| - http.headers.Feature-Policy.picture-in-picture | ||
| - http.headers.Feature-Policy.publickey-credentials-create | ||
| - http.headers.Feature-Policy.publickey-credentials-get | ||
| - http.headers.Feature-Policy.screen-wake-lock | ||
| - http.headers.Feature-Policy.serial | ||
| - http.headers.Feature-Policy.storage-access | ||
| - http.headers.Feature-Policy.usb | ||
| - http.headers.Feature-Policy.web-share | ||
| - http.headers.Feature-Policy.wildcards | ||
| - http.headers.Feature-Policy.window-management | ||
| - http.headers.Feature-Policy.xr-spatial-tracking | ||
| - api.Document.featurePolicy | ||
| - api.FeaturePolicy | ||
| - api.FeaturePolicy.allowedFeatures | ||
| - api.FeaturePolicy.allowsFeature | ||
| - api.FeaturePolicy.features | ||
| - api.FeaturePolicy.getAllowlistForFeature | ||
| - api.HTMLIFrameElement.featurePolicy | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,199 @@ | ||
| # Generated from: feature-policy.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "74" | ||
| chrome_android: "74" | ||
| edge: "79" | ||
| compat_features: | ||
| # baseline: false | ||
| # support: | ||
| # chrome: "60" | ||
| # chrome_android: "60" | ||
| # edge: "79" | ||
| - http.headers.Feature-Policy | ||
| - http.headers.Feature-Policy.payment | ||
| - http.headers.Feature-Policy.usb | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "62" | ||
| # chrome_android: "62" | ||
| # edge: "79" | ||
| - http.headers.Feature-Policy.fullscreen | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "64" | ||
| # chrome_android: "64" | ||
| # edge: "79" | ||
| - http.headers.Feature-Policy.autoplay | ||
| - http.headers.Feature-Policy.camera | ||
| - http.headers.Feature-Policy.encrypted-media | ||
| - http.headers.Feature-Policy.geolocation | ||
| - http.headers.Feature-Policy.microphone | ||
| - http.headers.Feature-Policy.midi | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "66" | ||
| # chrome_android: "66" | ||
| # edge: "79" | ||
| - http.headers.Feature-Policy.accelerometer | ||
| - http.headers.Feature-Policy.gyroscope | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "69" | ||
| # chrome_android: "105" | ||
| # edge: "79" | ||
| - http.headers.Feature-Policy.picture-in-picture | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: false | ||
| # support: | ||
| # chrome: "74" | ||
| # chrome_android: "74" | ||
| # edge: "79" | ||
| - api.Document.featurePolicy | ||
| - api.FeaturePolicy | ||
| - api.FeaturePolicy.allowedFeatures | ||
| - api.FeaturePolicy.allowsFeature | ||
| - api.FeaturePolicy.features | ||
| - api.FeaturePolicy.getAllowlistForFeature | ||
| - api.HTMLIFrameElement.featurePolicy | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "79" | ||
| # chrome_android: "79" | ||
| # edge: "79" | ||
| - http.headers.Feature-Policy.xr-spatial-tracking | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "84" | ||
| # chrome_android: "84" | ||
| # edge: "84" | ||
| - http.headers.Feature-Policy.publickey-credentials-create | ||
| - http.headers.Feature-Policy.publickey-credentials-get | ||
| - http.headers.Feature-Policy.screen-wake-lock | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "86" | ||
| # chrome_android: "86" | ||
| # edge: "86" | ||
| - http.headers.Feature-Policy.web-share | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "87" | ||
| # chrome_android: "87" | ||
| # edge: "87" | ||
| - http.headers.Feature-Policy.cross-origin-isolated | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "89" | ||
| # chrome_android: "89" | ||
| # edge: "89" | ||
| - http.headers.Feature-Policy.serial | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "93" | ||
| # chrome_android: "84" | ||
| # edge: "93" | ||
| - http.headers.Feature-Policy.otp-credentials | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "94" | ||
| # chrome_android: "94" | ||
| # edge: "94" | ||
| - http.headers.Feature-Policy.display-capture | ||
| - http.headers.Feature-Policy.idle-detection | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "100" | ||
| # chrome_android: "100" | ||
| # edge: "100" | ||
| - http.headers.Feature-Policy.window-management | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "104" | ||
| # chrome_android: "104" | ||
| # edge: "104" | ||
| - http.headers.Feature-Policy.bluetooth | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "108" | ||
| # chrome_android: "108" | ||
| # edge: "108" | ||
| - http.headers.Feature-Policy.wildcards | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "110" | ||
| # chrome_android: "110" | ||
| # edge: "110" | ||
| - http.headers.Feature-Policy.identity-credentials-get | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "113" | ||
| # chrome_android: "113" | ||
| # edge: "113" | ||
| - http.headers.Feature-Policy.storage-access | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "115" | ||
| # chrome_android: "115" | ||
| # edge: "115" | ||
| - http.headers.Feature-Policy.browsing-topics | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "117" | ||
| # chrome_android: "117" | ||
| # edge: "117" | ||
| - http.headers.Feature-Policy.attribution-reporting | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "135" | ||
| # chrome_android: "135" | ||
| # edge: "135" | ||
| - http.headers.Feature-Policy.deferred-fetch | ||
| - http.headers.Feature-Policy.deferred-fetch-minimal | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "89" | ||
| # edge: "89" | ||
| - http.headers.Feature-Policy.hid | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "103" | ||
| # edge: "103" | ||
| - http.headers.Feature-Policy.local-fonts | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "125" | ||
| # edge: "125" | ||
| - http.headers.Feature-Policy.compute-pressure | ||
|
|
||
| # baseline: false | ||
| # support: {} | ||
| - http.headers.Feature-Policy.ambient-light-sensor | ||
| - http.headers.Feature-Policy.document-domain | ||
| - http.headers.Feature-Policy.magnetometer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| name: Permissions policy | ||
| description: The `Permissions-Policy` response header and the `allow` attribute for `<iframe>` elements sets whether a policy-controlled feature, such as an API, may be used in a document. | ||
| spec: https://w3c.github.io/webappsec-permissions-policy/ | ||
| caniuse: permissions-policy | ||
| compat_features: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would also suggest moving the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed with b65c5e7. |
||
| - api.HTMLIFrameElement.allow | ||
| - html.elements.iframe.allow | ||
| - http.headers.Permissions-Policy | ||
| - http.headers.Permissions-Policy.wildcards | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Generated from: permissions-policy.yml | ||
| # Do not edit this file by hand. Edit the source file instead! | ||
|
|
||
| status: | ||
| baseline: false | ||
| support: | ||
| chrome: "108" | ||
| chrome_android: "108" | ||
| edge: "108" | ||
| compat_features: | ||
| # baseline: high | ||
| # baseline_low_date: 2020-07-28 | ||
| # baseline_high_date: 2023-01-28 | ||
| # support: | ||
| # chrome: "60" | ||
| # chrome_android: "60" | ||
| # edge: "79" | ||
| # firefox: "74" | ||
| # firefox_android: "79" | ||
| # safari: "11.1" | ||
| # safari_ios: "11.3" | ||
| - api.HTMLIFrameElement.allow | ||
| - html.elements.iframe.allow | ||
|
|
||
| # baseline: false | ||
| # support: | ||
| # chrome: "88" | ||
| # chrome_android: "88" | ||
| # edge: "88" | ||
| - http.headers.Permissions-Policy | ||
|
|
||
| # ⬇️ Same status as overall feature ⬇️ | ||
| # baseline: false | ||
| # support: | ||
| # chrome: "108" | ||
| # chrome_android: "108" | ||
| # edge: "108" | ||
| - http.headers.Permissions-Policy.wildcards |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.