-
Notifications
You must be signed in to change notification settings - Fork 181
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
Update usage of GET /groups/{group_id}/files/{file_name}/- json/xml #6385
Update usage of GET /groups/{group_id}/files/{file_name}/- json/xml #6385
Conversation
…p_id}/files/{file_name}
…p_id}/files/{file_name}
…p_id}/files/{file_name}
…p_id}/files/{file_name}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test
Video_2024-02-21_11-29-28.mp4
Test ✅
CR ✅
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker/imposter/wazuh-config.yml
Outdated
# Get a file in group | ||
- method: GET | ||
path: /groups/{group_id}/files/{file_name}/json | ||
# # Get a file in group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not used I think we should remove it to avoid polluting the file.
…p_id}/files/{file_name}
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
The following endpoints have been refactored:
Therefore, a revision in the code to properly manage them has been necessary.
The change to the endpoints has been to remove the extension from the path and replace it with a raw variable, making it so that if the variable is set to true, it will return the response structured as an XML; if the parameter is not added, it will return the response as a JSON.
Within the front-end structure, no endpoint needs a JSON structure, so I have added the parameter raw=true as the default. This is reflected in the file
plugins/main/public/controllers/management/components/management/groups/utils/groups-handler.js
, in the function getFileContent.Issues Resolved
Update usage of GET /groups/{group_id}/files/{file_name}/json and GET /groups/{group_id}/files/{file_name}/XML
Evidence
Evidence.mp4
Test
To generate a manager that works correctly, it will be necessary to use the master branch. For this, you can include this code in the dev.yml.
The files located in /wazuh_manager_filebeat_sources_cmake should be replaced with the following ones:
master-manager-enviroment.zip
Check List
yarn test:jest