Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dedicated command.action.args models #248

Open
2 tasks done
Tracked by #349
AlexRuiz7 opened this issue Jan 24, 2025 · 0 comments · May be fixed by #253
Open
2 tasks done
Tracked by #349

Dedicated command.action.args models #248

AlexRuiz7 opened this issue Jan 24, 2025 · 0 comments · May be fixed by #253
Assignees
Labels
level/task Task issue type/enhancement Enhancement issue

Comments

@AlexRuiz7
Copy link
Member

AlexRuiz7 commented Jan 24, 2025

Description

We already have a solid definition for the first set of commands that will be accepted by Wazuh Agents.

Currently, the Command Manager plugins does not validate per command type, and does a generic validation instead. For the commands of type set-group and fetch-config, the Command Manager needs to do a proper validation of the fields so they match the given definition model, specially these under the command.action.args object.

The set-group command is used to update the group of agents that the agent belongs too. This command accepts an array of strings within action.args, comprising the complete list of groups for this agent.

The fetch-config command is used to order an agent to download and apply the centralized configuration for the groups it belongs too. This command accepts no arguments.

Functional requirements

  • In case of a mismatch on a set-group command, the request is rejected.
  • In case of a mismatch on a fetch-config command, mismatching values are ignored, and the request is accepted.
  • For any other command type, the request is accepted under the generic parser.

Implementation restrictions

  • Unit tests required as PR acceptance criteria.

Plan

  • Create a dedicated parser (or model) for set-group commands.
  • Create a dedicated parser (or model) for fetch-config commands.
@AlexRuiz7 AlexRuiz7 added level/task Task issue mvp Minimum Viable Product type/enhancement Enhancement issue labels Jan 24, 2025
@wazuhci wazuhci moved this to Backlog in XDR+SIEM/Release 5.0.0 Jan 24, 2025
@wazuhci wazuhci moved this from Backlog to In progress in XDR+SIEM/Release 5.0.0 Jan 24, 2025
@mcasas993 mcasas993 linked a pull request Jan 27, 2025 that will close this issue
@davidjiglesias davidjiglesias removed the mvp Minimum Viable Product label Jan 27, 2025
@wazuhci wazuhci moved this from In progress to Pending review in XDR+SIEM/Release 5.0.0 Jan 27, 2025
@wazuhci wazuhci moved this from Pending review to In review in XDR+SIEM/Release 5.0.0 Jan 28, 2025
@wazuhci wazuhci moved this from In review to Pending final review in XDR+SIEM/Release 5.0.0 Jan 28, 2025
@wazuhci wazuhci moved this from Pending final review to In final review in XDR+SIEM/Release 5.0.0 Jan 28, 2025
@wazuhci wazuhci moved this from In final review to In progress in XDR+SIEM/Release 5.0.0 Jan 28, 2025
@wazuhci wazuhci moved this from In progress to Pending review in XDR+SIEM/Release 5.0.0 Jan 30, 2025
@wazuhci wazuhci moved this from Pending review to Pending final review in XDR+SIEM/Release 5.0.0 Jan 31, 2025
@wazuhci wazuhci moved this from Pending final review to In final review in XDR+SIEM/Release 5.0.0 Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/enhancement Enhancement issue
Projects
Status: In final review
3 participants