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

requestHeadersWhitelist setting needs to be replaced by requestHeadersAllowlist #1969

Closed
alberpilot opened this issue Dec 7, 2022 · 2 comments · Fixed by #1983
Closed

requestHeadersWhitelist setting needs to be replaced by requestHeadersAllowlist #1969

alberpilot opened this issue Dec 7, 2022 · 2 comments · Fixed by #1983
Assignees
Labels

Comments

@alberpilot
Copy link
Contributor

After reviewing the warning message

Dec 07 14:45:54 ip-172-31-92-159 opensearch-dashboards[41195]: {"type":"log","@timestamp":"2022-12-07T14:45:54Z","tags":["warning","config","deprecation"],"pid":41195,"message":"\"opensearch.requestHeadersWhitelist\" is deprecated and has been replaced by \"opensearch.requestHeadersAllowlist\""}

we need to update the default configuration setting and replace requestHeadersWhitelist with requestHeadersAllowlist.

@okynos okynos moved this to Triage in Release 4.4.0 Dec 12, 2022
@okynos okynos moved this from Triage to Todo in Release 4.4.0 Dec 12, 2022
@verdx verdx self-assigned this Dec 14, 2022
@verdx verdx moved this from Todo to In Progress in Release 4.4.0 Dec 14, 2022
@verdx verdx moved this from In Progress to In Review in Release 4.4.0 Dec 14, 2022
@verdx verdx moved this from In Review to In Progress in Release 4.4.0 Dec 14, 2022
@verdx
Copy link
Contributor

verdx commented Dec 15, 2022

Yesterday there were problems with the automatic checks(the comment wasn't sent) related to issue https://github.com/wazuh/wazuh-jenkins/issues/4529. When all tests were fixed or done, the only check left failing is the one seen in issue https://github.com/wazuh/wazuh-jenkins/issues/4507, but its test case is seen in other tests. As well, it has been tested on CentOS 8 locally and the cluster runs correctly:

[vagrant@centos8 unattended_installer]$ sudo bash wazuh-install.sh -a -i
15/12/2022 08:57:28 INFO: Starting Wazuh installation assistant. Wazuh version: 4.4.0
15/12/2022 08:57:28 INFO: Verbose logging redirected to /var/log/wazuh-install.log
15/12/2022 08:57:30 WARNING: Hardware and system checks ignored.
15/12/2022 08:57:34 INFO: Wazuh development repository added.
15/12/2022 08:57:34 INFO: --- Configuration files ---
15/12/2022 08:57:34 INFO: Generating configuration files.
15/12/2022 08:57:35 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
15/12/2022 08:57:35 INFO: --- Wazuh indexer ---
15/12/2022 08:57:35 INFO: Starting Wazuh indexer installation.
15/12/2022 09:08:14 INFO: Wazuh indexer installation finished.
15/12/2022 09:08:14 INFO: Wazuh indexer post-install configuration finished.
15/12/2022 09:08:14 INFO: Starting service wazuh-indexer.
15/12/2022 09:08:39 INFO: wazuh-indexer service started.
15/12/2022 09:08:39 INFO: Initializing Wazuh indexer cluster security settings.
15/12/2022 09:08:49 INFO: Wazuh indexer cluster initialized.
15/12/2022 09:08:49 INFO: --- Wazuh server ---
15/12/2022 09:08:49 INFO: Starting the Wazuh manager installation.
15/12/2022 09:12:18 INFO: Wazuh manager installation finished.
15/12/2022 09:12:18 INFO: Starting service wazuh-manager.
15/12/2022 09:12:34 INFO: wazuh-manager service started.
15/12/2022 09:12:34 INFO: Starting Filebeat installation.
15/12/2022 09:12:56 INFO: Filebeat installation finished.
15/12/2022 09:12:58 INFO: Filebeat post-install configuration finished.
15/12/2022 09:12:58 INFO: Starting service filebeat.
15/12/2022 09:12:59 INFO: filebeat service started.
15/12/2022 09:12:59 INFO: --- Wazuh dashboard ---
15/12/2022 09:12:59 INFO: Starting Wazuh dashboard installation.
15/12/2022 09:17:25 INFO: Wazuh dashboard installation finished.
15/12/2022 09:17:25 INFO: Wazuh dashboard post-install configuration finished.
15/12/2022 09:17:25 INFO: Starting service wazuh-dashboard.
15/12/2022 09:17:25 INFO: wazuh-dashboard service started.
15/12/2022 09:18:00 INFO: Initializing Wazuh dashboard web application.
15/12/2022 09:18:01 INFO: Wazuh dashboard web application initialized.
15/12/2022 09:18:01 INFO: --- Summary ---
15/12/2022 09:18:01 INFO: You can access the web interface https://<wazuh-dashboard-ip>
    User: admin
    Password: p+TaB3aAxg6znra8q6ZVN.ppwh+e.D2L
15/12/2022 09:18:01 INFO: Installation finished.
[vagrant@centos8 unattended_installer]$ ps -xa | grep wazuh-clusterd | grep -v grep
[vagrant@centos8 unattended_installer]$ ps -xa | grep wazuh-clusterd
   9640 pts/0    S+     0:00 grep --color=auto wazuh-clusterd
[vagrant@centos8 unattended_installer]$ 

@verdx
Copy link
Contributor

verdx commented Dec 15, 2022

The last test doesn't really compensate for the failing one, in being an AIO installation. The error shown in the test is:

=================================== FAILURES ===================================
______________________ test_check_wazuh_manager_clusterd _______________________

    @pytest.mark.wazuh_cluster
    def test_check_wazuh_manager_clusterd():
>       assert check_call("ps -xa | grep wazuh-clusterd | grep -v grep", shell=True) != ""

test_unattended.py:178: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

popenargs = ('ps -xa | grep wazuh-clusterd | grep -v grep',)
kwargs = {'shell': True}, retcode = 1
cmd = 'ps -xa | grep wazuh-clusterd | grep -v grep'

    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.
    
        The arguments are the same as for the call function.  Example:
    
        check_call(["ls
-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command 'ps -xa | grep wazuh-clusterd | grep -v grep' returned non-zero exit status 1.

/usr/lib64/python3.6/subprocess.py:311: CalledProcessError
=========================== short test summary info ============================
FAILED test_unattended.py::test_check_wazuh_manager_clusterd - subprocess.Cal...
================== 1 failed, 20 passed, 1 deselected in 9.37s ==================

A new test has been done replaying the pipeline without destroying the machines, and we can see the cluster is correctly running:

[root@ip-172-31-4-23 centos]# /var/ossec/bin/wazuh-control status
wazuh-clusterd is running...
wazuh-modulesd is running...
wazuh-monitord is running...
wazuh-logcollector is running...
wazuh-remoted is running...
wazuh-syscheckd is running...
wazuh-analysisd is running...
wazuh-maild not running...
wazuh-execd is running...
wazuh-db is running...
wazuh-authd is running...
wazuh-agentlessd not running...
wazuh-integratord not running...
wazuh-dbd not running...
wazuh-csyslogd not running...
wazuh-apid is running...
[root@ip-172-31-4-23 centos]# ps -xa | grep wazuh-clusterd
  17811 pts/0    S+     0:00 grep --color=auto wazuh-clusterd
[root@ip-172-31-4-23 centos]# 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
2 participants