(More details here: https://support.apple.com/en-us/102149 )
(More details here: https://support.apple.com/en-us/102149 )
WRT security implications of disabling SIP - I don't think OS becomes any less vulnerable than usual Linux/Windows installation.
Maybe for an automated test CI/CD running system (which is probably the main use-case), but not on anything that users would interact with.
That's a technical limitation.
If it really isn’t technically possible (which I think you might be able to do in a Darwin VM), then maybe this approach isn’t a good idea.
Tomorrow Apple might decide it is safe to chroot with SIP enabled (I actually do not understand why they restrict it, chroot is a tool to increase security). Does that suddenly convert bad design into a good design? But this is exactly the same design.
Does this current design require disabling SIP? Then I don’t think it is worth my effort to use (for my use case). If Apple changes the system in the future, my opinion might change.
But a design cannot be judged as good or bad outside of the context for which it was designed.
If you feel this is a better way to tackle the problem, then talk to Apple about it.
This is not an alternative to remotely connecting to a VM to control Linux containers (which DfM is)
They did not have such success on windows, despite Windows also having a container subsystem, as windows servers already did this with IIS web app containerization.
On MacOS desktop software distribution is largely a solved problem since ages. On MacOS/Darwin servers... are there such in industrial use apart from some research installations?
I believe this project can be useful for CI and testing scenarios.
> On MacOS desktop software distribution is largely a solved problem since ages
Are you talking about App Store? Or Homebrew? Or MacPorts? Or... Wait, isn't this too many tools for a problem that was solved?
Sure it does not attempt to map fsevents<->inotify 1:1 but honestly I can live with that limitation given that it's a 10x performance increase compared to the DfM kitchensink.
I do go native darwin when I can / it makes sense.
No
> or are you saying you sort of roll your own DfM alternative?
Yes, I set up a NixOS VM and use DOCKER_HOST=ssh://docker@<ip>
If you want to have it easy you can roll with lima/colima (but I found the fs sharing slower than vmhgfs)
> Also, what does "VM isolation" mean here?
The host/guest boundary. The guest is just like any another, remote machine. DsM adds smoke and mirrors to make it look like guest and host are one.
> How is NFS or VMware Fusion more "isolated" than DfM?
It's not, both are VMs and need a way to expose the host fs to the guest, NFS or vmhgfs are a means to that.
Can you say anything more about what you did instead, and how it ended up working out?
Of course, if you are using Go or some other language with a fast, static cross-compilation step, you don't need to mount a source code volume into your container, you can just rebuild the whole container image or rebuild on the host and `docker cp` the new binary onto the target container.
Is this related to the code you tried to have merged here: https://github.com/containerd/containerd/pull/8789 ?
Vanilla containerd cannot mount anything on macos.
> If you really want good adoption, you’ll have to figure out a way for devs to try it out without first having to disable SIP.
I can't stress enough how I also would like it to work with SIP enabled!
No matter what you or I think about what's needed for adoption, technical problems get in the way of the tool working with SIP, so seems it's in Apple's ball court really.
Think places where security is a big deal, like finance, military, aerospace, critical infrastructure etc.
is not a good enough argument.
For the story, SIP is Apple's "rootless". Effectively the OS runs with less privileges than root. Disabling SIP significantly increases the attack surface.
That being said, I'm grateful that someone decided to do something more native for containers in macOS.
Is there anything else I should be doing security wise?
I’ve been hearing podman is more secure, but I think it’s still containerd under the hood, so idk how true that is.
The way that podman and newer versions of docker get around this is using unprivileged user namespaces. Unprivileged user namespaces are not a free lunch - in fact, they're a bit of a security disaster in their own right.
Thankfully there is rootless mode for some time now: https://docs.docker.com/engine/security/rootless/.
Podman, too, can run in rootful and rootless mode. Rootless in podman still feels to me to be more like first class citizen, as opposed to docker case.
In both cases it's important to keep in mind in which mode you operate. Both from the perspective of security and day to day operations, as some aspects of behavior will differ between those modes.
On Linux, more or less the entire permissions system makes no assumption about SIP existing (as it doesn't there), so other protections are relied upon to secure the system (such as SELinux, granular directory permissions, etc.).
On both Linux and Windows, TPM and secure boot provide similar protections to SIP on macOS, but are optional (it's encouraged more forcefully on Windows 11).
Removing SIP from a system that relies on it as a basis for platform security is different than using a system that wasn't relying on it in the first place.
This concern is definitely not totally unfounded, back in 2019 Chrome shipped an update that rendered systems with SIP disabled unbootable: https://support.google.com/chrome/thread/15235262?hl=en
This is an example of defense-in-depth being present, and defense-in-depth still failing for some users who gave escalated permissions to some installers, allowing them to run roughshod over their filesystem permissions, leaving them vulnerable to a subsequent varsectomy. If one did the same thing to their Linux system, the same thing could happen.
https://arstechnica.com/information-technology/2019/09/no-it...
1: https://support.apple.com/en-gb/guide/security/secd698747c9/...
And SIP doesn't defend you from editing files in /bin. They are guarded by the fact that root filesystem is mounted read-only.
In reality they done basically everything to force users to use secure boot. If they disabled normal boot altogether, OS adoption would suffer heavily. They could've obscured that option, but it would be found out, and enterprise users would be pissed at them because they didn't gave them a provisionable way while the way exists. So it came down to normal variables in installer registry.
However modifying, e.g making users "hack" the ISO is really as forceful as it gets without market loss.
Note: There may be more normal way today than modifying the registry of ISO, I installed 11 once when it came out.
A modern Linux with SELinux enabled (the default in e.g. Fedora) running apps inside rootless containers (Podman doesn’t even need a daemon) is likely much more secure than your default MacOS or Windows.
Where SELinux really shines is in server installs.
A decade ago SIP didn't exist at all. I thought disabling SIP just put us back to how things were in Yosemite. What changed?