{"action":"created","comment":{"url":"https://api.github.com/repos/btcsuite/btcd/pulls/comments/28257268","id":28257268,"diff_hunk":"@@ -144,14 +144,18 @@\n ; RPC server options - The following options control the built-in RPC server\n ; which is used to control and query information from a running btcd process.\n ;\n-; NOTE: The RPC server is disabled by default if no rpcuser or rpcpass is\n-; specified.\n+; NOTE: The RPC server is disabled by default if rpcuser AND rpcpass, or\n+; rpclimituser AND rpclimitpass, are not specified.\n ; ------------------------------------------------------------------------------\n \n-; Secure the RPC API by specifying the username and password.  You must specify\n-; both or the RPC server will be disabled.\n-; rpcuser=whatever_username_you_want\n+; Secure the RPC API by specifying the username and password.  You can also\n+; specify a limited username and password.  You must specify at least one\n+; full set of credentials - read-only or read-write - or the RPC server will","path":"sample-btcd.conf","position":15,"original_position":15,"commit_id":"acfec85530073538b68133b9d39fce00654015d4","original_commit_id":"dd3b35b8515f1051f933a9fd8f9a27c16756ac96","user":{"login":"davecgh","id":2115102,"avatar_url":"https://avatars.githubusercontent.com/u/2115102?v=3","gravatar_id":"","url":"https://api.github.com/users/davecgh","html_url":"https://github.com/davecgh","followers_url":"https://api.github.com/users/davecgh/followers","following_url":"https://api.github.com/users/davecgh/following{/other_user}","gists_url":"https://api.github.com/users/davecgh/gists{/gist_id}","starred_url":"https://api.github.com/users/davecgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecgh/subscriptions","organizations_url":"https://api.github.com/users/davecgh/orgs","repos_url":"https://api.github.com/users/davecgh/repos","events_url":"https://api.github.com/users/davecgh/events{/privacy}","received_events_url":"https://api.github.com/users/davecgh/received_events","type":"User","site_admin":false},"body":"read-only -> limited","created_at":"2015-04-13T17:09:42Z","updated_at":"2015-04-13T17:09:42Z","html_url":"https://github.com/btcsuite/btcd/pull/363#discussion_r28257268","pull_request_url":"https://api.github.com/repos/btcsuite/btcd/pulls/363","_links":{"self":{"href":"https://api.github.com/repos/btcsuite/btcd/pulls/comments/28257268"},"html":{"href":"https://github.com/btcsuite/btcd/pull/363#discussion_r28257268"},"pull_request":{"href":"https://api.github.com/repos/btcsuite/btcd/pulls/363"}}},"pull_request":{"url":"https://api.github.com/repos/btcsuite/btcd/pulls/363","id":32433967,"html_url":"https://github.com/btcsuite/btcd/pull/363","diff_url":"https://github.com/btcsuite/btcd/pull/363.diff","patch_url":"https://github.com/btcsuite/btcd/pull/363.patch","issue_url":"https://api.github.com/repos/btcsuite/btcd/issues/363","number":363,"state":"open","locked":false,"title":"Create limited RPC user.","user":{"login":"aakselrod","id":1268625,"avatar_url":"https://avatars.githubusercontent.com/u/1268625?v=3","gravatar_id":"","url":"https://api.github.com/users/aakselrod","html_url":"https://github.com/aakselrod","followers_url":"https://api.github.com/users/aakselrod/followers","following_url":"https://api.github.com/users/aakselrod/following{/other_user}","gists_url":"https://api.github.com/users/aakselrod/gists{/gist_id}","starred_url":"https://api.github.com/users/aakselrod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakselrod/subscriptions","organizations_url":"https://api.github.com/users/aakselrod/orgs","repos_url":"https://api.github.com/users/aakselrod/repos","events_url":"https://api.github.com/users/aakselrod/events{/privacy}","received_events_url":"https://api.github.com/users/aakselrod/received_events","type":"User","site_admin":false},"body":"The limited user is specified with the --rpclimituser and\r\n--rpclimitpass options (or the equivalent in the config file).\r\nThe config struct and loadConfig() are updated to take the\r\nnew options into account.\r\n\r\nThe package-level rpcLimit map in rpcserver.go specifies\r\nthe RPC commands accessible by read-only users. This map\r\nincludes both HTTP/S and websocket commands.\r\n\r\nThe checkAuth function gets a new return parameter to\r\nsignify whether the user is authorized to change server\r\nstate. The result is passed to the jsonRPCRead function and\r\nto the WebsocketHandler function in rpcwebsocket.go.\r\n\r\nThe wsClient struct is updated with an \"isAdmin\" field\r\nsignifying that the client is authorized to change server\r\nstate, written by WebsocketHandler and handleMessage.\r\nThe handleMessage function also checks the field to\r\nallow or disallow an RPC call.","created_at":"2015-04-01T16:08:36Z","updated_at":"2015-04-13T17:09:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52578200ae543175bad47ccd60633af5baf43e89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/btcsuite/btcd/pulls/363/commits","review_comments_url":"https://api.github.com/repos/btcsuite/btcd/pulls/363/comments","review_comment_url":"https://api.github.com/repos/btcsuite/btcd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/btcsuite/btcd/issues/363/comments","statuses_url":"https://api.github.com/repos/btcsuite/btcd/statuses/acfec85530073538b68133b9d39fce00654015d4","head":{"label":"aakselrod:readonly-rpc","ref":"readonly-rpc","sha":"acfec85530073538b68133b9d39fce00654015d4","user":{"login":"aakselrod","id":1268625,"avatar_url":"https://avatars.githubusercontent.com/u/1268625?v=3","gravatar_id":"","url":"https://api.github.com/users/aakselrod","html_url":"https://github.com/aakselrod","followers_url":"https://api.github.com/users/aakselrod/followers","following_url":"https://api.github.com/users/aakselrod/following{/other_user}","gists_url":"https://api.github.com/users/aakselrod/gists{/gist_id}","starred_url":"https://api.github.com/users/aakselrod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakselrod/subscriptions","organizations_url":"https://api.github.com/users/aakselrod/orgs","repos_url":"https://api.github.com/users/aakselrod/repos","events_url":"https://api.github.com/users/aakselrod/events{/privacy}","received_events_url":"https://api.github.com/users/aakselrod/received_events","type":"User","site_admin":false},"repo":{"id":31991285,"name":"btcd","full_name":"aakselrod/btcd","owner":{"login":"aakselrod","id":1268625,"avatar_url":"https://avatars.githubusercontent.com/u/1268625?v=3","gravatar_id":"","url":"https://api.github.com/users/aakselrod","html_url":"https://github.com/aakselrod","followers_url":"https://api.github.com/users/aakselrod/followers","following_url":"https://api.github.com/users/aakselrod/following{/other_user}","gists_url":"https://api.github.com/users/aakselrod/gists{/gist_id}","starred_url":"https://api.github.com/users/aakselrod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakselrod/subscriptions","organizations_url":"https://api.github.com/users/aakselrod/orgs","repos_url":"https://api.github.com/users/aakselrod/repos","events_url":"https://api.github.com/users/aakselrod/events{/privacy}","received_events_url":"https://api.github.com/users/aakselrod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aakselrod/btcd","description":"An alternative full node bitcoin implementation written in Go (golang)","fork":true,"url":"https://api.github.com/repos/aakselrod/btcd","forks_url":"https://api.github.com/repos/aakselrod/btcd/forks","keys_url":"https://api.github.com/repos/aakselrod/btcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aakselrod/btcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aakselrod/btcd/teams","hooks_url":"https://api.github.com/repos/aakselrod/btcd/hooks","issue_events_url":"https://api.github.com/repos/aakselrod/btcd/issues/events{/number}","events_url":"https://api.github.com/repos/aakselrod/btcd/events","assignees_url":"https://api.github.com/repos/aakselrod/btcd/assignees{/user}","branches_url":"https://api.github.com/repos/aakselrod/btcd/branches{/branch}","tags_url":"https://api.github.com/repos/aakselrod/btcd/tags","blobs_url":"https://api.github.com/repos/aakselrod/btcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aakselrod/btcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aakselrod/btcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/aakselrod/btcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aakselrod/btcd/statuses/{sha}","languages_url":"https://api.github.com/repos/aakselrod/btcd/languages","stargazers_url":"https://api.github.com/repos/aakselrod/btcd/stargazers","contributors_url":"https://api.github.com/repos/aakselrod/btcd/contributors","subscribers_url":"https://api.github.com/repos/aakselrod/btcd/subscribers","subscription_url":"https://api.github.com/repos/aakselrod/btcd/subscription","commits_url":"https://api.github.com/repos/aakselrod/btcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/aakselrod/btcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/aakselrod/btcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/aakselrod/btcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/aakselrod/btcd/contents/{+path}","compare_url":"https://api.github.com/repos/aakselrod/btcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aakselrod/btcd/merges","archive_url":"https://api.github.com/repos/aakselrod/btcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aakselrod/btcd/downloads","issues_url":"https://api.github.com/repos/aakselrod/btcd/issues{/number}","pulls_url":"https://api.github.com/repos/aakselrod/btcd/pulls{/number}","milestones_url":"https://api.github.com/repos/aakselrod/btcd/milestones{/number}","notifications_url":"https://api.github.com/repos/aakselrod/btcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aakselrod/btcd/labels{/name}","releases_url":"https://api.github.com/repos/aakselrod/btcd/releases{/id}","created_at":"2015-03-11T01:20:09Z","updated_at":"2015-04-06T17:46:50Z","pushed_at":"2015-04-13T17:08:44Z","git_url":"git://github.com/aakselrod/btcd.git","ssh_url":"git@github.com:aakselrod/btcd.git","clone_url":"https://github.com/aakselrod/btcd.git","svn_url":"https://github.com/aakselrod/btcd","homepage":null,"size":8249,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"btcsuite:master","ref":"master","sha":"abe74f1d4ec7e2c1658714ba3a493b03d98e7245","user":{"login":"btcsuite","id":10235229,"avatar_url":"https://avatars.githubusercontent.com/u/10235229?v=3","gravatar_id":"","url":"https://api.github.com/users/btcsuite","html_url":"https://github.com/btcsuite","followers_url":"https://api.github.com/users/btcsuite/followers","following_url":"https://api.github.com/users/btcsuite/following{/other_user}","gists_url":"https://api.github.com/users/btcsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/btcsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btcsuite/subscriptions","organizations_url":"https://api.github.com/users/btcsuite/orgs","repos_url":"https://api.github.com/users/btcsuite/repos","events_url":"https://api.github.com/users/btcsuite/events{/privacy}","received_events_url":"https://api.github.com/users/btcsuite/received_events","type":"Organization","site_admin":false},"repo":{"id":11931032,"name":"btcd","full_name":"btcsuite/btcd","owner":{"login":"btcsuite","id":10235229,"avatar_url":"https://avatars.githubusercontent.com/u/10235229?v=3","gravatar_id":"","url":"https://api.github.com/users/btcsuite","html_url":"https://github.com/btcsuite","followers_url":"https://api.github.com/users/btcsuite/followers","following_url":"https://api.github.com/users/btcsuite/following{/other_user}","gists_url":"https://api.github.com/users/btcsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/btcsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btcsuite/subscriptions","organizations_url":"https://api.github.com/users/btcsuite/orgs","repos_url":"https://api.github.com/users/btcsuite/repos","events_url":"https://api.github.com/users/btcsuite/events{/privacy}","received_events_url":"https://api.github.com/users/btcsuite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/btcsuite/btcd","description":"An alternative full node bitcoin implementation written in Go (golang)","fork":false,"url":"https://api.github.com/repos/btcsuite/btcd","forks_url":"https://api.github.com/repos/btcsuite/btcd/forks","keys_url":"https://api.github.com/repos/btcsuite/btcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/btcsuite/btcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/btcsuite/btcd/teams","hooks_url":"https://api.github.com/repos/btcsuite/btcd/hooks","issue_events_url":"https://api.github.com/repos/btcsuite/btcd/issues/events{/number}","events_url":"https://api.github.com/repos/btcsuite/btcd/events","assignees_url":"https://api.github.com/repos/btcsuite/btcd/assignees{/user}","branches_url":"https://api.github.com/repos/btcsuite/btcd/branches{/branch}","tags_url":"https://api.github.com/repos/btcsuite/btcd/tags","blobs_url":"https://api.github.com/repos/btcsuite/btcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/btcsuite/btcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/btcsuite/btcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/btcsuite/btcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/btcsuite/btcd/statuses/{sha}","languages_url":"https://api.github.com/repos/btcsuite/btcd/languages","stargazers_url":"https://api.github.com/repos/btcsuite/btcd/stargazers","contributors_url":"https://api.github.com/repos/btcsuite/btcd/contributors","subscribers_url":"https://api.github.com/repos/btcsuite/btcd/subscribers","subscription_url":"https://api.github.com/repos/btcsuite/btcd/subscription","commits_url":"https://api.github.com/repos/btcsuite/btcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/btcsuite/btcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/btcsuite/btcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/btcsuite/btcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/btcsuite/btcd/contents/{+path}","compare_url":"https://api.github.com/repos/btcsuite/btcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/btcsuite/btcd/merges","archive_url":"https://api.github.com/repos/btcsuite/btcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/btcsuite/btcd/downloads","issues_url":"https://api.github.com/repos/btcsuite/btcd/issues{/number}","pulls_url":"https://api.github.com/repos/btcsuite/btcd/pulls{/number}","milestones_url":"https://api.github.com/repos/btcsuite/btcd/milestones{/number}","notifications_url":"https://api.github.com/repos/btcsuite/btcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/btcsuite/btcd/labels{/name}","releases_url":"https://api.github.com/repos/btcsuite/btcd/releases{/id}","created_at":"2013-08-06T18:10:52Z","updated_at":"2015-04-10T00:02:56Z","pushed_at":"2015-04-13T17:08:44Z","git_url":"git://github.com/btcsuite/btcd.git","ssh_url":"git@github.com:btcsuite/btcd.git","clone_url":"https://github.com/btcsuite/btcd.git","svn_url":"https://github.com/btcsuite/btcd","homepage":null,"size":18636,"stargazers_count":599,"watchers_count":599,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":49,"forks":117,"open_issues":49,"watchers":599,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/btcsuite/btcd/pulls/363"},"html":{"href":"https://github.com/btcsuite/btcd/pull/363"},"issue":{"href":"https://api.github.com/repos/btcsuite/btcd/issues/363"},"comments":{"href":"https://api.github.com/repos/btcsuite/btcd/issues/363/comments"},"review_comments":{"href":"https://api.github.com/repos/btcsuite/btcd/pulls/363/comments"},"review_comment":{"href":"https://api.github.com/repos/btcsuite/btcd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/btcsuite/btcd/pulls/363/commits"},"statuses":{"href":"https://api.github.com/repos/btcsuite/btcd/statuses/acfec85530073538b68133b9d39fce00654015d4"}}}}