-
Notifications
You must be signed in to change notification settings - Fork 155
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 request: a 'default' directive similar to CSP's 'default-src' #236
Comments
I think this duplicates #189 and #208 -- and my general objection to it is still that it makes it very difficult for browsers to turn any existing browser behaviour into features, as any site which has adopted this may immediately break. (This is the same problem with The equivalent policy a few years in the future might have to be extended to something like
just to re-enable web behaviours that have been carved out into policies. And that list may have to grow arbitrarily long in the future as well. One possibility that I've raised previously would be to allow a setting which would disable by default all features with a defaut allowlist of |
Apologies for the duplicate - though I would argue that duplicates are often a sign of a trend worth addressing (either in architecture, or in a FAQ). 😉 I definitely see your point about how As to the footgun problem generally ... with controls like Feature-Policy and Content-Security-Policy, we're already in a realm where a minimum level of understanding - and monitoring, such as with Some brainstorming snippets:
The incremental proliferation of If I have anything constructive to contribute further, I'll do so in one of the other thread. Closing - thanks for taking the time to answer. |
For simple sites that would like to adopt a 'default deny' or 'default self' stance for Feature Policy, a directive similar to the Content-Security-Policy
default-src
directive would be very useful (and could result in much shorter Feature-Policy headers for some use cases).For example, instead of:
accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'self'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; speaker 'self'; sync-xhr 'none'; usb 'none'; vr 'none'
... this could be the equivalent:
default: 'none'; fullscreen 'self'; speaker 'self'
Advantages:
Obvious valid values could be
'none'
,'self
', and*
.The text was updated successfully, but these errors were encountered: