{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/vault/pulls/comments/185214390","pull_request_review_id":116557423,"id":185214390,"diff_hunk":"@@ -371,6 +382,33 @@ func (b *backend) checkForValidChain(chains [][]*x509.Certificate) bool {\n \treturn false\n }\n \n+func (b *backend) checkCIDR(cert *CertEntry, req *logical.Request) error {\n+\n+\tif len(cert.BoundCIDRs) <= 0 {","path":"builtin/credential/cert/path_login.go","position":52,"original_position":52,"commit_id":"6c1977318f53663d2ebf6d9dd5da75c7d1605dd9","original_commit_id":"6c1977318f53663d2ebf6d9dd5da75c7d1605dd9","user":{"login":"chrishoffman","id":99742,"avatar_url":"https://avatars2.githubusercontent.com/u/99742?v=4","gravatar_id":"","url":"https://api.github.com/users/chrishoffman","html_url":"https://github.com/chrishoffman","followers_url":"https://api.github.com/users/chrishoffman/followers","following_url":"https://api.github.com/users/chrishoffman/following{/other_user}","gists_url":"https://api.github.com/users/chrishoffman/gists{/gist_id}","starred_url":"https://api.github.com/users/chrishoffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrishoffman/subscriptions","organizations_url":"https://api.github.com/users/chrishoffman/orgs","repos_url":"https://api.github.com/users/chrishoffman/repos","events_url":"https://api.github.com/users/chrishoffman/events{/privacy}","received_events_url":"https://api.github.com/users/chrishoffman/received_events","type":"User","site_admin":false},"body":"Len is never going to be below zero.  I think `==` makes more sense here.","created_at":"2018-05-01T12:51:17Z","updated_at":"2018-05-01T12:58:12Z","html_url":"https://github.com/hashicorp/vault/pull/4478#discussion_r185214390","pull_request_url":"https://api.github.com/repos/hashicorp/vault/pulls/4478","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/comments/185214390"},"html":{"href":"https://github.com/hashicorp/vault/pull/4478#discussion_r185214390"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/4478"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/vault/pulls/4478","id":184737495,"html_url":"https://github.com/hashicorp/vault/pull/4478","diff_url":"https://github.com/hashicorp/vault/pull/4478.diff","patch_url":"https://github.com/hashicorp/vault/pull/4478.patch","issue_url":"https://api.github.com/repos/hashicorp/vault/issues/4478","number":4478,"state":"open","locked":false,"title":"Restrict cert auth by CIDR","user":{"login":"tyrannosaurus-becks","id":1152361,"avatar_url":"https://avatars3.githubusercontent.com/u/1152361?v=4","gravatar_id":"","url":"https://api.github.com/users/tyrannosaurus-becks","html_url":"https://github.com/tyrannosaurus-becks","followers_url":"https://api.github.com/users/tyrannosaurus-becks/followers","following_url":"https://api.github.com/users/tyrannosaurus-becks/following{/other_user}","gists_url":"https://api.github.com/users/tyrannosaurus-becks/gists{/gist_id}","starred_url":"https://api.github.com/users/tyrannosaurus-becks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyrannosaurus-becks/subscriptions","organizations_url":"https://api.github.com/users/tyrannosaurus-becks/orgs","repos_url":"https://api.github.com/users/tyrannosaurus-becks/repos","events_url":"https://api.github.com/users/tyrannosaurus-becks/events{/privacy}","received_events_url":"https://api.github.com/users/tyrannosaurus-becks/received_events","type":"User","site_admin":false},"body":"Related to #815, add ability to restrict cert auth by CIDR.","created_at":"2018-04-27T22:01:49Z","updated_at":"2018-05-01T12:58:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50165cb94967a90b75967aa5a6d27f475f570a16","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/hashicorp/vault/milestones/35","html_url":"https://github.com/hashicorp/vault/milestone/35","labels_url":"https://api.github.com/repos/hashicorp/vault/milestones/35/labels","id":3281750,"number":35,"title":"0.10.2","description":null,"creator":{"login":"jefferai","id":28627,"avatar_url":"https://avatars0.githubusercontent.com/u/28627?v=4","gravatar_id":"","url":"https://api.github.com/users/jefferai","html_url":"https://github.com/jefferai","followers_url":"https://api.github.com/users/jefferai/followers","following_url":"https://api.github.com/users/jefferai/following{/other_user}","gists_url":"https://api.github.com/users/jefferai/gists{/gist_id}","starred_url":"https://api.github.com/users/jefferai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefferai/subscriptions","organizations_url":"https://api.github.com/users/jefferai/orgs","repos_url":"https://api.github.com/users/jefferai/repos","events_url":"https://api.github.com/users/jefferai/events{/privacy}","received_events_url":"https://api.github.com/users/jefferai/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":8,"state":"open","created_at":"2018-04-19T19:03:22Z","updated_at":"2018-04-30T18:21:39Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hashicorp/vault/pulls/4478/commits","review_comments_url":"https://api.github.com/repos/hashicorp/vault/pulls/4478/comments","review_comment_url":"https://api.github.com/repos/hashicorp/vault/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/vault/issues/4478/comments","statuses_url":"https://api.github.com/repos/hashicorp/vault/statuses/6c1977318f53663d2ebf6d9dd5da75c7d1605dd9","head":{"label":"hashicorp:cert-CIDRs","ref":"cert-CIDRs","sha":"6c1977318f53663d2ebf6d9dd5da75c7d1605dd9","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":31288958,"name":"vault","full_name":"hashicorp/vault","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/vault","description":"A tool for secrets management, encryption as a service, and privileged access management","fork":false,"url":"https://api.github.com/repos/hashicorp/vault","forks_url":"https://api.github.com/repos/hashicorp/vault/forks","keys_url":"https://api.github.com/repos/hashicorp/vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/vault/teams","hooks_url":"https://api.github.com/repos/hashicorp/vault/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/vault/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/vault/events","assignees_url":"https://api.github.com/repos/hashicorp/vault/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/vault/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/vault/tags","blobs_url":"https://api.github.com/repos/hashicorp/vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/vault/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/vault/languages","stargazers_url":"https://api.github.com/repos/hashicorp/vault/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/vault/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/vault/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/vault/subscription","commits_url":"https://api.github.com/repos/hashicorp/vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/vault/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/vault/merges","archive_url":"https://api.github.com/repos/hashicorp/vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/vault/downloads","issues_url":"https://api.github.com/repos/hashicorp/vault/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/vault/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/vault/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/vault/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/vault/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/vault/deployments","created_at":"2015-02-25T00:15:59Z","updated_at":"2018-05-01T12:22:50Z","pushed_at":"2018-04-30T22:01:01Z","git_url":"git://github.com/hashicorp/vault.git","ssh_url":"git@github.com:hashicorp/vault.git","clone_url":"https://github.com/hashicorp/vault.git","svn_url":"https://github.com/hashicorp/vault","homepage":"https://www.vaultproject.io/","size":49578,"stargazers_count":9085,"watchers_count":9085,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1337,"mirror_url":null,"archived":false,"open_issues_count":248,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":1337,"open_issues":248,"watchers":9085,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"9ac9e088ba7376080d22d165b51a3fcad3ef6165","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":31288958,"name":"vault","full_name":"hashicorp/vault","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars2.githubusercontent.com/u/761456?v=4","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/vault","description":"A tool for secrets management, encryption as a service, and privileged access management","fork":false,"url":"https://api.github.com/repos/hashicorp/vault","forks_url":"https://api.github.com/repos/hashicorp/vault/forks","keys_url":"https://api.github.com/repos/hashicorp/vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/vault/teams","hooks_url":"https://api.github.com/repos/hashicorp/vault/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/vault/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/vault/events","assignees_url":"https://api.github.com/repos/hashicorp/vault/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/vault/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/vault/tags","blobs_url":"https://api.github.com/repos/hashicorp/vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/vault/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/vault/languages","stargazers_url":"https://api.github.com/repos/hashicorp/vault/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/vault/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/vault/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/vault/subscription","commits_url":"https://api.github.com/repos/hashicorp/vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/vault/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/vault/merges","archive_url":"https://api.github.com/repos/hashicorp/vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/vault/downloads","issues_url":"https://api.github.com/repos/hashicorp/vault/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/vault/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/vault/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/vault/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/vault/releases{/id}","deployments_url":"https://api.github.com/repos/hashicorp/vault/deployments","created_at":"2015-02-25T00:15:59Z","updated_at":"2018-05-01T12:22:50Z","pushed_at":"2018-04-30T22:01:01Z","git_url":"git://github.com/hashicorp/vault.git","ssh_url":"git@github.com:hashicorp/vault.git","clone_url":"https://github.com/hashicorp/vault.git","svn_url":"https://github.com/hashicorp/vault","homepage":"https://www.vaultproject.io/","size":49578,"stargazers_count":9085,"watchers_count":9085,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1337,"mirror_url":null,"archived":false,"open_issues_count":248,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0"},"forks":1337,"open_issues":248,"watchers":9085,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/4478"},"html":{"href":"https://github.com/hashicorp/vault/pull/4478"},"issue":{"href":"https://api.github.com/repos/hashicorp/vault/issues/4478"},"comments":{"href":"https://api.github.com/repos/hashicorp/vault/issues/4478/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/4478/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/vault/pulls/4478/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/vault/statuses/6c1977318f53663d2ebf6d9dd5da75c7d1605dd9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"chrishoffman"}}