{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/6718","repository_url":"https://api.github.com/repos/coreos/etcd","labels_url":"https://api.github.com/repos/coreos/etcd/issues/6718/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/6718/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/6718/events","html_url":"https://github.com/coreos/etcd/pull/6718","id":185029779,"number":6718,"title":"auth, etcdserver: apply Authenticate() in an asynchronous manner","user":{"login":"mitake","id":1173955,"avatar_url":"https://avatars.githubusercontent.com/u/1173955?v=3","gravatar_id":"","url":"https://api.github.com/users/mitake","html_url":"https://github.com/mitake","followers_url":"https://api.github.com/users/mitake/followers","following_url":"https://api.github.com/users/mitake/following{/other_user}","gists_url":"https://api.github.com/users/mitake/gists{/gist_id}","starred_url":"https://api.github.com/users/mitake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitake/subscriptions","organizations_url":"https://api.github.com/users/mitake/orgs","repos_url":"https://api.github.com/users/mitake/repos","events_url":"https://api.github.com/users/mitake/events{/privacy}","received_events_url":"https://api.github.com/users/mitake/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-25T06:29:50Z","updated_at":"2016-11-01T04:41:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/6718","html_url":"https://github.com/coreos/etcd/pull/6718","diff_url":"https://github.com/coreos/etcd/pull/6718.diff","patch_url":"https://github.com/coreos/etcd/pull/6718.patch"},"body":"Because of the high cost of bcrypt password checking, the checking\nmechanism was moved to the API layer once. However, the modification\nproduced a corner case that can involve inconsistent state of the auth\nstore [1].\n\nThis commit moves the checking mechanism to the apply layer of state\nmachine again. For doing this, Authenticate() is now deconstructed\ninto two part: AsyncAuthenticateParam() and\nAsyncAuthenticate(). AsyncAuthenticateParam() is called in the apply\nloop like other commands and it obtains all parameters that are\nrequired for doing auth. AsyncAuthenticate() does actual checking\nbased on the params obtained by\nAsyncAuthenticateParam(). AsyncAuthenticate() can take long time\nbecause of the bcrypt cost, but it is executed in its own goroutine\nand does not block the apply loop. They are invoked with a new\nfunction AsyncApplyBuilder() of applierV3.\n\n[1] https://github.com/coreos/etcd/issues/6675#issuecomment-255006389\n\nFixes https://github.com/coreos/etcd/issues/6675 and https://github.com/coreos/etcd/issues/6683\n"},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/257487471","html_url":"https://github.com/coreos/etcd/pull/6718#issuecomment-257487471","issue_url":"https://api.github.com/repos/coreos/etcd/issues/6718","id":257487471,"user":{"login":"mitake","id":1173955,"avatar_url":"https://avatars.githubusercontent.com/u/1173955?v=3","gravatar_id":"","url":"https://api.github.com/users/mitake","html_url":"https://github.com/mitake","followers_url":"https://api.github.com/users/mitake/followers","following_url":"https://api.github.com/users/mitake/following{/other_user}","gists_url":"https://api.github.com/users/mitake/gists{/gist_id}","starred_url":"https://api.github.com/users/mitake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitake/subscriptions","organizations_url":"https://api.github.com/users/mitake/orgs","repos_url":"https://api.github.com/users/mitake/repos","events_url":"https://api.github.com/users/mitake/events{/privacy}","received_events_url":"https://api.github.com/users/mitake/received_events","type":"User","site_admin":false},"created_at":"2016-11-01T04:41:12Z","updated_at":"2016-11-01T04:41:12Z","body":"@xiang90 because of a schedule like this, password checking must be executed in the state machine layer: https://github.com/coreos/etcd/issues/6675#issuecomment-255006389\r\nActually current master does password checking similar to the code you pointed but it caused two problems fixed in this PR."}}
{"actor":{"display_login":"mitake"}}