{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/comments/38712188","id":38712188,"diff_hunk":"@@ -79,30 +76,73 @@\n   [pattern]\n   (-> pattern (str/lower-case) (str/split #\"\\.\") reverse vec))\n \n-(def allow-all { :auth-type :allow :type :allow-all :qualifier :exact :length nil :pattern [] })\n+(def allow-all {:auth-type :allow\n+                :type :allow-all\n+                :qualifier :exact\n+                :length nil\n+                :pattern []})\n+\n+(def deny-all {:auth-type :deny\n+               :type :regex\n+               :qualifier :exact\n+               :length nil\n+               :pattern #\"^/.*/$\"})","path":"src/puppetlabs/trapperkeeper/authorization/acl.clj","position":44,"original_position":44,"commit_id":"ac481e68f2f195c832ec8eb04b68f2e1b8ba6945","original_commit_id":"ac481e68f2f195c832ec8eb04b68f2e1b8ba6945","user":{"login":"camlow325","id":5652737,"avatar_url":"https://avatars.githubusercontent.com/u/5652737?v=3","gravatar_id":"","url":"https://api.github.com/users/camlow325","html_url":"https://github.com/camlow325","followers_url":"https://api.github.com/users/camlow325/followers","following_url":"https://api.github.com/users/camlow325/following{/other_user}","gists_url":"https://api.github.com/users/camlow325/gists{/gist_id}","starred_url":"https://api.github.com/users/camlow325/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camlow325/subscriptions","organizations_url":"https://api.github.com/users/camlow325/orgs","repos_url":"https://api.github.com/users/camlow325/repos","events_url":"https://api.github.com/users/camlow325/events{/privacy}","received_events_url":"https://api.github.com/users/camlow325/received_events","type":"User","site_admin":false},"body":"I don't think this pattern is correct.  I think we want `#\"^.*$\"` or just `#\"^*$\"`.  With what you have, the `match-name?` function will return `false` when checking to see if this ACE matches a request name except for cases where the name is delimited with a forward-slash and back-slash.  So `/blah/` or just `//` would return `true` for `match-name?` but `blah` would return `false`.  For a wildcard like this, I think we want `match-name?` to return `true` regardless of the value in the name.\r\n\r\nTo validate this in a unit test, for example, try adding an allow ACE to the rule being used the new \"Denied when deny all\" test and note that if the request would end up being allowed if the name were delimited with a forward slash and back slash but denied otherwise.","created_at":"2015-09-04T00:32:35Z","updated_at":"2015-09-04T00:32:35Z","html_url":"https://github.com/puppetlabs/trapperkeeper-authorization/pull/8#discussion_r38712188","pull_request_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/comments/38712188"},"html":{"href":"https://github.com/puppetlabs/trapperkeeper-authorization/pull/8#discussion_r38712188"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8","id":44160997,"html_url":"https://github.com/puppetlabs/trapperkeeper-authorization/pull/8","diff_url":"https://github.com/puppetlabs/trapperkeeper-authorization/pull/8.diff","patch_url":"https://github.com/puppetlabs/trapperkeeper-authorization/pull/8.patch","issue_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/issues/8","number":8,"state":"open","locked":false,"title":"(TK-272) Fix deny \"*\" rules","user":{"login":"dankreek","id":1510128,"avatar_url":"https://avatars.githubusercontent.com/u/1510128?v=3","gravatar_id":"","url":"https://api.github.com/users/dankreek","html_url":"https://github.com/dankreek","followers_url":"https://api.github.com/users/dankreek/followers","following_url":"https://api.github.com/users/dankreek/following{/other_user}","gists_url":"https://api.github.com/users/dankreek/gists{/gist_id}","starred_url":"https://api.github.com/users/dankreek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankreek/subscriptions","organizations_url":"https://api.github.com/users/dankreek/orgs","repos_url":"https://api.github.com/users/dankreek/repos","events_url":"https://api.github.com/users/dankreek/events{/privacy}","received_events_url":"https://api.github.com/users/dankreek/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-03T21:40:21Z","updated_at":"2015-09-04T00:32:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f786ebe8deb27ae45c67f36910bf25b235ccf76b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/issues/8/comments","statuses_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/statuses/ac481e68f2f195c832ec8eb04b68f2e1b8ba6945","head":{"label":"dankreek:TK-272/master/deny-all-broken","ref":"TK-272/master/deny-all-broken","sha":"ac481e68f2f195c832ec8eb04b68f2e1b8ba6945","user":{"login":"dankreek","id":1510128,"avatar_url":"https://avatars.githubusercontent.com/u/1510128?v=3","gravatar_id":"","url":"https://api.github.com/users/dankreek","html_url":"https://github.com/dankreek","followers_url":"https://api.github.com/users/dankreek/followers","following_url":"https://api.github.com/users/dankreek/following{/other_user}","gists_url":"https://api.github.com/users/dankreek/gists{/gist_id}","starred_url":"https://api.github.com/users/dankreek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankreek/subscriptions","organizations_url":"https://api.github.com/users/dankreek/orgs","repos_url":"https://api.github.com/users/dankreek/repos","events_url":"https://api.github.com/users/dankreek/events{/privacy}","received_events_url":"https://api.github.com/users/dankreek/received_events","type":"User","site_admin":false},"repo":{"id":40329454,"name":"trapperkeeper-authorization","full_name":"dankreek/trapperkeeper-authorization","owner":{"login":"dankreek","id":1510128,"avatar_url":"https://avatars.githubusercontent.com/u/1510128?v=3","gravatar_id":"","url":"https://api.github.com/users/dankreek","html_url":"https://github.com/dankreek","followers_url":"https://api.github.com/users/dankreek/followers","following_url":"https://api.github.com/users/dankreek/following{/other_user}","gists_url":"https://api.github.com/users/dankreek/gists{/gist_id}","starred_url":"https://api.github.com/users/dankreek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankreek/subscriptions","organizations_url":"https://api.github.com/users/dankreek/orgs","repos_url":"https://api.github.com/users/dankreek/repos","events_url":"https://api.github.com/users/dankreek/events{/privacy}","received_events_url":"https://api.github.com/users/dankreek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dankreek/trapperkeeper-authorization","description":"Fork of masterzen/trapperkeeper-authorization as a TK service","fork":true,"url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization","forks_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/forks","keys_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/teams","hooks_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/hooks","issue_events_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/issues/events{/number}","events_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/events","assignees_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/assignees{/user}","branches_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/branches{/branch}","tags_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/tags","blobs_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/git/refs{/sha}","trees_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/statuses/{sha}","languages_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/languages","stargazers_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/stargazers","contributors_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/contributors","subscribers_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/subscribers","subscription_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/subscription","commits_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/commits{/sha}","git_commits_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/git/commits{/sha}","comments_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/comments{/number}","issue_comment_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/issues/comments{/number}","contents_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/contents/{+path}","compare_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/merges","archive_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/downloads","issues_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/issues{/number}","pulls_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/pulls{/number}","milestones_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/milestones{/number}","notifications_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/labels{/name}","releases_url":"https://api.github.com/repos/dankreek/trapperkeeper-authorization/releases{/id}","created_at":"2015-08-06T22:20:05Z","updated_at":"2015-08-06T22:20:07Z","pushed_at":"2015-09-03T21:37:43Z","git_url":"git://github.com/dankreek/trapperkeeper-authorization.git","ssh_url":"git@github.com:dankreek/trapperkeeper-authorization.git","clone_url":"https://github.com/dankreek/trapperkeeper-authorization.git","svn_url":"https://github.com/dankreek/trapperkeeper-authorization","homepage":null,"size":124,"stargazers_count":0,"watchers_count":0,"language":"Clojure","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":"puppetlabs:master","ref":"master","sha":"e9cdbcf8e2b88ea85b76ea9e50de493d310c5d1f","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":40329341,"name":"trapperkeeper-authorization","full_name":"puppetlabs/trapperkeeper-authorization","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/trapperkeeper-authorization","description":"Fork of masterzen/trapperkeeper-authorization as a TK service","fork":false,"url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization","forks_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/forks","keys_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/teams","hooks_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/events","assignees_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/tags","blobs_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/subscription","commits_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/merges","archive_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/downloads","issues_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/releases{/id}","created_at":"2015-08-06T22:16:12Z","updated_at":"2015-08-07T18:32:57Z","pushed_at":"2015-09-03T22:44:19Z","git_url":"git://github.com/puppetlabs/trapperkeeper-authorization.git","ssh_url":"git@github.com:puppetlabs/trapperkeeper-authorization.git","clone_url":"https://github.com/puppetlabs/trapperkeeper-authorization.git","svn_url":"https://github.com/puppetlabs/trapperkeeper-authorization","homepage":null,"size":367,"stargazers_count":1,"watchers_count":1,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8"},"html":{"href":"https://github.com/puppetlabs/trapperkeeper-authorization/pull/8"},"issue":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/issues/8"},"comments":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-authorization/statuses/ac481e68f2f195c832ec8eb04b68f2e1b8ba6945"}}}}