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

Disable settings with wazuh.yml configuration #6557

Closed
6 tasks done
Tracked by #6127
asteriscos opened this issue Mar 27, 2024 · 7 comments · Fixed by #6607 or wazuh/wazuh-documentation#7220
Closed
6 tasks done
Tracked by #6127

Disable settings with wazuh.yml configuration #6557

asteriscos opened this issue Mar 27, 2024 · 7 comments · Fixed by #6607 or wazuh/wazuh-documentation#7220
Assignees
Labels
level/task Task issue type/enhancement Enhancement issue

Comments

@asteriscos
Copy link
Member

asteriscos commented Mar 27, 2024

Description

We need to implement a new setting in the wazuh.yml configuration file that disables the access to modify Wazuh Dashboard settings.

Tasks

Screenshots

Configuration tab
image
image

@asteriscos asteriscos added type/enhancement Enhancement issue level/task Task issue labels Mar 27, 2024
@wazuhci wazuhci moved this to Backlog in Release 4.9.0 Mar 27, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.9.0 Apr 2, 2024
@wazuhci wazuhci moved this from In progress to Backlog in Release 4.9.0 Apr 2, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 4.9.0 Apr 18, 2024
@Desvelao
Copy link
Member

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

@Desvelao
Copy link
Member

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

@Desvelao
Copy link
Member

Desvelao commented Apr 19, 2024

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.

@Desvelao
Copy link
Member

Due to we are working into replacing the render based on AngularJS template to ReactJS, to hide the Configuration tab, this issue depends on #6577.

@Desvelao
Copy link
Member

Update documentation

I added the new setting to the specification of the configuration file on this pull request: wazuh/wazuh-documentation#7220

@wazuhci wazuhci moved this from In progress to Blocked in Release 4.9.0 Apr 23, 2024
@Desvelao
Copy link
Member

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 on App Settings when the new setting is disabled

@Desvelao
Copy link
Member

Desvelao commented Apr 26, 2024

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

@wazuhci wazuhci moved this from Blocked to Pending review in Release 4.9.0 Apr 26, 2024
@wazuhci wazuhci moved this from Pending review to In review in Release 4.9.0 Apr 26, 2024
@lucianogorza lucianogorza moved this from In review to In final review in Release 4.9.0 Apr 30, 2024
@wazuhci wazuhci moved this from In final review to Done in Release 4.9.0 May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/enhancement Enhancement issue
Projects
No open projects
Status: Done
2 participants