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 extensions.* and disabled_roles settings #5988

Conversation

JuanGarriuz
Copy link
Member

@JuanGarriuz JuanGarriuz commented Oct 10, 2023

Description

This pull request removes the extensions.* and disabled_roles because these settings will be deprecated when moving to different registered applications.

Changes:

  • Remove the visibility of modules:
    • Remove the view to configure the modules in the UI
    • Remove settings related to configuring the visibility of modules on the configuration file, ability to configure from UI
    • Remove the persistence of visibility of modules on wazuh-registry.json file
    • Add a migration to remove the extensions key in the host data stored in wazuh-registry.json
  • Remove the setting disabled_roles from the configuration file and UI.
    • Remove frontend request to check if the wazuh application should be visible
    • Remove endpoint to check if the wazuh application should be visible
  • Remove the logic related to extensions
  • Remove managementReducers key from Redux store and related action
    creators and related usage
  • Remove toolsReducers key from Redux store and related action
    creators and related usage
  • Remove securityReducers key from Redux store and related action
    creators and related usage
  • Fix some breadcrumbs

Issues Resolved

#5965

Evidence

image

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

UI

Test Chrome Firefox Safari
The side menu should not display access to the Modules application
Upgrading the application, should remove the extensions key from the wazuh-registry.json
The extensions.* and disabled_roles settings should not be displayed in the Wazuh plugin settings application

Details

⚫ The side menu should not display access to the Modules application

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ Upgrading the application, should remove the extensions key from the wazuh-registry.json

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

⚫ The extensions.* and disabled_roles settings should not be displayed in the Wazuh plugin settings application

Chrome - ⚫

Firefox - ⚫

Safari - ⚫

Backend

Test Result
In a fresh installation, the generated configuration file (wazuh.yml) should not contain reference to extensions.* and disabled_roles settings.

Details

⚫ In a fresh installation, the generated configuration file (wazuh.yml) should not contain reference to `extensions.*` and `disabled_roles` settings.

Check List

  • All tests pass
    • yarn test:jest
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@Desvelao Desvelao changed the title remove modules Remove extensions.* and disabled_roles settings Oct 20, 2023
@JuanGarriuz JuanGarriuz marked this pull request as ready for review October 20, 2023 06:47
@JuanGarriuz JuanGarriuz requested a review from a team as a code owner October 20, 2023 06:47
@yenienserrano
Copy link
Member

yenienserrano commented Oct 20, 2023

Test

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

UI

Test Chrome Firefox Safari
The side menu should not display access to the Modules application 🟢
Upgrading the application, should remove the extensions key from the wazuh-registry.json 🟢
The extensions.* and disabled_roles settings should not be displayed in the Wazuh plugin settings application 🟢

Details

🟢 The side menu should not display access to the Modules application

Chrome - 🟢

image

Firefox - ⚫

Safari - ⚫

🟢 Upgrading the application, should remove the extensions key from the wazuh-registry.json

Chrome - 🟢

{"name":"Wazuh dashboard","app-version":"4.7.0","revision":"00","installationDate":"2023-10-20T09:27:40.686Z","lastRestart":"2023-10-20T09:27:40.686Z","hosts":{"imposter":{"cluster_info":{"manager":"wazuh-manager-master-0","node":"master-node","cluster":"wazuh","status":"enabled","allow_run_as":2},"extensions":{"github":true}}}}
node@osd:~/kbn$ cat data/wazuh/config/wazuh-registry.json 
{"name":"Wazuh dashboard","app-version":"4.8.0","revision":"00","installationDate":"2023-10-20T13:54:57.200Z","lastRestart":"2023-10-20T13:54:57.200Z","hosts":{"imposter":{"cluster_info":{"manager":"wazuh-manager-master-0","node":"master-node","cluster":"wazuh","status":"enabled","allow_run_as":2}}}}

Firefox - ⚫

Safari - ⚫

🟢 The extensions.* and disabled_roles settings should not be displayed in the Wazuh plugin settings application

Chrome - 🟢

image
image

Firefox - ⚫

Safari - ⚫

Backend

Test Result
In a fresh installation, the generated configuration file (wazuh.yml) should not contain reference to extensions.* and disabled_roles settings. 🟢

Details

🟢 In a fresh installation, the generated configuration file (wazuh.yml) should not contain reference to `extensions.*` and `disabled_roles` settings.
grep -iE  "extensions|disabled_roles" data/wazuh/config/wazuh.yml
# Supported extensions: .jpeg, .jpg, .png, .svg. Recommended dimensions:
# extensions: .jpeg, .jpg, .png, .svg. Recommended dimensions: 300x70px. Maximum
# top left corner of every page of the PDF. Supported extensions: .jpeg, .jpg,

- Remove managementReducers key from Redux store and related action
  creators and related usage
- Remove toolsReducers key from Redux store and related action
  creators and related usage
- Remove securityReducers key from Redux store and related action
  creators and related usage
- Fix some breadcrumbs
@github-actions
Copy link
Contributor

Code coverage (Jest) % values
Statements 11.82% ( 4031 / 34087 )
Branches 8.04% ( 1850 / 22987 )
Functions 11.05% ( 898 / 8125 )
Lines 12% ( 3918 / 32641 )

@Desvelao
Copy link
Member

Desvelao commented Oct 20, 2023

Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable

UI

Test Chrome Firefox Safari
The side menu should not display access to the Modules application 🟢
Upgrading the application, should remove the extensions key from the wazuh-registry.json 🟢
The extensions.* and disabled_roles settings should not be displayed in the Wazuh plugin settings application 🟢

Details

🟢 The side menu should not display access to the Modules application

Chrome - 🟢
image

Firefox - ⚫

Safari - ⚫

🟢 Upgrading the application, should remove the extensions key from the wazuh-registry.json

Chrome - 🟢

{"name":"Wazuh dashboard","app-version":"4.7.0","revision":"00","installationDate":"2023-10-20T09:27:40.686Z","lastRestart":"2023-10-20T09:27:40.686Z","hosts":{"imposter":{"cluster_info":{"manager":"wazuh-manager-master-0","node":"master-node","cluster":"wazuh","status":"enabled","allow_run_as":2},"extensions":{"github":true}}}}
node@osd:~/kbn$ cat data/wazuh/config/wazuh-registry.json 
{"name":"Wazuh dashboard","app-version":"4.8.0","revision":"00","installationDate":"2023-10-20T13:54:57.200Z","lastRestart":"2023-10-20T13:54:57.200Z","hosts":{"imposter":{"cluster_info":{"manager":"wazuh-manager-master-0","node":"master-node","cluster":"wazuh","status":"enabled","allow_run_as":2}}}}

Firefox - ⚫

Safari - ⚫

🟢 The extensions.* and disabled_roles settings should not be displayed in the Wazuh plugin settings application

Chrome - 🟢
image

Firefox - ⚫

Safari - ⚫

Backend

Test Result
In a fresh installation, the generated configuration file (wazuh.yml) should not contain reference to extensions.* and disabled_roles settings. 🟢

Details

🟢 In a fresh installation, the generated configuration file (wazuh.yml) should not contain reference to `extensions.*` and `disabled_roles` settings.
grep -iE  "extensions|disabled_roles" data/wazuh/config/wazuh.yml
# Supported extensions: .jpeg, .jpg, .png, .svg. Recommended dimensions:
# extensions: .jpeg, .jpg, .png, .svg. Recommended dimensions: 300x70px. Maximum
# top left corner of every page of the PDF. Supported extensions: .jpeg, .jpg,

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

🟢 code
🟢 tests #5988 (comment)

Copy link
Member

@yenienserrano yenienserrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Desvelao Desvelao merged commit f14d3fd into feat/83-move-menu-items-to-applications Oct 20, 2023
2 checks passed
@Desvelao Desvelao deleted the feat/5965-remove-the-visibility-configuration-of-modules branch October 20, 2023 14:10
@Desvelao Desvelao mentioned this pull request Oct 23, 2023
6 tasks
asteriscos added a commit that referenced this pull request Nov 3, 2023
* feat(menu): create applications for each menu item

* fix(share-data-applications): save selected agent data into sessionStorage

* fix(menu): redirection other tabs in RBAC application

* fix(menu): redirection to the application itself

* fix(menu): rename MITRE ATT&CK appplication

* feat(menu): add GDPR application

* feat(menu): Add modules and Miscellaneous applications

* feat(menu): remove navigation by tabs in Settings

* feat(menu): remove navigation by tabs in Tools

* feat(menu): add Overview app

* fix(menu): change application name to Security configuration assessment

* fix(menu): change app name to Docker listener

* feat(menu): add services to app redirection

* feat(menu): use i18n to define the app and categories name

* fix(menu): removed wz- prefix from the applications and renamed status to server-status due to application ID conflicts

* 5814 adapt the breadcrum to the new menu (#5817)

* Change Agents for Endpoints summary

* Remove unnecessary styles

* Remove deprecated code

* Remove deprecated code

* Revert changes in wz-menu.js

* Remove deprecated code

* Change some breadcrumbs

* Remove wazuh menu

* Change Management breadcrumbs

* Change setGlobalBreadcrumbs for withGlobalBreadcrumbs hoc

* Fix test

* Change href to agent

* Fix redirection breadcrumbs: inventory data, stats and configuration

* Add Miscellaneous to tab into Configuration App (#5830)

* Add Tab into Configuration App to show Miscellaneous as a tab

* Change compareCurrentAppID: wz-configuration to configuration

---------

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>

* Adapt the new global menu redirections (#5827)

* Fix endpoint summary and server managment redirections

* fix: adapt the redirections to applications

- Endpoints summary
- IT Hygiene
- Groups

* fix(health-check): fix redirection to health check the removed the tab query parameter from URL and then the previous URL could not be rebuilt

* fix(redirections): redirection from Overview app to Endpoints summary

* fix(redirections): removed wz- prefix from the redirections to applications

* fix: renamed apps redirection URLs

* fix: app redirections URLs

* fix: test

* fix: tests

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>

* Modify Overview application to display the new menu (#5852)

* Fix endpoint summary and server managment redirections

* fix: adapt the redirections to applications

- Endpoints summary
- IT Hygiene
- Groups

* fix(health-check): fix redirection to health check the removed the tab query parameter from URL and then the previous URL could not be rebuilt

* fix(redirections): redirection from Overview app to Endpoints summary

* fix(redirections): removed wz- prefix from the redirections to applications

* Change overview page, linked to the new menu estructure

* fix: move definitions of applications in the home application

* fix: application descriptions

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>

* Remove logo side bar and update logo app description (#5882)

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>

* fix: customization.logo.app setting description

* Merge master into feat/83-move-menu-items-to-applications

* fix: remove comment on test file

* fix: remove comment on test file

* Fix redirection (#5926)

Fix redirection agents table

* Fix redirection to groups and statistics (#5972)

* Fix groups redirection

* Fix statistics redirection

* Fix/5964 fix the breadcrumb of applications (#5968)

* Remove wazuh in breadcrumb

* Change breadcrumb OSD

* Add comment

* Center the agent's name in the breadcrumb

* Update sidebar menu and overview app (#5928)

* Update sidebar menu and overview app

* fix redirections

* Agent message fixed

* Server management order change to 6

* i18n added to applications

* fixed some redirections

---------

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>

* Adapt the navigation between applications (#5983)

* feat: adapt navigation between the applications

* Change redirection

* fix(test): mock service

---------

Co-authored-by: yenienserrano <ian.serrano@wazuh.com>

* Remove categories from overview (#5991)

* Remove categories from overview

* Fix snapshot

---------

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>

* fix: app category name and id

* Add order to applications (#6015)

* feat(applications): add order definition to applications

* feat(applications): register order to the applications

* Remove reloading when changing app (#5986)

* change app/discover for app/wz-discover

* Remove reload and add sync history

* Change defaultRout in opensearch_dashboards.yml osd-dev

* feat: adapt navigation between the applications

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>

* Rename applications on agent menu (#5997)

* feat: rename applications on agent menu

Refactor agent menu to use the applications and categories
Simplify the data saved in the local storage to keep the pinned
applications

* Recover the redirectTo in settings and wazuh settings

* Fix pin icon in menu agent

* Fix agent navbar

---------

Co-authored-by: yenienserrano <ian.serrano@wazuh.com>

* Remove `extensions.*` and `disabled_roles` settings (#5988)

* remove modules

* registry.json extension remove

* remove getExtension from menu-agent and wz-menu

* Delete extensions logic

* Fix wazuh version test

* remove disabled_roles extructure

* remove disabled_roles endpoint

* Add a migration to remove the extensions key in the host and add test for it

* mange-host and update-registry fixed

* fix: render tabs in Wazuh plugin settings application and minor enhancements

* feat: remove unused states in Redux store and minor fixes on breadcrumbs

- Remove managementReducers key from Redux store and related action
  creators and related usage
- Remove toolsReducers key from Redux store and related action
  creators and related usage
- Remove securityReducers key from Redux store and related action
  creators and related usage
- Fix some breadcrumbs

* fix: revert content of osquery.js files

* fix: revert configuration in .settings.json

* fix(test): fix test

---------

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>

* Add an agent selector to IT Hygiene application (#6005)

* feat: add agent selector to IT Hygiene application

- Wrapped the IT Hygiene application with a required selection of agent
- Added a Explore agent button to the IT Hygiene application
- The Explore agent button of alert modules now display the global agent
  selector instead of the local one.
- Removed the local agent selector modal of Explore agent button on alert
  modules
- Removed the related action creator and reducer case for SHOW_EXPLORE_AGENT_MODAL

* feat: add reactivity to agent welcome view when changing the selected agent

- Refactor MITRE ATT&CK panel
  - Rename MITRE to MITRE ATT&CK in the panel
- Rename mitre_top to mitre-top according to the file naming convention
- Add reactivity to the FIM: Recent events table when changing the
  selected agent

* feat(it-hygiene): fix problems when selecting and agent and navigate

- Move prompt agent never connected to prompts directory
  - Remove duplicated and related components on agent welcome, inventory
    data and agent configuration
- Change button on prompt agent never connected to Select agent
- Change Explore agent button on agent welcome

* fix: imports on prompt and add clarification on agent welcome

* fix(it-hygiene): change mitre attack referecence

* Fix navbar agent styles

* Fix refresh page: inventory data and stats

---------

Co-authored-by: yenienserrano <ian.serrano@wazuh.com>

* fix: breadcrumb of Endpoint groups application

* Fix change APIs (#6056)

* Fix change apis

* Change management label in menu

* Fix Switchtab exception in dashboards (#6019)

* Define the component properties in the controller constructor

* Delete redundant fetch in Events refresh button

* Prevent duplicate request on Events initial requests

* Revert "Prevent duplicate request on Events initial requests"

This reverts commit db721a1.

* Remove dulplicate request on changeTabView

* Fix explore agent button

* Fix imposter with explore agent button

* Change names of the applications in the menu

* Change breadcrumbs

* Change Wazuh API configuration to API Configuration

* Change the style of Home icons

* Change applications order

* Change comment categories ID

* Change id to new names in applications

* Change redirections without refresh page

* Fix test

* changelog: add entries

---------

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Co-authored-by: JuanGarriuz <juan.garcia@wazuh.com>
Co-authored-by: yenienserrano <ian.serrano@wazuh.com>
Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove the visibility configuration of modules and define and implement the ability to visualize applications
3 participants