{"action":"created","comment":{"url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/comments/340820909","pull_request_review_id":309471991,"id":340820909,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MDgyMDkwOQ==","diff_hunk":"@@ -304,6 +304,30 @@ func (h *handler) checkAuth(context *db.DatabaseContext) (err error) {\n \n \t}(time.Now())\n \n+\t// Is there a TLS client cert?\n+\tvar clientCertEmailAddress *string\n+\tif clientCerts := h.rq.TLS.VerifiedChains; len(clientCerts) > 0 {\n+\t\tclientCert := *clientCerts[0][0]","path":"rest/handler.go","position":7,"original_position":7,"commit_id":"ca4843f9169f22247f94929bc0a370fdfe24869c","original_commit_id":"ca4843f9169f22247f94929bc0a370fdfe24869c","user":{"login":"snej","id":43241,"node_id":"MDQ6VXNlcjQzMjQx","avatar_url":"https://avatars2.githubusercontent.com/u/43241?v=4","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false},"body":"Verified that a client can only send one cert.","created_at":"2019-10-30T19:40:05Z","updated_at":"2019-10-30T19:40:05Z","html_url":"https://github.com/couchbase/sync_gateway/pull/4295#discussion_r340820909","pull_request_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/comments/340820909"},"html":{"href":"https://github.com/couchbase/sync_gateway/pull/4295#discussion_r340820909"},"pull_request":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295"}},"in_reply_to_id":339784523},"pull_request":{"url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295","id":333253891,"node_id":"MDExOlB1bGxSZXF1ZXN0MzMzMjUzODkx","html_url":"https://github.com/couchbase/sync_gateway/pull/4295","diff_url":"https://github.com/couchbase/sync_gateway/pull/4295.diff","patch_url":"https://github.com/couchbase/sync_gateway/pull/4295.patch","issue_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/4295","number":4295,"state":"open","locked":false,"title":"TLS client certificate support for CBL","user":{"login":"snej","id":43241,"node_id":"MDQ6VXNlcjQzMjQx","avatar_url":"https://avatars2.githubusercontent.com/u/43241?v=4","gravatar_id":"","url":"https://api.github.com/users/snej","html_url":"https://github.com/snej","followers_url":"https://api.github.com/users/snej/followers","following_url":"https://api.github.com/users/snej/following{/other_user}","gists_url":"https://api.github.com/users/snej/gists{/gist_id}","starred_url":"https://api.github.com/users/snej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snej/subscriptions","organizations_url":"https://api.github.com/users/snej/orgs","repos_url":"https://api.github.com/users/snej/repos","events_url":"https://api.github.com/users/snej/events{/privacy}","received_events_url":"https://api.github.com/users/snej/received_events","type":"User","site_admin":false},"body":"If enabled via `unsupported.SSLClientCerts` config, TLS client certs\r\nwill be used for authentication. If a client cert contains an email\r\naddress (in the Subject Alternative Name or as the Common Name),\r\nand if there's a user with that email address, a request is authenti-\r\ncated as that user. Otherwise authentication proceeds normally.\r\n\r\nIf `unsupported.SSLClientCerts` is present, it must be an object\r\ncontaining a key `CA_cert` whose value is the path to a PEM or DER\r\nfile containing the CA certificate used to validate client certs.\r\nIt may also have a key `required` whose value is a boolean; if\r\nfalse, client certs are optional.\r\n\r\nCBG-570","created_at":"2019-10-28T18:11:49Z","updated_at":"2019-10-30T19:40:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"170094f3b830b88268c708def2d6f0d5776aadf7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295/commits","review_comments_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295/comments","review_comment_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/4295/comments","statuses_url":"https://api.github.com/repos/couchbase/sync_gateway/statuses/ca4843f9169f22247f94929bc0a370fdfe24869c","head":{"label":"couchbase:feature/client-certs","ref":"feature/client-certs","sha":"ca4843f9169f22247f94929bc0a370fdfe24869c","user":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":6082996,"node_id":"MDEwOlJlcG9zaXRvcnk2MDgyOTk2","name":"sync_gateway","full_name":"couchbase/sync_gateway","private":false,"owner":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/couchbase/sync_gateway","description":"Manages access and synchronization between Couchbase Lite and Couchbase Server","fork":false,"url":"https://api.github.com/repos/couchbase/sync_gateway","forks_url":"https://api.github.com/repos/couchbase/sync_gateway/forks","keys_url":"https://api.github.com/repos/couchbase/sync_gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/sync_gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/sync_gateway/teams","hooks_url":"https://api.github.com/repos/couchbase/sync_gateway/hooks","issue_events_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/sync_gateway/events","assignees_url":"https://api.github.com/repos/couchbase/sync_gateway/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/sync_gateway/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/sync_gateway/tags","blobs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/sync_gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/sync_gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/sync_gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/sync_gateway/languages","stargazers_url":"https://api.github.com/repos/couchbase/sync_gateway/stargazers","contributors_url":"https://api.github.com/repos/couchbase/sync_gateway/contributors","subscribers_url":"https://api.github.com/repos/couchbase/sync_gateway/subscribers","subscription_url":"https://api.github.com/repos/couchbase/sync_gateway/subscription","commits_url":"https://api.github.com/repos/couchbase/sync_gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/sync_gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/sync_gateway/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/sync_gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/sync_gateway/merges","archive_url":"https://api.github.com/repos/couchbase/sync_gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/sync_gateway/downloads","issues_url":"https://api.github.com/repos/couchbase/sync_gateway/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/sync_gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/sync_gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/sync_gateway/releases{/id}","deployments_url":"https://api.github.com/repos/couchbase/sync_gateway/deployments","created_at":"2012-10-04T22:25:43Z","updated_at":"2019-10-30T19:38:56Z","pushed_at":"2019-10-30T19:38:54Z","git_url":"git://github.com/couchbase/sync_gateway.git","ssh_url":"git@github.com:couchbase/sync_gateway.git","clone_url":"https://github.com/couchbase/sync_gateway.git","svn_url":"https://github.com/couchbase/sync_gateway","homepage":"https://www.couchbase.com/products/sync-gateway","size":32591,"stargazers_count":412,"watchers_count":412,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":298,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":128,"open_issues":298,"watchers":412,"default_branch":"master"}},"base":{"label":"couchbase:master","ref":"master","sha":"b4443c83085867ef061d5e649b1beede753c2c11","user":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"repo":{"id":6082996,"node_id":"MDEwOlJlcG9zaXRvcnk2MDgyOTk2","name":"sync_gateway","full_name":"couchbase/sync_gateway","private":false,"owner":{"login":"couchbase","id":605755,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNTc1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/605755?v=4","gravatar_id":"","url":"https://api.github.com/users/couchbase","html_url":"https://github.com/couchbase","followers_url":"https://api.github.com/users/couchbase/followers","following_url":"https://api.github.com/users/couchbase/following{/other_user}","gists_url":"https://api.github.com/users/couchbase/gists{/gist_id}","starred_url":"https://api.github.com/users/couchbase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/couchbase/subscriptions","organizations_url":"https://api.github.com/users/couchbase/orgs","repos_url":"https://api.github.com/users/couchbase/repos","events_url":"https://api.github.com/users/couchbase/events{/privacy}","received_events_url":"https://api.github.com/users/couchbase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/couchbase/sync_gateway","description":"Manages access and synchronization between Couchbase Lite and Couchbase Server","fork":false,"url":"https://api.github.com/repos/couchbase/sync_gateway","forks_url":"https://api.github.com/repos/couchbase/sync_gateway/forks","keys_url":"https://api.github.com/repos/couchbase/sync_gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/couchbase/sync_gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/couchbase/sync_gateway/teams","hooks_url":"https://api.github.com/repos/couchbase/sync_gateway/hooks","issue_events_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/events{/number}","events_url":"https://api.github.com/repos/couchbase/sync_gateway/events","assignees_url":"https://api.github.com/repos/couchbase/sync_gateway/assignees{/user}","branches_url":"https://api.github.com/repos/couchbase/sync_gateway/branches{/branch}","tags_url":"https://api.github.com/repos/couchbase/sync_gateway/tags","blobs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/couchbase/sync_gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/couchbase/sync_gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/couchbase/sync_gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/couchbase/sync_gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/couchbase/sync_gateway/languages","stargazers_url":"https://api.github.com/repos/couchbase/sync_gateway/stargazers","contributors_url":"https://api.github.com/repos/couchbase/sync_gateway/contributors","subscribers_url":"https://api.github.com/repos/couchbase/sync_gateway/subscribers","subscription_url":"https://api.github.com/repos/couchbase/sync_gateway/subscription","commits_url":"https://api.github.com/repos/couchbase/sync_gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/couchbase/sync_gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/couchbase/sync_gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/couchbase/sync_gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/couchbase/sync_gateway/contents/{+path}","compare_url":"https://api.github.com/repos/couchbase/sync_gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/couchbase/sync_gateway/merges","archive_url":"https://api.github.com/repos/couchbase/sync_gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/couchbase/sync_gateway/downloads","issues_url":"https://api.github.com/repos/couchbase/sync_gateway/issues{/number}","pulls_url":"https://api.github.com/repos/couchbase/sync_gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/couchbase/sync_gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/couchbase/sync_gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/couchbase/sync_gateway/labels{/name}","releases_url":"https://api.github.com/repos/couchbase/sync_gateway/releases{/id}","deployments_url":"https://api.github.com/repos/couchbase/sync_gateway/deployments","created_at":"2012-10-04T22:25:43Z","updated_at":"2019-10-30T19:38:56Z","pushed_at":"2019-10-30T19:38:54Z","git_url":"git://github.com/couchbase/sync_gateway.git","ssh_url":"git@github.com:couchbase/sync_gateway.git","clone_url":"https://github.com/couchbase/sync_gateway.git","svn_url":"https://github.com/couchbase/sync_gateway","homepage":"https://www.couchbase.com/products/sync-gateway","size":32591,"stargazers_count":412,"watchers_count":412,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":128,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":298,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":128,"open_issues":298,"watchers":412,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295"},"html":{"href":"https://github.com/couchbase/sync_gateway/pull/4295"},"issue":{"href":"https://api.github.com/repos/couchbase/sync_gateway/issues/4295"},"comments":{"href":"https://api.github.com/repos/couchbase/sync_gateway/issues/4295/comments"},"review_comments":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295/comments"},"review_comment":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/couchbase/sync_gateway/pulls/4295/commits"},"statuses":{"href":"https://api.github.com/repos/couchbase/sync_gateway/statuses/ca4843f9169f22247f94929bc0a370fdfe24869c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"snej"}}