this post was submitted on 26 Sep 2023
76 points (89.6% liked)

Selfhosted

39162 readers
412 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] dandroid@dandroid.app 12 points 11 months ago (2 children)

Don't let perfection be the enemy of good. Security is not all or nothing. Reducing the attack surface is still important.

Can you elaborate on running docker daemon as rootless? It's my understanding that you can add your account to a group to access the docker daemon rootless, but the containers are still running as root, as the daemon itself raises the access to root.

[–] icedterminal@lemmy.world 2 points 11 months ago

but the containers are still running as root, as the daemon itself raises the access to root.

No. The daemon can run without root, as such the containers don't have root. My docker install doesn't have root access. None of my stacks / containers need any root access tbh. I don't have any troubles with deplyong stuff.

https://docs.docker.com/engine/security/rootless/

[–] hottari@lemmy.ml -4 points 11 months ago (1 children)

Not sure relying on podman alone as a security tool might be advisable. Podman is a container technology first, security is not the main goal.

Read more about rootless docker here.

[–] dandroid@dandroid.app 7 points 11 months ago (1 children)

I never said I was relying on it alone. Not sure why you think that.

That's a great link. Thank you for sharing. It's good that docker supports this functionality now.

[–] hottari@lemmy.ml -5 points 11 months ago (1 children)

I never said I was relying on it alone. Not sure why you think that.

....

...all my services aren’t running as root.

If it turns out a vulnerability is discovered in lemmy tomorrow that allows people to access my server through my lemmy container, the attacker will only have access to a dummy account that hosts my containers.

This was your argument according to you for why you think podman is more secure (than docker I presume). Seemed to imply rootless podman will save you from an attacker. I was simply disproving the flawed notion.

[–] BlueBockser@programming.dev 0 points 11 months ago (1 children)

I think you're interpreting too much. Security is about layers and making it harder for attackers, and that's exactly what using a non-root user does.

In that scenario, the attacker needs to find and exploit another vulnerability to gain root access, which takes time - time which the attacker might not be willing to spend and time which you can use to respond.

[–] hottari@lemmy.ml -3 points 11 months ago (1 children)

You don't know enough about security to lecture me. The kernel has before/continues to suffer(ed) from successful root shell exploits, particularly in this case via unprivileged userns. Something podman or even rootless docker can't do anything about.

[–] BlueBockser@programming.dev -1 points 11 months ago (2 children)

Funny how you claim to know so much about security but can't even seem to comprehend my comment. I know root shell exploits exist, that's why I wrote that it takes additional time to get root access, not that it's impossible. And that's still a security improvement because it's an additional hurdle for the adversary.

[–] apigban@lemmy.dbzer0.com 2 points 11 months ago

the person you are replying to either lacks comprehension or maybe just wants to be argumentative and doesn't want to comprehend.

[–] hottari@lemmy.ml -3 points 11 months ago (1 children)

Containers cannot be viewed as security tools. They suffer from poor isolation and inadequate and some cases non-existent sandboxing. All these are proven security essentials. You would know about them if you knew anything about (defensive) security!

[–] BlueBockser@programming.dev 1 points 11 months ago

Once again, you're going off on an unrelated tangent. If you don't want to listen, I can't help you. We're done here.