-
Notifications
You must be signed in to change notification settings - Fork 97
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
Solve bugs when changing passwords in the manager, indexer and dashboard services #2968
Solve bugs when changing passwords in the manager, indexer and dashboard services #2968
Conversation
In the api users, the filebeat user name has been changed to admin for less confusion. Also added automatic restart of the dashboard when updating the wazuh-wui user.
Change admin user to use only the admin user from the indexer and restart only the dashboard only once time instead of twice when change wazuh-wui and kibanaserver password
PR UpdateWe have found a way to use the indexer admin user in the Password fileThe password file is the same as before, no new users are added Passwords file
Wazuh managerIn order to change the Filebeat password, we indicate it with the user admin instead of Filebeat. TestsOption with username and password
For the Filebeat password it is not necessary to add the credentials of the API admin user. --change-all option
Wazuh dashboardThe change of passwords in the dashboard has been improved. To change API user passwords, the TestsChange password for wazuh-wui with --api option
AIO deploymentNow when changing passwords in AIO, the message also appears when changing the Filebeat password. Tests--change-all option
Option with username and password
|
Description
When changing the passwords for the different services, neither the Filebeat password in the manager nor the wazuh-wui password in the dashboard were updated. Also in the indexer there was a message indicating that there were no API users, which was a bit confusing. The steps to solve this problem have been:
Password file
In order to be able to change the filebeat password in the wazuh-manager, a new user
admin
has been created in the API users section. This user will have the same password as theadmin
user in the indexer section. This provides a way to manage the Filebeat password from the manager.Tests
When generating the passwords we can see how a new API user
admin
is generated with the same password as indexeradmin
user.Wazuh indexer
In the indexer section we had the problem that a message appeared regarding the change of API user passwords:
INFO: Wazuh API admin credentials not provided, Wazuh API passwords not changed.
Which was a bit confusing if the manager was not installed on the machine.Now every time we try to change the indexer passwords without having the manager installed, we won't get the message again.
Tests
Wazuh manager
Regarding the manager, the problem was that when we changed the passwords with the
--changeall
option, the Filebeat password was not changed.Now, a new user has been added to the users section of the API called
Filebeat
. With these changes, if we put this user with his password in the password file, it will be changed correctly in the manager.Also, being a manager user, we can change the Filebeat password with the
--user
and--password
option as well.Tests
When executing the
filebeat test output
command we see that the filebeat password is wrong and therefore we get the errorERROR 401 Unauthorized: Unauthorized
.--changeall
option:If we check the connection again, it reconnects:
--user
and--password
.Wazuh dashboard
With the dashboard we had the problem that we couldn't change the password for
kibanaserver
andwazuh-wui
. Like the server, we can now change the passwords of these with the--changeall
option and also with--user
and--password
.Tests
--changeall
.--user
and--password
.When passwords are changed and the dashboard url is accessed, it works correctly.
All-in-one deployment
Tests have also been done for when there is an AIO.
Tests
If we do it with the right credentials, we can see that it does change:
Everything works correctly with the changes: