-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt command structure to new definition #394
Comments
09/12/2024The necessary modifications to adapt the code to the new command structure have been started. 10/12/2024Work on the modifications continued, tests were fixed, and testing was performed. The Draft PR was opened. 11/12/2024I have been adding commands cases to the mock based on Imposter. Additionally, I started deploying an E2E testing environment. Minor corrections were made to the code, and the PR was opened for review. 12/12/2024Corrections made to PR comments, further testing performed. PR comments have been fixed, testing continued, and an unrelated issue was identified and fixed in this commit. Minimal adjustments were subsequently made to align with design changes. |
Tests with python mock
|
Tests with python mock
|
Tests with Imposter mockIn these tests, various commands are used, some valid and others invalid. The cases can be reviewed at https://github.com/wazuh/wazuh-agent/blob/cdfd7468096ece59f4692eb993e880f4489145a7/src/tests/mock-server/config/commands.groovy#L13). The goal is to ensure that under high traffic of received commands, the segmentation fault no longer occurs. Sending 5 commands per secondVideo5commandsPerSecond.webmSending 100 commands per secondVideo100commandsPerSecond.webm |
Parent Issue: #241
Description
After the latest changes introduced in the server side, it was decided that the structure of the messages that the agent receives with commands will be as follows:
Besides, the structure of the response should be as following:
This issue consists in adapt the agent code to these new specifications.
Since the new message doesn't specify a module where the command should be executed, we also need to change the logic and make the command handler responsible of distribute the commands based on the name of the command and the arguments. This will require to make changes in the centralized configuration component as well.
It is mandatory to test all these changes with a real server to verify that the command feature works E2E.
The text was updated successfully, but these errors were encountered: