Hi Julio,Thanks for your reply.Below is the wazuh.yml config entries I have, just masked the password entry here :-#-------------------------------- API entries -----------------------------------
#The following configuration is the default structure to define an API entry.
#
#hosts:
# - <id>:
# url: http(s)://<url>
# port: <port>
# username: <username>
# password: <password>
hosts:
- 1513629884013:
url: https://wazuh-manager-master-0.wazuh-cluster
port: 55000
username: wazuh-wui
password: <Password>
run_as: true
Also, attaching the screenshot of successful API connection. I can make Curl request from Kibana to the WAZUH API
bash-4.2$ TOKEN=$(curl -u wazuh-wui:<pass> -k -X GET https://wazuh-manager-master-0.wazuh-cluster:55000/security/user/authenticate?raw=true)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 271 100 271 0 0 565 0 --:--:-- --:--:-- --:--:-- 565
bash-4.2$
bash-4.2$
bash-4.2$ curl -k -X GET https://wazuh-manager-master-0.wazuh-cluster:55000 -H "Authorization: Bearer $TOKEN"
{"data": {"title": "Wazuh API REST", "api_version": "4.0.4", "revision": 40011, "license_name": "GPL 2.0", "license_url": "https://github.com/wazuh/wazuh/blob/4.0/LICENSE", "hostname": "wazuh-manager-master-0", "timestamp": "2021-02-09T15:26:47+0000"}, "error": 0}bash-4.2$
bash-4.2$
bash-4.2$
bash-4.2$ curl -k -X GET https://wazuh-manager-master-0.wazuh-cluster:55000/cluster/local/info -H "Authorization: Bearer $TOKEN"
{"data": {"affected_items": [{"node": "wazuh-manager-master", "cluster": "wazuh", "type": "master"}], "total_affected_items": 1, "total_failed_items": 0, "failed_items": []}, "message": "All selected information was returned", "error": 0}bash-4.2$
bash-4.2$
bash-4.2$
bash-4.2$ curl -k -X GET https://wazuh-manager-master-0.wazuh-cluster:55000/cluster/nodes -H "Authorization: Bearer $TOKEN"
{"data": {"affected_items": [{"name": "wazuh-manager-master", "type": "master", "version": "4.0.4", "ip": "wazuh-manager-master-0.wazuh-cluster.wazuh"}, {"name": "wazuh-manager-worker-0", "type": "worker", "version": "4.0.4", "ip": "10.255.10.54"}, {"name": "wazuh-manager-worker-1", "type": "worker", "version": "4.0.4", "ip": "10.255.10.251"}], "total_affected_items": 3, "total_failed_items": 0, "failed_items": []}, "message": "All selected nodes information was returned", "error": 0}bash-4.2$
But, I always see the error code 500 whenever I load/reload the Wazuh-Kibana App/plugin on Browser and see the response as
message "3000 - Error getting the authorization token: Bad Request" code 3000 statusCode 500
I am stuck at this since last weekend, please suggest a wayout if possible.
Regards,
Gaurav
--
You received this message because you are subscribed to a topic in the Google Groups "Wazuh mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wazuh/qmvjD_sfzdU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wazuh+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/e655963f-ce6c-4b54-b8aa-049b184f3a83n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/81c0df07-cd38-4f3b-8b4b-81734ea344aan%40googlegroups.com.