bitcoin-core-sv2: document IPC socket trust assumptions and log the serving uid - #838
Open
plebhash wants to merge 3 commits into
Open
bitcoin-core-sv2: document IPC socket trust assumptions and log the serving uid#838plebhash wants to merge 3 commits into
bitcoin-core-sv2: document IPC socket trust assumptions and log the serving uid#838plebhash wants to merge 3 commits into
Conversation
The Bitcoin Core IPC transport carries no authentication: the runtimes trust whatever process listens at the configured node.sock path. Read the peer credentials right after connecting and log the uid, so an operator can confirm from the logs that the socket is served by the user running their node. The line is informational only. Securing the socket directory remains a deployment requirement, now stated in the unix_capnp module docs.
State once, in the crate README, what the IPC connection assumes: the directory holding node.sock must be owned by the user running Bitcoin Core and not writable by others, and the application should run as that user. Bitcoin Core's defaults already guarantee this and its own IPC clients rely on the same invariant, so no client-side check is added. A local user who can write to the data directory already controls the node through settings.json, wallets and the chainstate. Mention the uid log line as the way to verify a deployment.
Every place an operator chooses a Bitcoin Core data directory for IPC now points at the Socket Trust section of the bitcoin-core-sv2 README: the data_dir comments in the Pool, JDC and JDS config examples, the matching README parameter lists, the JDS README, and the Docker README, which also explains why the logged uid differs from the container's root uid.
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.
close #835