-
Notifications
You must be signed in to change notification settings - Fork 224
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
Idea: pass a socket instead of dqlite_node_set_bind_address #512
Comments
Why are they listening to a local TCP socket in the first place? That seems insecure. If they want to proxy dqlite, the way to do it would be with an abstract unix socket. |
@freeekanayaka it's in the context of writing tests for Juju, so I think security is not a concern. I think lots of tests will be running concurrently, so they need a supply of distinct addresses for dqlite servers to bind to, and a convenient way to do that is to have the OS assign a port to each. With an abstract Unix socket, I guess either you'd specify a distinct path for each test (possibly generating them in some way) or you'd just pass More broadly, I think that passing a socket directly is in some ways more flexible/"composable" than set_bind_address, so I thought I'd throw the idea out for comment. |
I'd recommend to use Unless I'm missing something, passing a socket directly seem something we don't absolutely need to support right now, so I'd be keen to not increase the API surface unless there is some real world use case that we can't currently meet. |
Okay, I've passed the suggestion to use |
Would it make sense to offer a function like this in the dqlite.h API?
The Juju team is suffering from some papercuts because they can't retrieve the port that the dqlite server is using when they pass
127.0.0.1:0
(etc.) as the bind address; this feature would give them a good solution to that problem.The text was updated successfully, but these errors were encountered: