wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
Disable settings with wazuh.yml configuration
Description
We need to implement a new setting in the wazuh.yml
configuration file that disables the access to modify Wazuh Dashboard settings.
Tasks
- [x] Add new setting to wazuh.yml
- [x] Protect API endpoints related to updating the configuration
- [x] Hide the App settings -> Configuration tab (Only the Miscellaneous tab should be visible)
- [x] Hide the Remember server address in the Deploy new agent guide
- [x] Update documentation https://github.com/wazuh/wazuh-documentation/pull/7220
- [x] Add the new setting
Screenshots
Configuration tab
Changes
- Create API endpoint controller decorator to protect the routes related to edit the configuration
- Protect the API endpoints with the new route decorator
-
POST /utils/configuration
-
POST /utils/configuration/files/{key}
-
DELETE /utils/configuration/files/{key}
-
- Add new setting to enable or disable the ability to edit the configuration (WIP)
Side changes
- Create a compose method to add multiple decorators to an API endpoint controller
Changes
- Add new setting to manage the ability to edit the configuration from API endpoints and UI
- Add test related to API controllers decorators
- Add test about PUT /utils/configuration related to API endpoint protection
New setting
key | type | default value | description |
---|---|---|---|
configuration.ui_api_editable |
boolean |
true |
Enable or disable the ability to edit the configuration from UI or API endpoints. When disabled, this can only be edited from the configuration file, the related API endpoints are disabled, and the UI is inaccessible. |
Due to we are working into replacing the render based on AngularJS template to ReactJS, to hide the Configuration
tab, this issue depends on https://github.com/wazuh/wazuh-dashboard-plugins/issues/6577.
Update documentation
I added the new setting to the specification of the configuration file on this pull request: https://github.com/wazuh/wazuh-documentation/pull/7220
Changes
- Update the development branch with the latest changes of
4.9.0
branch - Refactor some code on
Settings
component- Remove unused code
- Minor enhancements
- Put inaccessible the
Configuration
tab onApp Settings
when the new setting is disabled
Changes
- Update the development branch with the latest changes of
4.9.0
branch - Hide the button to save the
enrollment.dns
plugin setting from the Deploy new agent guide depending on if the configuration is editable from UI - Hide Settings button on Statistics app depending on if the configuration is editable from UI