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

Fixed wazuh-passwords-tool.sh so it doesn't remove the password in kibana.yml [master] #930

Merged
merged 10 commits into from
Nov 8, 2021

Conversation

verdx
Copy link
Contributor

@verdx verdx commented Oct 15, 2021

Related issue
#920

Description

I have changed wazuh-passwords-tool.sh so that it only changes the kibana.yml elasticsearch password if the user or one of the users changed is kibanaserver

Logs example

kibana_passwords

Tests

Checked on CentOS 7 and Ubuntu 18

@verdx verdx self-assigned this Oct 15, 2021
@verdx verdx requested review from alberpilot and DFolchA October 15, 2021 18:14
@verdx verdx marked this pull request as ready for review October 15, 2021 18:14
@@ -275,7 +275,7 @@ changePassword() {
restartService "filebeat"
fi

if [ -n "${haskibana}" ]; then
if [[ -n "${haskibana}" ]] && [[ -n "${kibpass}" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an error in the provided log related to this line, please fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kibana_fix_wazuh_user_bug
kibanaserver_password_change
kibana_change_all

Here are the updated logs, I also had to fix a previous error that impeded kibana's password being changed. The error was the changing of kibana password was inside an if statement only entered when the wazuh password or all of them were changed. I have taken it out and created a similar if statement for when the kibana password is changed

Copy link
Contributor

@DFolchA DFolchA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LFTM

Copy link
Contributor

@okynos okynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@verdx verdx changed the title Fixed wazuh-passwords-tool.sh so it dowsn't remove the password in kibana.yml Fixed wazuh-passwords-tool.sh so it doesn't remove the password in kibana.yml Oct 22, 2021
@verdx verdx changed the title Fixed wazuh-passwords-tool.sh so it doesn't remove the password in kibana.yml Fixed wazuh-passwords-tool.sh so it doesn't remove the password in kibana.yml [master] Oct 26, 2021
Copy link
Contributor

@alberpilot alberpilot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alberpilot alberpilot merged commit 324ab9e into master Nov 8, 2021
@alberpilot alberpilot deleted the 920-password-kibana-master branch November 8, 2021 12:08
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.

4 participants