@x_cli One question about the proper use of containers (*not* VM, only containers). Is it reasonable to give root access in a container to someone who is not root on the host? I always thought the answer was No and this is how I manage containers. The report mention "public cloud service". Are there services where tenants have root access to a container?

@Keltounet @x_cli ? I don't see the relationship. Let me ask again: are there *services* (not software) where *tenants* (not the company managing the service) have root access to a container?

Follow

@bortzmeyer @Keltounet @x_cli

The answer is here:

electricmonk.nl/log/2017/09/30

"A common practice is to add users that need to run Docker containers on your host to the docker group. [...] What is not obvious right away is that this is basically the same as giving those users root access. You see, the Docker daemon runs as root and when you add users to the docker group, they get full access over the Docker daemon."

@bortzmeyer

Unless I did not understand your question at all. In which case, please accept all my apologies.

@Keltounet @x_cli

@ParadeGrotesque
You are talking about giving a user docker command access. Stéphane was asking about root priv inside the container (which is "safe" if you use user namespaces, and preferably also seccomp, and a LSM)
@bortzmeyer @Keltounet

@x_cli @ParadeGrotesque @Keltounet Safe only if root-in-the-container is not mapped to some priviledged stuff like system:admin, no?

@bortzmeyer
Correct. You are expected to map the in-container root to an unpriv user on the parent NS. If the mapping maps in-container root to a user with some privileges on the parent NS, there are some more complex rules applying to what you can and can't do. That's because there are still stuff like mount point locks, and setns restrictions.
@ParadeGrotesque @Keltounet

@bortzmeyer @ParadeGrotesque @Keltounet
My answer was inaccurate. Even if mapped to an unpriv user, you have to care about mount point locks and setns restrictions and all of that "good" stuff, but things get even muddier when mapped to a user able to get some privileges and then, I'm not sure what happens.

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko