Hacker News new | ask | show | jobs
by ozh 4151 days ago
Sounds cool but I think the WordPress implementation is TERRIBLE: it depends on a WordPress fork that is completely outdated, instead of downloading an up-to-date fresh archive.
1 comments

I agree -- the current WordPress package needs work. Thank you for trying it and looking into it!

Community-wise, one thing we're going to need, as Sandstorm grows, is an ecosystem of app package maintainers. Part of what we're hoping is that more developers of the apps themselves will maintain the Sandstorm ports, like Audrey Tang is maintaining the EtherCalc port.

Tech-wise, one thing we're going to need is a solid story for how Sandstorm packages will easily stay up to date with the latest changes as the upstream author releases new updates.

I work on+for Sandstorm, and I'm also a Debian developer. Debian is not a shining example with regard to either of the above, and I'm sure we can do even better at Sandstorm.

Is it possible to run arbitrary Docker containers? If so, that could be a solution.
It's not currently possible to run arbitrary Docker containers through Sandstorm, since we prefer app packages (we call them SPKs) to be:

* Self-contained -- if the app needs MySQL, bundle it;

* Able to run with external network access unavailable -- this improves security, since even if an app gets compromised, it's not a big deal since it can't leak any data out to the world;

and a few other constraints that are more technical than philosophical.

https://github.com/sandstorm-io/sandstorm/wiki/Porting-Guide hints at them, but I don't quickly find a reference for all these constraints. I'm likely to write such a reference in the next few days/weeks, though.

These preferences of yours appear to be a step back from installer scripts like Softaculous. Fantastico, etc.

It's a nifty/fun project, but why in the world would I bundle MySQL with a simple blog platform?

It seems like you're trying to reinvent the wheel, and making it less functional in the process.

We actually don't want apps to bundle MySQL -- we'd prefer they use sqlite. :) But the point is, it's up to the app. The app gets a slice of filesystem and they can use whatever infrastructure they want to store stuff to it.

We want the experience for users to be install app, use app, without worrying about setting up databases and such. We also want to enforce isolation between apps so one app cannot access another's data, and that's a lot easier to do if they aren't sharing a database. Considering these desires, it makes sense to say that apps should simply bundle their database of choice.

why in the world would I bundle MySQL with a simple blog platform?

To make sure it actually works. (Although as others have said in this thread, it should probably use SQLite instead of MySQL.)

Sarien: It's not allowed to talk to the outside world except through Sandstorm via specific APIs.
Even so, I don't see how you could distinguish between a compromised app sending data to the outside world and an uncompromised app doing the same as part of its normal operation.
That's just marketing bullshit. Unless the API is magic (and I don't mean advanced technology "magic" but Harry Potter "magic") it has no way of knowing what the application is allowed to send or not and therefor cannot filter. It's like saying it cannot leak data because it has to use HTTP.
Hi, lead developer of Sandstorm here.

> That's just marketing bullshit.

No, it isn't.

> Unless the API is magic (and I don't mean advanced technology "magic" but Harry Potter "magic") it has no way of knowing what the application is allowed to send or not and therefor cannot filter.

You're assuming that Sandstorm apps have arbitrary IP network access. They do not.

Sandstorm is based on capability-based security. Any outgoing request has to be addressed to a capability representing some specific permission that the user has granted to the app. A capability might point to another app, or it might point to a specific external host that the user has designated.

More specifically, a Sandstorm app's only connection to the outside world is through Cap'n Proto RPC, which is an object-capability protocol, meaning that an app can only send requests to objects to which it has explicitly received a reference.

https://blog.sandstorm.io/news/2014-12-15-capnproto-0.5.html

https://capnproto.org/cxxrpc.html

Incoming HTTP to a Sandstorm app actually happens through this Cap'n Proto protocol:

https://github.com/sandstorm-io/sandstorm/blob/master/src/sa...

Of course, for backwards-compatibility, we have translation layers so that apps written to use regular old HTTP need not be entirely rewritten. You just have to tweak it to make the correct permissions request first, which has proven not very hard in practice.

Sandboxed applications literally cannot send any data by default. They can't open a connection to <whatever server>, no matter what protocol.

The goal, once they've built their Powerbox, is to then implement a set of protocol drivers which the application can use. So it still can't connect to arbitrary servers, but it can ask the user for permission to, say, connect via SMTP to <wherever>, and the user has control over that.

Yes, they could leak anything that you put in them if you allow them to connect to someone you don't trust. However, even if you do so once, most applications will be per-document - you have an instance of your document editor for each document, and they don't know anything about any other documents you have.

In short: applications can only leak what you give them, and only to people you say to give them to. They can't call back to home base without your permission or the permission of someone you've given the app permission to contact. So for all reasonable definitions of "cannot leak data", applications cannot leak data without your permission.

How can a COMPROMISED WEBapp ever not be able to leak data while being usable?
Here's how:

* Backend: Due to Linux network namespaces, the app can't communicate with the network (except over "sandstorm-http-bridge" which allows it to respond to inbound HTTP requests).

* Frontend: Due to Content-Security-Policy, the client part of the app can't communicate with any hostname other than the one the app runs on. The CSP header is set by Sandstorm, not the app.

So then it has no network access, and therefore even if it is compromised, can't leak anything.

This does hinge on the app's dynamic code only being run for logged-in users. For many apps -- imagine a Google Docs spreadsheet only accessible to people within your domain -- this is a pretty straightforwardly reasonable model. Sandstorm handles authentication for apps, so it can enforce this even if the app is 0wned.

I compromise an app, add myself admin account, log-in, download everything. What's stopping me?
In addition to what Asheesh (paulproteus) said, see:

https://blog.sandstorm.io/news/2014-08-19-why-not-run-docker...

Disclaimer: I couldn't get this thing to work reliably at all

Panamax[0] might be something to look into. It has app templates that are comprised of Docker images.

For example, getting Gitlab up and running is as simple as finding the Gitlab template and pressing "Install".

You can also save templates locally, think "Python Web App (db, cache, app server)".

[0]: http://panamax.io/