Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The limited user is specified with the --rpclimituser and --rpclimitpass options (or the equivalent in the config file). The config struct and loadConfig() are updated to take the new options into account. The limited user can have neither the same username nor the same password as the admin user. The package-level rpcLimit map in rpcserver.go specifies the RPC commands accessible by limited users. This map includes both HTTP/S and websocket commands. The checkAuth function gets a new return parameter to signify whether the user is authorized to change server state. The result is passed to the jsonRPCRead function and to the WebsocketHandler function in rpcwebsocket.go. The wsClient struct is updated with an "isAdmin" field signifying that the client is authorized to change server state, written by WebsocketHandler and handleMessage. The handleMessage function also checks the field to allow or disallow an RPC call. The following documentation files are updated: - doc.go - sample-btcd.conf - docs/README.md - docs/json_rpc_api.md - docs/configure_rpc_server_listen_interfaces.md
- Loading branch information
Showing
8 changed files
with
225 additions
and
82 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.