{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/45783629","id":45783629,"diff_hunk":"@@ -0,0 +1,32 @@\n+/*\n+Copyright 2015 The Kubernetes Authors All rights reserved.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package api\n+\n+import (\n+\t\"k8s.io/kubernetes/pkg/runtime\"\n+)\n+\n+// Scheme is the default instance of runtime.Scheme to which types in the abac API group are registered.\n+var Scheme = runtime.NewScheme()\n+\n+func init() {\n+\tScheme.AddKnownTypes(\"abac.authz.kubernetes.io/\",","path":"pkg/auth/authorizer/abac/api/register.go","position":27,"original_position":27,"commit_id":"8a60d2279e8a83fca4cc7da44bd0ed07dc54d54b","original_commit_id":"8a60d2279e8a83fca4cc7da44bd0ed07dc54d54b","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"why `authz` instead of `authorization`?","created_at":"2015-11-24T19:38:17Z","updated_at":"2015-11-24T19:38:17Z","html_url":"https://github.com/kubernetes/kubernetes/pull/16148#discussion_r45783629","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/45783629"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16148#discussion_r45783629"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148","id":48546424,"html_url":"https://github.com/kubernetes/kubernetes/pull/16148","diff_url":"https://github.com/kubernetes/kubernetes/pull/16148.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/16148.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16148","number":16148,"state":"open","locked":false,"title":"Add non-resource-request support to ABAC, fix kubectl for namespaced users","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"body":"Rebased and built on https://github.com/kubernetes/kubernetes/issues/13667\r\n\r\n- authorizer.Attributes\r\n  - Added attribute indicating whether the request was for a resource (`IsResourceRequest`)\r\n  - Added attribute containing the request path (can be used in combination with `IsResourceRequest` to authorize non-resource requests to paths like `/swaggerapi`, or `/apis` or `/healthz`, etc)\r\n- ABAC policy\r\n  - Added support for matching on API groups attribute\r\n  - Added support for matching non-resource requests (fixes #13097)\r\n  - Added line number and context to load errors\r\n  - Ignore empty and comment lines\r\n  - Converted to versioned resources (similar to scheduler policy objects) (fixes #15117)\r\n  - In \"abac.authz.kubernetes.io/v1\", explicitly require `\"user\":\"*\"` or `\"namespace\":\"*\"` or `\"resource\":\"*\"` or `\"resourceGroup\":\"*\"` to match all (deny by default, rather than grant by default)\r\n  - Defined a \"abac.authz.kubernetes.io/v0\" version for ABAC policy rule objects with conversions to \"abac.authz.kubernetes.io/v1\" preserving current behavior (preserved all ABAC tests as well)","created_at":"2015-10-23T06:32:48Z","updated_at":"2015-11-24T19:38:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afb0e9971b55b530f592a377dfdf76ab41dcd56c","assignee":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/16148/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/8a60d2279e8a83fca4cc7da44bd0ed07dc54d54b","head":{"label":"liggitt:mkulke-fix_kubectl_for_namespaced_users","ref":"mkulke-fix_kubectl_for_namespaced_users","sha":"8a60d2279e8a83fca4cc7da44bd0ed07dc54d54b","user":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"repo":{"id":22823654,"name":"kubernetes","full_name":"liggitt/kubernetes","owner":{"login":"liggitt","id":980082,"avatar_url":"https://avatars.githubusercontent.com/u/980082?v=3","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/liggitt/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/liggitt/kubernetes","forks_url":"https://api.github.com/repos/liggitt/kubernetes/forks","keys_url":"https://api.github.com/repos/liggitt/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liggitt/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liggitt/kubernetes/teams","hooks_url":"https://api.github.com/repos/liggitt/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/liggitt/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/liggitt/kubernetes/events","assignees_url":"https://api.github.com/repos/liggitt/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/liggitt/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/liggitt/kubernetes/tags","blobs_url":"https://api.github.com/repos/liggitt/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liggitt/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liggitt/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/liggitt/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liggitt/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/liggitt/kubernetes/languages","stargazers_url":"https://api.github.com/repos/liggitt/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/liggitt/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/liggitt/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/liggitt/kubernetes/subscription","commits_url":"https://api.github.com/repos/liggitt/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/liggitt/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/liggitt/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/liggitt/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/liggitt/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/liggitt/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liggitt/kubernetes/merges","archive_url":"https://api.github.com/repos/liggitt/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liggitt/kubernetes/downloads","issues_url":"https://api.github.com/repos/liggitt/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/liggitt/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/liggitt/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/liggitt/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liggitt/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/liggitt/kubernetes/releases{/id}","created_at":"2014-08-11T01:56:03Z","updated_at":"2015-05-08T17:59:39Z","pushed_at":"2015-11-24T19:31:04Z","git_url":"git://github.com/liggitt/kubernetes.git","ssh_url":"git@github.com:liggitt/kubernetes.git","clone_url":"https://github.com/liggitt/kubernetes.git","svn_url":"https://github.com/liggitt/kubernetes","homepage":null,"size":135551,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"kubernetes:master","ref":"master","sha":"2ddc61e941086d82ac006519bd096d5c2a8ba89a","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-11-24T17:51:20Z","pushed_at":"2015-11-24T19:32:20Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":289928,"stargazers_count":11418,"watchers_count":11418,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3047,"mirror_url":null,"open_issues_count":2396,"forks":3047,"open_issues":2396,"watchers":11418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/16148"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16148"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/16148/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/16148/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/8a60d2279e8a83fca4cc7da44bd0ed07dc54d54b"}}}}