{"action":"opened","number":72,"pull_request":{"url":"https://api.github.com/repos/fiorix/txmongo/pulls/72","id":30931285,"html_url":"https://github.com/fiorix/txmongo/pull/72","diff_url":"https://github.com/fiorix/txmongo/pull/72.diff","patch_url":"https://github.com/fiorix/txmongo/pull/72.patch","issue_url":"https://api.github.com/repos/fiorix/txmongo/issues/72","number":72,"state":"open","locked":false,"title":"Authentication reimplemented to work well with ConnectionPool and with multiple DBs","user":{"login":"IlyaSkriblovsky","id":909638,"avatar_url":"https://avatars.githubusercontent.com/u/909638?v=3","gravatar_id":"","url":"https://api.github.com/users/IlyaSkriblovsky","html_url":"https://github.com/IlyaSkriblovsky","followers_url":"https://api.github.com/users/IlyaSkriblovsky/followers","following_url":"https://api.github.com/users/IlyaSkriblovsky/following{/other_user}","gists_url":"https://api.github.com/users/IlyaSkriblovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/IlyaSkriblovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IlyaSkriblovsky/subscriptions","organizations_url":"https://api.github.com/users/IlyaSkriblovsky/orgs","repos_url":"https://api.github.com/users/IlyaSkriblovsky/repos","events_url":"https://api.github.com/users/IlyaSkriblovsky/events{/privacy}","received_events_url":"https://api.github.com/users/IlyaSkriblovsky/received_events","type":"User","site_admin":false},"body":"Hi!\r\n\r\nThe current implementation of authentication is broken in several use cases:\r\n\r\n* It is not reenterant and this leads to bugs with ConnectionPool when pool_size > 1. In such case ConnectionPool.authenticate_with_nonce() might be called multiple times simultaneously and race-condition occurs because 'getnonce' and 'authenticate' MongoDB commands cannot be mixed up.\r\n\r\n* It makes assumption that authentication on some DB is only required when accessing this DB. But MongoDB allows user from DB1 to have permissions on DB2.\r\n\r\nI've reworked all auth-related stuff and added some unit tests, some of them are failing on master branch.\r\n\r\n*Please note that unit tests in test_auth.py require your local MongoDB to have auth=true, no configured users and localhost exception enabled.*","created_at":"2015-03-11T10:39:30Z","updated_at":"2015-03-11T10:39:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fiorix/txmongo/pulls/72/commits","review_comments_url":"https://api.github.com/repos/fiorix/txmongo/pulls/72/comments","review_comment_url":"https://api.github.com/repos/fiorix/txmongo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fiorix/txmongo/issues/72/comments","statuses_url":"https://api.github.com/repos/fiorix/txmongo/statuses/b931dc19f9a11499439b0bb0dda284ec6877ed8f","head":{"label":"IlyaSkriblovsky:authentication","ref":"authentication","sha":"b931dc19f9a11499439b0bb0dda284ec6877ed8f","user":{"login":"IlyaSkriblovsky","id":909638,"avatar_url":"https://avatars.githubusercontent.com/u/909638?v=3","gravatar_id":"","url":"https://api.github.com/users/IlyaSkriblovsky","html_url":"https://github.com/IlyaSkriblovsky","followers_url":"https://api.github.com/users/IlyaSkriblovsky/followers","following_url":"https://api.github.com/users/IlyaSkriblovsky/following{/other_user}","gists_url":"https://api.github.com/users/IlyaSkriblovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/IlyaSkriblovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IlyaSkriblovsky/subscriptions","organizations_url":"https://api.github.com/users/IlyaSkriblovsky/orgs","repos_url":"https://api.github.com/users/IlyaSkriblovsky/repos","events_url":"https://api.github.com/users/IlyaSkriblovsky/events{/privacy}","received_events_url":"https://api.github.com/users/IlyaSkriblovsky/received_events","type":"User","site_admin":false},"repo":{"id":31769022,"name":"txmongo","full_name":"IlyaSkriblovsky/txmongo","owner":{"login":"IlyaSkriblovsky","id":909638,"avatar_url":"https://avatars.githubusercontent.com/u/909638?v=3","gravatar_id":"","url":"https://api.github.com/users/IlyaSkriblovsky","html_url":"https://github.com/IlyaSkriblovsky","followers_url":"https://api.github.com/users/IlyaSkriblovsky/followers","following_url":"https://api.github.com/users/IlyaSkriblovsky/following{/other_user}","gists_url":"https://api.github.com/users/IlyaSkriblovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/IlyaSkriblovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IlyaSkriblovsky/subscriptions","organizations_url":"https://api.github.com/users/IlyaSkriblovsky/orgs","repos_url":"https://api.github.com/users/IlyaSkriblovsky/repos","events_url":"https://api.github.com/users/IlyaSkriblovsky/events{/privacy}","received_events_url":"https://api.github.com/users/IlyaSkriblovsky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IlyaSkriblovsky/txmongo","description":"asynchronous python driver for mongo","fork":true,"url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo","forks_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/forks","keys_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/teams","hooks_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/hooks","issue_events_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/issues/events{/number}","events_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/events","assignees_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/assignees{/user}","branches_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/branches{/branch}","tags_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/tags","blobs_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/git/refs{/sha}","trees_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/statuses/{sha}","languages_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/languages","stargazers_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/stargazers","contributors_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/contributors","subscribers_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/subscribers","subscription_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/subscription","commits_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/commits{/sha}","git_commits_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/git/commits{/sha}","comments_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/comments{/number}","issue_comment_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/issues/comments{/number}","contents_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/contents/{+path}","compare_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/merges","archive_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/downloads","issues_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/issues{/number}","pulls_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/pulls{/number}","milestones_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/milestones{/number}","notifications_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/labels{/name}","releases_url":"https://api.github.com/repos/IlyaSkriblovsky/txmongo/releases{/id}","created_at":"2015-03-06T12:49:23Z","updated_at":"2015-03-11T08:38:56Z","pushed_at":"2015-03-11T09:59:36Z","git_url":"git://github.com/IlyaSkriblovsky/txmongo.git","ssh_url":"git@github.com:IlyaSkriblovsky/txmongo.git","clone_url":"https://github.com/IlyaSkriblovsky/txmongo.git","svn_url":"https://github.com/IlyaSkriblovsky/txmongo","homepage":"","size":426,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"fiorix:master","ref":"master","sha":"adacf166268bdddfa6cdefbc7019d343fbf90e3f","user":{"login":"fiorix","id":129742,"avatar_url":"https://avatars.githubusercontent.com/u/129742?v=3","gravatar_id":"","url":"https://api.github.com/users/fiorix","html_url":"https://github.com/fiorix","followers_url":"https://api.github.com/users/fiorix/followers","following_url":"https://api.github.com/users/fiorix/following{/other_user}","gists_url":"https://api.github.com/users/fiorix/gists{/gist_id}","starred_url":"https://api.github.com/users/fiorix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fiorix/subscriptions","organizations_url":"https://api.github.com/users/fiorix/orgs","repos_url":"https://api.github.com/users/fiorix/repos","events_url":"https://api.github.com/users/fiorix/events{/privacy}","received_events_url":"https://api.github.com/users/fiorix/received_events","type":"User","site_admin":false},"repo":{"id":318058,"name":"txmongo","full_name":"fiorix/txmongo","owner":{"login":"fiorix","id":129742,"avatar_url":"https://avatars.githubusercontent.com/u/129742?v=3","gravatar_id":"","url":"https://api.github.com/users/fiorix","html_url":"https://github.com/fiorix","followers_url":"https://api.github.com/users/fiorix/followers","following_url":"https://api.github.com/users/fiorix/following{/other_user}","gists_url":"https://api.github.com/users/fiorix/gists{/gist_id}","starred_url":"https://api.github.com/users/fiorix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fiorix/subscriptions","organizations_url":"https://api.github.com/users/fiorix/orgs","repos_url":"https://api.github.com/users/fiorix/repos","events_url":"https://api.github.com/users/fiorix/events{/privacy}","received_events_url":"https://api.github.com/users/fiorix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fiorix/txmongo","description":"asynchronous python driver for mongo","fork":false,"url":"https://api.github.com/repos/fiorix/txmongo","forks_url":"https://api.github.com/repos/fiorix/txmongo/forks","keys_url":"https://api.github.com/repos/fiorix/txmongo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fiorix/txmongo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fiorix/txmongo/teams","hooks_url":"https://api.github.com/repos/fiorix/txmongo/hooks","issue_events_url":"https://api.github.com/repos/fiorix/txmongo/issues/events{/number}","events_url":"https://api.github.com/repos/fiorix/txmongo/events","assignees_url":"https://api.github.com/repos/fiorix/txmongo/assignees{/user}","branches_url":"https://api.github.com/repos/fiorix/txmongo/branches{/branch}","tags_url":"https://api.github.com/repos/fiorix/txmongo/tags","blobs_url":"https://api.github.com/repos/fiorix/txmongo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fiorix/txmongo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fiorix/txmongo/git/refs{/sha}","trees_url":"https://api.github.com/repos/fiorix/txmongo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fiorix/txmongo/statuses/{sha}","languages_url":"https://api.github.com/repos/fiorix/txmongo/languages","stargazers_url":"https://api.github.com/repos/fiorix/txmongo/stargazers","contributors_url":"https://api.github.com/repos/fiorix/txmongo/contributors","subscribers_url":"https://api.github.com/repos/fiorix/txmongo/subscribers","subscription_url":"https://api.github.com/repos/fiorix/txmongo/subscription","commits_url":"https://api.github.com/repos/fiorix/txmongo/commits{/sha}","git_commits_url":"https://api.github.com/repos/fiorix/txmongo/git/commits{/sha}","comments_url":"https://api.github.com/repos/fiorix/txmongo/comments{/number}","issue_comment_url":"https://api.github.com/repos/fiorix/txmongo/issues/comments{/number}","contents_url":"https://api.github.com/repos/fiorix/txmongo/contents/{+path}","compare_url":"https://api.github.com/repos/fiorix/txmongo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fiorix/txmongo/merges","archive_url":"https://api.github.com/repos/fiorix/txmongo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fiorix/txmongo/downloads","issues_url":"https://api.github.com/repos/fiorix/txmongo/issues{/number}","pulls_url":"https://api.github.com/repos/fiorix/txmongo/pulls{/number}","milestones_url":"https://api.github.com/repos/fiorix/txmongo/milestones{/number}","notifications_url":"https://api.github.com/repos/fiorix/txmongo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fiorix/txmongo/labels{/name}","releases_url":"https://api.github.com/repos/fiorix/txmongo/releases{/id}","created_at":"2009-09-26T06:00:05Z","updated_at":"2015-03-09T13:04:47Z","pushed_at":"2015-03-09T12:55:51Z","git_url":"git://github.com/fiorix/txmongo.git","ssh_url":"git@github.com:fiorix/txmongo.git","clone_url":"https://github.com/fiorix/txmongo.git","svn_url":"https://github.com/fiorix/txmongo","homepage":"","size":638,"stargazers_count":247,"watchers_count":247,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":8,"forks":59,"open_issues":8,"watchers":247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fiorix/txmongo/pulls/72"},"html":{"href":"https://github.com/fiorix/txmongo/pull/72"},"issue":{"href":"https://api.github.com/repos/fiorix/txmongo/issues/72"},"comments":{"href":"https://api.github.com/repos/fiorix/txmongo/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/fiorix/txmongo/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/fiorix/txmongo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fiorix/txmongo/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/fiorix/txmongo/statuses/b931dc19f9a11499439b0bb0dda284ec6877ed8f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":281,"deletions":85,"changed_files":5}}