-
Notifications
You must be signed in to change notification settings - Fork 186
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
Use new default_ruleset parameter when reading rules and decoders file content #5176
Comments
Work in progressMeanwhile, I am implementing the initial request of the |
DiscussionA meeting will be done in the following days where we could talk about the problem mentioned #5176 (comment). |
Patch for the initial requestI was working around the initial request done in the issue ignoring the problem found. Depending on the decision taken, the next patch could be useful or we should work on another solution. 5176-get-rule-decoder-file-content-using-default-ruleset-parameter.txt The patch contains:
|
DiscussionWe had a meeting today. The API colleagues will review the possibility to give support to define the path of the rule/decoder file because the current implementation doesn't support getting the content of the file located in a different path to |
TrackingFramework reopened the issue wazuh/wazuh#15994 to investigate the discussion of the meeting. |
Blocked by wazuh/wazuh#15994 |
Researchwazuh/wazuh#15994 was merged. I built a Wazuh manager in 4.6.0 that has implemented the fix of the issue. I could adapt the API request to get the file content. But I found other problems that I guess the product should support. Following the approach of the How are we supposed to edit or delete a custom file indicating the relative directory name? API logs:
EDIT: I commented on this with the API co-workers and they reopened the issue again wazuh/wazuh#15994 |
I asked to @Selutario about:
and he replied that it does, so this is not considered as a problem. |
Research
Reply by @Selutario:
@davidjiglesias commented that this was not a requirement when API RBAC was designed in 2019. For now, we should take into account the plugin RBAC usage. |
BlockThis issue is blocked by wazuh/wazuh#15994 related to this topic: #5176 (comment). |
ChecksThe following checks have to be done to ensure the functionalities are not broken:
|
Patch to fix the update and delete rule/decoder file. |
The pull request was recently merged and the issue was closed, so we could continue the work in this issue. |
The problem commented here #5176 (comment) was confirmed by an API co-worker. They will work in a fix. For another hand, I added the features to update and delete the files using the We will block the issue until the fix related to the problem found is patched. Then we should check the problem is not happening anymore. |
PR successfully closed |
Description
As reported in wazuh/wazuh#15994, we did not have an option to select if a rule or decoder belonged to the default or the custom ruleset when reading the file content from the API.
This caused a bug, also affecting our WUI, where an user creates a new rule file, add it to the custom ruleset (with the same name as a default ruleset file) and when you try to access its content from the interface, the content of the other file is read.
Since we have added a new option to select if the file to be read belongs to the default ruleset or not, we should adapt the WUI to properly use this parameter based on the file being selected, for example:
I have created a copy and modified its content for 0010-rules_config.xml:
However, if I click on the custom one, with path
etc/rules
, I obtain the content for the default one.We can fix this using the new API parameter default_ruleset, setting it as false when the path starts with
etc/
Related issues
The text was updated successfully, but these errors were encountered: