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

Improved agent CLI #614

Open
5 tasks
cborla opened this issue Feb 18, 2025 · 1 comment · May be fixed by #620
Open
5 tasks

Improved agent CLI #614

cborla opened this issue Feb 18, 2025 · 1 comment · May be fixed by #620
Assignees
Labels

Comments

@cborla
Copy link
Member

cborla commented Feb 18, 2025

Description

The Wazuh agent CLI needs enhancements to improve the registration process and provide clearer help documentation. Additionally, options should be displayed only for the relevant operating system.

Requirements

Update agent registration command

Currently, the agent registration command is:

.\wazuh-agent.exe --register-agent --user wazuh --password wazuh --url https://192.168.100.121:55000 --verification-mode none

The new command should looks like:

.\wazuh-agent.exe --enroll-agent --user wazuh --password wazuh --enroll-url https://192.168.100.121:55000 --connect-url https://192.168.100.121:27000 --verification-mode none
  • --enroll-urlMANDATORY
  • --connect-urlOPTIONAL

If --connect-url is provided, the wazuh-agent.yml file should be updated with the specified URL, for example:

server_url: https://192.168.100.121:27000

Improve --help output

Currently, the help command output for registration is:

.\wazuh-agent.exe --register-agent --help
--url, --user and --password args are mandatory

Expected behavior:

  • Display all available options for --register-agent with descriptions.
  • Ensure clarity on mandatory and optional parameters.

Filter OS-specific options

Currently, some CLI options not applicable to the running OS are displayed. For example, on Windows, these options should only be shown when applicable:

--install-service       Use this option to install Wazuh as a Windows service
--remove-service        Use this option to remove Wazuh Windows service
--run-service           Use this option to run Wazuh as a Windows service

Expected behavior:

  • Only show OS-relevant options when using --help.

Definition of Done

  • The new --enroll-agent command is implemented.
  • The --help output is updated with full descriptions.
  • OS-specific options are correctly filtered.
  • Tests validate all changes.
  • Documentation is updated accordingly.
@cborla cborla added level/task Task issue module/agent type/enhancement Enhancement issue labels Feb 18, 2025
@wazuhci wazuhci moved this to Backlog in XDR+SIEM/Release 5.0.0 Feb 18, 2025
@jr0me jr0me self-assigned this Feb 20, 2025
@wazuhci wazuhci moved this from Backlog to In progress in XDR+SIEM/Release 5.0.0 Feb 20, 2025
@jr0me
Copy link
Member

jr0me commented Feb 21, 2025

Update

Started to look into the issue. I'm redesigning main.cpp and process_options files to enable conditional compilation according to platforms.

@jr0me jr0me linked a pull request Feb 21, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants