Skip to content

Commit

Permalink
Merge 4.6.0 into 4.7.0 (#5711)
Browse files Browse the repository at this point in the history
* Merge 4.5.1 into 4.6.0 (#5671)

* Change windows agent service name (#5538)

* Change windows agent service name to Wazuh

Change windows agent service name to Wazuh

* Add CHANGELOG

* Remove agent name in agent info ribbon (#5497)

* remove: agent name in agent info ribbon

* changelog: add pull request entry

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fix IPV6 visualizations (#5471)

* add ipv6 service

* add test for service

* Fix issue in agents-table

* fix issue in agents-info

* fix groups agents issue

* Fix width in groups agents

* use mapResponseItem

* Add copy button to groups

* Add copy button to info

* fix for node list

* Optimize code

* Fix styles

* Edit changelog

* Edit changelog

* Add imposter changes to test ipv6

* Replace onMouseDown with onClick

* Move copy buttons to the left

* fix: removed compressipv6 property of TableWzAPI

* feat: add tableLayout property to some tables and remove IPv6 address compression

add tableLayout=auto property to some tables:
- Agents/{agent_id}/Inventory data
- Management/Cluster/Nodes
- Agents
- Management/Configuration/Client
- Management/Global configuration/Remote
remove IPv6 address compression

* remove: remove unused service to IPv6 compression

* revert: revert changes in TableWzAPI component

* add: add mocked responses to some syscollector endpoints

* remove: unwanted table columns properties

* changelog: add pull request entry

* Fix imposter

---------

Co-authored-by: Antonio David Gutiérrez <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>
Co-authored-by: yenienserrano <[email protected]>
Co-authored-by: Antonio <[email protected]>

* Bump v4.4.4-2.6.0-rc2

* Add Apple Silicon architecture to the register Agent wizard (#5478)

* Add Apple Silicon architecture

* Add changelog

* Change macOS environment variables

* Revert "Change macOS environment variables"

This reverts commit 108e866.

* Change macOS architecture ids

* Add missing supported versions to the Docker environments (#5584)

feat(environments): add latest versions to Docker environments

- Add Kibana versions: 7.17.7, 7.17.8, 7.17.9 and 7.17.10
- Add OpenSearch: 2.6.0
- Add OpenSearch Dashboards: 2.6.0
- Add Wazuh 4.4.1, 4.4.2, 4.4.3 and 4.4.4

* Bump 4.5.1

* Change the method to make the redirect (#5539)

* Change the metod to make the redirect

* Remove unused code

* Add changelog

---------

Co-authored-by: Álex Ruiz <[email protected]>

* Fix agents active coverage stat as NaN (#5490)

* fix: agents active coverate stat as NaN

Ensure the values used to calculate have the expected types and
the total count is greater than 0.

* remove: unused openRegistrationDocs method

* changelog: add entry

* fix: check if agents active coverage is a NaN

* changelog: fix entry

---------

Co-authored-by: Álex Ruiz <[email protected]>

* [Backport 4.5.1] Update test snapshots for 4.5 (#5607)

* Update test snapshots for 4.5 (#5601)

* Add missing supported versions to the Docker environments (#5584)

feat(environments): add latest versions to Docker environments

- Add Kibana versions: 7.17.7, 7.17.8, 7.17.9 and 7.17.10
- Add OpenSearch: 2.6.0
- Add OpenSearch Dashboards: 2.6.0
- Add Wazuh 4.4.1, 4.4.2, 4.4.3 and 4.4.4

* Update test snapshost

* Update API data to 4.5

* Update branch patterns for GH Actions

---------

Co-authored-by: Antonio <[email protected]>
(cherry picked from commit 1ae5f19)

* Fix API reference links in endpoints.json

* Add kbn-dev 7.17.11 (#5628)

* Merge 4.5.0 into 4.5.1 (#5670)

* Update test snapshots for 4.5 (#5601)

* Add missing supported versions to the Docker environments (#5584)

feat(environments): add latest versions to Docker environments

- Add Kibana versions: 7.17.7, 7.17.8, 7.17.9 and 7.17.10
- Add OpenSearch: 2.6.0
- Add OpenSearch Dashboards: 2.6.0
- Add Wazuh 4.4.1, 4.4.2, 4.4.3 and 4.4.4

* Update test snapshost

* Update API data to 4.5

* Update branch patterns for GH Actions

---------

Co-authored-by: Antonio <[email protected]>

* Fix API reference links in endpoints.json

* Merge 4.4 into 4.5.0 (#5669)

Merge v4.4.5-2.6.0 into 4.4 (#5665)

* Bump Wazuh and platform versions for v4.4.5 (#5639)

* Update changelog

* Update opensearch_dashboards.json

* Update package.json

* Update readme

* Update tag script

* Change tag.py version value

* Empty tag suffix

* Prepare tag.py for v4.4.5-rc1 (#5645)

Add -rc1 tag suffix

* Fix incompatible version of triple-beam subdependency (#5652)

fix: add yarn.lock file and set version of triple-beam in yarn.lock

* Update unit-test.yml (#5655)

* Add support for Wazuh 4.4.5-rc2 (#5659)

* Update revision of v4.4.5 in the Changelog

* Bump v4.4.5-2.6.0-rc2

---------

Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>
Co-authored-by: Antonio <[email protected]>

---------

Co-authored-by: Álex Ruiz <[email protected]>
Co-authored-by: Antonio <[email protected]>
Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>

---------

Co-authored-by: Julio César Biset <[email protected]>
Co-authored-by: Antonio <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>
Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]>
Co-authored-by: Antonio David Gutiérrez <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>

* Remove unused embedded jquery-ui (#5592)

* fix: remove unused embedded jquery-ui dependency

* changelog: add pull request entry

---------

Co-authored-by: Federico Rodriguez <[email protected]>

* Fixes redirection problem to inventory data, stats and configuration in an agent (#5685)

Fix redirect to inventory data, stats and configuration

* Fix conflicts in branch synchronization (#5708)

* fix: fix conflicts

* changelog: remove entry

* Fix 4.6.0 changelog merge errors (#5692)

* Update changelog

* Update CHANGELOG.md

---------

Co-authored-by: Ian Yenien Serrano <[email protected]>
Co-authored-by: Julio César Biset <[email protected]>
Co-authored-by: Álex Ruiz <[email protected]>
Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]>
Co-authored-by: Federico Rodriguez <[email protected]>
  • Loading branch information
6 people authored Jul 20, 2023
1 parent 33092a0 commit 6c02116
Show file tree
Hide file tree
Showing 11 changed files with 1,233 additions and 12,911 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"ignorePatterns": [
"node_modules/",
"public/utils/codemirror/",
"public/kibana-integrations/",
"public/utils/jquery-ui.js"
"public/kibana-integrations/"
],
"rules": {
"filenames-simple/naming-convention": "error",
Expand Down
29 changes: 21 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,19 @@ All notable changes to the Wazuh app project will be documented in this file.
- Added `ignore` and `restrict` options to Syslog configuration. [#5203](https://github.com/wazuh/wazuh-kibana-app/pull/5203)
- Added the `extensions.github` and `extensions.office` settings to the default configuration file [#5376](https://github.com/wazuh/wazuh-kibana-app/pull/5376)
- Added new global error treatment (client-side) [#4163](https://github.com/wazuh/wazuh-kibana-app/pull/4163)
- Added a description to step 3 of the deploy a new agent section. [#5419](https://github.com/wazuh/wazuh-kibana-app/pull/5419)
- Added a title to the agent name input of the deploy a new agent section. [#5429](https://github.com/wazuh/wazuh-kibana-app/pull/5429)
- Added callout below the agent name entry of the deploy a new agent section. [#5429](https://github.com/wazuh/wazuh-kibana-app/pull/5429)
- Added new CLI to generate API data from specification file [#5519](https://github.com/wazuh/wazuh-kibana-app/pull/5519)
- Added specific RBAC permissions to Security section [#5551](https://github.com/wazuh/wazuh-kibana-app/pull/5551)

### Changed

- Changed of regular expression in RBAC. [#5201](https://github.com/wazuh/wazuh-kibana-app/pull/5201)
- Migrate the timeFilter, metaFields, maxBuckets health checks inside the pattern check. [#5384](https://github.com/wazuh/wazuh-kibana-app/pull/5384)
- Changed the title to step 3 of the deploy a new agent section. [#5419](https://github.com/wazuh/wazuh-kibana-app/pull/5419)
- Changed the title of step 3 of the deploy a new agent section. [#5429](https://github.com/wazuh/wazuh-kibana-app/pull/5429)
- Changed the description of step 3 of the deploy a new agent section. [#5429](https://github.com/wazuh/wazuh-kibana-app/pull/5429)
- Changed the placeholder of the agent name input of the deploy a new agent section. [#5429](https://github.com/wazuh/wazuh-kibana-app/pull/5429)
- Changed the query to search for an agent in `management/configuration`. [#5485](https://github.com/wazuh/wazuh-kibana-app/pull/5485)
- Changed the search bar in management/log to the one used in the rest of the app. [#5476](https://github.com/wazuh/wazuh-kibana-app/pull/5476)

### Fixed

- Fixed trailing hyphen character for OS value in the list of agents [#4828](https://github.com/wazuh/wazuh-kibana-app/pull/4828)
- Fixed an issue that caused incorrect visualization of IPv6 addresses ([#4909](https://github.com/wazuh/wazuh-kibana-app/pull/4909)).
- Fixed several typos in the code, by @jctello [#4911](https://github.com/wazuh/wazuh-kibana-app/pull/4911)
- Fixed the display of more than one protocol in the Global configuration section [#4917](https://github.com/wazuh/wazuh-kibana-app/pull/4917)
- Handling endpoint response was done when there is no data to show [#4918](https://github.com/wazuh/wazuh-kibana-app/pull/4918)
Expand All @@ -59,6 +51,27 @@ All notable changes to the Wazuh app project will be documented in this file.
- Removed pretty parameter from cron job requests. [#5532](https://github.com/wazuh/wazuh-kibana-app/pull/5532)
- Removed unnecessary requests in `Management/Status` section. [#5528](https://github.com/wazuh/wazuh-kibana-app/pull/5528)
- Removed obsolete code that caused duplicate requests to the api in `Management`. [#5485](https://github.com/wazuh/wazuh-kibana-app/pull/5485)
- Removed unused embedded jquery-ui [#5592](https://github.com/wazuh/wazuh-kibana-app/pull/5592)

## Wazuh v4.5.1 - OpenSearch Dashboards 2.6.0 - Revision 01

### Added

- Add Apple Silicon architecture button to the register Agent wizard [#5478](https://github.com/wazuh/wazuh-kibana-app/pull/5478)

### Fixed

- Fixed the rendering of tables that contains IPs and agent overview [#5471](https://github.com/wazuh/wazuh-kibana-app/pull/5471)
- Fixed the agents active coverage stat as NaN in Details panel of Agents section [#5490](https://github.com/wazuh/wazuh-kibana-app/pull/5490)

### Removed

- Removed the agent name in the agent info ribbon [#5497](https://github.com/wazuh/wazuh-kibana-app/pull/5497)

### Changed

- Changed method to perform redirection on agent table buttons [#5539](https://github.com/wazuh/wazuh-kibana-app/pull/5539)
- Changed windows agent service name in the deploy agent wizard [#5538](https://github.com/wazuh/wazuh-kibana-app/pull/5538)

## Wazuh v4.5.1 - OpenSearch Dashboards 2.6.0 - Revision 01

Expand Down
6 changes: 5 additions & 1 deletion plugins/main/common/services/web_documentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ test(`Generate a web documentation URL to the base URL using to the plugin short
});

test(`Generate a web documentation URL using a specific version`, () => {
expect(webDocumentationLink('user-manual/agent-enrollment/index.html', '4.7')).toBe(`${DOCUMENTATION_WEB_BASE_URL}/4.7/user-manual/agent-enrollment/index.html`);
expect(
webDocumentationLink('user-manual/agent-enrollment/index.html', '4.6'),
).toBe(
`${DOCUMENTATION_WEB_BASE_URL}/4.6/user-manual/agent-enrollment/index.html`,
);
});
54 changes: 30 additions & 24 deletions plugins/main/public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import './utils/fontawesome/scss/font-awesome.scss';
// Dev tools
import './utils/codemirror';

import './utils/jquery-ui';

// Material
import 'angular-material/angular-material.css';
import 'angular-aria/angular-aria';
Expand Down Expand Up @@ -60,7 +58,9 @@ const app = getAngularModule();
app.config([
'$compileProvider',
function ($compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|data|blob):/);
$compileProvider.aHrefSanitizationWhitelist(
/^\s*(https?|ftp|mailto|data|blob):/,
);
},
]);

Expand All @@ -79,7 +79,7 @@ app.run([

// Set currentSecurity platform in Redux when app starts.
checkCurrentSecurityPlatform()
.then((item) => {
.then(item => {
store.dispatch(updateCurrentPlatform(item));
})
.catch(() => {});
Expand All @@ -96,7 +96,7 @@ app.run([
* Set trigger for logout
*/
app.run(function ($rootElement) {
$rootElement.append(`
$rootElement.append(`
<div>
<div class="wazuhNotReadyYet"></div>
<div ng-view class="mainView"></div>
Expand All @@ -109,23 +109,29 @@ app.run(function ($rootElement) {
addHelpMenuToAppChrome();

// Bind deleteExistentToken on Log out component.
$('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on('mouseleave', function () {
// opendistro
$('button:contains(Log out)').on('click', function () {
WzAuthentication.deleteExistentToken();
});
// x-pack
$('a:contains(Log out)').on('click', function (event) {
// Override href's behaviour and navigate programatically
// to the logout path once the token has been deleted.
event.preventDefault();
WzAuthentication.deleteExistentToken()
.catch((err) => {
console.error('[ERROR] - User token could not be deprecated - ', err);
})
.finally(() => {
window.location = event.currentTarget.href;
});
});
});
$('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on(
'mouseleave',
function () {
// opendistro
$('button:contains(Log out)').on('click', function () {
WzAuthentication.deleteExistentToken();
});
// x-pack
$('a:contains(Log out)').on('click', function (event) {
// Override href's behaviour and navigate programatically
// to the logout path once the token has been deleted.
event.preventDefault();
WzAuthentication.deleteExistentToken()
.catch(err => {
console.error(
'[ERROR] - User token could not be deprecated - ',
err,
);
})
.finally(() => {
window.location = event.currentTarget.href;
});
});
},
);
});
3 changes: 1 addition & 2 deletions plugins/main/public/components/common/welcome/agents-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import WzTextWithTooltipIfTruncated from '../wz-text-with-tooltip-if-truncated';
import { WzStat } from '../../wz-stat';
import { GroupTruncate } from '../util/agent-group-truncate';
import { AgentStatus } from '../../agents/agent_status';
import { compressIPv6 } from '../../../services/ipv6-services';

export class AgentInfo extends Component {
constructor(props) {
Expand Down Expand Up @@ -181,7 +180,7 @@ export class AgentInfo extends Component {
{
title: agent.ip,
description: 'IP address',
style: { minwidth: 150 },
style: {},
},
{
title: agent.version,
Expand Down
51 changes: 6 additions & 45 deletions plugins/main/public/components/common/welcome/agents-welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
*/
import React, { Component, Fragment } from 'react';
import {
EuiCard,
EuiIcon,
EuiLink,
EuiPanel,
EuiFlexItem,
EuiFlexGroup,
EuiSpacer,
EuiText,
EuiFlexGrid,
EuiButtonEmpty,
EuiTitle,
EuiPage,
EuiButton,
EuiPopover,
Expand All @@ -39,10 +37,8 @@ import {
RequirementVis,
} from './components';
import { AgentInfo } from './agents-info';
import { WAZUH_MODULES } from '../../../../common/wazuh-modules';
import store from '../../../redux/store';
import { updateGlobalBreadcrumb } from '../../../redux/actions/globalBreadcrumbActions';
import { ActionAgents } from '../../../react-services/action-agents';
import WzReduxProvider from '../../../redux/wz-redux-provider';
import MenuAgent from './components/menu-agent';
import './welcome.scss';
Expand All @@ -53,7 +49,6 @@ import { AppState } from '../../../react-services/app-state';
import { FilterHandler } from '../../../utils/filter-handler';
import { TabVisualizations } from '../../../factories/tab-visualizations';
import { updateCurrentAgentData } from '../../../redux/actions/appStateActions';
import WzTextWithTooltipIfTruncated from '../wz-text-with-tooltip-if-truncated';
import { getAngularModule } from '../../../kibana-services';
import { hasAgentSupportModule } from '../../../react-services/wz-agents';
import { withErrorBoundary, withReduxProvider } from '../hocs';
Expand Down Expand Up @@ -296,6 +291,7 @@ export const AgentsWelcome = compose(
}

renderTitle() {
const notNeedStatus = true;
return (
<EuiFlexGroup>
<EuiFlexItem className='wz-module-header-agent-title'>
Expand Down Expand Up @@ -378,43 +374,6 @@ export const AgentsWelcome = compose(
this.setState({ datePicker: { from, to } });
};

getOptions() {
return [
{ value: 'pci', text: 'PCI DSS' },
{ value: 'gdpr', text: 'GDPR' },
{ value: 'nist', text: 'NIST 800-53' },
{ value: 'hipaa', text: 'HIPAA' },
{ value: 'gpg13', text: 'GPG13' },
{ value: 'tsc', text: 'TSC' },
];
}

setSelectValue(e) {
this.setState({ selectedRequirement: e.target.value });
}

getRequirementVis() {
if (this.state.selectedRequirement === 'pci') {
return 'Wazuh-App-Agents-Welcome-Top-PCI';
}
if (this.state.selectedRequirement === 'gdpr') {
return 'Wazuh-App-Agents-Welcome-Top-GDPR';
}
if (this.state.selectedRequirement === 'hipaa') {
return 'Wazuh-App-Agents-Welcome-Top-HIPAA';
}
if (this.state.selectedRequirement === 'nist') {
return 'Wazuh-App-Agents-Welcome-Top-NIST-800-53';
}
if (this.state.selectedRequirement === 'gpg13') {
return 'Wazuh-App-Agents-Welcome-Top-GPG-13';
}
if (this.state.selectedRequirement === 'tsc') {
return 'Wazuh-App-Agents-Welcome-Top-TSC';
}
return 'Wazuh-App-Agents-Welcome-Top-PCI';
}

renderMitrePanel() {
return (
<Fragment>
Expand Down Expand Up @@ -530,14 +489,16 @@ export const AgentsWelcome = compose(
The agent has been registered but has not yet connected to the
manager.
</p>
<a
<EuiLink
href={webDocumentationLink(
'user-manual/agents/agent-connection.html',
)}
external
target='_blank'
rel='noopener noreferrer'
>
Checking connection with the Wazuh server
</a>
</EuiLink>
</Fragment>
}
actions={
Expand Down
18 changes: 5 additions & 13 deletions plugins/main/public/controllers/agent/components/agents-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import { UI_ERROR_SEVERITIES } from '../../../react-services/error-orchestrator/
import { getErrorOrchestrator } from '../../../react-services/common-services';
import { AgentStatus } from '../../../components/agents/agent_status';
import { AgentSynced } from '../../../components/agents/agent-synced';
import { compressIPv6 } from '../../../services/ipv6-services';

export const AgentsTable = withErrorBoundary(
class AgentsTable extends Component {
Expand Down Expand Up @@ -310,9 +309,6 @@ export const AgentsTable = withErrorBoundary(
}

formatAgent(agent) {
const checkField = field => {
return field !== undefined ? field : '-';
};
const agentVersion =
agent.version !== undefined ? agent.version.split(' ')[1] : '-';
const node_name =
Expand All @@ -323,7 +319,7 @@ export const AgentsTable = withErrorBoundary(
return {
id: agent.id,
name: agent.name,
ip: compressIPv6(agent.ip),
ip: agent.ip,
status: agent.status,
group_config_status: agent.group_config_status,
group: agent?.group || '-',
Expand Down Expand Up @@ -384,11 +380,8 @@ export const AgentsTable = withErrorBoundary(
}

addIconPlatformRender(agent) {
let icon = false;
const checkField = field => {
return field !== undefined ? field : '-';
};
const os = (agent || {}).os;
let icon = '';
const os = agent?.os || {};

if ((os?.uname || '').includes('Linux')) {
icon = 'linux';
Expand All @@ -397,8 +390,7 @@ export const AgentsTable = withErrorBoundary(
} else if (os?.platform === 'darwin') {
icon = 'apple';
}
const os_name =
checkField(agent?.os?.name) + ' ' + checkField(agent?.os?.version);
const os_name = `${agent?.os?.name || ''} ${agent?.os?.version || ''}`;

return (
<EuiFlexGroup gutterSize='xs'>
Expand All @@ -408,7 +400,7 @@ export const AgentsTable = withErrorBoundary(
aria-hidden='true'
></i>
</EuiFlexItem>{' '}
<EuiFlexItem>{os_name === '- -' ? '-' : os_name}</EuiFlexItem>
<EuiFlexItem>{os_name.trim() || '-'}</EuiFlexItem>
</EuiFlexGroup>
);
}
Expand Down
21 changes: 0 additions & 21 deletions plugins/main/public/services/ipv6-services.test.js

This file was deleted.

21 changes: 0 additions & 21 deletions plugins/main/public/services/ipv6-services.ts

This file was deleted.

Loading

0 comments on commit 6c02116

Please sign in to comment.