7 ms·
A new security header: Feature Policy
- detaro 8y agoSpec draft: https://wicg.github.io/feature-policy/ https://wicg.github.io/feature-policy/ Not sure how relevant such detailed settings really are... Could be a tool for site operators to somewhat limit issues with bad ads getting through?
- daxterspeed 8y agoAll these security headers seem like a terrible idea to me, shouldn't security be the default - especially if it breaks insecure websites?
- pixl97 8y agoGood idea, let's break 90% of the internet and see why nobody uses your secure by default browser. You're not wrong, but what you want doesn't work for human reasons.
- Millennium 8y agoThis is true most of the time, but if it's necessary to keep the ads flowing, I think most ad-supported sites will update very quickly.
- daxterspeed 8y agoI understand your sentiment but I do wonder what the extent would actually be. The largest website are more than capable of adapting, and older sites are more likely to either not use any JavaScript or only accept http traffic (which is already a lost cause). I suppose the ones would take the biggest hit would be the people running WordPress blogs with various (already insecure) site plugins. Suppose if these security changes would slowly get imposed over all https traffic in a coordinated fashion among the major browser vendors over a large time span? https requires some periodic maintenance anyway, so it shouldn't add an unreasonable workload. I worry that this isn't happening because the ad industry (including Google) doesn't want to take responsibility over distributing untrustworthy and insecure code.
- move-on-by 8y agoThink of these headers not so much as security. Just because a site doesn't have this or other headers doesn't make it any less secure. The headers are better described as fine-tuned access-control policies. You want to be able to send your users notifications on your site? Well great, now any ads on your site have the same ability. These headers allow you to control that. The primary site has features x,y, and z - but any ads or iframes don't have any features. > distributing untrustworthy and insecure code. So this isn't really how things are, we didn't have the ability to fine-tune these access control features before. Either you accepted a website as a whole to give you notifications or not. On the client side it still appears the same, but on the server side they can limit which scripts/domains actually get those permissions.
- vorpalhex 8y agoI suspect this is to help websites crack down on crappy ad networks without actually having to moderate their ads?
- michaelt 8y agoSome would say the fact websites are unable to control what they serve is why ad blockers are so popular.
- mcintyre1994 8y agoWon't they just add "allow=all,the,crap,they,want" in the embed iframe code they ask site owners to copy/paste? I'm sure there's a reason for the design (allowing deny all at the top and then only allowing what's specifically needed is nice), but I'm not sure what it'll actually do for the case where an iframe is just a copy/paste embed and can use the allow attribute for whatever it wants.
- inetknght 8y agoThe fact that you have to tell the browser not to do stuff that other sites you're also telling it to load are telling it to do is perhaps exemplary that the web as we know it has taken a wrong turn somewhere
- Someone1234 8y agoI'm going to vote "no." Most security headers exist to enhance site security. This "security header" seems to exist solely to save site operators the trouble of having to vet what third party resources do (mostly ads I assume). They seem to want to have their cake and eat it too (i.e. embed toxic content, without vetting it, while also disabling many of the more toxic tricks). Problem with that is that toxic ads pay more BECAUSE they're toxic, that's why you went with that ad network, higher CPM. How about you just do your job as a site owner and employ an ad network with a code of conduct/morals? Not to mention that this won't work, because real sites actually need some of these features.
- neotek 8y agoThere's the fantasy reality we wished we lived in, and there's the pragmatic reality we actually live in, and if you only ever act as though you live in the fantasy reality then the pragmatic reality will always leave you disappointed. So unless you know of a way to force site operators to act against their best interests to service yours, I would much rather that we at least have this option available. Also, let's not forget that Google itself has been guilty of letting toxic ads slip through their vetting procedures. It's not as though there's some 100% foolproof way of ensuring that you only ever run ads that are completely benign in every possible sense without doing away with 90% of the things legitimate advertisers demand to have (rich ads, tracking, javascript, etc), so again, unless you've discovered a realistic way for site operators to fund the operation of their sites without having to erect paywalls, the threat of toxic content will always exist.
- Someone1234 8y ago> So unless you know of a way to force site operators to act against their best interests to service yours, I would much rather that we at least have this option available. You seem confused about this proposal. This doesn't provide the end user any more options, and isn't meant to. This is a proposal designed to allow site operators to embed dangerous content without vetting that content. Nothing more, nothing less.
- dqv 8y ago
- jasonkostempski 8y agoThat's a very HTML specific HTTP header and it seems very out of place.
- johncolanduoni 8y agoThere are already tons of HTML specific HTTP headers (Link, CSP, X-Frame-Options, etc.). I don’t see why HTTP headers shouldn’t be used for metadata when serving HTML, it’s not like the header needs to be added to the HTTP spec.
- JD557 8y agoI think this would look better as some kind of <meta> tag inside the HTML document. I think that the document itself should have knowledge about its security requirements (the "allow" field in <iframe> tags requires this), so it seems awkward to have part of the responsibility in the HTTP server and another part in the HTML document.
- klodolph 8y agoAs a website operator, I should be able to have some guarantees about the security of my site without auditing every single piece of HTML, JavaScript, and CSS. That might be far from a trivial task if my site has user-generated content... beyond forums, there are also blogs and CMSs. HTML, JS, and CSS are fast moving targets and something that is safe today could easily have security implications down the road when a new feature arrives. This has happened before and it will happen again.
- jasonkostempski 8y agoLink is not HTML specific. Content-Security-Policy can also be specified as an HTML meta tag, that's where it belongs. CSP obsoletes X-Frame-Options which couldn't be specified as a meta tag only because MS made up that rule when they made up the header, with no justification for it. Everyone followed suit simply because that's what people had to do when MS had a stranglehold on the internet. I'm sure there are other examples of HTML specific HTTP headers that can't be specified as meta tags because we're still stuck with a lot of crud, but that doesn't mean they're not out of place too. It's just the wrong layer for that data.
- james_a_craig 8y agoSurely this header should be an allow list, not a block list? Disable features from iframes etc. until permitted, if the header's present, so that you never end up with unexpected activity from external sources.
- jerf 8y agoUnfortunately, reverse compatibility forces the web into a blacklisting model with new headers. In my Copious Free Time (TM) I am trying to write a web framework that is default deny instead, so even if the web itself is whitelist based, you can try to write in a default-deny environment for security reasons. But even if imagine a perfect such framework from 2017, now in 2018 you have these new headers to deal with, and it means even if the 2018 version of this default-deny framework comes up, you can't just upgrade the framework itself and do nothing because now if you default-deny all of these the website stops working. Plus it's a sense of false security if you program this restriction that says "no iframes!" if someone uses a browser that doesn't support it. It's a hard problem, unfortunately.
- cptskippy 8y agoCouldn't we instead have a header sites could implement to indicate they're compatible with the newer security model? The incentive would be that new features can only be accessed by sites that conform to the new model. Older sites could continue to function as they do today or perhaps be even more heavily sandboxed AND not have access to new APIs.
- tallanvor 8y agoPermissive by default also means you have to worry about making sure that every time a new feature comes out that you have to go back and update your code to disallow it rather than updating it to be allowed only if and when you actually want to use it. I also wonder if this will lead bad actors to scan for this header and start targeting their ads at sites that don't have this policy configured. It really does seem incredibly poorly thought out.
- Ajedi32 8y ago
- nottorp 8y agoHold on, does that mean that a web site is allowed to vibrate my phone? Since when and who agreed to that idiocy?
- esnard 8y agoNavigator.vibrate() [0] is available in Firefox since January 2012, according to Can I Use data [1]. Here is the initial Bugzilla issue: https://bugzilla.mozilla.org/show_bug.cgi?id=679966 https://bugzilla.mozilla.org/show_bug.cgi?id=679966 [0]: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate https://developer.mozilla.org/en-US/docs/Web/API/Navigator/v... [1]: https://caniuse.com/#feat=vibration https://caniuse.com/#feat=vibration
- nottorp 8y agoOh damn. And I like how Firefox for mobile handles tabs.
- Ajedi32 8y agoI'm not sure I'd call this a security header, as all of the features controlled by feature policy already have their own systems in place for ensuring they don't hurt user security. A site can't get your GPS location without asking your permission, regardless of what a site's security headers say. Rather, this seems more like an anti-annoyance header; it lets sites and server administrators restrict the behavior of content they're serving to ensure it doesn't annoy the user. The most obvious use case is for ads: a site could, for example, specify that ads are _not_ allowed to play audio; and the user agent would enforce that.
- phyzome 8y ago« To further the exposure of the header I will be adding detection to Security Headers. The header will not have a weight to impact the grade but it will be flagged as required. I can start to track utilisation and make people aware of its existence to drive adoption! » That seems really quite early. Give it some time, let people discuss it.
- eganist 8y agoQuoting an opinion by someone other than myself (https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/he9tr7p3rZ8/S5B9ImLuBAAJ https://groups.google.com/a/chromium.org/forum/#!msg/blink-d...) regarding the termination of HPKP which is relevant to Feature Policy: > If you going to take the same approach moving forward then I will simply ignore anything invented by google/chrome, if I realise that after 2 years it will probably be dead due to lack of adoption, waste of my time to invest in anything that has a 2 year shelf life. Feature Policy is a tool which, though I value, I don't see high hopes for because of the precedent set with HPKP. I'm on the fence with implementation solely because Google's unwillingness to invest in the success of their development platforms is now adversely impacting their security team. And that breaks my heart. https://wicg.github.io/feature-policy/ https://wicg.github.io/feature-policy/
- cptskippy 8y ago> Feature Policy is being created to allow site owners to enable and disable certain web platform features on their own pages and those they embed. I think this needs to be rephrased. The site/page shouldn't be deciding what features it can use, it should be indicating what features I might ask permission to use. I can see the benefit of saying "I might ask to vibrate or use your location but deny any other requests" but this should only be used as a whitelist in the sense that those are the features that the users should be asked for permission to use.
- natch 8y agoNo, just no. It’s already hard enough to view source, save a video, or download a picture. Unless users have full ultimate control, this reminds me of DRM.
- kevin_thibedeau 8y ago"vibrate" Is this supposed to mean "notify"? Also [1] doesn't return the most ideal results. [1] https://www.google.com/search?q=site%3Asecurityheaders.com+vibrate https://www.google.com/search?q=site%3Asecurityheaders.com+v...