{"action":"created","comment":{"url":"https://api.github.com/repos/munkireport/munkireport-php/pulls/comments/171368542","pull_request_review_id":100208793,"id":171368542,"diff_hunk":"@@ -774,6 +774,24 @@\n \t*/\n \t$conf['mysql_create_tbl_opts'] = 'ENGINE=InnoDB DEFAULT CHARSET=utf8';\n \n+        /*\n+        |===============================================\n+        | Whitelist Management Console Access\n+        |===============================================\n+        |\n+        | Whitelisting of IP addresses that can access the management interface \n+        |    (anything except for index.php?/report/ which is always allowed)\n+        |  - You can provide either individual IP addresses (which will have /32 appended automatically)\n+        |      or you can provide CIDR notation. See https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing for reference\n+        |  - You can also provide a custom 403 page for traffic that does not have access to the management interface\n+        |      Default: Value of $conf['webhost'] with 403.html added to the end\n+        |\n+        */\n+        //$conf['manage_ipwhitelist'] = array('xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx/yy');\n+        //$conf['403_unauth'] = 'http://fqdn/403.html';","path":"config_default.php","position":18,"original_position":18,"commit_id":"5cbad196b0c6cd842d78544978408e5e08592451","original_commit_id":"5cbad196b0c6cd842d78544978408e5e08592451","user":{"login":"bochoven","id":1429002,"avatar_url":"https://avatars0.githubusercontent.com/u/1429002?v=4","gravatar_id":"","url":"https://api.github.com/users/bochoven","html_url":"https://github.com/bochoven","followers_url":"https://api.github.com/users/bochoven/followers","following_url":"https://api.github.com/users/bochoven/following{/other_user}","gists_url":"https://api.github.com/users/bochoven/gists{/gist_id}","starred_url":"https://api.github.com/users/bochoven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bochoven/subscriptions","organizations_url":"https://api.github.com/users/bochoven/orgs","repos_url":"https://api.github.com/users/bochoven/repos","events_url":"https://api.github.com/users/bochoven/events{/privacy}","received_events_url":"https://api.github.com/users/bochoven/received_events","type":"User","site_admin":false},"body":"Ok, how about this:\r\n```php\r\n$conf['auth']['network'] = [\r\n    'whitelist_ipv4' => [\r\n        'xxx.xxx.xxx.xxx',\r\n        'xxx.xxx.xxx.xxx',\r\n    ],\r\n    'redirect_unauthorized' => 'http://fqdn/403.html',\r\n]\r\n```\r\nWhere `redirect_unauthorized` is optional and defaults to the built-in 403 page\r\n","created_at":"2018-02-28T20:03:08Z","updated_at":"2018-02-28T20:03:09Z","html_url":"https://github.com/munkireport/munkireport-php/pull/990#discussion_r171368542","pull_request_url":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/munkireport/munkireport-php/pulls/comments/171368542"},"html":{"href":"https://github.com/munkireport/munkireport-php/pull/990#discussion_r171368542"},"pull_request":{"href":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990"}},"in_reply_to_id":171320904},"pull_request":{"url":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990","id":170881704,"html_url":"https://github.com/munkireport/munkireport-php/pull/990","diff_url":"https://github.com/munkireport/munkireport-php/pull/990.diff","patch_url":"https://github.com/munkireport/munkireport-php/pull/990.patch","issue_url":"https://api.github.com/repos/munkireport/munkireport-php/issues/990","number":990,"state":"open","locked":false,"title":"Added support for server-side IP filtering","user":{"login":"danner26","id":8165027,"avatar_url":"https://avatars1.githubusercontent.com/u/8165027?v=4","gravatar_id":"","url":"https://api.github.com/users/danner26","html_url":"https://github.com/danner26","followers_url":"https://api.github.com/users/danner26/followers","following_url":"https://api.github.com/users/danner26/following{/other_user}","gists_url":"https://api.github.com/users/danner26/gists{/gist_id}","starred_url":"https://api.github.com/users/danner26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danner26/subscriptions","organizations_url":"https://api.github.com/users/danner26/orgs","repos_url":"https://api.github.com/users/danner26/repos","events_url":"https://api.github.com/users/danner26/events{/privacy}","received_events_url":"https://api.github.com/users/danner26/received_events","type":"User","site_admin":false},"body":"This is in reference to Issue #984 \r\n\r\nBasically this allows for you to disallow traffic to the management console from everywhere except certain IP addresses or CIDR ranges, while still allowing for clients to report to MunkiReport. \r\n\r\nWhen someone tries to access the MR URL, it will check the IP address of the client against the $conf['manage_ipwhitelist'] array of IP's or CIDR addresses.\r\nIf the client is whitelisted, it will let them through. Otherwise it will send them to the 403 page.\r\n\r\nIf the custom 403 page is setup with $conf['403_unauth'] then it will send them to that page. Otherwise it will send them to the webhost with /403.html at the end (the default location for a 403 page.","created_at":"2018-02-22T22:17:12Z","updated_at":"2018-02-28T20:03:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ddfbb22b7eadd1b4ea9cbf975b58c11dd1de43a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":59070093,"url":"https://api.github.com/repos/munkireport/munkireport-php/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":757971373,"url":"https://api.github.com/repos/munkireport/munkireport-php/labels/needs%20changes","name":"needs changes","color":"ffbcbe","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990/commits","review_comments_url":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990/comments","review_comment_url":"https://api.github.com/repos/munkireport/munkireport-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/munkireport/munkireport-php/issues/990/comments","statuses_url":"https://api.github.com/repos/munkireport/munkireport-php/statuses/5cbad196b0c6cd842d78544978408e5e08592451","head":{"label":"danner26:security-cidr-block","ref":"security-cidr-block","sha":"5cbad196b0c6cd842d78544978408e5e08592451","user":{"login":"danner26","id":8165027,"avatar_url":"https://avatars1.githubusercontent.com/u/8165027?v=4","gravatar_id":"","url":"https://api.github.com/users/danner26","html_url":"https://github.com/danner26","followers_url":"https://api.github.com/users/danner26/followers","following_url":"https://api.github.com/users/danner26/following{/other_user}","gists_url":"https://api.github.com/users/danner26/gists{/gist_id}","starred_url":"https://api.github.com/users/danner26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danner26/subscriptions","organizations_url":"https://api.github.com/users/danner26/orgs","repos_url":"https://api.github.com/users/danner26/repos","events_url":"https://api.github.com/users/danner26/events{/privacy}","received_events_url":"https://api.github.com/users/danner26/received_events","type":"User","site_admin":false},"repo":{"id":122392330,"name":"munkireport-php","full_name":"danner26/munkireport-php","owner":{"login":"danner26","id":8165027,"avatar_url":"https://avatars1.githubusercontent.com/u/8165027?v=4","gravatar_id":"","url":"https://api.github.com/users/danner26","html_url":"https://github.com/danner26","followers_url":"https://api.github.com/users/danner26/followers","following_url":"https://api.github.com/users/danner26/following{/other_user}","gists_url":"https://api.github.com/users/danner26/gists{/gist_id}","starred_url":"https://api.github.com/users/danner26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danner26/subscriptions","organizations_url":"https://api.github.com/users/danner26/orgs","repos_url":"https://api.github.com/users/danner26/repos","events_url":"https://api.github.com/users/danner26/events{/privacy}","received_events_url":"https://api.github.com/users/danner26/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danner26/munkireport-php","description":"A reporting tool for munki","fork":true,"url":"https://api.github.com/repos/danner26/munkireport-php","forks_url":"https://api.github.com/repos/danner26/munkireport-php/forks","keys_url":"https://api.github.com/repos/danner26/munkireport-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danner26/munkireport-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danner26/munkireport-php/teams","hooks_url":"https://api.github.com/repos/danner26/munkireport-php/hooks","issue_events_url":"https://api.github.com/repos/danner26/munkireport-php/issues/events{/number}","events_url":"https://api.github.com/repos/danner26/munkireport-php/events","assignees_url":"https://api.github.com/repos/danner26/munkireport-php/assignees{/user}","branches_url":"https://api.github.com/repos/danner26/munkireport-php/branches{/branch}","tags_url":"https://api.github.com/repos/danner26/munkireport-php/tags","blobs_url":"https://api.github.com/repos/danner26/munkireport-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danner26/munkireport-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danner26/munkireport-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/danner26/munkireport-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danner26/munkireport-php/statuses/{sha}","languages_url":"https://api.github.com/repos/danner26/munkireport-php/languages","stargazers_url":"https://api.github.com/repos/danner26/munkireport-php/stargazers","contributors_url":"https://api.github.com/repos/danner26/munkireport-php/contributors","subscribers_url":"https://api.github.com/repos/danner26/munkireport-php/subscribers","subscription_url":"https://api.github.com/repos/danner26/munkireport-php/subscription","commits_url":"https://api.github.com/repos/danner26/munkireport-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/danner26/munkireport-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/danner26/munkireport-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/danner26/munkireport-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/danner26/munkireport-php/contents/{+path}","compare_url":"https://api.github.com/repos/danner26/munkireport-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danner26/munkireport-php/merges","archive_url":"https://api.github.com/repos/danner26/munkireport-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danner26/munkireport-php/downloads","issues_url":"https://api.github.com/repos/danner26/munkireport-php/issues{/number}","pulls_url":"https://api.github.com/repos/danner26/munkireport-php/pulls{/number}","milestones_url":"https://api.github.com/repos/danner26/munkireport-php/milestones{/number}","notifications_url":"https://api.github.com/repos/danner26/munkireport-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danner26/munkireport-php/labels{/name}","releases_url":"https://api.github.com/repos/danner26/munkireport-php/releases{/id}","deployments_url":"https://api.github.com/repos/danner26/munkireport-php/deployments","created_at":"2018-02-21T20:53:49Z","updated_at":"2018-02-21T20:53:52Z","pushed_at":"2018-02-27T19:14:04Z","git_url":"git://github.com/danner26/munkireport-php.git","ssh_url":"git@github.com:danner26/munkireport-php.git","clone_url":"https://github.com/danner26/munkireport-php.git","svn_url":"https://github.com/danner26/munkireport-php","homepage":"http://munkireport.github.io/munkireport-php/","size":10418,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"munkireport:wip","ref":"wip","sha":"46e4d3d0a2821cec5126e9cd35258f99a3e61a08","user":{"login":"munkireport","id":5647483,"avatar_url":"https://avatars1.githubusercontent.com/u/5647483?v=4","gravatar_id":"","url":"https://api.github.com/users/munkireport","html_url":"https://github.com/munkireport","followers_url":"https://api.github.com/users/munkireport/followers","following_url":"https://api.github.com/users/munkireport/following{/other_user}","gists_url":"https://api.github.com/users/munkireport/gists{/gist_id}","starred_url":"https://api.github.com/users/munkireport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munkireport/subscriptions","organizations_url":"https://api.github.com/users/munkireport/orgs","repos_url":"https://api.github.com/users/munkireport/repos","events_url":"https://api.github.com/users/munkireport/events{/privacy}","received_events_url":"https://api.github.com/users/munkireport/received_events","type":"Organization","site_admin":false},"repo":{"id":13271888,"name":"munkireport-php","full_name":"munkireport/munkireport-php","owner":{"login":"munkireport","id":5647483,"avatar_url":"https://avatars1.githubusercontent.com/u/5647483?v=4","gravatar_id":"","url":"https://api.github.com/users/munkireport","html_url":"https://github.com/munkireport","followers_url":"https://api.github.com/users/munkireport/followers","following_url":"https://api.github.com/users/munkireport/following{/other_user}","gists_url":"https://api.github.com/users/munkireport/gists{/gist_id}","starred_url":"https://api.github.com/users/munkireport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munkireport/subscriptions","organizations_url":"https://api.github.com/users/munkireport/orgs","repos_url":"https://api.github.com/users/munkireport/repos","events_url":"https://api.github.com/users/munkireport/events{/privacy}","received_events_url":"https://api.github.com/users/munkireport/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/munkireport/munkireport-php","description":"A reporting tool for munki","fork":false,"url":"https://api.github.com/repos/munkireport/munkireport-php","forks_url":"https://api.github.com/repos/munkireport/munkireport-php/forks","keys_url":"https://api.github.com/repos/munkireport/munkireport-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/munkireport/munkireport-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/munkireport/munkireport-php/teams","hooks_url":"https://api.github.com/repos/munkireport/munkireport-php/hooks","issue_events_url":"https://api.github.com/repos/munkireport/munkireport-php/issues/events{/number}","events_url":"https://api.github.com/repos/munkireport/munkireport-php/events","assignees_url":"https://api.github.com/repos/munkireport/munkireport-php/assignees{/user}","branches_url":"https://api.github.com/repos/munkireport/munkireport-php/branches{/branch}","tags_url":"https://api.github.com/repos/munkireport/munkireport-php/tags","blobs_url":"https://api.github.com/repos/munkireport/munkireport-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/munkireport/munkireport-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/munkireport/munkireport-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/munkireport/munkireport-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/munkireport/munkireport-php/statuses/{sha}","languages_url":"https://api.github.com/repos/munkireport/munkireport-php/languages","stargazers_url":"https://api.github.com/repos/munkireport/munkireport-php/stargazers","contributors_url":"https://api.github.com/repos/munkireport/munkireport-php/contributors","subscribers_url":"https://api.github.com/repos/munkireport/munkireport-php/subscribers","subscription_url":"https://api.github.com/repos/munkireport/munkireport-php/subscription","commits_url":"https://api.github.com/repos/munkireport/munkireport-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/munkireport/munkireport-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/munkireport/munkireport-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/munkireport/munkireport-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/munkireport/munkireport-php/contents/{+path}","compare_url":"https://api.github.com/repos/munkireport/munkireport-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/munkireport/munkireport-php/merges","archive_url":"https://api.github.com/repos/munkireport/munkireport-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/munkireport/munkireport-php/downloads","issues_url":"https://api.github.com/repos/munkireport/munkireport-php/issues{/number}","pulls_url":"https://api.github.com/repos/munkireport/munkireport-php/pulls{/number}","milestones_url":"https://api.github.com/repos/munkireport/munkireport-php/milestones{/number}","notifications_url":"https://api.github.com/repos/munkireport/munkireport-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/munkireport/munkireport-php/labels{/name}","releases_url":"https://api.github.com/repos/munkireport/munkireport-php/releases{/id}","deployments_url":"https://api.github.com/repos/munkireport/munkireport-php/deployments","created_at":"2013-10-02T13:35:23Z","updated_at":"2018-02-22T07:31:47Z","pushed_at":"2018-02-28T19:53:08Z","git_url":"git://github.com/munkireport/munkireport-php.git","ssh_url":"git@github.com:munkireport/munkireport-php.git","clone_url":"https://github.com/munkireport/munkireport-php.git","svn_url":"https://github.com/munkireport/munkireport-php","homepage":"http://munkireport.github.io/munkireport-php/","size":10438,"stargazers_count":213,"watchers_count":213,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"archived":false,"open_issues_count":112,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":96,"open_issues":112,"watchers":213,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990"},"html":{"href":"https://github.com/munkireport/munkireport-php/pull/990"},"issue":{"href":"https://api.github.com/repos/munkireport/munkireport-php/issues/990"},"comments":{"href":"https://api.github.com/repos/munkireport/munkireport-php/issues/990/comments"},"review_comments":{"href":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990/comments"},"review_comment":{"href":"https://api.github.com/repos/munkireport/munkireport-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/munkireport/munkireport-php/pulls/990/commits"},"statuses":{"href":"https://api.github.com/repos/munkireport/munkireport-php/statuses/5cbad196b0c6cd842d78544978408e5e08592451"}},"author_association":"NONE"}}
{"actor":{"display_login":"bochoven"}}