WASI: A New Kind of System Interface
infoq.com
infoq.com
While it is reasonable to trust users with their own files, it is unreasonable that the only model of computing offered to those users requires that they then give all of their privileges to every piece of code they run.
It is possible to run code from anywhere without having to trust it, thanks to this new model of computing.
Capability security is almost as old as access control lists. That's the only quibble I have with your post.
Yes, but it's never been fully implemented. Separating superuser/root from normal users was a good first approximation. However, in the modern era of persistent internet and mobile code, we need to finish the job.
Theoretically, you could start a new process having previously created a new UID and having turned off access to all files in the ACL on the root, but can a user do that? Easily? Can you explain it to someone's mom?
Money in a wallet is capability based, and people have managed that model since the beginning.
I'm fine with ACLs for managing overall access to file structures on a per account basis, they don't work for a per execution instance basis.
It sure has, in at least 6 different operating systems that have actually seen real world use, and 3 programming languages since the mid 70s.
Yes indeed; running untrusted code blobs on my home computers and cloud servers alike is truly and finally solved by running them in a VM.
There are many software packages that confine themselves to what is legal. They often want to ingest and upload everything they can about the user. But if they are locked down to a narrow set of user data, they won't risk the liability of attacking the protections themselves.
We also seem to have the same issue with SSD modules and SYNC commands.
You can't fix broken hardware in software without taking a huge performance it, if it is possible at all.
Yes, we all like to point out corner cases here, don't we?
Ahem, such distinction predates Unix, and in fact Unix has a watered down regime compared to Multics, which implemented a multiple ring approach.
In other words, computing existed before Unix.
Its security capabilities are one of the reasons why Unisys keeps updating and selling it to customers that want security above everything else.
Virtualization and containers have existed in IBM mainframes for a decade before making their way into UNIX.
I want to set up a DNS-like system, where I have some pub/private key pair to control which servers you can find me at. My friend Tom sets his up, too.
Then I want to tell the Service Host she's talking about, "Here's my friend Tom's public key. Please look him up in the DNS system, and find out how to reach one of his hosts. Let this new Service X, talk to Tom. Use something like Wire Guard to establish a connection directly from this wasm Service X that I'm running, to a similar wasm service X that Tom is running. We're going to send proto messages (not streams!) back and forth to each other, and you're in charge of connectivity."
Give me that, and the ability to talk to, I dunno, Redis, SQLite, MongoDB, and/or maybe Firebase, and I think people could make some really amazing federated or P2P social apps with a very, very small amount of code.
I picture writing a Front-end UI on Flutter that talks to a Back-end like I describe.
PS maybe someone could make a WASM-first (no Dart) version of Flutter?
Unfortunately, Opportunistic IPSec failed miserably at widespread adoption. The same fate is almost certainly waiting for any similar all-encompassing approach. Wireguard doesn't really help as the vast majority of the complexity and pain exists above the level of the basic stream encryption. (Supporting schemes like Opportunistic IPSec is one reason why IPSec permits direct IP-to-IP encryption without tunneling or layering. One of Wireguard's simplifying assumptions was that it would be used to create VPNs and tunnels; TLS had won the day as a solution for direct, end-to-end encryption.)
I kind of feel like you and I are talking past each other a bit. (And the fact that I don't know any of the technical terminology doesn't help me at all, here.)
I want this Host program she's talking about to be trivial to install for some random end user. And then that user can pick my App from some App Store interface, similar to the Demo in sandstorm.io, and then add Contacts, and then give my App permission to talk to some of their Contacts.
So, the Host program is super sandboxed, and capability-model based...
And I'm also asking for the Contact Management DNS Connectivity system, which I imagine feels roughly like setting up a public/private key pair with PGP, and then feels roughly like setting up a Dynamic DNS.
I don't actually care about specific ports, and how they're actually encrypted, etc. It could connect over WebRTC for all I care. Yes, TLS might work. I hear NAT traversal is a problem to connect peer-to-peer, and I barely know what I'm talking about. I want the Host / DNS / some minimal central servers to take care of that for me.
I feel like the DB interfaces are slightly higher level than the stream level access she was talking about, and would make it slightly easier to do some of the cool stuff I envision. But I feel like providing DB Capabilities is a pretty low bar - it should be relatively easy to do, right?
Speaking of Lisp and WASM, IchigoLisp [0] is a remarkably faithful implementation of LISP 1.5 in WAT. Extraordinarily impressive, and inspires even more awe for the original system from the 60s.
Is that what things like this [1] are doing?
It isn't only Java, bytecode as execution format goes all the way back to late 1950's, Gosling quite clearly asserts the work that Java builds upon, contrary to the WebAssembly folks.
https://queue.acm.org/detail.cfm?id=1017013
"Back when I was a grad student at Carnegie Mellon, I had this problem where I needed to have some kind of an architecture-neutral distribution format. We had a bunch of workstations called PERQ machines. The folks who built them were a bunch of hardware guys who didn’t want to do software. The only compiler that they could get for free was UCSD (University of California San Diego) Pascal. So they made the hardware interpret UCSD Pascal p-codes.
My thesis advisor, Raj Reddy, asked me to spend the summer trying to figure out how to get the software from these PERQ machines to run on our VAXs.
I started out writing a little hardware emulator, just to understand the p-codes. Then I realized I could actually write a code-generating program that translated from Pascal p-codes to VAX assembly code.
So I wrote a hardware emulator for the PERQ machine that did hardware emulation by translating, and I spent a bunch of time trying to figure out why it was that the translation actually worked. One of the things that I noticed was that the code that I was getting at was actually better than the code that was coming out of the C compiler. I was quite floored by how well it worked, and I spent a bunch of time thinking about what it was about p-code that actually made it work, versus trying to do this for some other instruction set.
Then fast-forward a bunch of years, when I was trying to do the project that Java came out of. I had to do this architecture-neutral distribution format, and then I just went ka-ching! You know, this p-code translator thing would actually just drop in there."
As another example of hidden agenda, most WebAssembly sales also ignore PNaCL and CrossBridge, only mentioning asmjs as previous art.
But I don't understand, you make the Java joke because previous attempts aren't recognized enough?
There's plenty of blog posts about transitioning from them, Chromium (the only ones who implemented PNaCL) did one, as did others.
There are plenty of WebAssembly articles selling it as being the first kind of bytecode to support C like languages.
That doesn't detract from the technology itself, which is great.
And the actual Web-Assembly developers don't ignore that stuff. And even if they did so what? Re-inventing the wheel is common and sometimes something good and new comes out of it.
Something good like re-inventing EAR files.
And btw, not mentioning prior art doesn't count.
Tainted evidences, you ask. Me no bother.
https://leaningtech.com/cheerpj/
https://leaningtech.com/cheerpx-for-flash/
Thanks for making the revenge of plugins a reality.
WASI lets you use lots of languages included non-GC languages (GC'd languages are a bit of a WIP but it's going to happen).
It's funny that some of the most popular languages these days are Go (crippled Java 1.4) and Rust (Java for frontend web developers who need to be tricked into it) so it seems like lots of people really do want to write Java.
Case in comparison, bpf or ebpf. In that they are both a type of radically different approach on solving the old problem. Bpf being kernel programmability for app developer, wasm being portable execution environment.