From c5879d28b2c35c6a36d80bc023b036b8d501a978 Mon Sep 17 00:00:00 2001 From: mauromalara Date: Tue, 19 Dec 2023 20:20:48 -0300 Subject: [PATCH 01/12] deactivate tests and update config --- .../ansible-wazuh-manager/defaults/main.yml | 28 ++-------------- .../var-ossec-etc-ossec-server.conf.j2 | 28 +++------------- .../data/playbooks/configuration.yaml | 18 ++-------- .../data/playbooks/configuration.yaml | 17 ++-------- .../test_files/test_audit/data/ossec.conf | 22 ++----------- .../configuration_alerts_reading.yaml | 8 ++--- .../configuration_syscollector.yaml | 8 ++--- .../configuration_syscollector_no_tags.yaml | 8 ++--- ...iguration_syscollector_scans_disabled.yaml | 8 ++--- .../test_cpe_helper/test_cpe_helper.py | 5 +++ .../test_feeds/test_cpe_indexing.py | 2 ++ .../test_feeds/test_download_feeds.py | 1 + .../test_feeds/test_duplicate_feeds.py | 1 + .../test_import_invalid_feed_type.py | 1 + .../test_feeds/test_msu_inventory.py | 1 + .../test_feeds/test_validate_feed_content.py | 2 ++ .../test_general_settings/test_enabled.py | 2 ++ .../test_general_settings/test_interval.py | 1 + .../test_min_full_scan_interval.py | 1 + .../test_retry_interval.py | 2 ++ .../test_run_on_start.py | 2 ++ .../test_providers/test_enabled.py | 2 ++ .../test_providers/test_missing_os.py | 1 + .../test_multiple_provider_feeds.py | 1 + .../test_providers/test_os.py | 1 + .../test_providers/test_update_from_year.py | 1 + .../test_providers/test_update_interval.py | 1 + .../test_scan_nvd_vulnerabilities.py | 2 ++ ...t_scan_provider_and_nvd_vulnerabilities.py | 1 + .../test_scan_provider_vulnerabilities.py | 1 + .../test_scan_vulnerabilities_triaged_null.py | 1 + .../test_scan_vulnerability_removal.py | 2 ++ .../test_baseline_scan_type.py | 2 ++ .../test_scan_types/test_full_scan_type.py | 4 +++ .../test_scan_types/test_partial_scan_type.py | 4 +++ ...t_vulnerability_inventory_baseline_scan.py | 1 + .../test_vulnerability_inventory_full_scan.py | 2 ++ ...st_vulnerability_inventory_partial_scan.py | 2 ++ .../roles/master-role/files/ossec.conf | 33 ------------------- .../roles/worker-role/files/ossec.conf | 33 ------------------- .../roles/master-role/files/ossec.conf | 33 ------------------- .../roles/worker-role/files/ossec.conf | 33 ------------------- 42 files changed, 75 insertions(+), 252 deletions(-) diff --git a/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml b/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml index 5e423a74d7..30948c3ac0 100644 --- a/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml +++ b/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml @@ -173,32 +173,8 @@ wazuh_manager_sca: ## Vulnerability Detector wazuh_manager_vulnerability_detector: enabled: 'no' - interval: '5m' - run_on_start: 'yes' - providers: - - enabled: 'no' - os: - - 'trusty' - - 'xenial' - - 'bionic' - update_interval: '1h' - name: '"canonical"' - - enabled: 'no' - os: - - 'wheezy' - - 'stretch' - - 'jessie' - - 'buster' - update_interval: '1h' - name: '"debian"' - - enabled: 'no' - update_from_year: '2010' - update_interval: '1h' - name: '"redhat"' - - enabled: 'no' - update_from_year: '2010' - update_interval: '1h' - name: '"nvd"' + index_status: 'yes' + feed_update_interval: '60m' ## Syscheck wazuh_manager_syscheck: diff --git a/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 b/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 index cf87a44cc8..22c8261fa7 100644 --- a/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 +++ b/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 @@ -262,31 +262,11 @@ {% if wazuh_manager_config.vulnerability_detector.enabled is defined %} {{ wazuh_manager_config.vulnerability_detector.enabled }} {% endif %} - {% if wazuh_manager_config.vulnerability_detector.interval is defined %} - {{ wazuh_manager_config.vulnerability_detector.interval }} + {% if wazuh_manager_config.vulnerability_detector.index_status is defined %} + {{ wazuh_manager_config.vulnerability_detector.index_status }} {% endif %} - {% if wazuh_manager_config.vulnerability_detector.run_on_start is defined %} - {{ wazuh_manager_config.vulnerability_detector.run_on_start }} - {% endif %} - {% if wazuh_manager_config.vulnerability_detector.providers is defined %} - {% for provider_ in wazuh_manager_config.vulnerability_detector.providers %} - - {% if provider_.enabled is defined %} - {{ provider_.enabled }} - {% endif %} - {% if provider_.os is defined %} - {% for os_ in provider_.os %} - {{ os_ }} - {% endfor %} - {% endif %} - {% if provider_.update_from_year is defined %} - {{ provider_.update_from_year }} - {% endif %} - {% if provider_.update_interval is defined %} - {{ provider_.update_interval }} - {% endif %} - - {% endfor %} + {% if wazuh_manager_config.vulnerability_detector.feed_update_interval is defined %} + {{ wazuh_manager_config.vulnerability_detector.feed_update_interval }} {% endif %} diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml index 7ecb135245..f6a9d47964 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml @@ -39,22 +39,8 @@ config_block: | yes - 60s - 60s - yes - - - - yes - jammy - 1h - - - - - yes - 1h - + yes + 60m os: linux diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml index 4fbb01a57e..9541bb9214 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml @@ -53,21 +53,8 @@ config_block: | yes - 60s - 60s - yes - - - - yes - 1h - - - - - yes - 1h - + yes + 60m os: linux diff --git a/tests/integration/test_fim/test_files/test_audit/data/ossec.conf b/tests/integration/test_fim/test_files/test_audit/data/ossec.conf index e9fc26389e..8904af56c0 100644 --- a/tests/integration/test_fim/test_files/test_audit/data/ossec.conf +++ b/tests/integration/test_fim/test_files/test_audit/data/ossec.conf @@ -108,25 +108,9 @@ - - yes - 5m - 6h - yes - - yes - 1h - - - yes - 2010 - 1h - - - yes - 1h - - + + no + diff --git a/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml b/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml index f68eba1317..9cf321793d 100644 --- a/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml +++ b/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml @@ -22,12 +22,10 @@ - disabled: value: 'yes' - - section: wodle - attributes: - - name: vulnerability-detector + - section: vulnerability-detector elements: - - disabled: - value: 'yes' + - enabled: + value: 'no' - section: rootcheck elements: diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml index 74483c7f3a..5466f273b2 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml @@ -35,12 +35,10 @@ - disabled: value: 'yes' - - section: wodle - attributes: - - name: vulnerability-detector + - section: vulnerability-detector elements: - - disabled: - value: 'yes' + - enabled: + value: 'no' - section: rootcheck elements: diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml index ee5b7cd584..81ef37f877 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml @@ -8,12 +8,10 @@ - disabled: value: 'yes' - - section: wodle - attributes: - - name: vulnerability-detector + - section: vulnerability-detector elements: - - disabled: - value: 'yes' + - enabled: + value: 'no' - section: rootcheck elements: diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml index 7449c8c50a..c8417d5bc5 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml @@ -31,12 +31,10 @@ - disabled: value: 'yes' - - section: wodle - attributes: - - name: vulnerability-detector + - section: vulnerability-detector elements: - - disabled: - value: 'yes' + - enabled: + value: 'no' - section: rootcheck elements: diff --git a/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py b/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py index 1f5eaac265..8935b86ef1 100644 --- a/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py +++ b/tests/integration/test_vulnerability_detector/test_cpe_helper/test_cpe_helper.py @@ -252,6 +252,7 @@ def prepare_environment(request, metadata, agent_system, agent_packages, mock_ag write_json_file(CPE_HELPER_PATH, cpe_helper_backup_data) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata, agent_system, agent_packages', zip(t1_configurations, t1_configuration_metadata, t1_systems, t1_agent_packages), @@ -342,6 +343,7 @@ def test_cpe_indexing_wrong_tags(configuration, metadata, agent_system, agent_pa raise AttributeError('Unexpected log') +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata, agent_system, agent_packages', zip(t2_configurations, t2_configuration_metadata, t2_systems, t2_agent_packages), @@ -432,6 +434,7 @@ def test_cpe_indexing_wrong_values(configuration, metadata, agent_system, agent_ raise AttributeError('Unexpected log') +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata, agent_system, agent_packages', zip(t3_configurations, t3_configuration_metadata, t3_systems, t3_agent_packages), @@ -521,6 +524,7 @@ def test_cpe_indexing_missing_field(configuration, metadata, agent_system, agent evm.check_error_inserting_package(agent_id=prepare_environment) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system, agent_packages', zip(t4_configurations, t4_configuration_metadata, t4_systems, t4_agent_packages), @@ -601,6 +605,7 @@ def test_cpe_indexing_empty_fields(configuration, metadata, agent_system, agent_ package=metadata['values']['PRODUCT_T_VALUE_0'], cve=package['cveid']) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system, agent_packages', zip(t5_configurations, t5_configuration_metadata, t5_systems, t5_agent_packages), diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py b/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py index 3b5d14e99e..f5a4923ab6 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_cpe_indexing.py @@ -135,6 +135,7 @@ def prepare_scan(request, metadata, agent_system, mock_agent_with_custom_system) write_json_file(CPE_HELPER_PATH, cpe_helper_backup_data) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(t1_configurations, t1_configuration_metadata, t1_systems), ids=t1_test_case_ids) @@ -196,6 +197,7 @@ def test_cpe_indexing_packages(configuration, metadata, agent_system, set_wazuh_ agent_id=prepare_scan) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(t2_configurations, t2_configuration_metadata, t2_systems), ids=t2_test_case_ids) diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py b/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py index 89ed472a45..7ebe8e3ccb 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_download_feeds.py @@ -83,6 +83,7 @@ configurations = load_configuration_template(configurations_path, configuration_parameters, configuration_metadata) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=case_ids) def test_download_feeds(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py b/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py index 782dae080f..260fad3771 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_duplicate_feeds.py @@ -126,6 +126,7 @@ def check_update_finish_logs(log_monitor=None, provider_name='', provider_json_n return cve_db.get_provider_feeds_number() +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_duplicate_feeds(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py b/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py index b763eab4c6..205dfd71a9 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_import_invalid_feed_type.py @@ -90,6 +90,7 @@ use_case['custom_feed_url'])) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=case_ids) def test_import_invalid_feed_type(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py b/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py index b32c781916..f9b66968cb 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_msu_inventory.py @@ -86,6 +86,7 @@ patch_references = ['4465477', '5003711', '4470788'] +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=case_ids) def test_msu_catalog_patches(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py b/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py index 12df00fd46..19cf6ff3ba 100644 --- a/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py +++ b/tests/integration/test_vulnerability_detector/test_feeds/test_validate_feed_content.py @@ -122,6 +122,7 @@ def manage_file(metadata): file.remove_file(file_path=metadata['decompressed_file']) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('metadata', t1_configuration_metadata, ids=t1_case_ids) def test_validate_json_feed_content(metadata, manage_file): @@ -166,6 +167,7 @@ def test_validate_json_feed_content(metadata, manage_file): assert file.validate_json_file(raw_feed_file), f"{metadata['provider_name']} file is not JSON 'parseable'" +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=2) @pytest.mark.parametrize('metadata', t2_configuration_metadata, ids=t2_case_ids) def test_validate_xml_feed_content(metadata, manage_file): diff --git a/tests/integration/test_vulnerability_detector/test_general_settings/test_enabled.py b/tests/integration/test_vulnerability_detector/test_general_settings/test_enabled.py index 235b70ddef..8b459e70f5 100644 --- a/tests/integration/test_vulnerability_detector/test_general_settings/test_enabled.py +++ b/tests/integration/test_vulnerability_detector/test_general_settings/test_enabled.py @@ -77,6 +77,7 @@ t2_configuration_metadata) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_enabled(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, @@ -123,6 +124,7 @@ def test_enabled(configuration, metadata, set_wazuh_configuration_vdt, truncate_ evm.check_vulnerability_detector_disabled() +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(t2_configurations, t2_configuration_metadata), ids=t2_case_ids) def test_disabled(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_general_settings/test_interval.py b/tests/integration/test_vulnerability_detector/test_general_settings/test_interval.py index bd3b43b5cc..0bac4495ba 100644 --- a/tests/integration/test_vulnerability_detector/test_general_settings/test_interval.py +++ b/tests/integration/test_vulnerability_detector/test_general_settings/test_interval.py @@ -72,6 +72,7 @@ configuration_metadata) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=case_ids) def test_interval_scan(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_general_settings/test_min_full_scan_interval.py b/tests/integration/test_vulnerability_detector/test_general_settings/test_min_full_scan_interval.py index cc972a39be..a545486f85 100644 --- a/tests/integration/test_vulnerability_detector/test_general_settings/test_min_full_scan_interval.py +++ b/tests/integration/test_vulnerability_detector/test_general_settings/test_min_full_scan_interval.py @@ -103,6 +103,7 @@ def prepare_full_scan_environment(mock_agent_function, mock_agent_packages): yield mock_agent_function +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_min_full_scan_interval(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_general_settings/test_retry_interval.py b/tests/integration/test_vulnerability_detector/test_general_settings/test_retry_interval.py index 0c24cdafad..a9181cafbc 100644 --- a/tests/integration/test_vulnerability_detector/test_general_settings/test_retry_interval.py +++ b/tests/integration/test_vulnerability_detector/test_general_settings/test_retry_interval.py @@ -93,6 +93,7 @@ configurations = update_configuration_template(configurations, tags_to_replace, new_tags_values) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_retry_interval(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, @@ -173,6 +174,7 @@ def test_retry_interval(configuration, metadata, set_wazuh_configuration_vdt, tr evm.check_analyzing_oval_vulnerabilities_log(agent_id=mock_agent_function) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_retry_interval_max_retries(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_general_settings/test_run_on_start.py b/tests/integration/test_vulnerability_detector/test_general_settings/test_run_on_start.py index aa53c0c32b..feae02d37c 100644 --- a/tests/integration/test_vulnerability_detector/test_general_settings/test_run_on_start.py +++ b/tests/integration/test_vulnerability_detector/test_general_settings/test_run_on_start.py @@ -86,6 +86,7 @@ [custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration', t1_configurations, ids=t1_case_ids) def test_run_on_start_enabled(configuration, set_wazuh_configuration_vdt, truncate_monitored_files, @@ -132,6 +133,7 @@ def test_run_on_start_enabled(configuration, set_wazuh_configuration_vdt, trunca evm.check_vulnerability_scan_start() +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration', t2_configurations, ids=t2_case_ids) def test_run_on_start_disabled(configuration, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py b/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py index cecc8f5afd..13f9737be9 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_enabled.py @@ -89,6 +89,7 @@ t2_configuration_metadata) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_enabled(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, @@ -134,6 +135,7 @@ def test_enabled(configuration, metadata, set_wazuh_configuration_vdt, truncate_ evm.check_provider_database_update_start_log(metadata['provider_name']) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(t2_configurations, t2_configuration_metadata), ids=t2_case_ids) def test_disabled(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py b/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py index df2b39fdec..9151565341 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_missing_os.py @@ -88,6 +88,7 @@ configuration_metadata) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_providers_missing_os(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py b/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py index 3753548ab2..6f4b1d70ef 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_multiple_provider_feeds.py @@ -93,6 +93,7 @@ configuration_metadata = configuration.update_configuration_template(configuration_metadata, to_modify, new_values) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_check_log_multiple_provider_feeds(configuration, metadata, set_wazuh_configuration_vdt, diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_os.py b/tests/integration/test_vulnerability_detector/test_providers/test_os.py index 83fbb4a01d..c2ee3e6e25 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_os.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_os.py @@ -87,6 +87,7 @@ configuration_metadata) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_providers_os(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py b/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py index d89f07d735..0e4b2e7ddd 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_update_from_year.py @@ -84,6 +84,7 @@ {'update_from_year': {'value': current_year}} +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_update_from_year(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py b/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py index d4dced10e0..968842652c 100644 --- a/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py +++ b/tests/integration/test_vulnerability_detector/test_providers/test_update_interval.py @@ -79,6 +79,7 @@ configurations = load_configuration_template(configurations_path, configuration_parameters, configuration_metadata) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=0) @pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids) def test_update_interval(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py index d6b60e9e07..71ffb83695 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_nvd_vulnerabilities.py @@ -145,6 +145,7 @@ def prepare_scan(metadata, agent_system, mock_agent_with_custom_system): write_json_file(CPE_HELPER_PATH, cpe_helper_backup_data) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(t1_configurations, t1_configuration_metadata, t1_systems), ids=t1_case_ids) @@ -214,6 +215,7 @@ def test_scan_nvd_vulnerabilities(configuration, metadata, agent_system, set_waz cve=package['cveid']) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.parametrize('configuration, metadata, agent_system', zip(t2_configurations, t2_configuration_metadata, t2_systems), ids=t2_case_ids) def test_no_agent_data(configuration, metadata, agent_system, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py index 58bf907235..54163a0713 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_and_nvd_vulnerabilities.py @@ -82,6 +82,7 @@ systems = [metadata['system'] for metadata in configuration_metadata] +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(configurations, configuration_metadata, systems), ids=case_ids) diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py index 787419ff97..ecbbf4d545 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_provider_vulnerabilities.py @@ -82,6 +82,7 @@ systems = [metadata['system'] for metadata in configuration_metadata] +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(configurations, configuration_metadata, systems), ids=case_ids) diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py index 9e52a79ecc..f76bda5d41 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerabilities_triaged_null.py @@ -93,6 +93,7 @@ [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(t1_configurations, t1_configuration_metadata, t1_systems), ids=t1_case_ids) diff --git a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py index eee849523e..7d4ef1cdfc 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py +++ b/tests/integration/test_vulnerability_detector/test_scan_results/test_scan_vulnerability_removal.py @@ -88,6 +88,7 @@ systems = [metadata['system'] for metadata in configuration_metadata] +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(configurations, configuration_metadata, systems), ids=test_case_ids) @@ -181,6 +182,7 @@ def test_vulnerability_removal_update_package(configuration, metadata, agent_sys evm.check_removal_package_alert(metadata['test_package_1_cve'], metadata['test_package_1_name']) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata, agent_system', zip(configurations, configuration_metadata, systems), ids=test_case_ids) diff --git a/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py b/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py index 3ec97d1392..436e59ddc1 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py +++ b/tests/integration/test_vulnerability_detector/test_scan_types/test_baseline_scan_type.py @@ -91,6 +91,7 @@ [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_baseline_scan_start(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, @@ -150,6 +151,7 @@ def test_baseline_scan_start(configuration, metadata, set_wazuh_configuration_vd evm.check_baseline_scan_start_log(agent_id=agent_id, timeout=vd.T_10) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t2_configurations, t2_configuration_metadata), ids=t2_case_ids) def test_baseline_scan_alert(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py b/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py index 6e44fa0624..bdda689763 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py +++ b/tests/integration/test_vulnerability_detector/test_scan_types/test_full_scan_type.py @@ -110,6 +110,7 @@ [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_full_scan_start(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, @@ -168,6 +169,7 @@ def test_full_scan_start(configuration, metadata, set_wazuh_configuration_vdt, t evm.check_vulnerability_full_scan_start(agent_id=agent_id, timeout=vd.T_10) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t2_configurations, t2_configuration_metadata), ids=t2_case_ids) def test_full_scan_no_alert_after_no_changes(configuration, metadata, set_wazuh_configuration_vdt, @@ -253,6 +255,7 @@ def test_full_scan_no_alert_after_no_changes(configuration, metadata, set_wazuh_ raise AssertionError("Vulnerability alert was generated again after being reported in the last scan") +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t3_configurations, t3_configuration_metadata), ids=t3_case_ids) def test_full_scan_alert_after_changes(configuration, metadata, set_wazuh_configuration_vdt, @@ -327,6 +330,7 @@ def test_full_scan_alert_after_changes(configuration, metadata, set_wazuh_config package=vd.VULNERABLE_PACKAGES[1]['name']) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t4_configurations, t4_configuration_metadata), ids=t4_case_ids) def test_full_scan_remove_vulnerability_alert(configuration, metadata, set_wazuh_configuration_vdt, diff --git a/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py b/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py index 1d1b51a864..ad993b2494 100644 --- a/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py +++ b/tests/integration/test_vulnerability_detector/test_scan_types/test_partial_scan_type.py @@ -109,6 +109,7 @@ [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_partial_scan_start(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, @@ -167,6 +168,7 @@ def test_partial_scan_start(configuration, metadata, set_wazuh_configuration_vdt evm.check_partial_scan_start_log(agent_id=agent_id, timeout=vd.T_10) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t2_configurations, t2_configuration_metadata), ids=t2_case_ids) def test_partial_scan_no_alert_after_no_changes(configuration, metadata, set_wazuh_configuration_vdt, @@ -247,6 +249,7 @@ def test_partial_scan_no_alert_after_no_changes(configuration, metadata, set_waz raise AssertionError("Vulnerability alert was generated again after being reported in the last scan") +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t3_configurations, t3_configuration_metadata), ids=t3_case_ids) def test_partial_scan_alert_after_changes(configuration, metadata, set_wazuh_configuration_vdt, @@ -316,6 +319,7 @@ def test_partial_scan_alert_after_changes(configuration, metadata, set_wazuh_con package=vd.VULNERABLE_PACKAGES[1]['name']) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t4_configurations, t4_configuration_metadata), ids=t4_case_ids) def test_partial_scan_remove_vulnerability_alert(configuration, metadata, set_wazuh_configuration_vdt, diff --git a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py index 037f2f33f3..e82d67a65d 100644 --- a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py +++ b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_baseline_scan.py @@ -78,6 +78,7 @@ [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_vulnerability_inserted_baseline_scan(configuration, metadata, set_wazuh_configuration_vdt, diff --git a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py index ec2c30c289..fb3eefcfff 100644 --- a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py +++ b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_full_scan.py @@ -87,6 +87,7 @@ [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_vulnerability_inserted_full_scan(configuration, metadata, set_wazuh_configuration_vdt, @@ -156,6 +157,7 @@ def test_vulnerability_inserted_full_scan(configuration, metadata, set_wazuh_con len(vd.VULNERABLE_PACKAGES) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t2_configurations, t2_configuration_metadata), ids=t2_case_ids) def test_vulnerability_removed_full_scan(configuration, metadata, set_wazuh_configuration_vdt, truncate_monitored_files, diff --git a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py index 3486604022..9b8e57d4e3 100644 --- a/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py +++ b/tests/integration/test_vulnerability_detector/test_vulnerability_inventory/test_vulnerability_inventory_partial_scan.py @@ -87,6 +87,7 @@ [custom_redhat_oval_feed_path, custom_redhat_json_feed_path, custom_nvd_json_feed_path]) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t1_configurations, t1_configuration_metadata), ids=t1_case_ids) def test_vulnerability_inserted_partial_scan(configuration, metadata, set_wazuh_configuration_vdt, @@ -156,6 +157,7 @@ def test_vulnerability_inserted_partial_scan(configuration, metadata, set_wazuh_ len(vd.VULNERABLE_PACKAGES) +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.tier(level=1) @pytest.mark.parametrize('configuration, metadata', zip(t2_configurations, t2_configuration_metadata), ids=t2_case_ids) def test_vulnerability_removed_partial_scan(configuration, metadata, set_wazuh_configuration_vdt, diff --git a/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf index 69d08315b6..f02a98d6e8 100644 --- a/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf index add6f7cc78..4093e301a6 100644 --- a/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf index 69d08315b6..f02a98d6e8 100644 --- a/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf index add6f7cc78..4093e301a6 100644 --- a/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - From bbe702bc91a55fc82b9c0b6617fbb06c7900c8c2 Mon Sep 17 00:00:00 2001 From: mauromalara Date: Wed, 20 Dec 2023 10:41:08 -0300 Subject: [PATCH 02/12] fix config and skip more tests --- .../data/playbooks/configuration.yaml | 2 +- .../test_vulnerability_detector_linux.py | 1 + .../data/playbooks/configuration.yaml | 2 +- .../test_vulnerability_detection_windows.py | 1 + .../roles/manager-role/files/ossec.conf | 12 +++---- .../roles/master-role/files/ossec.conf | 33 ------------------- .../roles/worker-role/files/ossec.conf | 33 ------------------- .../roles/master-role/files/ossec.conf | 33 ------------------- .../roles/worker-role/files/ossec.conf | 33 ------------------- .../roles/master-role/files/ossec.conf | 33 ------------------- .../roles/worker-role/files/ossec.conf | 33 ------------------- .../roles/manager-role/files/ossec.conf | 33 ------------------- .../roles/master-role/files/ossec.conf | 33 ------------------- .../roles/manager-role/files/ossec.conf | 33 ------------------- 14 files changed, 9 insertions(+), 306 deletions(-) diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml index f6a9d47964..8e9a83128e 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml @@ -40,7 +40,7 @@ yes yes - 60m + 60s os: linux diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/test_vulnerability_detector_linux.py b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/test_vulnerability_detector_linux.py index d1bc9c8e5d..b010f94ea2 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/test_vulnerability_detector_linux.py +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/test_vulnerability_detector_linux.py @@ -67,6 +67,7 @@ pytestmark = [TIER0, LINUX] +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.filterwarnings('ignore::urllib3.exceptions.InsecureRequestWarning') @pytest.mark.parametrize('metadata', configuration_metadata, ids=cases_ids) def test_vulnerability_detector_linux(configure_environment, metadata, get_indexer_credentials, get_manager_ip, diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml index 9541bb9214..cc074f0210 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml @@ -54,7 +54,7 @@ yes yes - 60m + 60s os: linux diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/test_vulnerability_detection_windows.py b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/test_vulnerability_detection_windows.py index 700bdfe54e..6b21bdb3ab 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/test_vulnerability_detection_windows.py +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/test_vulnerability_detection_windows.py @@ -68,6 +68,7 @@ pytestmark = [TIER0, WINDOWS] +@pytest.mark.skip(reason="Vulnerability Detector was refactored. Some tests are deprecated.") @pytest.mark.filterwarnings('ignore::urllib3.exceptions.InsecureRequestWarning') @pytest.mark.parametrize('metadata', configuration_metadata, ids=cases_ids) def test_vulnerability_detector_windows(configure_environment, metadata, get_indexer_credentials, get_manager_ip, diff --git a/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf b/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf index b5c939843b..41bbf068a9 100644 --- a/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf @@ -79,13 +79,11 @@ - - no - 1d - yes - yes - yes - + + yes + yes + 60m + yes diff --git a/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf b/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf index 69d08315b6..f02a98d6e8 100644 --- a/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf b/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf index add6f7cc78..4093e301a6 100644 --- a/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf index 69d08315b6..f02a98d6e8 100644 --- a/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf index add6f7cc78..4093e301a6 100644 --- a/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf b/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf index 69d08315b6..f02a98d6e8 100644 --- a/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf b/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf index add6f7cc78..4093e301a6 100644 --- a/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf b/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf index 2531150af8..99b22cc61b 100644 --- a/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf b/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf index 2531150af8..99b22cc61b 100644 --- a/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - diff --git a/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf b/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf index d8b07bdba7..98af5ec4ff 100644 --- a/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf @@ -81,39 +81,6 @@ no - 5m - 6h - yes - - - no - precise - trusty - xenial - bionic - 1h - - - - no - wheezy - stretch - jessie - buster - 1h - - - - no - 2010 - 1h - - - - no - 1h - - From fc22a9171786c7d4499d0e298a8fe02381677298 Mon Sep 17 00:00:00 2001 From: mauromalara Date: Wed, 20 Dec 2023 19:32:10 -0300 Subject: [PATCH 03/12] add indexer config --- .../wazuh_testing/data/all_disabled_ossec.conf | 4 ++++ .../roles/wazuh/ansible-wazuh-manager/defaults/main.yml | 6 +++++- .../templates/var-ossec-etc-ossec-server.conf.j2 | 6 ++++++ .../data/playbooks/configuration.yaml | 5 ++++- .../data/playbooks/configuration.yaml | 5 ++++- .../configuration_overwritten_rules.yaml | 5 +++++ .../basic_test_module/configuration_disabled.yaml | 4 ++++ .../configuration_signature_id_values.yaml | 5 +++++ .../test_fim/test_files/test_audit/data/ossec.conf | 4 ++++ .../data/configuration/configuration_alerts_reading.yaml | 5 +++++ .../data/configuration/configuration_syscollector.yaml | 5 +++++ .../configuration/configuration_syscollector_no_tags.yaml | 5 +++++ .../configuration_syscollector_scans_disabled.yaml | 5 +++++ .../agentless_cluster/roles/master-role/files/ossec.conf | 4 ++++ .../agentless_cluster/roles/worker-role/files/ossec.conf | 4 ++++ .../basic_cluster/roles/master-role/files/ossec.conf | 4 ++++ .../basic_cluster/roles/worker-role/files/ossec.conf | 4 ++++ .../basic_environment/roles/manager-role/files/ossec.conf | 6 +++++- .../roles/master-role/files/ossec.conf | 4 ++++ .../roles/worker-role/files/ossec.conf | 4 ++++ .../enrollment_cluster/roles/master-role/files/ossec.conf | 4 ++++ .../enrollment_cluster/roles/worker-role/files/ossec.conf | 4 ++++ .../roles/master-role/files/ossec.conf | 4 ++++ .../roles/worker-role/files/ossec.conf | 4 ++++ .../manager_agent/roles/manager-role/files/ossec.conf | 4 ++++ .../manager_agent/roles/master-role/files/ossec.conf | 4 ++++ .../one_manager_agent/roles/manager-role/files/ossec.conf | 4 ++++ 27 files changed, 118 insertions(+), 4 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf b/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf index 388eb62feb..507055783e 100644 --- a/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf +++ b/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf @@ -42,6 +42,10 @@ no + + no + + yes diff --git a/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml b/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml index 30948c3ac0..78bf48dfd7 100644 --- a/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml +++ b/provisioning/roles/wazuh/ansible-wazuh-manager/defaults/main.yml @@ -173,9 +173,12 @@ wazuh_manager_sca: ## Vulnerability Detector wazuh_manager_vulnerability_detector: enabled: 'no' - index_status: 'yes' + index_status: 'no' feed_update_interval: '60m' +wazuh_manager_indexer: + enabled: 'no' + ## Syscheck wazuh_manager_syscheck: disable: 'no' @@ -417,6 +420,7 @@ wazuh_manager_config_defaults: syscollector: '{{ wazuh_manager_syscollector }}' sca: '{{ wazuh_manager_sca }}' vulnerability_detector: '{{ wazuh_manager_vulnerability_detector }}' + indexer: '{{ wazuh_manager_indexer }}' log_level: '{{ wazuh_manager_log_level }}' email_level: '{{ wazuh_manager_email_level }}' localfiles: '{{ wazuh_manager_localfiles }}' diff --git a/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 b/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 index 22c8261fa7..90650892d4 100644 --- a/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 +++ b/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 @@ -270,6 +270,12 @@ {% endif %} + + {% if wazuh_manager_config.indexer.enabled is defined %} + {{ wazuh_manager_config.indexer.enabled }} + {% endif %} + + {{ wazuh_manager_config.syscheck.disable }} diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml index 8e9a83128e..f5570510db 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml @@ -39,9 +39,12 @@ config_block: | yes - yes + no 60s + + no + os: linux - name: Restart wazuh-manager diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml index cc074f0210..42aa65132b 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml @@ -53,9 +53,12 @@ config_block: | yes - yes + no 60s + + no + os: linux - name: Restart wazuh-manager diff --git a/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml b/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml index 4c1e452a43..29ecf7824c 100644 --- a/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml +++ b/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml @@ -31,6 +31,11 @@ - enabled: value: 'no' + - section: indexer + elements: + - enabled: + value: 'no' + - section: sca elements: - enabled: diff --git a/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml b/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml index 3f3f7143e2..2319e4100d 100644 --- a/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml +++ b/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml @@ -3,3 +3,7 @@ elements: - enabled: value: 'no' + - section: indexer + elements: + - enabled: + value: 'no' diff --git a/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml b/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml index 89e68ea9b2..05957b56e9 100644 --- a/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml +++ b/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml @@ -4,6 +4,11 @@ - enabled: value: 'no' + - section: indexer + elements: + - enabled: + value: 'no' + - section: sca elements: - enabled: diff --git a/tests/integration/test_fim/test_files/test_audit/data/ossec.conf b/tests/integration/test_fim/test_files/test_audit/data/ossec.conf index 8904af56c0..731c490ec9 100644 --- a/tests/integration/test_fim/test_files/test_audit/data/ossec.conf +++ b/tests/integration/test_fim/test_files/test_audit/data/ossec.conf @@ -112,6 +112,10 @@ no + + no + + no diff --git a/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml b/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml index 9cf321793d..8e96c8164e 100644 --- a/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml +++ b/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml @@ -27,6 +27,11 @@ - enabled: value: 'no' + - section: indexer + elements: + - enabled: + value: 'no' + - section: rootcheck elements: - disabled: diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml index 5466f273b2..e6c83e257f 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml @@ -40,6 +40,11 @@ - enabled: value: 'no' + - section: indexer + elements: + - enabled: + value: 'no' + - section: rootcheck elements: - disabled: diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml index 81ef37f877..13b5e46217 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml @@ -13,6 +13,11 @@ - enabled: value: 'no' + - section: indexer + elements: + - enabled: + value: 'no' + - section: rootcheck elements: - disabled: diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml index c8417d5bc5..d8d4bb4fff 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml @@ -36,6 +36,11 @@ - enabled: value: 'no' + - section: indexer + elements: + - enabled: + value: 'no' + - section: rootcheck elements: - disabled: diff --git a/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf index f02a98d6e8..389ce15155 100644 --- a/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf index 4093e301a6..4acfed0ab1 100644 --- a/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf index f02a98d6e8..389ce15155 100644 --- a/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf index 4093e301a6..4acfed0ab1 100644 --- a/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf b/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf index 41bbf068a9..26616a4eb6 100644 --- a/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf @@ -81,10 +81,14 @@ yes - yes + no 60m + + no + + yes 60 diff --git a/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf b/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf index f02a98d6e8..389ce15155 100644 --- a/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf b/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf index 4093e301a6..4acfed0ab1 100644 --- a/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf index f02a98d6e8..389ce15155 100644 --- a/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf index 4093e301a6..4acfed0ab1 100644 --- a/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf b/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf index f02a98d6e8..389ce15155 100644 --- a/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf b/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf index 4093e301a6..4acfed0ab1 100644 --- a/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf b/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf index 99b22cc61b..6822194ba5 100644 --- a/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf b/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf index 99b22cc61b..6822194ba5 100644 --- a/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + yes diff --git a/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf b/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf index 98af5ec4ff..5486bcabf1 100644 --- a/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf @@ -83,6 +83,10 @@ no + + no + + no 43200 From 8be0df427904aa95a16e53622b3cbdc14153abe6 Mon Sep 17 00:00:00 2001 From: mauromalara Date: Fri, 22 Dec 2023 17:50:42 -0300 Subject: [PATCH 04/12] change config --- deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf | 4 ++-- .../templates/var-ossec-etc-ossec-server.conf.j2 | 4 ++-- .../data/playbooks/configuration.yaml | 4 ++-- .../data/playbooks/configuration.yaml | 4 ++-- .../configuration_overwritten_rules.yaml | 2 +- .../basic_test_module/configuration_disabled.yaml | 2 +- .../configuration_signature_id_values.yaml | 2 +- .../test_fim/test_files/test_audit/data/ossec.conf | 4 ++-- .../data/configuration/configuration_alerts_reading.yaml | 2 +- .../data/configuration/configuration_syscollector.yaml | 2 +- .../configuration/configuration_syscollector_no_tags.yaml | 2 +- .../configuration_syscollector_scans_disabled.yaml | 2 +- .../agentless_cluster/roles/master-role/files/ossec.conf | 4 ++-- .../agentless_cluster/roles/worker-role/files/ossec.conf | 4 ++-- .../basic_cluster/roles/master-role/files/ossec.conf | 4 ++-- .../basic_cluster/roles/worker-role/files/ossec.conf | 4 ++-- .../basic_environment/roles/manager-role/files/ossec.conf | 4 ++-- .../big_cluster_40_agents/roles/master-role/files/ossec.conf | 4 ++-- .../big_cluster_40_agents/roles/worker-role/files/ossec.conf | 4 ++-- .../enrollment_cluster/roles/master-role/files/ossec.conf | 4 ++-- .../enrollment_cluster/roles/worker-role/files/ossec.conf | 4 ++-- .../roles/master-role/files/ossec.conf | 4 ++-- .../roles/worker-role/files/ossec.conf | 4 ++-- .../manager_agent/roles/manager-role/files/ossec.conf | 4 ++-- .../manager_agent/roles/master-role/files/ossec.conf | 4 ++-- .../one_manager_agent/roles/manager-role/files/ossec.conf | 4 ++-- 26 files changed, 45 insertions(+), 45 deletions(-) diff --git a/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf b/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf index 507055783e..387466041d 100644 --- a/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf +++ b/deps/wazuh_testing/wazuh_testing/data/all_disabled_ossec.conf @@ -38,9 +38,9 @@ no - + no - + no diff --git a/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 b/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 index 90650892d4..a514ff7a8f 100644 --- a/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 +++ b/provisioning/roles/wazuh/ansible-wazuh-manager/templates/var-ossec-etc-ossec-server.conf.j2 @@ -258,7 +258,7 @@ {% endif %} - + {% if wazuh_manager_config.vulnerability_detector.enabled is defined %} {{ wazuh_manager_config.vulnerability_detector.enabled }} {% endif %} @@ -268,7 +268,7 @@ {% if wazuh_manager_config.vulnerability_detector.feed_update_interval is defined %} {{ wazuh_manager_config.vulnerability_detector.feed_update_interval }} {% endif %} - + {% if wazuh_manager_config.indexer.enabled is defined %} diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml index f5570510db..c1576041d6 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/data/playbooks/configuration.yaml @@ -37,11 +37,11 @@ tasks_from: write_wazuh_config.yaml vars: config_block: | - + yes no 60s - + no diff --git a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml index 42aa65132b..f609fd0614 100644 --- a/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml +++ b/tests/end_to_end/test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/data/playbooks/configuration.yaml @@ -51,11 +51,11 @@ tasks_from: write_wazuh_config.yaml vars: config_block: | - + yes no 60s - + no diff --git a/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml b/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml index 29ecf7824c..1548b15313 100644 --- a/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml +++ b/tests/integration/test_active_response/test_analysisd/data/configuration_template/configuration_overwritten_rules.yaml @@ -26,7 +26,7 @@ - log_format: value: syslog - - section: vulnerability-detector + - section: vulnerability-detection elements: - enabled: value: 'no' diff --git a/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml b/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml index 2319e4100d..05b0594179 100644 --- a/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml +++ b/tests/integration/test_analysisd/test_limit_eps/data/configuration_template/basic_test_module/configuration_disabled.yaml @@ -1,5 +1,5 @@ - sections: - - section: vulnerability-detector + - section: vulnerability-detection elements: - enabled: value: 'no' diff --git a/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml b/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml index 05957b56e9..3bbb49047f 100644 --- a/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml +++ b/tests/integration/test_analysisd/test_signature_id/data/configuration_template/configuration_signature_id_values.yaml @@ -1,5 +1,5 @@ - sections: - - section: vulnerability-detector + - section: vulnerability-detection elements: - enabled: value: 'no' diff --git a/tests/integration/test_fim/test_files/test_audit/data/ossec.conf b/tests/integration/test_fim/test_files/test_audit/data/ossec.conf index 731c490ec9..ef6c7b5461 100644 --- a/tests/integration/test_fim/test_files/test_audit/data/ossec.conf +++ b/tests/integration/test_fim/test_files/test_audit/data/ossec.conf @@ -108,9 +108,9 @@ - + no - + no diff --git a/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml b/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml index 8e96c8164e..46a17b2b1a 100644 --- a/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml +++ b/tests/integration/test_integratord/data/configuration/configuration_alerts_reading.yaml @@ -22,7 +22,7 @@ - disabled: value: 'yes' - - section: vulnerability-detector + - section: vulnerability-detection elements: - enabled: value: 'no' diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml index e6c83e257f..e3f8960120 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector.yaml @@ -35,7 +35,7 @@ - disabled: value: 'yes' - - section: vulnerability-detector + - section: vulnerability-detection elements: - enabled: value: 'no' diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml index 13b5e46217..29067106d4 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_no_tags.yaml @@ -8,7 +8,7 @@ - disabled: value: 'yes' - - section: vulnerability-detector + - section: vulnerability-detection elements: - enabled: value: 'no' diff --git a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml index d8d4bb4fff..5852b17ac0 100644 --- a/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml +++ b/tests/integration/test_syscollector/data/configuration/configuration_syscollector_scans_disabled.yaml @@ -31,7 +31,7 @@ - disabled: value: 'yes' - - section: vulnerability-detector + - section: vulnerability-detection elements: - enabled: value: 'no' diff --git a/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf index 389ce15155..69e38422af 100644 --- a/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/agentless_cluster/roles/master-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf index 4acfed0ab1..3ce76c2512 100644 --- a/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/agentless_cluster/roles/worker-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf index 389ce15155..69e38422af 100644 --- a/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/basic_cluster/roles/master-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf index 4acfed0ab1..3ce76c2512 100644 --- a/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/basic_cluster/roles/worker-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf b/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf index 26616a4eb6..677dbefa37 100644 --- a/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/basic_environment/roles/manager-role/files/ossec.conf @@ -79,11 +79,11 @@ - + yes no 60m - + no diff --git a/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf b/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf index 389ce15155..69e38422af 100644 --- a/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/big_cluster_40_agents/roles/master-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf b/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf index 4acfed0ab1..3ce76c2512 100644 --- a/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/big_cluster_40_agents/roles/worker-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf b/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf index 389ce15155..69e38422af 100644 --- a/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/enrollment_cluster/roles/master-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf b/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf index 4acfed0ab1..3ce76c2512 100644 --- a/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/enrollment_cluster/roles/worker-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf b/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf index 389ce15155..69e38422af 100644 --- a/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/four_manager_disconnected_node/roles/master-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf b/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf index 4acfed0ab1..3ce76c2512 100644 --- a/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf +++ b/tests/system/provisioning/four_manager_disconnected_node/roles/worker-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf b/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf index 6822194ba5..077fb5e0be 100644 --- a/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/manager_agent/roles/manager-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf b/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf index 6822194ba5..077fb5e0be 100644 --- a/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf +++ b/tests/system/provisioning/manager_agent/roles/master-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no diff --git a/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf b/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf index 5486bcabf1..8dd472b67f 100644 --- a/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf +++ b/tests/system/provisioning/one_manager_agent/roles/manager-role/files/ossec.conf @@ -79,9 +79,9 @@ - + no - + no From 77a8a2b20d7071503d5d548a369136761e659d86 Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Casali Date: Thu, 4 Jan 2024 10:48:35 +0100 Subject: [PATCH 05/12] fix: change user in agent role tasks --- .../manager_agent/roles/agent-role/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml b/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml index c0e72e6abb..7ef81fb1c1 100644 --- a/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml +++ b/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml @@ -39,7 +39,7 @@ copy: src: ../files/ossec.conf dest: /var/ossec/etc/ossec.conf - owner: "{{agent_user}}" + owner: "root" mode: '0664' - name: enable execd debug mode @@ -57,7 +57,7 @@ lineinfile: path: /var/ossec/etc/client.keys line: "{{ agent_id }} {{agent_hostname}} any {{ agent_key }}" - owner: "{{agent_user}}" + owner: "root" mode: "0664" create: yes From d170b6de516d79be8c6ef105214039c3adfd08b4 Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Casali Date: Thu, 4 Jan 2024 13:24:46 +0100 Subject: [PATCH 06/12] fix: change agent user for files --- tests/system/provisioning/manager_agent/playbook.yml | 6 +++--- .../manager_agent/roles/agent-role/tasks/main.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/system/provisioning/manager_agent/playbook.yml b/tests/system/provisioning/manager_agent/playbook.yml index d1651254cb..1a9ca1ef04 100644 --- a/tests/system/provisioning/manager_agent/playbook.yml +++ b/tests/system/provisioning/manager_agent/playbook.yml @@ -71,7 +71,7 @@ agent_id: "{{ agent1_id }}" agent_hostname: "{{ agent1_hostname }}" agent_key: "{{ agent1_key }}" - agent_user: "{{agent_user}}" + agent_user: "{{agent1_user}}" restart_command: "{{restart_command_415}}" vars_files: - ./vars/configurations.yml @@ -86,7 +86,7 @@ agent_id: "{{ agent2_id }}" agent_hostname: "{{ agent2_hostname }}" agent_key: "{{ agent2_key }}" - agent_user: "{{agent_user}}" + agent_user: "{{agent1_user}}" restart_command: "{{restart_command_4_2}}" vars_files: - ./vars/configurations.yml @@ -100,7 +100,7 @@ agent_id: "{{ agent3_id }}" agent_hostname: "{{ agent3_hostname }}" agent_key: "{{ agent3_key }}" - agent_user: "{{agent_user}}" + agent_user: "{{agent3_user}}" restart_command: "{{restart_command_4_2}}" vars_files: - ./vars/configurations.yml diff --git a/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml b/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml index 7ef81fb1c1..c0e72e6abb 100644 --- a/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml +++ b/tests/system/provisioning/manager_agent/roles/agent-role/tasks/main.yml @@ -39,7 +39,7 @@ copy: src: ../files/ossec.conf dest: /var/ossec/etc/ossec.conf - owner: "root" + owner: "{{agent_user}}" mode: '0664' - name: enable execd debug mode @@ -57,7 +57,7 @@ lineinfile: path: /var/ossec/etc/client.keys line: "{{ agent_id }} {{agent_hostname}} any {{ agent_key }}" - owner: "root" + owner: "{{agent_user}}" mode: "0664" create: yes From 7954adb7cdb056fea4e15272aa8ff5866c72065d Mon Sep 17 00:00:00 2001 From: Andres Carmelo Micalizzi Casali Date: Thu, 4 Jan 2024 13:25:09 +0100 Subject: [PATCH 07/12] fix: parametrize agent3 package --- .../provisioning/manager_agent/vars/configurations.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/system/provisioning/manager_agent/vars/configurations.yml b/tests/system/provisioning/manager_agent/vars/configurations.yml index 8d6e44626f..abb0007e57 100644 --- a/tests/system/provisioning/manager_agent/vars/configurations.yml +++ b/tests/system/provisioning/manager_agent/vars/configurations.yml @@ -3,7 +3,7 @@ cluster_key: "00000000000000000000000000000000" manager_hostname: "wazuh-manager" log_file: "/var/log/secure" #Remember to change in agents ossec.conf if changed -agent_user: "ossec" #Only valid for agents verions<4.2.5 + restart_command_415: /var/ossec/bin/ossec-control restart restart_command_4_2: /var/ossec/bin/wazuh-control restart @@ -11,17 +11,17 @@ agent1_id: "001" agent1_hostname: "wazuh-agent1" agent1_key: "1111111111111111111111111111111111111111111111111111111111111111" agent1_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.1.5-1_amd64.deb" +agent1_user: "ossec" #Only valid for agents verions<4.2.5 agent2_id: "002" agent2_hostname: "wazuh-agent2" agent2_key: "2222222222222222222222222222222222222222222222222222222222222222" agent2_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.2.2-1_amd64.deb" -agent_user_4_2: "wazuh" - agent3_id: "003" agent3_hostname: "wazuh-agent3" agent3_key: "3333333333333333333333333333333333333333333333333333333333333333" -agent3_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.2.5-1_amd64.deb" +agent3_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_{{package_version}}-{{package_revision}}_amd64.deb" +agent3_user: "root" #Only valid for agents verions=>4.2.5 docker_network: "cluster_net" From 9c8de595af24e1317cef5a94f90e8c6f58519461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Carmelo=20Micalizzi=20Casali?= Date: Fri, 5 Jan 2024 12:17:20 +0100 Subject: [PATCH 08/12] Add package_repository to agent3 in configurations.yml --- tests/system/provisioning/manager_agent/vars/configurations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/provisioning/manager_agent/vars/configurations.yml b/tests/system/provisioning/manager_agent/vars/configurations.yml index abb0007e57..70afbc9fef 100644 --- a/tests/system/provisioning/manager_agent/vars/configurations.yml +++ b/tests/system/provisioning/manager_agent/vars/configurations.yml @@ -20,7 +20,7 @@ agent2_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazu agent3_id: "003" agent3_hostname: "wazuh-agent3" agent3_key: "3333333333333333333333333333333333333333333333333333333333333333" -agent3_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_{{package_version}}-{{package_revision}}_amd64.deb" +agent3_package: "https://{{package_repository}}.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_{{package_version}}-{{package_revision}}_amd64.deb" agent3_user: "root" #Only valid for agents verions=>4.2.5 docker_network: "cluster_net" From 6be11bfb9655466b8f811edc9855b5916dce3873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Carmelo=20Micalizzi=20Casali?= Date: Fri, 5 Jan 2024 12:24:59 +0100 Subject: [PATCH 09/12] fix: add repository for agent3 package url --- .../system/provisioning/manager_agent/vars/configurations.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/system/provisioning/manager_agent/vars/configurations.yml b/tests/system/provisioning/manager_agent/vars/configurations.yml index 70afbc9fef..cd00d08bb7 100644 --- a/tests/system/provisioning/manager_agent/vars/configurations.yml +++ b/tests/system/provisioning/manager_agent/vars/configurations.yml @@ -17,10 +17,11 @@ agent2_id: "002" agent2_hostname: "wazuh-agent2" agent2_key: "2222222222222222222222222222222222222222222222222222222222222222" agent2_package: "https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.2.2-1_amd64.deb" + agent3_id: "003" agent3_hostname: "wazuh-agent3" agent3_key: "3333333333333333333333333333333333333333333333333333333333333333" -agent3_package: "https://{{package_repository}}.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_{{package_version}}-{{package_revision}}_amd64.deb" +agent3_package: "https://{{package_repository}}.wazuh.com/{{repository}}/apt/pool/main/w/wazuh-agent/wazuh-agent_{{package_version}}-{{package_revision}}_amd64.deb" agent3_user: "root" #Only valid for agents verions=>4.2.5 docker_network: "cluster_net" From 81a18e8949f33303e73b3660c61cdc064994aedc Mon Sep 17 00:00:00 2001 From: Antonio Date: Fri, 5 Jan 2024 14:10:23 +0100 Subject: [PATCH 10/12] refactor: bump revision --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 5a3c4535a1..cc48caea84 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { "version": "4.7.2", - "revision": "40710" + "revision": "40711" } From 8ef06a89a033d111f475ad278260398adad2c49c Mon Sep 17 00:00:00 2001 From: Julia Date: Tue, 9 Jan 2024 13:11:56 +0100 Subject: [PATCH 11/12] docs: update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18f64f5d55..23f344d4fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,10 +17,11 @@ All notable changes to this project will be documented in this file. ### Changed +- Deactivate tests and update vulnerability-detector configuration ([#4784](https://github.com/wazuh/wazuh-qa/pull/4784)) \- (Framework + Tests) - Fix body format for get_api_token ([#4797](https://github.com/wazuh/wazuh-qa/pull/4797)) \- (Framework) - Fix one_manager_agent_env pytest marker for System Tests ([#4782](https://github.com/wazuh/wazuh-qa/pull/4782)) \- (Tests) - Updated Filebeat module to 0.4 ([#4775](https://github.com/wazuh/wazuh-qa/pull/4775)) \- (Framework) -- Include ATP repository update before the installation of Ubuntu E2E agent installation ([#4761](https://github.com/wazuh/wazuh-qa/pull/4761)) \- (Framework) +- Include APT repository update before the installation of Ubuntu E2E agent installation ([#4761](https://github.com/wazuh/wazuh-qa/pull/4761)) \- (Framework) - Enhance macOS deployment ansible taks ([#4685](https://github.com/wazuh/wazuh-qa/pull/4685)) \- (Framework) - Updated Filebeat module to 0.3 ([#4700](https://github.com/wazuh/wazuh-qa/pull/4700)) \- (Framework) - Change database v13 to v12. ([#4677](https://github.com/wazuh/wazuh-qa/pull/4677)) \- (Tests) @@ -34,6 +35,7 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fixed IT control_service Windows loop ([#4765](https://github.com/wazuh/wazuh-qa/pull/4765)) \- (Framework) - Fix macOS agents provision to enable registration and connection with managers. ([#4770](https://github.com/wazuh/wazuh-qa/pull/4770/)) \- (Framework) - Fix hardcoded python interpreter in qa_framework role. ([#4658](https://github.com/wazuh/wazuh-qa/pull/4658)) \- (Framework) - Fix duplicated jq dependency ([#4678](https://github.com/wazuh/wazuh-qa/pull/4678)) \- (Framework) From 263e12f1e067ded8ec9d5b3056292fc9f3d6204a Mon Sep 17 00:00:00 2001 From: Julia Date: Tue, 9 Jan 2024 13:28:11 +0100 Subject: [PATCH 12/12] refactor: bump revision --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 72b2496844..07cbaefcfc 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { "version": "4.8.0", - "revision": "40801" + "revision": "40802" }