Commit graph

8 commits

Author SHA1 Message Date
Alex Akselrod
4a1445a032 Create limited RPC user.
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
2015-04-13 14:14:52 -04:00
Dave Collins
1185b8632a Fix a couple of links in main README.md. 2015-02-08 12:09:49 -06:00
Dave Collins
2e5bb96eea Correct a few instances of missed pkg name changes. 2015-02-05 17:54:04 -06:00
Dave Collins
624bbb3216 Update btcchain import paths to new location. 2015-01-30 16:25:42 -06:00
Dave Collins
3b1a15d0d5 Update btcscript import paths to new location. 2015-01-30 12:14:33 -06:00
Dave Collins
6a6e8dddf0 Correct a couple of descriptions in docs/README.md. 2015-01-27 19:17:54 -06:00
Dave Collins
309a9ea31d Update database import paths to new location. 2015-01-27 15:38:23 -06:00
Dave Collins
8a50187bf1 Move all wiki docs into docs folder of the repo.
This allows the docs to be updated via pull requests and makes it easier
to keep it in sync as a part of normal code updates.
2015-01-18 12:19:23 -06:00