{"action":"closed","number":1594,"pull_request":{"url":"https://api.github.com/repos/ossec/ossec-hids/pulls/1594","id":237915126,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3OTE1MTI2","html_url":"https://github.com/ossec/ossec-hids/pull/1594","diff_url":"https://github.com/ossec/ossec-hids/pull/1594.diff","patch_url":"https://github.com/ossec/ossec-hids/pull/1594.patch","issue_url":"https://api.github.com/repos/ossec/ossec-hids/issues/1594","number":1594,"state":"closed","locked":false,"title":"Allow reuse ID and improve search algorithm finding available ID key","user":{"login":"nhatking16591","id":19186226,"node_id":"MDQ6VXNlcjE5MTg2MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/19186226?v=4","gravatar_id":"","url":"https://api.github.com/users/nhatking16591","html_url":"https://github.com/nhatking16591","followers_url":"https://api.github.com/users/nhatking16591/followers","following_url":"https://api.github.com/users/nhatking16591/following{/other_user}","gists_url":"https://api.github.com/users/nhatking16591/gists{/gist_id}","starred_url":"https://api.github.com/users/nhatking16591/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhatking16591/subscriptions","organizations_url":"https://api.github.com/users/nhatking16591/orgs","repos_url":"https://api.github.com/users/nhatking16591/repos","events_url":"https://api.github.com/users/nhatking16591/events{/privacy}","received_events_url":"https://api.github.com/users/nhatking16591/received_events","type":"User","site_admin":false},"body":"**Problem:**\r\n- Currently ossec doesn't support reuse ID for client key .\r\n   - Even-though if i try to remove completely client key manually( remove from client.keys), current algorithm still can not found correct available ID as it work correctly only incase of IDs have an ordering.\r\n   - This problem makes the number of ID keeps increase and when ID = MAX_AGENTS + AUTHD_FIRST_ID we can't register a new agent and have to rebuild ossec with higher MAXAGENTS.\r\n- Take so much time for searching an available ID\r\nOssec use \"Dichotomic search\", we have to loop into all client.keys file each times check for ID exist (O (nlogn).\r\n\r\n**Solution:**\r\n- Support reuse ID \r\n- Create BitMap to store every ID already allocated, and we only need to loop in entire of client key in 2 times. So this solution have complexity O(n) instead of O(nlogn) as previous version.\r\n\r\n**Test:**\r\nAlready did a patch for ossec-hids 3.0.0 and did testing in my system everything working ok.","created_at":"2018-12-12T05:15:21Z","updated_at":"2018-12-15T15:56:29Z","closed_at":"2018-12-15T15:56:29Z","merged_at":"2018-12-15T15:56:29Z","merge_commit_sha":"8302afc64f459f070585c452696edea45b47c350","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ossec/ossec-hids/pulls/1594/commits","review_comments_url":"https://api.github.com/repos/ossec/ossec-hids/pulls/1594/comments","review_comment_url":"https://api.github.com/repos/ossec/ossec-hids/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ossec/ossec-hids/issues/1594/comments","statuses_url":"https://api.github.com/repos/ossec/ossec-hids/statuses/f1fda99c794b5833bf94f6066a5ba1d6c5e14182","head":{"label":"nhatking16591:reuse-id","ref":"reuse-id","sha":"f1fda99c794b5833bf94f6066a5ba1d6c5e14182","user":{"login":"nhatking16591","id":19186226,"node_id":"MDQ6VXNlcjE5MTg2MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/19186226?v=4","gravatar_id":"","url":"https://api.github.com/users/nhatking16591","html_url":"https://github.com/nhatking16591","followers_url":"https://api.github.com/users/nhatking16591/followers","following_url":"https://api.github.com/users/nhatking16591/following{/other_user}","gists_url":"https://api.github.com/users/nhatking16591/gists{/gist_id}","starred_url":"https://api.github.com/users/nhatking16591/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhatking16591/subscriptions","organizations_url":"https://api.github.com/users/nhatking16591/orgs","repos_url":"https://api.github.com/users/nhatking16591/repos","events_url":"https://api.github.com/users/nhatking16591/events{/privacy}","received_events_url":"https://api.github.com/users/nhatking16591/received_events","type":"User","site_admin":false},"repo":{"id":125326233,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUzMjYyMzM=","name":"ossec-hids","full_name":"nhatking16591/ossec-hids","private":false,"owner":{"login":"nhatking16591","id":19186226,"node_id":"MDQ6VXNlcjE5MTg2MjI2","avatar_url":"https://avatars1.githubusercontent.com/u/19186226?v=4","gravatar_id":"","url":"https://api.github.com/users/nhatking16591","html_url":"https://github.com/nhatking16591","followers_url":"https://api.github.com/users/nhatking16591/followers","following_url":"https://api.github.com/users/nhatking16591/following{/other_user}","gists_url":"https://api.github.com/users/nhatking16591/gists{/gist_id}","starred_url":"https://api.github.com/users/nhatking16591/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhatking16591/subscriptions","organizations_url":"https://api.github.com/users/nhatking16591/orgs","repos_url":"https://api.github.com/users/nhatking16591/repos","events_url":"https://api.github.com/users/nhatking16591/events{/privacy}","received_events_url":"https://api.github.com/users/nhatking16591/received_events","type":"User","site_admin":false},"html_url":"https://github.com/nhatking16591/ossec-hids","description":"OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.","fork":true,"url":"https://api.github.com/repos/nhatking16591/ossec-hids","forks_url":"https://api.github.com/repos/nhatking16591/ossec-hids/forks","keys_url":"https://api.github.com/repos/nhatking16591/ossec-hids/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nhatking16591/ossec-hids/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nhatking16591/ossec-hids/teams","hooks_url":"https://api.github.com/repos/nhatking16591/ossec-hids/hooks","issue_events_url":"https://api.github.com/repos/nhatking16591/ossec-hids/issues/events{/number}","events_url":"https://api.github.com/repos/nhatking16591/ossec-hids/events","assignees_url":"https://api.github.com/repos/nhatking16591/ossec-hids/assignees{/user}","branches_url":"https://api.github.com/repos/nhatking16591/ossec-hids/branches{/branch}","tags_url":"https://api.github.com/repos/nhatking16591/ossec-hids/tags","blobs_url":"https://api.github.com/repos/nhatking16591/ossec-hids/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nhatking16591/ossec-hids/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nhatking16591/ossec-hids/git/refs{/sha}","trees_url":"https://api.github.com/repos/nhatking16591/ossec-hids/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nhatking16591/ossec-hids/statuses/{sha}","languages_url":"https://api.github.com/repos/nhatking16591/ossec-hids/languages","stargazers_url":"https://api.github.com/repos/nhatking16591/ossec-hids/stargazers","contributors_url":"https://api.github.com/repos/nhatking16591/ossec-hids/contributors","subscribers_url":"https://api.github.com/repos/nhatking16591/ossec-hids/subscribers","subscription_url":"https://api.github.com/repos/nhatking16591/ossec-hids/subscription","commits_url":"https://api.github.com/repos/nhatking16591/ossec-hids/commits{/sha}","git_commits_url":"https://api.github.com/repos/nhatking16591/ossec-hids/git/commits{/sha}","comments_url":"https://api.github.com/repos/nhatking16591/ossec-hids/comments{/number}","issue_comment_url":"https://api.github.com/repos/nhatking16591/ossec-hids/issues/comments{/number}","contents_url":"https://api.github.com/repos/nhatking16591/ossec-hids/contents/{+path}","compare_url":"https://api.github.com/repos/nhatking16591/ossec-hids/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nhatking16591/ossec-hids/merges","archive_url":"https://api.github.com/repos/nhatking16591/ossec-hids/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nhatking16591/ossec-hids/downloads","issues_url":"https://api.github.com/repos/nhatking16591/ossec-hids/issues{/number}","pulls_url":"https://api.github.com/repos/nhatking16591/ossec-hids/pulls{/number}","milestones_url":"https://api.github.com/repos/nhatking16591/ossec-hids/milestones{/number}","notifications_url":"https://api.github.com/repos/nhatking16591/ossec-hids/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nhatking16591/ossec-hids/labels{/name}","releases_url":"https://api.github.com/repos/nhatking16591/ossec-hids/releases{/id}","deployments_url":"https://api.github.com/repos/nhatking16591/ossec-hids/deployments","created_at":"2018-03-15T07:05:14Z","updated_at":"2018-03-15T07:05:18Z","pushed_at":"2018-12-12T04:10:03Z","git_url":"git://github.com/nhatking16591/ossec-hids.git","ssh_url":"git@github.com:nhatking16591/ossec-hids.git","clone_url":"https://github.com/nhatking16591/ossec-hids.git","svn_url":"https://github.com/nhatking16591/ossec-hids","homepage":"http://ossec.github.io","size":16131,"stargazers_count":0,"watchers_count":0,"language":"C","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":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ossec:master","ref":"master","sha":"814b47c1c91fb6ee84244860fe09d9405f017fec","user":{"login":"ossec","id":5479983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Nzk5ODM=","avatar_url":"https://avatars3.githubusercontent.com/u/5479983?v=4","gravatar_id":"","url":"https://api.github.com/users/ossec","html_url":"https://github.com/ossec","followers_url":"https://api.github.com/users/ossec/followers","following_url":"https://api.github.com/users/ossec/following{/other_user}","gists_url":"https://api.github.com/users/ossec/gists{/gist_id}","starred_url":"https://api.github.com/users/ossec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ossec/subscriptions","organizations_url":"https://api.github.com/users/ossec/orgs","repos_url":"https://api.github.com/users/ossec/repos","events_url":"https://api.github.com/users/ossec/events{/privacy}","received_events_url":"https://api.github.com/users/ossec/received_events","type":"Organization","site_admin":false},"repo":{"id":12901559,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkwMTU1OQ==","name":"ossec-hids","full_name":"ossec/ossec-hids","private":false,"owner":{"login":"ossec","id":5479983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Nzk5ODM=","avatar_url":"https://avatars3.githubusercontent.com/u/5479983?v=4","gravatar_id":"","url":"https://api.github.com/users/ossec","html_url":"https://github.com/ossec","followers_url":"https://api.github.com/users/ossec/followers","following_url":"https://api.github.com/users/ossec/following{/other_user}","gists_url":"https://api.github.com/users/ossec/gists{/gist_id}","starred_url":"https://api.github.com/users/ossec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ossec/subscriptions","organizations_url":"https://api.github.com/users/ossec/orgs","repos_url":"https://api.github.com/users/ossec/repos","events_url":"https://api.github.com/users/ossec/events{/privacy}","received_events_url":"https://api.github.com/users/ossec/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ossec/ossec-hids","description":"OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.","fork":false,"url":"https://api.github.com/repos/ossec/ossec-hids","forks_url":"https://api.github.com/repos/ossec/ossec-hids/forks","keys_url":"https://api.github.com/repos/ossec/ossec-hids/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ossec/ossec-hids/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ossec/ossec-hids/teams","hooks_url":"https://api.github.com/repos/ossec/ossec-hids/hooks","issue_events_url":"https://api.github.com/repos/ossec/ossec-hids/issues/events{/number}","events_url":"https://api.github.com/repos/ossec/ossec-hids/events","assignees_url":"https://api.github.com/repos/ossec/ossec-hids/assignees{/user}","branches_url":"https://api.github.com/repos/ossec/ossec-hids/branches{/branch}","tags_url":"https://api.github.com/repos/ossec/ossec-hids/tags","blobs_url":"https://api.github.com/repos/ossec/ossec-hids/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ossec/ossec-hids/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ossec/ossec-hids/git/refs{/sha}","trees_url":"https://api.github.com/repos/ossec/ossec-hids/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ossec/ossec-hids/statuses/{sha}","languages_url":"https://api.github.com/repos/ossec/ossec-hids/languages","stargazers_url":"https://api.github.com/repos/ossec/ossec-hids/stargazers","contributors_url":"https://api.github.com/repos/ossec/ossec-hids/contributors","subscribers_url":"https://api.github.com/repos/ossec/ossec-hids/subscribers","subscription_url":"https://api.github.com/repos/ossec/ossec-hids/subscription","commits_url":"https://api.github.com/repos/ossec/ossec-hids/commits{/sha}","git_commits_url":"https://api.github.com/repos/ossec/ossec-hids/git/commits{/sha}","comments_url":"https://api.github.com/repos/ossec/ossec-hids/comments{/number}","issue_comment_url":"https://api.github.com/repos/ossec/ossec-hids/issues/comments{/number}","contents_url":"https://api.github.com/repos/ossec/ossec-hids/contents/{+path}","compare_url":"https://api.github.com/repos/ossec/ossec-hids/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ossec/ossec-hids/merges","archive_url":"https://api.github.com/repos/ossec/ossec-hids/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ossec/ossec-hids/downloads","issues_url":"https://api.github.com/repos/ossec/ossec-hids/issues{/number}","pulls_url":"https://api.github.com/repos/ossec/ossec-hids/pulls{/number}","milestones_url":"https://api.github.com/repos/ossec/ossec-hids/milestones{/number}","notifications_url":"https://api.github.com/repos/ossec/ossec-hids/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ossec/ossec-hids/labels{/name}","releases_url":"https://api.github.com/repos/ossec/ossec-hids/releases{/id}","deployments_url":"https://api.github.com/repos/ossec/ossec-hids/deployments","created_at":"2013-09-17T17:07:58Z","updated_at":"2018-12-15T15:54:33Z","pushed_at":"2018-12-15T15:56:29Z","git_url":"git://github.com/ossec/ossec-hids.git","ssh_url":"git@github.com:ossec/ossec-hids.git","clone_url":"https://github.com/ossec/ossec-hids.git","svn_url":"https://github.com/ossec/ossec-hids","homepage":"http://ossec.github.io","size":16338,"stargazers_count":2400,"watchers_count":2400,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":698,"mirror_url":null,"archived":false,"open_issues_count":218,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":698,"open_issues":218,"watchers":2400,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ossec/ossec-hids/pulls/1594"},"html":{"href":"https://github.com/ossec/ossec-hids/pull/1594"},"issue":{"href":"https://api.github.com/repos/ossec/ossec-hids/issues/1594"},"comments":{"href":"https://api.github.com/repos/ossec/ossec-hids/issues/1594/comments"},"review_comments":{"href":"https://api.github.com/repos/ossec/ossec-hids/pulls/1594/comments"},"review_comment":{"href":"https://api.github.com/repos/ossec/ossec-hids/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ossec/ossec-hids/pulls/1594/commits"},"statuses":{"href":"https://api.github.com/repos/ossec/ossec-hids/statuses/f1fda99c794b5833bf94f6066a5ba1d6c5e14182"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"atomicturtle","id":4910547,"node_id":"MDQ6VXNlcjQ5MTA1NDc=","avatar_url":"https://avatars1.githubusercontent.com/u/4910547?v=4","gravatar_id":"","url":"https://api.github.com/users/atomicturtle","html_url":"https://github.com/atomicturtle","followers_url":"https://api.github.com/users/atomicturtle/followers","following_url":"https://api.github.com/users/atomicturtle/following{/other_user}","gists_url":"https://api.github.com/users/atomicturtle/gists{/gist_id}","starred_url":"https://api.github.com/users/atomicturtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomicturtle/subscriptions","organizations_url":"https://api.github.com/users/atomicturtle/orgs","repos_url":"https://api.github.com/users/atomicturtle/repos","events_url":"https://api.github.com/users/atomicturtle/events{/privacy}","received_events_url":"https://api.github.com/users/atomicturtle/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":70,"deletions":23,"changed_files":2}}
{"actor":{"display_login":"atomicturtle"}}