Skip to content

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions features/feature-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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:
according_to:
- https://github.com/w3c/webappsec-permissions-policy/pull/379
alternatives:
- permissions-policy
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
196 changes: 196 additions & 0 deletions features/feature-policy.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
# Generated from: feature-policy.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support: {}
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

# 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

# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support: {}
- http.headers.Feature-Policy.ambient-light-sensor
- http.headers.Feature-Policy.document-domain
- http.headers.Feature-Policy.magnetometer
7 changes: 7 additions & 0 deletions features/permissions-policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Permissions policy
description: The `Permissions-Policy` response header 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:
- http.headers.Permissions-Policy
- http.headers.Permissions-Policy.wildcards
24 changes: 24 additions & 0 deletions features/permissions-policy.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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: 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
4 changes: 4 additions & 0 deletions scripts/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ const defaultAllowlist: allowlistItem[] = [
[
"https://github.com/whatwg/fetch/pull/1647",
"This is where fetchLater() is in the process of being spec'd. Once the PR merges, change the spec url in fetchlater.yml, and remove this exception."
],
[
"https://www.w3.org/TR/2019/WD-feature-policy-1-20190416/",
"Allowed because feature policy was replaced by permissions policy."
]
];

Expand Down