-
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
Rollback configuration store from saved object to configuration file #6573
Conversation
…tion file - Rollback the store system to configuration file - Change WAZUH_CORE_CONFIGURATION_CACHE_SECONDS from 60 to 10 - Create logic to ensure the configuration file is created else create it with default configuration on start - Remove task to migrate the configuration file to saved object - Enhance the Configuration service to include references to categories and some utility functions - Remove plugin settings: - wazuh_core.instance - wazuh_core.encryption_key
…e to saved object
…n App Settings application - Display the real path of the configuration file instead of the fixed value on App Settings - Add configuration_file property to the response of GET /api/setup - Refactor the ConfigurationStore services - Minor enhancements typed code
…er APIs - Remove buttons to edit and remove from the table - Change the form to add an API connection by information about editing the configuration file
… backend side - Remove API endpoints and related controllers - POST /hosts/apis/{id} - PUT /hosts/apis/{id} - DELETE /hosts/apis/{id} - Remove methods to manage the API connections in the ManageHosts service
…ue to an error in the backend side - Renamed setting properties: - validate -> validateUIForm - validateBackend -> validate - Adapted the validation on the affected API endpoints - Removed transformation of changed values of useForm hook. This transformation is now done externally.
- Enhance the validation of enrollment.dns setting - Replace the validation of the server address input on Deploy new agent guide by the validation of enrollment.dns plugin setting - Remove validateServerAddress method and related tests. Move tests to apply to SettingsValidator
…ization settings on App Settings - Create getSettingValueIfNotSet method for Configuration services to manage the customization settings - Adapt the getCustomizationSetting method of Configuration service to use getSettingValueIfNotSet - Change the parameters of getCustomizationSetting of Configuration service to support multiple settings - Adapt printer to the usage of getCustomizationSettings redefinition - Enhance code typings
- Rollback to the consideration of administrator user based on the administrator API connection role - Create logic to check this consideration to the DashboardSecurity services in frontend and backend side - Add getAccountFromJWTAPIDecodedToken method to frontend side - Adapt the WzAuthentication service to use the getAccountFromJWTAPIDecodedToken - Add a constant that defines the ID for the administrator role of the API connection - Remove previous consideration based on the access to the security REST API of the platform - Remove API endpoint `GET /utils/account` and getPluginScopedAccount controller - Remove fetch user account data from the frontend side - Remove fetchAccount method of DashboardSecurity service on the frontend side - Adapt routeDecoratorProtectedAdministrator route decorator - Enhance the message about the administrator missing requirements - Rename administrator_error_message to administrator_requirements related to the consideration of administrator user
…tore in the backend side
…o feat/6570-rollback-plugins-configuration
…o feat/6570-rollback-plugins-configuration
Testrollback-configuration-storeLegend: UI
Details 🟢 Ensure the Server APIs application does not have the buttons to edit or remove the API application on the Actions column of the tableFirefox - ⚫ Safari - ⚫ 🟢 In the Server APIs application, click on the Add API connection and should display information about modifying the configuration fileFirefox - ⚫ Safari - ⚫ 🟢 Ensure the customization settings are applied when they are defined and the customization is enabledFirefox - ⚫ Safari - ⚫ 🟢 Go to App Settings application and check it displays the tabs of Configuration and MiscellaneousFirefox - ⚫ Safari - ⚫ Backend
Details 🟢 With no configuration file, start Wazuh dashboard, the configuration file should be created with the default configuration🟢 With a defined configuration file, start Wazuh dashboard, and the configuration file should not be replaced by the default content🟡 Go to App Settings, edit a setting, this should be saved into the configuration file🟡 Warning => #6573 (comment) |
UI
Details 🟢 Ensure the Server APIs application does not have the buttons to edit or remove the API application on the Actions column of the tableChrome - 🟢 Firefox - ⚫ Safari - ⚫ 🟢 In the Server APIs application, click on the Add API connection and should display information about modifying the configuration fileChrome - 🟢 Firefox - ⚫ Safari - ⚫ 🟢 Ensure the customization settings are applied when they are defined and the customization is enabledChrome - 🟢 Firefox - ⚫ Safari - ⚫ 🟢 Go to App Settings application and check it displays the tabs of Configuration and MiscellaneousChrome - 🟢 Firefox - ⚫ Safari - ⚫ Backend
Details 🟢 With no configuration file, start Wazuh dashboard, the configuration file should be created with the default configuration🟢 With a defined configuration file, start Wazuh dashboard, and the configuration file should be replaced by the default content🟢 Go to App Settings, edit a setting, this should be saved into the configuration file |
…n/clear - Remove API endpoint POST /utils/configuration/clear - Remove route controller
… period of time - Add plugin setting category: API_CONNECTION (related to hosts setting) - Replace the category of hosts plugin setting - Refactor the setting.store.file interface: - Remove configurable - Add configurableManaged and defaultBlock - Adapt the plugin settings defitions with these changes - Remove the configuration block related to the API connections from the ConfigurationStore service to the plugin setting definition through the defaultBlock - Enhance logging on ManageHosts
|
|
Changes
|
|
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.
Description
This pull request rollbacks the configuration stored in a saved object to a configuration file.
Changes:
ManageHosts
POST /utils/configuration/import
administrator
APIconnection role
GET /utils/account
@osd/config-schema
package (used in the related API endpoints)useForm
hook and managed externallyenrollment.dns
on App Settings application. Move thevalidateServerAddress
to SettingsValidators and replace its usage in the Deploy new agent guidegetCustomizationSetting
and its usage to get the plugin settings taking into account the hidden values.Miscellaneous
tab ofApp Settings
application was not accessible from UIIssues Resolved
#6570
Evidence
Test
rollback-configuraiton-store
Legend:
⚫: none
🟢: pass
🟡: warning
🔴: fail
⚪: not applicable
UI
Details
⚫ Ensure the Server APIs application does not have the buttons to edit or remove the API application on the Actions column of the table
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ In the Server APIs application, click on the Add API connection and should display information about modifying the configuration file
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Ensure the customization settings are applied when they are defined and the customization is enabled
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
⚫ Go to App Settings application and check it displays the tabs of Configuration and Miscellaneous
Chrome - ⚫
Firefox - ⚫
Safari - ⚫
Backend
Details
⚫ With no configuration file, start Wazuh dashboard, the configuration file should be created with the default configuration
⚫ With a defined configuration file, start Wazuh dashboard, and the configuration file should not be replaced by the default content
⚫ Go to App Settings, edit a setting, this should be saved into the configuration file
Check List
yarn test:jest