{"action":"created","comment":{"url":"https://api.github.com/repos/inverse-inc/packetfence/pulls/comments/34427125","id":34427125,"diff_hunk":"@@ -218,6 +218,11 @@ sub authenticate {\n \n     $logger->debug(sub {\"Authenticating '$display_username' from source(s) \".join(', ', map { $_->id } @sources) });\n \n+    # Fetching IP and MAC from Portal Session, as to properly LOG them together with the USERNAME \n+\tmy $portalSession = pf::Portal::Session->new();\n+\tmy $ip = $portalSession->getClientIp();\n+\tmy $mac = $portalSession->getClientMac();","path":"lib/pf/authentication.pm","position":7,"original_position":7,"commit_id":"6c192e0a7fb5690df83f6a4ee1d7cbd330e879fa","original_commit_id":"6c192e0a7fb5690df83f6a4ee1d7cbd330e879fa","user":{"login":"dwlfrth","id":633234,"avatar_url":"https://avatars.githubusercontent.com/u/633234?v=3","gravatar_id":"","url":"https://api.github.com/users/dwlfrth","html_url":"https://github.com/dwlfrth","followers_url":"https://api.github.com/users/dwlfrth/followers","following_url":"https://api.github.com/users/dwlfrth/following{/other_user}","gists_url":"https://api.github.com/users/dwlfrth/gists{/gist_id}","starred_url":"https://api.github.com/users/dwlfrth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwlfrth/subscriptions","organizations_url":"https://api.github.com/users/dwlfrth/orgs","repos_url":"https://api.github.com/users/dwlfrth/repos","events_url":"https://api.github.com/users/dwlfrth/events{/privacy}","received_events_url":"https://api.github.com/users/dwlfrth/received_events","type":"User","site_admin":false},"body":"Indentation is bogus","created_at":"2015-07-12T23:35:13Z","updated_at":"2015-07-12T23:35:13Z","html_url":"https://github.com/inverse-inc/packetfence/pull/751#discussion_r34427125","pull_request_url":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751","_links":{"self":{"href":"https://api.github.com/repos/inverse-inc/packetfence/pulls/comments/34427125"},"html":{"href":"https://github.com/inverse-inc/packetfence/pull/751#discussion_r34427125"},"pull_request":{"href":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751"}}},"pull_request":{"url":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751","id":39752564,"html_url":"https://github.com/inverse-inc/packetfence/pull/751","diff_url":"https://github.com/inverse-inc/packetfence/pull/751.diff","patch_url":"https://github.com/inverse-inc/packetfence/pull/751.patch","issue_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/751","number":751,"state":"open","locked":false,"title":"Added LOGGING of MAC and IP address in addition to the USERNAME, after succesfull authentication","user":{"login":"verzulli","id":6765895,"avatar_url":"https://avatars.githubusercontent.com/u/6765895?v=3","gravatar_id":"","url":"https://api.github.com/users/verzulli","html_url":"https://github.com/verzulli","followers_url":"https://api.github.com/users/verzulli/followers","following_url":"https://api.github.com/users/verzulli/following{/other_user}","gists_url":"https://api.github.com/users/verzulli/gists{/gist_id}","starred_url":"https://api.github.com/users/verzulli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verzulli/subscriptions","organizations_url":"https://api.github.com/users/verzulli/orgs","repos_url":"https://api.github.com/users/verzulli/repos","events_url":"https://api.github.com/users/verzulli/events{/privacy}","received_events_url":"https://api.github.com/users/verzulli/received_events","type":"User","site_admin":false},"body":"I've added three lines of code to fetch IP-address and MAC-address from PortalSession within the authentication.pm module, so to being able to LOG them (IP/MAC) in addition to what is currently logged (USERNAME).\r\nThis is relevent, expecially in \"inline L2\" deployments, as thanks to this it will be very easy to keep an historical mapping between USERNAME<=>MAC address, regardless of the historical data stored in MySQL, thanks to what's reported in LOG-files.\r\nProbably it will be also useful in other \"vlan-enforcement\" deployments.","created_at":"2015-07-11T21:28:04Z","updated_at":"2015-07-12T23:35:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ced01d9560a2fa62e436ad58a00a1f3c504fdfb5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751/commits","review_comments_url":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751/comments","review_comment_url":"https://api.github.com/repos/inverse-inc/packetfence/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/751/comments","statuses_url":"https://api.github.com/repos/inverse-inc/packetfence/statuses/6c192e0a7fb5690df83f6a4ee1d7cbd330e879fa","head":{"label":"verzulli:devel","ref":"devel","sha":"6c192e0a7fb5690df83f6a4ee1d7cbd330e879fa","user":{"login":"verzulli","id":6765895,"avatar_url":"https://avatars.githubusercontent.com/u/6765895?v=3","gravatar_id":"","url":"https://api.github.com/users/verzulli","html_url":"https://github.com/verzulli","followers_url":"https://api.github.com/users/verzulli/followers","following_url":"https://api.github.com/users/verzulli/following{/other_user}","gists_url":"https://api.github.com/users/verzulli/gists{/gist_id}","starred_url":"https://api.github.com/users/verzulli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verzulli/subscriptions","organizations_url":"https://api.github.com/users/verzulli/orgs","repos_url":"https://api.github.com/users/verzulli/repos","events_url":"https://api.github.com/users/verzulli/events{/privacy}","received_events_url":"https://api.github.com/users/verzulli/received_events","type":"User","site_admin":false},"repo":{"id":38925442,"name":"packetfence","full_name":"verzulli/packetfence","owner":{"login":"verzulli","id":6765895,"avatar_url":"https://avatars.githubusercontent.com/u/6765895?v=3","gravatar_id":"","url":"https://api.github.com/users/verzulli","html_url":"https://github.com/verzulli","followers_url":"https://api.github.com/users/verzulli/followers","following_url":"https://api.github.com/users/verzulli/following{/other_user}","gists_url":"https://api.github.com/users/verzulli/gists{/gist_id}","starred_url":"https://api.github.com/users/verzulli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verzulli/subscriptions","organizations_url":"https://api.github.com/users/verzulli/orgs","repos_url":"https://api.github.com/users/verzulli/repos","events_url":"https://api.github.com/users/verzulli/events{/privacy}","received_events_url":"https://api.github.com/users/verzulli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/verzulli/packetfence","description":"PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) solution. Boasting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, powerful guest management options, 802.1X support, layer-2 isolation of problematic devices; PacketFence can be used to effectively secure networks small to very large heterogeneous networks.","fork":true,"url":"https://api.github.com/repos/verzulli/packetfence","forks_url":"https://api.github.com/repos/verzulli/packetfence/forks","keys_url":"https://api.github.com/repos/verzulli/packetfence/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verzulli/packetfence/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verzulli/packetfence/teams","hooks_url":"https://api.github.com/repos/verzulli/packetfence/hooks","issue_events_url":"https://api.github.com/repos/verzulli/packetfence/issues/events{/number}","events_url":"https://api.github.com/repos/verzulli/packetfence/events","assignees_url":"https://api.github.com/repos/verzulli/packetfence/assignees{/user}","branches_url":"https://api.github.com/repos/verzulli/packetfence/branches{/branch}","tags_url":"https://api.github.com/repos/verzulli/packetfence/tags","blobs_url":"https://api.github.com/repos/verzulli/packetfence/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verzulli/packetfence/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verzulli/packetfence/git/refs{/sha}","trees_url":"https://api.github.com/repos/verzulli/packetfence/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verzulli/packetfence/statuses/{sha}","languages_url":"https://api.github.com/repos/verzulli/packetfence/languages","stargazers_url":"https://api.github.com/repos/verzulli/packetfence/stargazers","contributors_url":"https://api.github.com/repos/verzulli/packetfence/contributors","subscribers_url":"https://api.github.com/repos/verzulli/packetfence/subscribers","subscription_url":"https://api.github.com/repos/verzulli/packetfence/subscription","commits_url":"https://api.github.com/repos/verzulli/packetfence/commits{/sha}","git_commits_url":"https://api.github.com/repos/verzulli/packetfence/git/commits{/sha}","comments_url":"https://api.github.com/repos/verzulli/packetfence/comments{/number}","issue_comment_url":"https://api.github.com/repos/verzulli/packetfence/issues/comments{/number}","contents_url":"https://api.github.com/repos/verzulli/packetfence/contents/{+path}","compare_url":"https://api.github.com/repos/verzulli/packetfence/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verzulli/packetfence/merges","archive_url":"https://api.github.com/repos/verzulli/packetfence/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verzulli/packetfence/downloads","issues_url":"https://api.github.com/repos/verzulli/packetfence/issues{/number}","pulls_url":"https://api.github.com/repos/verzulli/packetfence/pulls{/number}","milestones_url":"https://api.github.com/repos/verzulli/packetfence/milestones{/number}","notifications_url":"https://api.github.com/repos/verzulli/packetfence/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verzulli/packetfence/labels{/name}","releases_url":"https://api.github.com/repos/verzulli/packetfence/releases{/id}","created_at":"2015-07-11T12:45:53Z","updated_at":"2015-07-11T12:46:01Z","pushed_at":"2015-07-11T14:33:57Z","git_url":"git://github.com/verzulli/packetfence.git","ssh_url":"git@github.com:verzulli/packetfence.git","clone_url":"https://github.com/verzulli/packetfence.git","svn_url":"https://github.com/verzulli/packetfence","homepage":"http://www.packetfence.org","size":161826,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"inverse-inc:devel","ref":"devel","sha":"cde5f79e2c5329f992b69338f2b9950c753c3d57","user":{"login":"inverse-inc","id":1203154,"avatar_url":"https://avatars.githubusercontent.com/u/1203154?v=3","gravatar_id":"","url":"https://api.github.com/users/inverse-inc","html_url":"https://github.com/inverse-inc","followers_url":"https://api.github.com/users/inverse-inc/followers","following_url":"https://api.github.com/users/inverse-inc/following{/other_user}","gists_url":"https://api.github.com/users/inverse-inc/gists{/gist_id}","starred_url":"https://api.github.com/users/inverse-inc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inverse-inc/subscriptions","organizations_url":"https://api.github.com/users/inverse-inc/orgs","repos_url":"https://api.github.com/users/inverse-inc/repos","events_url":"https://api.github.com/users/inverse-inc/events{/privacy}","received_events_url":"https://api.github.com/users/inverse-inc/received_events","type":"Organization","site_admin":false},"repo":{"id":3595658,"name":"packetfence","full_name":"inverse-inc/packetfence","owner":{"login":"inverse-inc","id":1203154,"avatar_url":"https://avatars.githubusercontent.com/u/1203154?v=3","gravatar_id":"","url":"https://api.github.com/users/inverse-inc","html_url":"https://github.com/inverse-inc","followers_url":"https://api.github.com/users/inverse-inc/followers","following_url":"https://api.github.com/users/inverse-inc/following{/other_user}","gists_url":"https://api.github.com/users/inverse-inc/gists{/gist_id}","starred_url":"https://api.github.com/users/inverse-inc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inverse-inc/subscriptions","organizations_url":"https://api.github.com/users/inverse-inc/orgs","repos_url":"https://api.github.com/users/inverse-inc/repos","events_url":"https://api.github.com/users/inverse-inc/events{/privacy}","received_events_url":"https://api.github.com/users/inverse-inc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inverse-inc/packetfence","description":"PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) solution. Boasting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, powerful guest management options, 802.1X support, layer-2 isolation of problematic devices; PacketFence can be used to effectively secure networks small to very large heterogeneous networks.","fork":false,"url":"https://api.github.com/repos/inverse-inc/packetfence","forks_url":"https://api.github.com/repos/inverse-inc/packetfence/forks","keys_url":"https://api.github.com/repos/inverse-inc/packetfence/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inverse-inc/packetfence/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inverse-inc/packetfence/teams","hooks_url":"https://api.github.com/repos/inverse-inc/packetfence/hooks","issue_events_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/events{/number}","events_url":"https://api.github.com/repos/inverse-inc/packetfence/events","assignees_url":"https://api.github.com/repos/inverse-inc/packetfence/assignees{/user}","branches_url":"https://api.github.com/repos/inverse-inc/packetfence/branches{/branch}","tags_url":"https://api.github.com/repos/inverse-inc/packetfence/tags","blobs_url":"https://api.github.com/repos/inverse-inc/packetfence/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inverse-inc/packetfence/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inverse-inc/packetfence/git/refs{/sha}","trees_url":"https://api.github.com/repos/inverse-inc/packetfence/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inverse-inc/packetfence/statuses/{sha}","languages_url":"https://api.github.com/repos/inverse-inc/packetfence/languages","stargazers_url":"https://api.github.com/repos/inverse-inc/packetfence/stargazers","contributors_url":"https://api.github.com/repos/inverse-inc/packetfence/contributors","subscribers_url":"https://api.github.com/repos/inverse-inc/packetfence/subscribers","subscription_url":"https://api.github.com/repos/inverse-inc/packetfence/subscription","commits_url":"https://api.github.com/repos/inverse-inc/packetfence/commits{/sha}","git_commits_url":"https://api.github.com/repos/inverse-inc/packetfence/git/commits{/sha}","comments_url":"https://api.github.com/repos/inverse-inc/packetfence/comments{/number}","issue_comment_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/comments{/number}","contents_url":"https://api.github.com/repos/inverse-inc/packetfence/contents/{+path}","compare_url":"https://api.github.com/repos/inverse-inc/packetfence/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inverse-inc/packetfence/merges","archive_url":"https://api.github.com/repos/inverse-inc/packetfence/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inverse-inc/packetfence/downloads","issues_url":"https://api.github.com/repos/inverse-inc/packetfence/issues{/number}","pulls_url":"https://api.github.com/repos/inverse-inc/packetfence/pulls{/number}","milestones_url":"https://api.github.com/repos/inverse-inc/packetfence/milestones{/number}","notifications_url":"https://api.github.com/repos/inverse-inc/packetfence/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inverse-inc/packetfence/labels{/name}","releases_url":"https://api.github.com/repos/inverse-inc/packetfence/releases{/id}","created_at":"2012-03-01T20:21:13Z","updated_at":"2015-07-01T15:38:55Z","pushed_at":"2015-07-11T21:28:04Z","git_url":"git://github.com/inverse-inc/packetfence.git","ssh_url":"git@github.com:inverse-inc/packetfence.git","clone_url":"https://github.com/inverse-inc/packetfence.git","svn_url":"https://github.com/inverse-inc/packetfence","homepage":"http://www.packetfence.org","size":161826,"stargazers_count":122,"watchers_count":122,"language":"Perl","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":66,"mirror_url":null,"open_issues_count":133,"forks":66,"open_issues":133,"watchers":122,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751"},"html":{"href":"https://github.com/inverse-inc/packetfence/pull/751"},"issue":{"href":"https://api.github.com/repos/inverse-inc/packetfence/issues/751"},"comments":{"href":"https://api.github.com/repos/inverse-inc/packetfence/issues/751/comments"},"review_comments":{"href":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751/comments"},"review_comment":{"href":"https://api.github.com/repos/inverse-inc/packetfence/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inverse-inc/packetfence/pulls/751/commits"},"statuses":{"href":"https://api.github.com/repos/inverse-inc/packetfence/statuses/6c192e0a7fb5690df83f6a4ee1d7cbd330e879fa"}}}}