Skip to content

Commit

Permalink
Merge branch '4.9.0' into 6520-remove-discover-implement-embeddable-d…
Browse files Browse the repository at this point in the history
…ashboard-on-malware-detection-module
  • Loading branch information
yenienserrano authored Apr 30, 2024
2 parents 2a52113 + abe8b03 commit e15b331
Show file tree
Hide file tree
Showing 67 changed files with 2,987 additions and 3,760 deletions.
32 changes: 15 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ All notable changes to the Wazuh app project will be documented in this file.
- Move AngularJS controller and view for manage groups to ReactJS [#6543](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6543)
- Move AngularJS controllers and views of Tools and Dev Tools to ReactJS [#6544](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6544)
- Move the AngularJS controller and template of blank screen to ReactJS component [#6538](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6538)
- Move AngularJS controller for management to ReactJS component [#6555](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6555)
- Moved the registry data to in-memory cache [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481)
- Enhance the validation for `enrollment.dns` on App Settings application [#6573](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6573)
- Remove AngularJS controller for manage groups [#6543](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6543)
- Remove some branding references across the application. [#6155](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6155)
- Move AngularJS controller for the agent view to ReactJS [#6618](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6618)
- Implement new data source feature on MITRE ATT&CK module [#6482](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6482)

### Fixed
Expand All @@ -46,27 +47,15 @@ All notable changes to the Wazuh app project will be documented in this file.
- Removed API endpoint DELETE /hosts/remove-orphan-entries [#6481](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6481)
- Remove AngularJS component `click-action` [#6613](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6613)

## Wazuh v4.8.2 - OpenSearch Dashboards 2.10.0 - Revision 00

### Added

- Support for Wazuh 4.8.2

## Wazuh v4.8.1 - OpenSearch Dashboards 2.10.0 - Revision 00

### Added

- Support for Wazuh 4.8.1

## Wazuh v4.8.0 - OpenSearch Dashboards 2.10.0 - Revision 06
## Wazuh v4.8.0 - OpenSearch Dashboards 2.10.0 - Revision 08

### Added

- Support for Wazuh 4.8.0
- Added the ability to check if there are available updates from the UI. [#6093](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6093) [#6256](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6256) [#6328](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6328)
- Added remember server address check [#5791](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5791)
- Added the ssl_agent_ca configuration to the SSL Settings form [#6083](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6083)
- Added global vulnerabilities dashboards [#5896](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5896) [#6179](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6179) [#6173](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6173) [#6147](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6147) [#6231](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6231) [#6246](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6246) [#6321](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6321) [#6338](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6338) [#6356](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6356) [#6396](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6396) [#6399](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6399) [#6405](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6405) [#6410](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6410) [#6424](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6424) [#6422](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6422) [#6429](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6429) [#6448](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6448) [#6488](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6488)
- Added global vulnerabilities dashboards [#5896](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5896) [#6179](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6179) [#6173](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6173) [#6147](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6147) [#6231](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6231) [#6246](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6246) [#6321](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6321) [#6338](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6338) [#6356](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6356) [#6396](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6396) [#6399](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6399) [#6405](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6405) [#6410](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6410) [#6424](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6424) [#6422](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6422) [#6429](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6429) [#6448](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6448) [#6488](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6488) [#6590](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6590)
- Added an agent selector to the IT Hygiene application [#5840](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5840)
- Added query results limit when the search exceed 10000 hits [#6106](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6106)
- Added a redirection button to Endpoint Summary from IT Hygiene application [#6176](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6176)
Expand All @@ -75,13 +64,14 @@ All notable changes to the Wazuh app project will be documented in this file.

### Changed

- Moved the plugin menu to platform applications into the side menu [#5840](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5840) [#6226](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6226) [#6244](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6244) [#6176](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6176) [#6423](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6423) [#6510](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6510)
- Moved the plugin menu to platform applications into the side menu [#5840](https://github.com/wazuh/wazuh-dashboard-plugins/pull/5840) [#6226](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6226) [#6244](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6244) [#6176](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6176) [#6423](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6423) [#6510](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6510) [#6591](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6591)
- Changed dashboards. [#6035](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6035)
- Change the display order of tabs in all modules. [#6067](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6067)
- Upgraded the `axios` dependency to `1.6.1` [#6114](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6114)
- Changed the api configuration title in the Server APIs section. [#6373](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6373)
- Changed overview home top KPIs. [#6379](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6379) [#6408](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6408)
- Changed overview home top KPIs. [#6379](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6379) [#6408](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6408) [#6569](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6569)
- Updated the PDF report year number. [#6492](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6492)
- Changed overview home font size [#6627](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6627)

### Fixed

Expand All @@ -104,6 +94,8 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed a error pop-up spawn in MITRE ATT&CK [#6431](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6431)
- Fixed minor style issues [#6484](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6484) [#6489](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6489)
- Fixed "View alerts of this Rule" link [#6553](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6553)
- Fixed minor color styles [#6587](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6587)
- Fixed disconnected agent configuration error [#6587](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6617)

### Removed

Expand All @@ -114,6 +106,12 @@ All notable changes to the Wazuh app project will be documented in this file.
- Removed compilation date field from the app [#6366](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6366)
- Removed WAZUH_REGISTRATION_SERVER from Windows agent deployment command [#6361](https://github.com/wazuh/wazuh-dashboard-plugins/pull/6361)

## Wazuh v4.7.4 - OpenSearch Dashboards 2.8.0 - Revision 02

### Added

- Support for Wazuh 4.7.4

## Wazuh v4.7.3 - OpenSearch Dashboards 2.8.0 - Revision 02

### Added
Expand Down
3 changes: 3 additions & 0 deletions docker/osd-dev/config/2.x/osd/wazuh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ hosts:
username: wazuh-wui
password: MyS3cr37P450r.*-
run_as: false


wazuh.updates.disabled: true
20 changes: 14 additions & 6 deletions plugins/main/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ export const DATA_SOURCE_FILTER_CONTROLLED_MALWARE_DETECTION_RULE_GROUP =
export const DATA_SOURCE_FILTER_CONTROLLED_AWS_RULE_GROUP = 'aws-rule-group';
export const DATA_SOURCE_FILTER_CONTROLLED_FIM_RULE_GROUP = 'fim-rule-group';


// Wazuh links
export const WAZUH_LINK_GITHUB = 'https://github.com/wazuh';
export const WAZUH_LINK_GOOGLE_GROUPS =
Expand Down Expand Up @@ -313,6 +312,15 @@ export const PLUGIN_PLATFORM_REQUEST_HEADERS = {
export const PLUGIN_APP_NAME = 'dashboard';

// UI
export const UI_COLOR_STATUS = {
success: '#007871',
danger: '#BD271E',
warning: '#FEC514',
disabled: '#646A77',
info: '#6092C0',
default: '#000000',
} as const;

export const API_NAME_AGENT_STATUS = {
ACTIVE: 'active',
DISCONNECTED: 'disconnected',
Expand All @@ -321,11 +329,11 @@ export const API_NAME_AGENT_STATUS = {
} as const;

export const UI_COLOR_AGENT_STATUS = {
[API_NAME_AGENT_STATUS.ACTIVE]: '#007871',
[API_NAME_AGENT_STATUS.DISCONNECTED]: '#BD271E',
[API_NAME_AGENT_STATUS.PENDING]: '#FEC514',
[API_NAME_AGENT_STATUS.NEVER_CONNECTED]: '#646A77',
default: '#000000',
[API_NAME_AGENT_STATUS.ACTIVE]: UI_COLOR_STATUS.success,
[API_NAME_AGENT_STATUS.DISCONNECTED]: UI_COLOR_STATUS.danger,
[API_NAME_AGENT_STATUS.PENDING]: UI_COLOR_STATUS.warning,
[API_NAME_AGENT_STATUS.NEVER_CONNECTED]: UI_COLOR_STATUS.disabled,
default: UI_COLOR_STATUS.default,
} as const;

export const UI_LABEL_NAME_AGENT_STATUS = {
Expand Down
6 changes: 4 additions & 2 deletions plugins/main/opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"id": "wazuh",
"version": "4.9.0-00",
"opensearchDashboardsVersion": "opensearchDashboards",
"configPath": ["wazuh"],
"configPath": [
"wazuh"
],
"requiredPlugins": [
"navigation",
"data",
Expand All @@ -28,4 +30,4 @@
],
"server": true,
"ui": true
}
}
2 changes: 1 addition & 1 deletion plugins/main/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ app.run(function ($rootElement) {
<react-component name="WzMenuWrapper" props=""></react-component>
<react-component name="WzAgentSelectorWrapper" props=""></react-component>
<react-component name="ToastNotificationsModal" props=""></react-component>
<react-component name="WzUpdatesNotification" props=""></react-component>
<react-component name="WzUpdatesNotification"></react-component>
</div>`);

// Bind deleteExistentToken on Log out component.
Expand Down
181 changes: 181 additions & 0 deletions plugins/main/public/components/agents/export-configuration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
/*
* Wazuh app - React component for exporting the configuration of a group.
* Copyright (C) 2015-2022 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Find more information about this on the LICENSE file.
*/
import React, { Component } from 'react';

import {
EuiPopover,
EuiButton,
EuiCheckboxGroup,
EuiSpacer,
EuiButtonEmpty,
} from '@elastic/eui';

import PropTypes from 'prop-types';
import { UnsupportedComponents } from '../../utils/components-os-support';
import { WAZUH_AGENTS_OS_TYPE } from '../../../common/constants';
import { withErrorBoundary } from '../common/hocs';

export const ExportConfiguration = withErrorBoundary(
class ExportConfiguration extends Component {
constructor(props) {
super(props);

this.state = {
buttonDisabled: false,
isPopoverOpen: false,
};

const agentOptions = [
'Global configuration',
'Communication',
'Anti-flooding settings',
'Labels',
'Policy monitoring',
{ name: 'oscap', desc: 'OpenSCAP' },
'CIS-CAT',
'Osquery',
'Inventory data',
'Active response',
'Commands',
{ name: 'docker', desc: 'Docker listener' },
'Log collection',
'Integrity monitoring',
];
const groupOptions = ['Configurations', 'Agents in group'];

this.options = [];
const list = this.props.type === 'agent' ? agentOptions : groupOptions;
list.forEach((x, idx) => {
if (
typeof x === 'string' ||
(x.name &&
!(
UnsupportedComponents[this.props.agentPlatform] ||
UnsupportedComponents[WAZUH_AGENTS_OS_TYPE.OTHERS]
).includes(x.name))
) {
this.options.push({ id: `${idx}`, label: x.desc || x });
}
});

let initialChecks = {};
this.options.forEach(x => {
initialChecks[x.id] = true;
});
this.state.checkboxIdToSelectedMap = initialChecks;
}

selectAll(flag) {
let newCheckboxIdToSelectedMap = {};
for (let i = 0; i < this.options.length; i++) {
newCheckboxIdToSelectedMap[`${this.options[i].id}`] = flag;
}
this.setState({
checkboxIdToSelectedMap: newCheckboxIdToSelectedMap,
buttonDisabled: !flag,
});
}

exportClick() {
this.setState({
isPopoverOpen: !this.state.isPopoverOpen,
});
}

closePopover() {
this.setState({
isPopoverOpen: false,
});
}

onChange = optionId => {
const newCheckboxIdToSelectedMap = {
...this.state.checkboxIdToSelectedMap,
...{
[optionId]: !this.state.checkboxIdToSelectedMap[optionId],
},
};
let result = false;
for (let i = 0; i < this.options.length; i++) {
if (newCheckboxIdToSelectedMap[`${this.options[i].id}`] === true) {
result = true;
}
}
this.setState({
checkboxIdToSelectedMap: newCheckboxIdToSelectedMap,
buttonDisabled: !result,
});
};

render() {
const button = (
<EuiButtonEmpty
iconType='importAction'
iconSide='left'
size='s'
style={{ marginTop: '4px' }}
onClick={this.exportClick.bind(this)}
>
Export PDF
</EuiButtonEmpty>
);
return (
<EuiPopover
id='trapFocus'
ownFocus
button={button}
isOpen={this.state.isPopoverOpen}
closePopover={this.closePopover.bind(this)}
anchorPosition='downRight'
>
<EuiCheckboxGroup
options={this.options}
idToSelectedMap={this.state.checkboxIdToSelectedMap}
onChange={this.onChange}
compressed
/>
<EuiSpacer size='s' />
{this.options.length > 3 && (
<>
<EuiButtonEmpty size='xs' onClick={() => this.selectAll(true)}>
Select all
</EuiButtonEmpty>
<EuiSpacer size='s' />
<EuiButtonEmpty size='xs' onClick={() => this.selectAll(false)}>
Unselect all
</EuiButtonEmpty>
</>
)}
<EuiSpacer size='m' />
<EuiButton
isDisabled={this.state.buttonDisabled}
onClick={() => {
this.closePopover();
this.props.exportConfiguration(
this.state.checkboxIdToSelectedMap,
);
}}
fill
>
Generate PDF report
</EuiButton>
</EuiPopover>
);
}
},
);

ExportConfiguration.propTypes = {
exportConfiguration: PropTypes.func,
type: PropTypes.string,
agentPlatform: PropTypes.string,
};
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ export const VisualizationBasicWidgetSelector = ({

return (
<>
<EuiFlexGroup className='embPanel__header' gutterSize='none'>
<EuiFlexGroup
className='embPanel__header'
gutterSize='none'
alignItems='center'
>
<EuiFlexItem>
{title && (
<h2 className='embPanel__title wz-headline-title'>
Expand Down
2 changes: 2 additions & 0 deletions plugins/main/public/components/common/modules/main-agent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
EuiTitle,
EuiButtonEmpty,
} from '@elastic/eui';
import { euiThemeVars } from '@osd/ui-shared-deps/theme';
import '../../common/modules/module.scss';
import store from '../../../redux/store';
import { FilterHandler } from '../../../utils/filter-handler';
Expand Down Expand Up @@ -107,6 +108,7 @@ export class MainModuleAgent extends Component {
<EuiTitle size='s' className='wz-module-header-agent-title-btn'>
<h1>
<span
style={{ color: euiThemeVars.euiColorPrimaryText }}
onClick={() => {
window.location.href = `#/agents?agent=${this.props.agent.id}`;
this.router.reload();
Expand Down
Loading

0 comments on commit e15b331

Please sign in to comment.