{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9794","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9794/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9794/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9794/events","html_url":"https://github.com/cockroachdb/cockroach/pull/9794","id":181524483,"number":9794,"title":"sql: add CREATE USER stmt and pgwire password-based authentication","user":{"login":"asubiotto","id":10560359,"avatar_url":"https://avatars.githubusercontent.com/u/10560359?v=3","gravatar_id":"","url":"https://api.github.com/users/asubiotto","html_url":"https://github.com/asubiotto","followers_url":"https://api.github.com/users/asubiotto/followers","following_url":"https://api.github.com/users/asubiotto/following{/other_user}","gists_url":"https://api.github.com/users/asubiotto/gists{/gist_id}","starred_url":"https://api.github.com/users/asubiotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asubiotto/subscriptions","organizations_url":"https://api.github.com/users/asubiotto/orgs","repos_url":"https://api.github.com/users/asubiotto/repos","events_url":"https://api.github.com/users/asubiotto/events{/privacy}","received_events_url":"https://api.github.com/users/asubiotto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/docs-todo","name":"docs-todo","color":"5319e7"},{"url":"https://api.github.com/repos/cockroachdb/cockroach/labels/noteworthy","name":"noteworthy","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"knz","id":642886,"avatar_url":"https://avatars.githubusercontent.com/u/642886?v=3","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"assignees":[{"login":"knz","id":642886,"avatar_url":"https://avatars.githubusercontent.com/u/642886?v=3","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":44,"created_at":"2016-10-06T21:01:05Z","updated_at":"2016-10-25T16:51:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/9794","html_url":"https://github.com/cockroachdb/cockroach/pull/9794","diff_url":"https://github.com/cockroachdb/cockroach/pull/9794.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/9794.patch"},"body":"Add mechanism to create users and then authenticate as them through a pgwire connection. This takes care of #6457.\r\n\r\n@tamird @petermattis @cuongdo @mberhault\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/9794)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/256093293","html_url":"https://github.com/cockroachdb/cockroach/pull/9794#issuecomment-256093293","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/9794","id":256093293,"user":{"login":"knz","id":642886,"avatar_url":"https://avatars.githubusercontent.com/u/642886?v=3","gravatar_id":"","url":"https://api.github.com/users/knz","html_url":"https://github.com/knz","followers_url":"https://api.github.com/users/knz/followers","following_url":"https://api.github.com/users/knz/following{/other_user}","gists_url":"https://api.github.com/users/knz/gists{/gist_id}","starred_url":"https://api.github.com/users/knz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knz/subscriptions","organizations_url":"https://api.github.com/users/knz/orgs","repos_url":"https://api.github.com/users/knz/repos","events_url":"https://api.github.com/users/knz/events{/privacy}","received_events_url":"https://api.github.com/users/knz/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T16:51:38Z","updated_at":"2016-10-25T16:51:38Z","body":"<img class=\"emoji\" title=\":lgtm:\" alt=\":lgtm:\" align=\"absmiddle\" src=\"https://reviewable.io/lgtm.png\" height=\"20\" width=\"61\"/> modulo the comment by Tamir.\n\n---\n\nReviewed 1 of 14 files at r6.\nReview status: all files reviewed at latest revision, 23 unresolved discussions, all commit checks successful.\n\n---\n\n*[pkg/cli/user.go, line 154 at r5](https://reviewable.io:443/reviews/cockroachdb/cockroach/9794#-KUhXz-tdfx0eLnkYRct:-KUwjOHy3u84aWkfOwIH:bb77ufg) ([raw file](https://github.com/cockroachdb/cockroach/blob/6e400a141d46d505ddff81803617d03774e1c98e/pkg/cli/user.go#L154)):*\n<details><summary><i>Previously, asubiotto (Alfonso Subiotto Marqués) wrote…</i></summary>\n> If users do not provide a certificate, authentication will default to password authentication. If the user has been created without a password, an empty password will result in a successful authentication. I think it's important to allow the creation of users without passwords (I can imagine a use case where cert authentication is always used and password creation is a burden on cockroach's ease of use). However, I don't think we should allow password authentication for users with empty passwords. I will add this change in, does that sound good?\n</details>\nYes.\n\n---\n\n*[pkg/sql/create.go, line 254 at r5](https://reviewable.io:443/reviews/cockroachdb/cockroach/9794#-KUhRPGPBxnzOrjg9RqB:-KUwjWmpJ9g8Zd_XnlRl:bb6mt9b) ([raw file](https://github.com/cockroachdb/cockroach/blob/342f9a5ae434cc2efdede3bec0c5b800e6c35c59/pkg/sql/create.go#L254)):*\n<details><summary><i>Previously, asubiotto (Alfonso Subiotto Marqués) wrote…</i></summary>\n> I added explicit checking for INSERT privilege on system.users rather than checking that the user is root.\n</details>\n:+1:\n\n---\n\n*[pkg/sql/create.go, line 280 at r5](https://reviewable.io:443/reviews/cockroachdb/cockroach/9794#-KUhTYmvspw936sF-Zp6:-KUwjcYg52fzxYpXNHhJ:begay6z) ([raw file](https://github.com/cockroachdb/cockroach/blob/342f9a5ae434cc2efdede3bec0c5b800e6c35c59/pkg/sql/create.go#L280)):*\n<details><summary><i>Previously, asubiotto (Alfonso Subiotto Marqués) wrote…</i></summary>\n> There seems to be some weird behavior when using this statement in that I get 1 row affected on conflict. Will look into this more and change this code when I find the issue. For now I don't think this should be a blocker.\n</details>\nOk but if you're not following on this immediately please file an issue.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/9794#-:-KUwkFJ-TMJpn3Rq3hcJ:bobre1v)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"knz"}}