Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option in configuration to force the use of authd #43

Merged
merged 2 commits into from
Dec 20, 2017

Conversation

mgmacias95
Copy link
Contributor

Hello,

In this PR I've added an new option in API configuration (config.js file): force the use of authd to add and remove agents.

# /var/ossec/bin/ossec-control status
ossec-monitord is running...
ossec-logcollector is running...
ossec-remoted is running...
ossec-syscheckd is running...
ossec-analysisd is running...
ossec-maild not running...
ossec-execd is running...
wazuh-modulesd is running...
wazuh-clusterd not running...
# curl -u foo:bar -XPUT "localhost:55000/agents/forcetest?pretty"
{
   "error": 1725,
   "message": "Ossec authd is not running."
}
# curl -u foo:bar -XDELETE "localhost:55000/agents/002?pretty"
{
   "error": 0,
   "data": {
      "msg": "Some agents were not removed",
      "ids": [
         {
            "id": "002",
            "error": {
               "message": "Ossec authd is not running.",
               "code": 1725
            }
         }
      ]
   }
}
# /var/ossec/bin/ossec-control enable auth
# /var/ossec/bin/ossec-control restart
Killing ossec-monitord ..
Killing ossec-logcollector ..
Killing ossec-remoted ..
Killing ossec-syscheckd ..
Killing ossec-analysisd ..
ossec-maild not running ..
Killing ossec-execd ..
Killing wazuh-modulesd ..
wazuh-clusterd not running ..
ossec-authd not running ..
Wazuh v3.1.0-alpha1 Stopped
Starting Wazuh v3.1.0-alpha1 (maintained by Wazuh Inc.)...
Started ossec-authd...
Started wazuh-clusterd...
Started wazuh-modulesd...
Started ossec-execd...
Started ossec-analysisd...
Started ossec-logcollector...
Started ossec-remoted...
Started ossec-syscheckd...
Started ossec-monitord...
Completed.
# curl -u foo:bar -XPUT "localhost:55000/agents/forcetest?pretty"
{
   "error": 0,
   "data": "003"
}
# curl -u foo:bar -XDELETE "localhost:55000/agents/002?pretty"
{
   "error": 0,
   "data": {
      "msg": "All selected agents were removed"
   }
}

Best regards,
Marta

@mgmacias95 mgmacias95 merged commit c735894 into master Dec 20, 2017
@mgmacias95 mgmacias95 deleted the dev-force_authd_api branch December 20, 2017 23:38
vikman90 pushed a commit that referenced this pull request Jan 15, 2018
vikman90 pushed a commit that referenced this pull request Jan 15, 2018
vikman90 pushed a commit that referenced this pull request Jan 15, 2018
vikman90 pushed a commit that referenced this pull request Jan 15, 2018
… in _load_info_from_agent_db method : references #43
vikman90 pushed a commit that referenced this pull request Jan 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant