diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-01-04 12:59:26 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-01-04 13:00:12 +0100 |
commit | c2ea1e6561caba3abffce361abc800822b9e0efe (patch) | |
tree | 990a0ff1bb33d83d9275f30f154a40979ea79def | |
parent | d65a13b773f822be76b83d9c782dbe14cbc32cd0 (diff) | |
parent | 0513c707aa1e356bc4da609bf0263cc684b0d6e3 (diff) |
Merge #9401: Make rpcauth help message clearer, add example in example .conf
0513c70 Make rpcauth help message clearer, add example in example .conf (Gregory Sanders)
-rw-r--r-- | contrib/debian/examples/bitcoin.conf | 23 | ||||
-rw-r--r-- | src/init.cpp | 2 |
2 files changed, 23 insertions, 2 deletions
diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf index 2831c07292..afbc7882e0 100644 --- a/contrib/debian/examples/bitcoin.conf +++ b/contrib/debian/examples/bitcoin.conf @@ -67,9 +67,30 @@ # This option can be specified multiple times (default: bind to all interfaces) #rpcbind=<addr> -# You must set rpcuser and rpcpassword to secure the JSON-RPC api +# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name +# is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used +# when the server and client are run as the same user. +# +# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first +# method(DEPRECATED) is to set this pair for the server and client: #rpcuser=Ulysseys #rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593 +# +# The second method `rpcauth` can be added to server startup argument. It is set at intialization time +# using the output from the script in share/rpcuser/rpcuser.py after providing a username: +# +# ./share/rpcuser/rpcuser.py alice +# String to be appended to bitcoin.conf: +# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae +# Your password: +# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E= +# +# On client-side, you add the normal user/password pair to send commands: +#rpcuser=alice +#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E= +# +# You can even add multiple entries of these to the server conf file, and client can use any of them: +# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99 # How many seconds bitcoin will wait for a complete RPC HTTP request. # after the HTTP connection is established. diff --git a/src/init.cpp b/src/init.cpp index 8110b63119..f0334a08e3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -486,7 +486,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-rpccookiefile=<loc>", _("Location of the auth cookie (default: data dir)")); strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections")); strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections")); - strUsage += HelpMessageOpt("-rpcauth=<userpw>", _("Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. This option can be specified multiple times")); + strUsage += HelpMessageOpt("-rpcauth=<userpw>", _("Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can be specified multiple times")); strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), BaseParams(CBaseChainParams::MAIN).RPCPort(), BaseParams(CBaseChainParams::TESTNET).RPCPort())); strUsage += HelpMessageOpt("-rpcallowip=<ip>", _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times")); strUsage += HelpMessageOpt("-rpcthreads=<n>", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS)); |