5 ms·
The user-centric model is actually still relevant if you use them as the means to software isolation. This is a major aspect to the security models of OpenBSD
by yellowapple 10y ago
The user-centric model is actually still relevant if you use them as the means to software isolation. This is a major aspect to the security models of OpenBSD and (last I checked) Android, and is generally effective (unless you're deliberately subverting it, as is common on "rooted" Android devices).
However, said model still has connotations of a specific actual user, which is no longer entirely accurate in such applications of that model. It'd be nice to have a sort of "subuser" system where - within, say, the user for my own desktop account - I could further divide the software I run into "users" for things like Firefox or Spotify or what have me.
Basically, I'm in agreement that everything should be sandboxed. We have the technology to do it, and in fact have had the technology to do it for decades (maybe not quite as well as we can do now, but confining daemons to their own users has been possible for a long time).
My own dream system would be one where every "package" for my operating system is a filesystem image with `/bin`, `/lib`, `/etc`, and possibly `/var`. One of these packages would provide the root filesystem with a microkernel and the minimum supporting libraries and executables required to get a container-oriented `init` equivalent running; then, `init` would spin up each service in complete isolation by spinning up `chroot`s or something with various packages union-mounted on top of one another. One of these services could be for a graphical login, in which case said service would spin up another isolated container of sorts for my login session, and inside that I could run applications built up from the same union-mount approach with the same sort of isolation.
Plan 9 From Bell Labs is probably the closest thing to that ideal world.
- fao_ 10y agoHowever, said model still has connotations of a specific actual user, which is no longer entirely accurate in such applications of that model. It'd be nice to have a sort of "subuser" system where - within, say, the user for my own desktop account - I could further divide the software I run into "users" for things like Firefox or Spotify or what have me. I think you might be able to use groups for this.
- yellowapple 10y agoSort of. Groups seem to be better suited for roles - e.g. to provide resources to sandboxes rather than act as sandboxes themselves.
- falcolas 10y agoIn a fashion, you can also do this with sudo -u sudo -u ff_user firefox This way Firefox is run as a separate user within the current user's session, with all that entails. Of course, that would be a serious pita for your average user to setup.
- fao_ 10y agoI guess you could script a lot of it to happen automagically for a subset of applications.
- mycall 10y ago> It'd be nice to have a sort of "subuser" system Reminds me of genode's application-specific trusted computing bases. http://genode.org/documentation/general-overview/index http://genode.org/documentation/general-overview/index
- deleted 10y ago[deleted]
- jcrites 10y ago> My own dream system would be one where every "package" for my operating system is a filesystem image with `/bin`, `/lib`, `/etc`, and possibly `/var`. Take a look at NixOS and the Nix package manager. It works along these lines [0]. > then, `init` would spin up each service in complete isolation by spinning up `chroot`s Systemd employs container features, some automatically like cgroups and some via configuration. There was an article on HN just the other day about some of its new sandbox features [1]. Parameters such as PrivateNetwork=, ProtectSystem=strict, PrivateTmp=yes, SystemCallFilter= provide chroot-like capabilities in a number of different namespace dimensions. It has support for chroot as well through the RootDirectory= parameter. See [2] for a good overview of these featuers and [3] for the reference. Hopefully as these features mature and gain adoption, system software will operate more like what you're describing over time. [0] https://nixos.org/ https://nixos.org/ [1] https://news.ycombinator.com/item?id=12874731 https://news.ycombinator.com/item?id=12874731 [2] http://0pointer.de/blog/projects/security.html http://0pointer.de/blog/projects/security.html [3] https://www.freedesktop.org/software/systemd/man/systemd.exec.html https://www.freedesktop.org/software/systemd/man/systemd.exe...