Rootless Containers
unit42.paloaltonetworks.com
unit42.paloaltonetworks.com
Good grief, that's off by almost 15 years. Slirp was originally a SLIP endpoint you could run on a remote dial-in shell account to connect your local system to the internet. As it happens that's basically the same problem needed to get (something like) IP to work out of a userspace context in general, so it got appropriated by the container community and used pervasively. But it's roots go much deeper.
Also... "Quick Emulator"?!
https://en.wikipedia.org/wiki/QEMU → "QEMU (short for Quick EMUlator)[2] is a free and open-source emulator that performs hardware virtualization."
However, the citation points to an article from The Register circa 2019: https://www.theregister.com/2019/03/11/windows_10_on_kvm/
So who knows?
Actual SLIP needed privs on the host to configure everything. slirp did it in usermode, allowing lowly undergrads to get real IP connections at home from the terminal services universities provided. Then you could run NSCA Mosaic at home :-) And ftp things directly, instead of downloading to your shell account tmp dir and using zmodem to transfer it the last hop.
https://www.linuxjournal.com/article/1174
It went away as real ISPs began to appear, offering PPP connections, and universities dropped their dial-in services. Strange and glorious to see it back again.
There are some fairly well documented shortcomings to consider/work-around. You can find that list at https://github.com/containers/libpod/blob/master/rootless.md
> but that will actually work just fine if you stay as root inside the container, which maps to your uid outside the container
In short, you don't remap when running as root in the container, thus no uid/gid remapping.
> but that will actually work just fine if you stay as root inside the container, which maps to your uid outside the container
The context of the statement isn’t clicking with me. You start with “it’s a problem with these filesystems” which I’m on board with but then follow with “but it’s fine if you do this” and I’m not seeing the correct correlation.
When you run as uid=0 in same the container, you are actually mapped to your uid, since the range starts to be applicable for uid=1. If you can stay as root, you can write to NFS/GPFS just fine.
The issue with this is that lots of available containers have moved away from using things as root. For example, you couldn’t start the vanilla redis container with a data directory on NFS for snapshots because redis runs as user 999.
Oh oh oh, you were just saying run the container as root, like literally. That’s what threw me off, because I was in the mindset of rootless. Wasn’t allowing myself to think outside of that environment. Sorry for the confusion on that. Long day yesterday.
Actually, a lot of the time you can get away without namespacing anyhow, just by settings paths to point into an unpacked image. That does depend on what you want to run being sufficiently configurable, though.
Singularity makes some bad design choices though, like eliminating layers, which results in proliferation of huge container images cluttering everywhere, with no idea what they do. It's really designed for HPC administrators who don't like end users.
Ironically, I keep getting told I have to switch over from docker because of security. Plenty of IT security folk have their knickers in a twist at the idea of non-sysadmin priviledged users. They would rather run a giant insecure system (Linux or Windows AD) with lots of LPE and lateral movement than smaller more isolated systems with more trusted users and less LPE. Dev(Sec)Ops concepts still haven't penetrated very deep.
While it would be better to run a capability micro-kernel-ish system, you're stuck with Linux for things like HPC. There's no excuse for known exploitable privilege escalations, though and, yes, introducing more opportunity with setuid programs doesn't help. I agree the way such systems are run is unfortunate.
There is quite a bit of distrust of Singularity places that value security. I'm hoping podman rootless can eventually come through and render all the bespoke implementations moot, but it will probably be a few years.
device controller is present since kernel 4.15.
> Adoption status
Docker/Moby supports FUSE-OverlayFS and cgroup2 as well on master. Planned to be released as v20.0X.
> spearheaded by Podman and LXC.
Yes w.r.t. cgroup, but the network stuffs (slirp4netns & RootlessKit) were originally written for Docker/Moby :)
> the truth is that container engines run Slirp without the seccomp support
Untrue. https://github.com/containers/libpod/blob/d4a3c05c0fcd0c53fa... https://github.com/moby/moby/blob/b47e74255811b2ead92b222541...
I thought, when i used that tool for the first time, that is some small company building it but nope its paloaltonetworks.
In contrast, gvisor, needs ptrace or kvm.
Both nanovms and gvisor aim to provide an abstraction through emulated system calls.