Skip to content

init: Remove unnecessary sensitive flag from rpcbind - #26829

Merged
maflcko merged 1 commit into
bitcoin:masterfrom
achow101:dont-hide-rpcbind-log
Jan 25, 2023
Merged

maflcko merged 1 commit into
bitcoin:masterfrom
achow101:dont-hide-rpcbind-log

Conversation

@achow101

@achow101 achow101 commented Jan 6, 2023

Copy link
Copy Markdown
Member

-rpcbind is currently flagged as a sensitive option which means that its value will be masked when the command line args are written to the debug.log file. However this is not useful as if rpcbind is actually activated, the bound IP addresses will be written to the log anyways. The test feature_config_args.py did not catch this contradiction as the test node was not started with rpcallowip and so rpcbind was not acted upon.

This also brings rpcbind inline with bind as that is not flagged as sensitive either.

@DrahtBot

DrahtBot commented Jan 6, 2023 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK theStack, Sjors, willcl-ark

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

No conflicts as of last run.

@Sjors

Sjors commented Jan 19, 2023

Copy link
Copy Markdown
Member

utACK c5fbea9

That said, for a followup it could make sense to go the other direction and make sure we don't log the user IP address anywhere. For IPv4 -(rpc)bind is typically just a 192.168.x.x address, but for IPv6 it's a global address.

@theStack theStack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK

Comment thread test/functional/feature_config_args.py Resolved
@achow101
achow101 force-pushed the dont-hide-rpcbind-log branch from c5fbea9 to b9d5674 Compare January 23, 2023 22:25

@theStack theStack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK b9d5674

@Sjors

Sjors commented Jan 24, 2023

Copy link
Copy Markdown
Member

re-utACK b9d5674

Running the old code against the new test triggers the unexpected argument error, as expected.

@fanquake
fanquake requested a review from willcl-ark January 25, 2023 11:06
@willcl-ark

Copy link
Copy Markdown
Member

ACK b9d5674

Looks like it was added in b951b09 as part of writing config options to debug.log.

FWIW I was just working on #26964 which ensures that we don't create the RPC cookie before we've bound to the server. As long as we don't do that, there seems little danger in having the bound port and address exposed in the log messages. We should not rely on port obscurity for security.

@maflcko
maflcko merged commit 0486148 into bitcoin:master Jan 25, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants