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

UNIX domain socket support in a non-exclusive way #635

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ssafar
Copy link

@ssafar ssafar commented Aug 31, 2021

Opening TCP sockets, even locally, is somewhat tricky from a security point of view (see #286)... especially when connecting to remote Lisps when we don't want to close the port immediately.

#291 was aiming to solve this problem by switching over to UNIX domain sockets entirely when connecting to Lisps on UNIX systems, and sticking with TCP ports e.g. on Windows. However, this doesn't account for cases when we'd still want to keep using TCP ports on UNIX; also, its author is not interested in working on this anymore.

This PR follows a slightly different approach: instead of replacing the existing, TCP-based connection mechanism, it adds UNIX domain sockets as an additional, optional mechanism. We still connect to local Lisps via TCP; the use case for this is long-running Lisp images on servers, that we'd want to connect to remotely (e.g. by using ssh to forward the UNIX socket, or wrapping it into a client-cert-checked SSL tunnel using e.g. socat). It's definitely possible to use this sort of mechanism for local Lisps too in the future; it's just not being done yet, to keep things simple (& avoid breaking too many things).

I also added a test to make sure that this does in fact work, end to end.

It currently only supports SBCL; I can definitely put in backend functions for other Lisps, too, before merging, if you think this entire PR is a good idea in general (... if it isn't, universal support is kinda pointless :) so the first commit is mainly to start a discussion.)

Thanks for taking a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant