feat: optionally limit access to nodes listed in authorized_keys file#68
Open
feat: optionally limit access to nodes listed in authorized_keys file#68
Conversation
matheus23
reviewed
Jul 7, 2025
| let addr = args.ticket.node_addr(); | ||
| let remote_node_id = addr.node_id; | ||
| // connect to the node, try only once | ||
| let connection = endpoint.connect(addr.clone(), &args.common.alpn()?).await?; |
Member
There was a problem hiding this comment.
It might be reasonable to check for the 403 error code here to provide a nice error message when you're not authorized. Perhaps saying something like "The remote node denied access: Your node ID is not configured as authorized in the remote authorized_keys file."
|
implemented based on cli flags, it is less state. maan2003@f22fc7e |
Contributor
|
Given that dumbpipe is supposed to be a very simple and lightweight tool, I am in favour of using just CLI args for this. Adding a file with an associated file format feels a bit heavy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows to limit access to a dumbpipe server to nodes listed in an
authorized_keysfile.Quoting from the new section in the README:
You can limit access to a dumbpipe listener through a keys file, similar to the
authorized_keysfile that SSH uses.You can put the file wherever you want, e.g. at
~/.dumbpipe/authorized_keys. For the file to be used, and thusaccess to be limited, specify the file path with the
--authorized-keys(or-a) when launching dumbpipe.When authorization is set, only connections from nodes listed in the file will be accepted.
Here's an example file:
The file must contain a list of hex-encoded node ids, seperated by newlines.
The node ids may be followed by a comment, separated by a space from the encoded node id.
Lines starting with
#are ignored and can be used as comments.