Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect: Support unix sockets #4293

Closed
roidelapluie opened this issue Jun 26, 2018 · 4 comments
Closed

Connect: Support unix sockets #4293

roidelapluie opened this issue Jun 26, 2018 · 4 comments
Labels
theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/enhancement Proposed improvement or new feature

Comments

@roidelapluie
Copy link
Contributor

roidelapluie commented Jun 26, 2018

Feature Description

Instead of listening to a tcp port, it would be great to be able to use unix sockets for incoming connections of the connect proxy (upstreams).

Use Case(s)

Unix sockets offer an alternative to listening to loopback and can be secured differently (more easily) than with network namespaces.

@mitchellh
Copy link
Contributor

This is a very reasonable idea. I'm assuming you mean for the upstream listeners (private listeners).

We focused really hard on this initial release to go with platform-agnostic technologies with the full intention of building platform-specific features later. This is a relatively simple one and I agree that the security aspects can be appealing here.

@mitchellh mitchellh added the type/enhancement Proposed improvement or new feature label Jun 26, 2018
@banks
Copy link
Member

banks commented Jun 26, 2018

Yeah this is something we considered as Mitchell said. Out of interest, what software are you thinking of that could make use of unix sockets? The most common things I can think of are databases like MySQL that can listen on a unix socket which is potentially nicer than loopback, but it can't make outgoing connections on unix sockets. The improvements in security are mostly a concern for outgoing connections which it's not clear how the application would consume without modification.

We will certainly consider supporting this anyway but just wanted to hear if you have specific use-cases in mind we hadn't thought of?

@roidelapluie
Copy link
Contributor Author

That idea crossed my mind because trusting localhost quite a huge requirement when you have lots of microservices on the same host ; and playing with network namespaces is not the most easy thing to do. I do not really have a special usecase in mind at the moment, but for languages like golang using unix sockets or tcp/ip socket does not make a big difference in code.

@pearkes pearkes added type/enhancement Proposed improvement or new feature theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies and removed type/enhancement Proposed improvement or new feature theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies labels Jul 17, 2018
@blake
Copy link
Member

blake commented May 10, 2021

Support for Unix sockets with Connect was added in Consul 1.10 beta 2 by #9981.

@blake blake closed this as completed May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

5 participants