This PR introduces a mock server based on Imposter to simulate the Wazuh Agent's Comms API (port 27000) and Management API (port 55000). The mock server supports HTTP and HTTPS protocols, logs stateful and stateless requests, and facilitates testing the agent's interactions without requiring a full backend setup.
The mock server is distributed as a Docker environment and includes a script to simplify execution and configuration.
Usage
Command-line Options
The server script supports the following options:
Option
Description
Default
--comms-port <PORT>
Comms API port
27000
--http
Use HTTP
--https
Use HTTPS
✅
--log-stateful
Log stateful requests
--log-stateless
Log stateless requests
--mgmt-port <PORT>
Management API port
55000
Requirements
Docker
Example
To start the mock server with default settings:
./mock-server
To use HTTP instead of HTTPS and log stateful requests:
./mock-server --http --log-stateful
09:07:37 INFO i.g.i.Imposter - Starting mock engine 4.2.1
09:07:41 INFO i.g.i.Imposter - Mock engine up and running on https://localhost:8443
Description
This PR introduces a mock server based on Imposter to simulate the Wazuh Agent's Comms API (port 27000) and Management API (port 55000). The mock server supports HTTP and HTTPS protocols, logs stateful and stateless requests, and facilitates testing the agent's interactions without requiring a full backend setup.
The mock server is distributed as a Docker environment and includes a script to simplify execution and configuration.
Usage
Command-line Options
--comms-port <PORT>
--http
--https
--log-stateful
--log-stateless
--mgmt-port <PORT>
Requirements
Example
To start the mock server with default settings:
To use HTTP instead of HTTPS and log stateful requests: