←back to thread

180 points teleforce | 2 comments | | HN request time: 0s | source
Show context
orthoxerox ◴[] No.43685880[source]
What is the killer feature that will make me want to switch from Docker Compose to Podman Quadlets?
replies(7): >>43685989 #>>43685992 #>>43686728 #>>43687129 #>>43687706 #>>43688911 #>>43690483 #
eriksjolund ◴[] No.43685992[source]
Podman quadlet supports "Socket activation of containers" https://github.com/containers/podman/blob/main/docs/tutorial... This allows you to run a network server with `Network=none` (--network=none). If the server would be compromised, the intruder would not have the privileges to use the compromised server as a spam bot. There are other advantages, such as support for preserved source IP address and better performance when running a container with rootless Podman + Pasta in a custom network.
replies(2): >>43687323 #>>43687533 #
anonfordays ◴[] No.43687533[source]
What's old is new again. That's effectively how inetd worked circa 1986. The inetd daemon had some serious security vulnerabilities so the world move away from using "socket activated daemons" to having always listening services (performance reasons as well).
replies(2): >>43688098 #>>43689460 #
rendaw ◴[] No.43689460[source]
I never understood the use case for socket activation - is someone really running a web server that mixed workloads, long periods with no network traffic you'd rather prioritize something else, and a web server that's so resource intensive when not handling events it makes sense to stop it? Maybe desktop computers?

The security aspect is something new to me and I'm not sure if that applies to inetd/systemd socket services or if it's specifically a container thing.

Does anyone have more info on use cases for this?

replies(3): >>43689950 #>>43689968 #>>43691201 #
ratorx ◴[] No.43689950[source]
> the security aspect

It’s not a systemd-specific thing, but systemd makes it relatively easy to drop privileges (like network in this case), whilst also allowing socket-activated services to be configured easily. You can probably achieve the same thing with inetd + network namespaces (I think this is what systemd uses under the hood)

replies(1): >>43690036 #
eriksjolund ◴[] No.43690036[source]
You can use the podman option `--network=none` together with the systemd directive `RestrictAddressFamilies=`

I wrote a demo: https://www.redhat.com/en/blog/podman-systemd-limit-access

Podman will then not have the privilege to pull the container image, but a web server container can still serve the internet with socket activation.

replies(1): >>43690339 #
rendaw ◴[] No.43690339{3}[source]
What's the use case for that? Multitenant server web hosting where customers provide containers and you want to lock them down I guess? Mostly SaaS/PaaS?
replies(1): >>43691838 #
1. eriksjolund ◴[] No.43691838{4}[source]
I did it out of pure interest, just to explore ways of locking down a web server.
replies(1): >>43692560 #
2. rendaw ◴[] No.43692560[source]
Oh, fair enough! It is very cool, FWIW.