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

Enable HTTP to bind to a unix socket. #1639

Open
kevincox opened this issue Aug 22, 2016 · 6 comments · May be fixed by #16884
Open

Enable HTTP to bind to a unix socket. #1639

kevincox opened this issue Aug 22, 2016 · 6 comments · May be fixed by #16884

Comments

@kevincox
Copy link

kevincox commented Aug 22, 2016

With security coming to nomad for RPC and Serf (#469, #1615) it would be nice to finish the job by allowing the HTTP UI to be protected.

While this could also be done with SSL I think it would be easier for Nomad to support binding to a unix socket (and it doesn't preclude adding SSL support later). Unix sockets provide the following advantages.

  • Access can be restricted using standard posix filesystem permissions.
  • Reverse proxies often provide flexible authentication options, these can be used without the need to reimplement everything in Nomad.
  • Many people run reverse proxies on their servers anyways.

The only downside is that the client would need to support these authentication schemes. But starting slowly (HTTP basic auth over SSL) seems like it would be a good idea.

(Other suggestions for securing the HTTP interface also welcome)

@dadgar
Copy link
Contributor

dadgar commented Aug 22, 2016

I think we can also just use TLS for this

@kevincox
Copy link
Author

kevincox commented Aug 22, 2016

TLS would also work. Especially since basic auth is already supported

That being said I think that a unix socket would still be easy and really useful (I can do a lot of fun things with nginx or another reverse proxy).

@dadgar
Copy link
Contributor

dadgar commented Aug 22, 2016

Yeah I think we just treat them tangentially and do both

@kevincox
Copy link
Author

Actually thinking about it. You can sort of hack up security by using basic auth on localhost and then putting an SSL proxy in front of it. Kinda clunky but not too ugly.

@mlafeldt
Copy link
Contributor

mlafeldt commented Aug 29, 2016

We're currently running our Nomad server cluster behind an ELB with SSL termination enabled. On each server node, we have an auth proxy container based on Nginx, which adds basic auth for us. That's actually the reason why I added basic auth support to the Nomad client in the first place. 😄

@blalor
Copy link
Contributor

blalor commented Jan 18, 2017

When adding this feature, please allow for binding to multiple endpoints. Consul has this only half-implemented right now: unix socket or tcp port. It would be useful to be able to specify both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Roadmapping
Development

Successfully merging a pull request may close this issue.

5 participants