Lack of support for unix domain sockets
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Ruby
- Estrellas
- 148
- Forks
- 95
- Merge medio
- 10 h 54 min
- PR fusionados (30 d)
- 4
Descripción
Hi,
it's a common practice and used in an increasing number or projects to offer HTTP interfaces, especially REST APIs, over unix domain sockets instead of regular TCP, for several reasons, most prominent security. The socket is not accessible over internet, no matter how broken firewalling and network filtering is, and unix file system rights can be applied, e.g. limit the access to owner, group or extended file permissions (acl). Daemons like snapd or docker engine offer their APIs as HTTP/REST over unix domain sockets.
Therefore, it is not just a strange thing that ruby/net-http does not just not support unix-domain sockets, but seems to completely ignore all requests to implement, e.g.
https://bugs.ruby-lang.org/issues/13719
https://bugs.ruby-lang.org/issues/17166
and even desperate attempts to workaround:
https://github.com/puppetlabs/net_http_unix
which, as a wrapper around net/http, solves the problem with just a few lines of code, but can be used in your own code, eight years old. Unfortunately, it doesn't help with all those libs directly based on net/http, such as ruby rest-client.
I wonder why the maintainers of net/http silently ignore all those requests without any comment (at least, I didn't find one), while other languages like python do handle unix domain sockets (which exist, if I remember correctly, for at least about 35 years). It's a shame that one has to prefer python over ruby for easy access to unix domain rest apis.
Is there any particular reason for not supporting http over unix domain sockets?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comience revisando los issues 13719 y 17166 de Ruby y, a continuación, compare la solución alternativa de puppetlabs/net_http_unix mencionada en el informe. El resultado solicitado es añadir compatibilidad en ruby/net-http para el acceso HTTP o REST a través de sockets de dominio Unix; el comportamiento requerido y las pruebas aún están por definir.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ruby
- Área
- api, backend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100