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

Remove the ability to store the PDF reports into the filesystem #6495

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch '4.9.0' of https://github.com/wazuh/wazuh-kibana-app int…
…o enhancement/6487-remove-ability-store-pdf-reports-filesystem
Desvelao committed Mar 12, 2024
commit 5af83733bdf0faf218f07df3ec4128e37e4beb32
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,10 @@ All notable changes to the Wazuh app project will be documented in this file.

- Support for Wazuh 4.9.0
- Added AngularJS dependencies [#6145](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6145)
- Added a migration task to setup the configuration using a configuration file [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Added the ability to manage the API hosts from the Server APIs [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Added edit groups action to Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250)
- Added upgrade agent action to Endpoints Summary [#6476](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6476)
- Added global actions add agents to groups and remove agents from groups to Endpoints Summary [#6274](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6274)
- Added propagation of updates from the table to dashboard visualizations in Endpoints summary [#6460](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6460)

@@ -17,6 +20,8 @@ All notable changes to the Wazuh app project will be documented in this file.
- Removed embedded discover [#6120](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6120) [#6235](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6235) [#6254](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6254) [#6285](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6285) [#6288](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6288) [#6290](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6290) [#6289](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6289) [#6286](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6286) [#6275](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6275) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6297](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6297) [#6287](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6291](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6287) [#6459](https://github.com/wazuh/wazuh-dashboard-plugins/pull/#6459)
- Develop logic of a new index for the fim module [#6227](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6227)
- Allow editing groups for an agent from Endpoints Summary [#6250](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6250)
- Changed as the configuration is defined and stored [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Change the view of API is down and check connection to Server APIs application [#6337](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6337)
- Changed the usage of the endpoint GET /groups/{group_id}/files/{file_name} [#6385](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6385)
- Refactoring and redesign endpoints summary visualizations [#6268](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6268)

10 changes: 10 additions & 0 deletions docker/imposter/tasks/empty.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"data": {
"affected_items": [],
"total_affected_items": 0,
"total_failed_items": 0,
"failed_items": []
},
"message": "All specified task's status were returned",
"error": 0
}
47 changes: 47 additions & 0 deletions docker/imposter/tasks/status.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
var storeWazuh = stores.open('storeWazuh');
var attemptRestart = storeWazuh.load('attempt');

var taskStatus = context.request.queryParams.status;

if (!taskStatus) {
respond().withStatusCode(200).withFile('tasks/status_in_progress_2.json');
}

if (attemptRestart < 5) {
storeWazuh.save('attempt', attemptRestart + 1);

if (taskStatus === 'In progress') {
respond().withStatusCode(200).withFile('tasks/status_in_progress_2.json');
}

if (taskStatus === 'Done' || taskStatus === 'Failed') {
respond().withStatusCode(200).withFile('tasks/empty.json');
}
} else if (attemptRestart < 10) {
storeWazuh.save('attempt', attemptRestart + 1);

if (taskStatus === 'In progress') {
respond().withStatusCode(200).withFile('tasks/status_in_progress_1.json');
}

if (taskStatus === 'Done') {
respond().withStatusCode(200).withFile('tasks/status_done.json');
}

if (taskStatus === 'Failed') {
respond().withStatusCode(200).withFile('tasks/empty.json');
}
} else {
if (taskStatus === 'In progress') {
respond().withStatusCode(200).withFile('tasks/empty.json');
}

if (taskStatus === 'Done') {
respond().withStatusCode(200).withFile('tasks/status_done.json');
}

if (taskStatus === 'Failed') {
storeWazuh.save('attempt', 0);
respond().withStatusCode(200).withFile('tasks/status_failed.json');
}
}
22 changes: 22 additions & 0 deletions docker/imposter/tasks/status_done.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"data": {
"affected_items": [
{
"message": "Success",
"agent": "001",
"task_id": 1,
"node": "worker2",
"module": "upgrade_module",
"command": "upgrade",
"status": "Done",
"create_time": "2024-03-11T11:55:33.000Z",
"last_update_time": "2020-03-11T12:05:10.000Z"
}
],
"total_affected_items": 1,
"total_failed_items": 0,
"failed_items": []
},
"message": "All specified task's status were returned",
"error": 0
}
22 changes: 22 additions & 0 deletions docker/imposter/tasks/status_failed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"data": {
"affected_items": [
{
"message": "Success",
"agent": "002",
"task_id": 2,
"node": "worker2",
"module": "upgrade_module",
"command": "upgrade",
"status": "Failed",
"create_time": "2024-03-11T11:57:44.000Z",
"last_update_time": "2020-03-11T12:11:32.000Z"
}
],
"total_affected_items": 1,
"total_failed_items": 0,
"failed_items": []
},
"message": "All specified task's status were returned",
"error": 0
}
22 changes: 22 additions & 0 deletions docker/imposter/tasks/status_in_progress_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"data": {
"affected_items": [
{
"message": "Success",
"agent": "002",
"task_id": 2,
"node": "worker2",
"module": "upgrade_module",
"command": "upgrade",
"status": "In progress",
"create_time": "2024-03-11T11:57:44.000Z",
"last_update_time": "2020-03-11T11:57:46.000Z"
}
],
"total_affected_items": 1,
"total_failed_items": 0,
"failed_items": []
},
"message": "All specified task's status were returned",
"error": 0
}
33 changes: 33 additions & 0 deletions docker/imposter/tasks/status_in_progress_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"data": {
"affected_items": [
{
"message": "Success",
"agent": "001",
"task_id": 1,
"node": "worker2",
"module": "upgrade_module",
"command": "upgrade",
"status": "In progress",
"create_time": "2024-03-11T11:55:33.000Z",
"last_update_time": "2020-03-11T11:55:36.000Z"
},
{
"message": "Success",
"agent": "002",
"task_id": 2,
"node": "worker2",
"module": "upgrade_module",
"command": "upgrade",
"status": "In progress",
"create_time": "2024-03-11T11:57:44.000Z",
"last_update_time": "2020-03-11T11:57:46.000Z"
}
],
"total_affected_items": 2,
"total_failed_items": 0,
"failed_items": []
},
"message": "All specified task's status were returned",
"error": 0
}
3 changes: 3 additions & 0 deletions docker/imposter/wazuh-config.yml
Original file line number Diff line number Diff line change
@@ -889,6 +889,9 @@ resources:
# List tasks
- method: GET
path: /tasks/status
response:
statusCode: 200
scriptFile: tasks/status.js

# ===================================================== #
# VULNERABILITY
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.