News for hackers. Stuff that matters.
Re:Kata Containers: The speed of containers, the security of... by fiddlerwoaroof on Wednesday October 04, 2023 @05:54AM (#37762964)
It’s a steep learning curve, but I find nix basically solves all the parts of these problems for me that I want solved (without things like network namespaces that just make life harder) and it’s easy to turn a working nix build into a container for deployment.
Re:Kata Containers: The speed of containers, the security of... by mongol on Wednesday October 04, 2023 @06:48AM (#37763309)
I don't think Nix solves security concerns as well as other distributions do. It excels in most ways but this is the weakest point.
Re:Kata Containers: The speed of containers, the security of... by k8svet on Wednesday October 04, 2023 @06:57AM (#37763377)
Nix isn't an OS and NixOS does "security concerns" just as well as any other distro. I'm really struggling to understand what you mean. Nix itself doesn't have any runtime sandboxing, but that's no different than using distro packages on any other distro. Meanwhile you can still use Flatpaks, docker, podman, kvm/libvirt, etc, just like on any distro.
Re:Kata Containers: The speed of containers, the security of... by endgame on Wednesday October 04, 2023 @07:21AM (#37763572)
As great as Nix is, a security update to something like glibc will necessitate a rebuild of the entire universe as a necessary consequence of its "immutable, hashed inputs" model. Guix has a feature called "grafts" that avoids some of this pain, but compromises the purity of the functional packaging model to do so.
Re:Kata Containers: The speed of containers, the security of... by SkyMarshal on Wednesday October 04, 2023 @09:17AM (#37764665)
But Nix rebuilds are cheap and fast, what’s the problem?
Re:Kata Containers: The speed of containers, the security of... by ochoseis on Wednesday October 04, 2023 @09:36AM (#37764956)
Plus they can be easily cached so you only ever have to do it once, and the result is available to your whole fleet.
Re:Kata Containers: The speed of containers, the security of... by nbpname on Thursday October 05, 2023 @05:44AM (#37776618)
Grafting is indeed a good solution for fast security updates, except that the way this is implemented in Guix depends on the maintainer of each package. This is indeed better than Nix which relies on asking every user to replace the dependencies.

A few years ago, I made a proposal to have some automatic grafting mechanism: https://github.com/NixOS/nixpkgs/pull/10851

This would automagically work by simply maintaining 2 trees of Nixpkgs, one with the cherry-picked security updates, and one which matches the latest set of cached packages. This way one can fully benefit from the cached packages while having the ability to replaces with the latest security patches they want to import without building the world.

Unfortunately, rewritting Nixpkgs to fit the requirements needed to have the automagic mechanism is a huge project, especially given the activity of Nixpkgs. Maintaining a fork of Nixpkgs which stays up-to-date while changing its inner working cannot be held by a single person.

My hopes would be to push this to the Nixpkgs Architecture Team, while preventing them from doing mistakes by inserting extra complexity while making this work more challenging.

Re:Kata Containers: The speed of containers, the security of... by mongol on Wednesday October 04, 2023 @09:26AM (#37764795)
No it doesn't. It has nothing like SELinux or AppArmor
Re:Kata Containers: The speed of containers, the security of... by fiddlerwoaroof on Wednesday October 04, 2023 @07:35PM (#37773144)
So, first of all, nix isn't a distribution, it's a build/packaging tool. Secondly, docker/containers are not a security mechanism
Re:Kata Containers: The speed of containers, the security of... by pxc on Thursday October 05, 2023 @12:23PM (#37780597)
Nixpkgs is a distribution, as is NixOS. Neither of those things is Nix, but it's an easy mistake to mentally correct when interpreting someone charitably. That said, GP didn't give you much to go off of.

As for security, it's worth noting here that there are Nix-native tools for generating MicroVMs as well, if that's what folks are after with Kata and Firecracker.

Re:Kata Containers: The speed of containers, the security of... by fiddlerwoaroof on Thursday October 05, 2023 @09:34PM (#37786300)
Nixpkgs isn’t really a distribution, but something relatively new (although a bit like FreeBSD ports and Gentoo’s portage): it’s a collection of build scripts designed to make it possible to build software cross-platform in a reproducible way.
Re:Kata Containers: The speed of containers, the security of... by pxc on Thursday October 05, 2023 @11:46PM (#37786931)
Portage and *BSD ports systems are certainly software distributions. They're just source-based distributions.

Nixpkgs includes the same kind of reuse and integration and patching that you see in other kinds of software distributions, like Linux distros or Conda.

Re:Kata Containers: The speed of containers, the security of... by fiddlerwoaroof on Friday October 06, 2023 @08:12PM (#37797914)
In this context I assumed “distribution” meant “operating system distribution”
Re:Kata Containers: The speed of containers, the security of... by pxc on Monday October 09, 2023 @01:25AM (#37817139)
Ah! Got you.