Repository navigation
Would per-component capabilities fit TrailBase? #304
Replies: 1 comment
Sounds like snug apps run on the client-side. With TrailBase WASM apps run on the server. Yours is a single-user environment and TrailBase is a multi-user environment. Arguably, isolation is more important in the latter case. That said, I'm not sure what set-up you have in mind, e.g. bundle TrailBase into some client-side binary, ... 🤷
I'm not sure what your threat-model looks like. If all apps are isolated by the browser using its origin-policy, your only boundary seems to be with the "host agent runtime" that is inherently more constraint than a general computation sandbox 🤷
That's the thought, i.e. limit component capabilities. However once you grant those capabilities components could interact, e.g. using the file-system.
Depends on your threat-model, depends on your deployment model (single-user vs multi-user), ... I find discussing capabilities in the context of brower/client-side execution vs server-side execution rather challenging. Maybe you could focus on what you're trying to accomplish rather than implementation details and we can figure out the requirements from there |
Uh oh!
There was an error while loading. Please reload this page.
I'm Jeetu, creator of Snug, a project for portable, agent-backed apps. Snug is independent and doesn't integrate with TrailBase today. I'm trying to understand where TrailBase could fit.
Snug apps currently run as HTML in sandboxed iframes. Their code and state live in a portable SQLite-backed .snug file, and they use the host's agent runtime for intelligence. Imported app code is untrusted, so the host needs to control both its storage access and the other capabilities it can use.
I understand TrailBase's WASM components are currently trusted. The SQL API doesn't take a database name on each request, and databases can be attached. For Snug, SQL scoping alone wouldn't cover the broader host boundary.
The capability discussion in #252 seems relevant here. Would an optional, host-enforced per-component policy fit that direction: binding a component to its allowed database/storage, with filesystem, network and other host capabilities granted separately? Or would you recommend keeping untrusted execution outside TrailBase, with a trusted broker handling access?
I'm looking for guidance on the architecture before getting into an implementation proposal.
All reactions