Skip to content

Conversation

@cvengler
Copy link
Contributor

A release note for #12763

@fanquake fanquake added the Docs label Dec 13, 2019
@cvengler cvengler force-pushed the 2019-12-whitelist-release-note branch from 7ebd664 to 58c0417 Compare December 13, 2019 13:28
@instagibbs
Copy link
Member

it should probably at least mention one or all of the config options, otherwise users will have to just grep and guess

@cvengler
Copy link
Contributor Author

@instagibbs Updated, however it isn't updated on the PR page for some weird reason. If you look into my branch you will see the update o.O

@cvengler
Copy link
Contributor Author

See https://www.githubstatus.com/, they have issues at the moment

@cvengler cvengler force-pushed the 2019-12-whitelist-release-note branch 2 times, most recently from 0816d40 to cb66408 Compare December 13, 2019 16:58
@JeremyRubin
Copy link
Contributor

You could just copy the help-text if you want it to be more thorough.

    gArgs.AddArg("-rpcwhitelist=<whitelist>", "Set a whitelist to filter incoming RPC calls for a specific user. The field <whitelist> comes in the format: <USERNAME>:<rpc 1>,<rpc 2>,...,<rpc n>. If multiple whitelists are set for a given user, they are set-intersected. See -rpcwhitelistdefault documentation for information on default whitelist behavior.", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    gArgs.AddArg("-rpcwhitelistdefault", "Sets default behavior for rpc whitelisting. Unless rpcwhitelistdefault is set to 0, if any -rpcwhitelist is set, the rpc server acts as if all rpc users are subject to empty-unless-otherwise-specified whitelists. If rpcwhitelistdefault is set to 1 and no -rpcwhitelist is set, rpc server acts as if all rpc users are subject to empty whitelists.", ArgsManager::ALLOW_BOOL, OptionsCategory::RPC);

@maflcko
Copy link
Member

maflcko commented Dec 13, 2019

The release notes are meant as a brief pointer, not to duplicate the rpc and/or command line help. I think the current patch is ok

@cvengler cvengler force-pushed the 2019-12-whitelist-release-note branch from cb66408 to 2b705b0 Compare December 13, 2019 20:44
@instagibbs
Copy link
Member

instagibbs commented Dec 13, 2019

thanks for the cleanups

@cvengler cvengler force-pushed the 2019-12-whitelist-release-note branch from 2b705b0 to 3ae22b0 Compare December 13, 2019 20:45
@cvengler
Copy link
Contributor Author

@instagibbs Sorry but could you re-ACK? The commit hash just changed as I included the PR reference :P

@instagibbs
Copy link
Member

argh, needed to refresh one more time :)

ACK 3ae22b0

@promag
Copy link
Contributor

promag commented Dec 14, 2019

ACK 3ae22b0c8fb9a59ab95cbf6c970166b01274f846.

@practicalswift
Copy link
Contributor

practicalswift commented Dec 14, 2019

Oh, before merging this I think we should either bump UniValue or add a temporary warning about this RPC DoS gotcha (#17742 (comment)):

$ share/rpcauth/rpcauth.py u p
String to be appended to bitcoin.conf:
rpcauth=u:d7ca300b5aeceb73e9825068fc4496ef$166cbdedfe11c30a95c28d13b3383682825308d1069d347f9705b8cf922637c5
Your password:
p
$ src/bitcoind -regtest -rpcwhitelist=u:help '-rpcauth=u:d7ca300b5aeceb73e9825068fc4496ef$166cbdedfe11c30a95c28d13b3383682825308d1069d347f9705b8cf922637c5' &
$ src/bitcoin-cli -regtest -rpcuser=u -rpcpassword=p help | head -1
== Blockchain ==
$ src/bitcoin-cli -regtest -rpcuser=u -rpcpassword=p getnetworkinfo
2019-12-13T02:01:37Z RPC User u not allowed to call method getnetworkinfo
error: server returned HTTP error 403
$ curl -u u:p --request POST \
     --data $(python -c 'print(50000 * "[");') http://127.0.0.1:18443
curl: (52) Empty reply from server
[1]+  Segmentation fault      (core dumped) src/bitcoind -regtest -rpcwhitelist=u:help '-rpcauth=u:d7ca300b5aeceb73e9825068fc4496ef$166cbdedfe11c30a95c28d13b3383682825308d1069d347f9705b8cf922637c5'

Temporary NACK until this is addressed. Sorry about that, but end-user security is first, second and third priority :)

@JeremyRubin
Copy link
Contributor

JeremyRubin commented Dec 14, 2019 via email

@practicalswift
Copy link
Contributor

practicalswift commented Dec 14, 2019

@JeremyRubin I'm just NACK:ing the change as-is (per 3ae22b0c8fb9a59ab95cbf6c970166b01274f846): if @emilengler adds a (temporary) warning about this gotcha that would be perfectly fine and I'll ACK immediately :)

We should do what we can to help our users stay safe: not adding a warning about a known gotcha when we have the opportunity would feel bad :)

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Suggestion below.

@cvengler cvengler force-pushed the 2019-12-whitelist-release-note branch from 3ae22b0 to f1cf747 Compare December 14, 2019 22:48
@cvengler
Copy link
Contributor Author

@practicalswift Adjusted, could you check it?

@cvengler cvengler force-pushed the 2019-12-whitelist-release-note branch from f1cf747 to 7965e0b Compare December 15, 2019 19:50
@laanwj
Copy link
Member

laanwj commented Dec 16, 2019

ACK 7965e0b

laanwj added a commit that referenced this pull request Dec 16, 2019
7965e0b doc: Add release note for RPC Whitelist (Emil Engler)

Pull request description:

  A release note for #12763

ACKs for top commit:
  laanwj:
    ACK 7965e0b

Tree-SHA512: 4ac3e62029a403e64e4cd3183433dc7aa071d42688b689d7cffb8f08dc4b26d2a586d32fa791d2b5679d6b95cd6e34c56e40a5592b9af446ad9429307f7267fe
@laanwj laanwj merged commit 7965e0b into bitcoin:master Dec 16, 2019
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants