10 ms·
"Letting the server supply you with arbitrary Javascript code to execute doesn't really get you away from trusting the server." BINGO! That is the biggest prob
by EGreg 16y ago
"Letting the server supply you with arbitrary Javascript code to execute doesn't really get you away from trusting the server."
BINGO! That is the biggest problem with current web technology today. We need to have some kind of mechanism for delivering STATIC content, content that can be verified by independently downloading a hash from somewhere that you trust, and making sure the file is the same. This download has to happen through the browser itself, and not be initiated by javascript.
- JoachimSchipper 16y agoDo you have a proposal? Something like "code signing" for HTML/JS would be doable in theory, but where do you get the keys from? If you re-use the certificate authority infrastructure, you've only complicated things; a web-of-trust may work for some early adopters, but look at PGP's lack of mainstream success to see how that would work out...
- EGreg 16y agoYes, I have a proposal. Similar to how we have https:// https:// blabla, and the user agent warns us if the server's certificate is not trusted, we should have httpc:// blabla to indicate constant files. Sites all over the world can download urls from httpc:// and store hashes to them in various formats, and your user agent can trust one or more of these authorities. When downloading, it would compare the hashes against the ones downloaded from these authorities, and if there is even a small deviation, it would give you a warning just like https:// https:// I can see this being used in app stores for the web (curating apps and various versions of apps, like Apple does) and also for secure logins. I would like someone to make guarantees that my password is not being sent in the clear to the server that I am connected to. Currently with web tech it's impossible to be sure you aren't revealing sensitive info to the server. This simple change would make possible a variety of applications that we haven't even thought of, besides these two.
- JoachimSchipper 16y agoI don't really see how httpc:// would make HTTPS logins work better. Can you explain? Some sort of "distributed checksumming" like your first example may be useful for myapp-1.0.0.dmg or jquery-1.4.4.js, but how would you handle upgrades?
- EGreg 16y agodistributed checksumming is what I am talking about upgrades should be done by putting the new version at a DIFFERENT url. As tim berners-lee says, cool uris don't change: http://www.w3.org/Provider/Style/URI http://www.w3.org/Provider/Style/URI
- JoachimSchipper 16y agoEGreg - if everyone will have to re-establish trust for each new release, what's the advantage?
- EGreg 16y agowhat is the advantage of magazines having to review every new version of software? httpc:// would be used for logins and distributing software. People already publish checksums, this would just be an automatic way of verifying every file that the server claims is constant.
- Raphael 16y agoJSON is static content. Open an HTML page you trust and have that load the JSON data you want and use it to populate the DOM, making sure to escape HTML characters so it can't inject script tags and such.
- EGreg 16y agoThe point is to be able to guarantee properties of a resource that is delivered to you via the internet. Whether it contains JSON or not, you are trusting the server. With current web technology you don't have an option.