4

Hi everyone.

I was trying to research about how to implement SSL on the traffic between my clients and the containers that I host on my server.

Basically, my plan was to use upstream SSL in HAProxy to attempt to achieve this, but in order for that to work, each individual container on my server needs to be able to decrypt SSL. I do not think that is possible and that every container has the necessary libraries for it. This puts a halt on my idea for upstream encryption of traffic from my reverse-proxy to my containers.

With that said, ChatGPT suggested I use Kubernetes with a service mesh like Istio. The idea was intriguing so I started to read about it; but before I dive head-first into using k3s (TBH it's overkill for my setup), is there any way to implement server-side encryption with podman containers and a reverse-proxy?

After writing all of this, I think I'm missing the point about a reverse-proxy being an SSL termination endpoint, but if my question makes sense to you, please let me know your thoughts!

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[-] Chewy7324@discuss.tchncs.de 4 points 1 year ago

Nothing wrong with asking LLM's about topics, I'd even say it's a good idea instead of directly asking on a forum. Just like searching before asking, asking an LLM before asking humans is good.

And mentioning where you got the recommendation for k8s is also helpful. I'm not knowledgeable about k8s, but I guess the "wtf" was about the overkill of recommending k8s when simpler solutions exist.

Unix sockets have permissions like any file, so it's simple to restrict access to a user/group and thus process running as the user. If it's unencrypted http on a server other processes could listen on localhost, but I'm unsure about that part.

[-] MigratingtoLemmy@lemmy.world 1 points 1 year ago

Sorry for replying this late; I wanted to read more about Unix sockets and podman before I got back. Thanks for your comment.

I already responded to the other commenter with what I've understood and my plans, I'll paste it here too:

If I understand correctly, Unix sockets specifically allow two or more processes to communicate amongst each other, and are supporter on Podman (and Docker).

Now, the question is: how do I programmatically programmatically utilise sockets for containers to communicate amongst each other?

I was considering a reverse proxy per pod as someone else suggested, since every podman pod has its own network namespace. Connecting between pods should likely be through the reverse proxies then. I just need to figure out how I can automate the deployment of such proxies along with the pods.

Thanks again for your comment, and please let me know if I'm missing anything.

[-] Chewy7324@discuss.tchncs.de 1 points 1 year ago

Thanks for the long reply. Sadly I don't know enough about unix sockets and docker/podman networking to help you.

I've only used unix sockets with postgresql and signald. For both I had to mount the socket into the container and for the postgres I had to change the config to use unix sockets.

[-] MigratingtoLemmy@lemmy.world 1 points 1 year ago

I see. My use-case would probably be better served through a software bus implementation (how would I keep all of these containers attached to the bus? Isn't that a security risk?), but perhaps handling everything through the network behind individual reverse-proxies might be the best idea in this case.

this post was submitted on 03 Nov 2023
4 points (75.0% liked)

Selfhosted

40153 readers
243 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