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

Fix installation assistant API error in single Wazuh manager nodes #1721

Merged
merged 1 commit into from
Jul 4, 2022

Conversation

DFolchA
Copy link
Contributor

@DFolchA DFolchA commented Jul 4, 2022

Related issue

Description

This PR fixes an error where API passwords were not changed in Wazuh manager single-node installation-

Logs example

root@ubuntu:/home/vagrant/repo# ./wazuh-install.sh -ws wazuh-server
04/07/2022 07:37:19 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.5
04/07/2022 07:37:19 INFO: Verbose logging redirected to /var/log/wazuh-install.log
04/07/2022 07:37:26 INFO: --- Dependencies ----
04/07/2022 07:37:26 INFO: Installing apt-transport-https.
04/07/2022 07:37:30 INFO: Wazuh repository added.
04/07/2022 07:37:30 INFO: --- Wazuh server ---
04/07/2022 07:37:30 INFO: Starting the Wazuh manager installation.
04/07/2022 07:38:03 INFO: Wazuh manager installation finished.
04/07/2022 07:38:03 INFO: Starting service wazuh-manager.
04/07/2022 07:38:19 INFO: wazuh-manager service started.
04/07/2022 07:38:19 INFO: Starting Filebeat installation.
04/07/2022 07:38:24 INFO: Filebeat installation finished.
04/07/2022 07:38:25 INFO: Filebeat post-install configuration finished.
04/07/2022 07:38:27 INFO: Starting service filebeat.
04/07/2022 07:38:29 INFO: filebeat service started.
04/07/2022 07:38:29 INFO: Installation finished.
root@ubuntu:/home/vagrant/repo# curl -u "wazuh-wui":"SLg9btH0NXX?t63RAf3iRLV8jnewGInT" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true"
{"title": "Unauthorized", "detail": "Invalid credentials"}
root@ubuntu:/home/vagrant/repo# curl -u "wazuh-wui":"wazuh-wui" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true"
eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ3YXp1aCIsImF1ZCI6IldhenVoIEFQSSBSRVNUIiwibmJmIjoxNjU2OTIxMDEwLCJleHAiOjE2NTY5MjE5MTAsInN1YiI6IndhenVoLXd1aSIsInJ1bl9hcyI6ZmFsc2UsInJiYWNfcm9sZXMiOlsxXSwicmJhY19tb2RlIjoid2hpdGUifQ.AYQHDjg_mDAXotarr1zNii6RUjquBwBvdF7YKAIC6oNlWN6GWKYiIx4ynCZpr5zn6NGKQTqDJUBatIcjI6CHEZcOAArKcnalj8bWXjvFvxpj8fEz9uaFzfrvPVAc_-Ezg-84QhVBpp0OgKjqxdU5niKdTWQx_rQX5lwYtUfWbqasoPPd

Tests

root@ubuntu:/home/vagrant/repo# rm wazuh-install.sh 
root@ubuntu:/home/vagrant/repo# ./builder.sh -i
root@ubuntu:/home/vagrant/repo# ./wazuh-install.sh -ws wazuh-server -o
04/07/2022 07:56:36 INFO: Starting Wazuh installation assistant. Wazuh version: 4.3.5
04/07/2022 07:56:36 INFO: Verbose logging redirected to /var/log/wazuh-install.log
04/07/2022 07:56:37 INFO: --- Removing existing Wazuh installation ---
04/07/2022 07:56:37 INFO: Removing Wazuh manager.
04/07/2022 07:56:43 INFO: Wazuh manager removed.
04/07/2022 07:56:43 INFO: Removing Filebeat.
04/07/2022 07:56:44 INFO: Filebeat removed.
04/07/2022 07:56:44 INFO: Installation cleaned.
04/07/2022 07:56:49 INFO: Wazuh repository added.
04/07/2022 07:56:49 INFO: --- Wazuh server ---
04/07/2022 07:56:49 INFO: Starting the Wazuh manager installation.
04/07/2022 07:57:19 INFO: Wazuh manager installation finished.
04/07/2022 07:57:19 INFO: Starting service wazuh-manager.
04/07/2022 07:57:35 INFO: wazuh-manager service started.
04/07/2022 07:57:35 INFO: Starting Filebeat installation.
04/07/2022 07:57:39 INFO: Filebeat installation finished.
04/07/2022 07:57:39 INFO: Filebeat post-install configuration finished.
04/07/2022 07:57:43 INFO: Starting service filebeat.
04/07/2022 07:57:45 INFO: filebeat service started.
04/07/2022 07:57:45 INFO: Installation finished.
root@ubuntu:/home/vagrant/repo# curl -u "wazuh-wui":"wazuh-wui" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true"
{"title": "Unauthorized", "detail": "Invalid credentials"}
root@ubuntu:/home/vagrant/repo# curl -u "wazuh-wui":"SLg9btH0NXX?t63RAf3iRLV8jnewGInT" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true"
eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ3YXp1aCIsImF1ZCI6IldhenVoIEFQSSBSRVNUIiwibmJmIjoxNjU2OTIxNDk3LCJleHAiOjE2NTY5MjIzOTcsInN1YiI6IndhenVoLXd1aSIsInJ1bl9hcyI6ZmFsc2UsInJiYWNfcm9sZXMiOlsxXSwicmJhY19tb2RlIjoid2hpdGUifQ.AU0enPQ1zk2GFHA5kRLvH8r5NfVJeO3mBgpOPxhGbH9KGpUmr3zzmXrOinal9SzyEBQUVNNF-AJlEntNB_rEvFUQAY1_RlJXQV0VMiR6_G9-Cm-31yyc5eHIwmm_Lnyxd1PuN6pKidozJdsFJ_wxAfigizwRw6t9bhap_cG1BBAuM2Keroot@ubuntu:/home/vagrant/repo# 

@alberpilot alberpilot merged commit 5de626d into 4.3 Jul 4, 2022
@alberpilot alberpilot deleted the install-assiatant-fixes branch July 4, 2022 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants