Open MarkMcCaskey opened 5 years ago
Perhaps a duplicate of https://github.com/WebAssembly/WASI/issues/5?
Perhaps a duplicate of #5?
Good call! I didn't see that when posting this now, but unfortunately I'm not able to comment on that issue.
You can't perform this action at this time.
So opening a new issue seems to be my only way of contributing in any case.
Deno use capabilities and ask for them when needed. Could be investigated for inspiration. I think we could diferenciate between mandatory required capabilities that the application needs to work, and optional ones only needed for some features.
@MarkMcCaskey odd... you should be able to comment on it, perhaps github had a hiccup.
@piranna the general design goal (as said in 5) is that wasi uses these manifests to pre-request resources. Beyond that, applications could add additional ways to get capabilities (like deno's, where it pauses and confirms with the user). I don't think it would make sense to enforce that runtimes need anything more than support for the manifest though.
I don't think it would make sense to enforce that runtimes need anything more than support for the manifest though.
Fair enought. Yeah, maybe would be a good idea to left that permissions to each runtime, that doesn't goes against the fact the manifest show what capabilities are mandatory so the app/library can work, and what ones are optional and left to the user to enable them or not.
A major problem we're seeing with using WASI, in contrast with Emscripten and unsandboxed code, for human-in-the-loop uses of WebAssembly is: how does the user know which capabilities a module will need?
Currently the flow is:
What we need is a way for the WASI module to ask for more permissions. We've considered adding something like this for WASI as it is now, but I think having it in the WASI standard is the way to go. And in the case of preopened file descriptors, a WASI-native solution will be much nicer than having the host edit the libpreopen data structures in WASI memory.
Alternative solutions:
Known issues
.ssh
if I happen to run it in my home directory.[1]I think this was mentioned in passing in one of the previous meetings, but I'd like to restart the conversation around this. Getting this right is critical to having WASI and sandboxed/secure computation used for user-facing applications.
Please share your ideas about this, suggestions for alternatives/known issues, and intermediate solutions that you all have been using if you've encountered this issue!
[1]: We've considered special casing uses like this (inferring permissions based on command line arguments) because we solved the "program relies on a pile of files to work correctly" problem for our uses with wapm package filesystems (statically declaring host file dependencies outside the WASI module). This is a band-aid though and is easily defeated, like in the case of a compiler which not only reads the file you gave it as an argument and its pile of files, it needs to output file(s).