{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/etcd/pulls/comments/43562728","id":43562728,"diff_hunk":"@@ -97,6 +98,13 @@ type store struct {\n \n \tmu      sync.Mutex // protect enabled\n \tenabled *bool\n+\n+\tPasswordStore\n+}\n+\n+type PasswordStore interface {\n+\tCheckPassword(user User, password string) bool\n+\tHashPassword(password string) (string, error)\n }","path":"etcdserver/auth/auth.go","position":10,"original_position":19,"commit_id":"ee522025b300871dee1a5d5ac6007614afae1cd9","original_commit_id":"8f28cce39278867f7ba46fb426e7ee012aac6d1d","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"Fixed.","created_at":"2015-10-30T23:33:46Z","updated_at":"2015-10-30T23:33:46Z","html_url":"https://github.com/coreos/etcd/pull/3762#discussion_r43562728","pull_request_url":"https://api.github.com/repos/coreos/etcd/pulls/3762","_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments/43562728"},"html":{"href":"https://github.com/coreos/etcd/pull/3762#discussion_r43562728"},"pull_request":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3762"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/3762","id":48941130,"html_url":"https://github.com/coreos/etcd/pull/3762","diff_url":"https://github.com/coreos/etcd/pull/3762.diff","patch_url":"https://github.com/coreos/etcd/pull/3762.patch","issue_url":"https://api.github.com/repos/coreos/etcd/issues/3762","number":3762,"state":"open","locked":false,"title":"etcdserver: restructure auth.Store and auth.User","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"This attempts to decouple password-related functions, which previously\r\nexisted both in the Store and User structs, by splitting them out into a\r\nseparate interface, PasswordStore.  This means that they can be more\r\neasily swapped out during testing.\r\n\r\nThis also changes the relevant tests to use mock password functions\r\ninstead of the bcrypt-backed implementations; as a result, the tests are\r\nmuch faster.\r\n\r\nBefore:\r\n```\r\n        github.com/coreos/etcd/etcdserver/auth          31.495s\r\n        github.com/coreos/etcd/etcdserver/etcdhttp      91.205s\r\n```\r\n\r\nAfter:\r\n```\r\n        github.com/coreos/etcd/etcdserver/auth          1.207s\r\n        github.com/coreos/etcd/etcdserver/etcdhttp      1.207s\r\n```","created_at":"2015-10-27T22:22:55Z","updated_at":"2015-10-30T23:33:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c235b47521b68c45e9c8454b6fed554e03ccae7","assignee":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/coreos/etcd/milestones/24","html_url":"https://github.com/coreos/etcd/milestones/v2.3.0-alpha0","labels_url":"https://api.github.com/repos/coreos/etcd/milestones/24/labels","id":1271801,"number":24,"title":"v2.3.0-alpha0","description":"","creator":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":18,"state":"open","created_at":"2015-08-25T15:54:58Z","updated_at":"2015-10-30T20:47:25Z","due_on":"2015-10-30T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/coreos/etcd/pulls/3762/commits","review_comments_url":"https://api.github.com/repos/coreos/etcd/pulls/3762/comments","review_comment_url":"https://api.github.com/repos/coreos/etcd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/3762/comments","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/ee522025b300871dee1a5d5ac6007614afae1cd9","head":{"label":"jonboulle:auth","ref":"auth","sha":"ee522025b300871dee1a5d5ac6007614afae1cd9","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"repo":{"id":16238846,"name":"etcd","full_name":"jonboulle/etcd","owner":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonboulle/etcd","description":"A highly-available key value store for shared configuration and service discovery","fork":true,"url":"https://api.github.com/repos/jonboulle/etcd","forks_url":"https://api.github.com/repos/jonboulle/etcd/forks","keys_url":"https://api.github.com/repos/jonboulle/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonboulle/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonboulle/etcd/teams","hooks_url":"https://api.github.com/repos/jonboulle/etcd/hooks","issue_events_url":"https://api.github.com/repos/jonboulle/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/jonboulle/etcd/events","assignees_url":"https://api.github.com/repos/jonboulle/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/jonboulle/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/jonboulle/etcd/tags","blobs_url":"https://api.github.com/repos/jonboulle/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonboulle/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonboulle/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonboulle/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonboulle/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/jonboulle/etcd/languages","stargazers_url":"https://api.github.com/repos/jonboulle/etcd/stargazers","contributors_url":"https://api.github.com/repos/jonboulle/etcd/contributors","subscribers_url":"https://api.github.com/repos/jonboulle/etcd/subscribers","subscription_url":"https://api.github.com/repos/jonboulle/etcd/subscription","commits_url":"https://api.github.com/repos/jonboulle/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonboulle/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonboulle/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonboulle/etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonboulle/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/jonboulle/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonboulle/etcd/merges","archive_url":"https://api.github.com/repos/jonboulle/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonboulle/etcd/downloads","issues_url":"https://api.github.com/repos/jonboulle/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/jonboulle/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/jonboulle/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/jonboulle/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonboulle/etcd/labels{/name}","releases_url":"https://api.github.com/repos/jonboulle/etcd/releases{/id}","created_at":"2014-01-25T20:07:46Z","updated_at":"2014-12-19T00:22:17Z","pushed_at":"2015-10-30T23:33:44Z","git_url":"git://github.com/jonboulle/etcd.git","ssh_url":"git@github.com:jonboulle/etcd.git","clone_url":"https://github.com/jonboulle/etcd.git","svn_url":"https://github.com/jonboulle/etcd","homepage":"","size":19546,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"coreos:master","ref":"master","sha":"2840260b3becbf108688ad865fe470a58eadaef5","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":11225014,"name":"etcd","full_name":"coreos/etcd","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/etcd","description":"Distributed reliable key-value store for the most critical data of a distributed system","fork":false,"url":"https://api.github.com/repos/coreos/etcd","forks_url":"https://api.github.com/repos/coreos/etcd/forks","keys_url":"https://api.github.com/repos/coreos/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/etcd/teams","hooks_url":"https://api.github.com/repos/coreos/etcd/hooks","issue_events_url":"https://api.github.com/repos/coreos/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/etcd/events","assignees_url":"https://api.github.com/repos/coreos/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/etcd/tags","blobs_url":"https://api.github.com/repos/coreos/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/etcd/languages","stargazers_url":"https://api.github.com/repos/coreos/etcd/stargazers","contributors_url":"https://api.github.com/repos/coreos/etcd/contributors","subscribers_url":"https://api.github.com/repos/coreos/etcd/subscribers","subscription_url":"https://api.github.com/repos/coreos/etcd/subscription","commits_url":"https://api.github.com/repos/coreos/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/etcd/merges","archive_url":"https://api.github.com/repos/coreos/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/etcd/downloads","issues_url":"https://api.github.com/repos/coreos/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/etcd/labels{/name}","releases_url":"https://api.github.com/repos/coreos/etcd/releases{/id}","created_at":"2013-07-06T21:57:21Z","updated_at":"2015-10-30T18:38:59Z","pushed_at":"2015-10-30T23:33:44Z","git_url":"git://github.com/coreos/etcd.git","ssh_url":"git@github.com:coreos/etcd.git","clone_url":"https://github.com/coreos/etcd.git","svn_url":"https://github.com/coreos/etcd","homepage":"https://coreos.com/etcd/docs/latest/","size":38288,"stargazers_count":7884,"watchers_count":7884,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1181,"mirror_url":null,"open_issues_count":153,"forks":1181,"open_issues":153,"watchers":7884,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3762"},"html":{"href":"https://github.com/coreos/etcd/pull/3762"},"issue":{"href":"https://api.github.com/repos/coreos/etcd/issues/3762"},"comments":{"href":"https://api.github.com/repos/coreos/etcd/issues/3762/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3762/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3762/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/etcd/statuses/ee522025b300871dee1a5d5ac6007614afae1cd9"}}}}