Output
{"data": {"affected_items": [{"id": 1, "username": "wazuh", "allow_run_as": true, "roles": [1]}], "total_affected_items": 1, "total_failed_items": 0, "failed_items": []}, "message": "User was successfully updated", "error": 0}_________________________________________
f. curl -k -X PUT "https://192.168.131.201:55000/security/users/2" -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d'g. {h. "password": "SuperS3cretPassword+"i. }'Output
{"data": {"affected_items": [{"id": 2, "username": "wazuh-wui", "allow_run_as": true, "roles": [1]}], "total_affected_items": 1, "total_failed_items": 0, "failed_items": []}, "message": "User was successfully updated", "error": 0}The error you're encountering, 401 Unauthorized, indicates that Filebeat is unable to authenticate with your Elasticsearch server.
This error typically occurs when the credentials used by Filebeat to connect to Elasticsearch are either incorrect or insufficient in terms of permissions.
This can be a security concern, as it suggests that the Filebeat instance cannot properly communicate with Elasticsearch, which may lead to missed logs or incomplete monitoring data.
Troubleshooting Steps:
Ensure that the filebeat.yml configuration file contains the correct username and password for the Elasticsearch output. These credentials must correspond to a user that has sufficient permissions to write to Elasticsearch.
Log into Kibana or use the Elasticsearch API to verify that the user configured in Filebeat has the correct roles and permissions. The user should have the ingest_admin role or a custom role that allows for index creation and data writing.
Example API call to check roles:
curl -u your_elasticsearch_username:your_elasticsearch_password -X GET "https://192.168.131.200:9200/_security/user/your_elasticsearch_username"
Check the Elasticsearch logs for any additional error messages related to authentication or authorization. This can provide more context on why the authentication is failing.
Log location (assuming default installation paths):
Security Implications:
Next Steps:
By addressing this 401 Unauthorized error, you can ensure that your Wazuh installation remains secure and that all logs are properly ingested into Elasticsearch for analysis.
--
You received this message because you are subscribed to the Google Groups "Wazuh | Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/49b1b02c-5369-43ce-baa2-245cdffcfb2en%40googlegroups.com.