Skip to content

Add logtest modules to framework#5870

Merged
davidjiglesias merged 144 commits intofeature/5337-logtest-enhancementfrom
feature/5590-dev-logtest-framework
Oct 22, 2020
Merged

Add logtest modules to framework#5870
davidjiglesias merged 144 commits intofeature/5337-logtest-enhancementfrom
feature/5590-dev-logtest-framework

Conversation

@vicferpoy
Copy link
Copy Markdown
Contributor

@vicferpoy vicferpoy commented Sep 1, 2020

Hello team, this closes #5590 .

This PR adds new modules to use the logtest tool from the framework. The new logtest endpoints will use these modules.

It includes the addition of a new action/resource to RBAC and new unit tests for these modules.

You can see examples of the new functions here: #5590 (comment)

Tests results

==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.5, pytest-5.4.3, py-1.8.2, pluggy-0.13.1
rootdir: /home/vicferpoy/Desktop/Git/wazuh/framework
plugins: asyncio-0.12.0
collected 6 items                                                                                                                                                                           

wazuh/tests/test_logtest.py ......                                                                                                                                                    [100%]

===================================================================================== 6 passed in 0.08s =====================================================================================

==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.5, pytest-5.4.3, py-1.8.2, pluggy-0.13.1
rootdir: /home/vicferpoy/Desktop/Git/wazuh/framework
plugins: asyncio-0.12.0
collected 2 items                                                                                                                                                                           

wazuh/core/tests/test_logtest.py ..                                                                                                                                                   [100%]

===================================================================================== 2 passed in 0.03s =====================================================================================
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.5, pytest-5.4.3, py-1.8.2, pluggy-0.13.1
rootdir: /home/vicferpoy/Desktop/Git/wazuh/framework
plugins: asyncio-0.12.0
collected 20 items                                                                                                                                                                          

wazuh/core/tests/test_wazuh_socket.py ....................                                                                                                                            [100%]

==================================================================================== 20 passed in 0.07s =====================================================================================

Regards.

Lopuiz and others added 30 commits July 14, 2020 14:14
Declare main functions and structures for wazuh-logtest
- Change type of w_logtest_conf.enabled to boolean
- Change warning messages to error messages in Read_Logtest
- Change debug2 messages to warning messages in Read_Logtest
- Change type of w_logtest_conf.threads and w_logtest_conf.max_sessions to int
- Document accumulator.h, logtest.h and fts.h
- Modify decoders and cdb list flow to work with wazuh-logtest
- Document the CDB list, rules list, and decoders list
* Remove errors and warnings

Remove merror and mwarn from ReadDecodeXML, Rules_OP_ReadRules and other functions for internal use,
instead, errors are returned by parameters
@vikman90 vikman90 changed the base branch from develop to master September 25, 2020 08:02
@vicferpoy vicferpoy force-pushed the feature/5590-dev-logtest-framework branch from 1fe0f87 to 18a502c Compare October 14, 2020 14:34
@vicferpoy vicferpoy changed the base branch from master to feature/5337-logtest-enhancement October 19, 2020 10:55
Copy link
Copy Markdown
Member

@davidjiglesias davidjiglesias left a comment

Choose a reason for hiding this comment

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

Add CHANGELOG update

Comment thread framework/wazuh/core/exception.py Outdated
Comment thread framework/wazuh/core/exception.py Outdated
Comment thread framework/wazuh/logtest.py Outdated
Comment thread framework/wazuh/core/wazuh_socket.py
@davidjiglesias davidjiglesias merged commit 59b37c2 into feature/5337-logtest-enhancement Oct 22, 2020
@davidjiglesias davidjiglesias deleted the feature/5590-dev-logtest-framework branch October 22, 2020 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Framework] Add support for new logtest tool

7 participants