4 ms·
Seems like most (all?) people in this thread are not picking up on the key insight that he's putting forward here -- which is the encapsulated process & securit
by cmrdporcupine 4y ago
Seems like most (all?) people in this thread are not picking up on the key insight that he's putting forward here -- which is the encapsulated process & security capability model that was in E.
I think he's absolutely right that the "right" replacement for JS is something built on that kind of foundation. It's not a matter of a language with a better syntax or a better arbitrary runtime like WASM, or whatever. It's the component and security model itself.
Unfortunately 30ish years on, people still don't seem in general to understand capabilities and what this can provide for us, especially in a environment with the trust model of the browser, which is executing arbitrary code from all over.
I encourage people to read up on caps, and actually on E itself.
I'm glad to see Fuchsia running with the capabilities baton. And it's in a lot of devices in the form of SeL4. But almost never exposed as an aspect of "end user" programming.
EDIT: obligatory WP links: https://en.wikipedia.org/wiki/Object-capability_model https://en.wikipedia.org/wiki/Object-capability_model and https://en.wikipedia.org/wiki/E_(programming_language) https://en.wikipedia.org/wiki/E_(programming_language)
- mikewarot 4y ago>Unfortunately 30ish years on, people still don't seem in general to understand capabilities That's because they think they've seen it, and what they saw was horrible. First was the UAC stuff in Windows Vista that caused no end of unnecessary headaches. Next was all of the permissions flags (capabilities) in their phones in the name of "security" It's a Java/Javascript situation. I'm not sure what the best way to route around this is. Recently I've used these analogies: Cash in a wallet - if you hand someone $10, there's no way that it can lead to a loss of more than $10, as opposed to access to your entire wallet Circuit breaker / Outlet - An circuit is only capable of delivering up to the limit of the circuit breaker that is protecting it
- cmrdporcupine 4y agoYes the conceptual model behind capabilities is perhaps the hardest part to understand fully, and completely translate back to end users. We're so used to this "identity" and "API" separation now, we just take it for granted. And I suspect it has a lot to do with our own mental modeling of problem domains like they're hierarchical social problems. Administrator is the King and He Can Do All. Others are Serfs. Whatever. The notion that the "handle" or "reference" is the capability and the API itself is the 'permissions' layer is harder to explain maybe. I still struggle fully with the vocabulary around it.
- mikewarot 4y agoSee here's how I explained it in another thread - https://news.ycombinator.com/item?id=32740498 https://news.ycombinator.com/item?id=32740498 Capability Based Security - No, you really don't know what it is (like Java/Javascript, there's confusion.. it's not Windows Vista UAC, nor the flags for apps on your phone, not even AppArmor or SElinux) Currently, when you start your favorite GUI based editor, and tell it to open a file, it calls on the OS to present a dialog box, who chooses file(s), those names are then passed back to the editor. The editor then uses the users permission to open the file(s), and allow you to edit your data. Note that there is NOTHING stopping the program from getting confused or malicious and opening any arbitrary file using that user's account. The exact same workflow happens in a Capabilities based OS, except the names of the parts and constraints (that you don't see) are different. It works exactly the same, as far as the user is concerned. Instead of calling on the OS to present a dialog, then directly accessing the files, the program calls the OS to present a PowerBox to the user, and it returns capabilities to files or folders, the program has NO access to any other folders or files. No matter how confused or rogue the editor can not corrupt anything outside of the objects specifically chosen by the user.
- the_duke 4y ago> or a better arbitrary runtime like WASM > It's the component and security model itself. WASI and the WASM component model proposal [1] are moving to a capability based system (enabled by unforgeable references aka `reftype`) and to isolation between different parts of your code, which would make isolating and restricting dependencies really easy. Combined with interface types (essentially a universal cross-language ABI) the ecosystem has the building blocks for building very secure systems. Sadly progress has been very slow, with no end in sight, but I remain hopeful. [1] https://github.com/WebAssembly/component-model https://github.com/WebAssembly/component-model
- cmrdporcupine 4y agoAgreed. I have been watching this as well a bit, esp as the startup I'm now working at is working in the "hosted WASM" area. But it still seems early days. And not clear if their goals correspond to mine (WASI doesn't fit their/our use case generally, but a lightweight component model for WASM does). Probably I should watch this more closely, or see if there's a reasonable way I could get involved. I still think there's a long rough road to "get there from here" in the context of the browser though, which has already defined its own (non-capability based) security and component model. Luckily what I work on right now doesn't involve the browser.
- gnufx 4y agoHear, hear. Many, possibly most, security failures I see reported seem to be at least related to ambient authority-type sins at one level or another. If only that was widely recognized after all this time.