From 6e8c94263c5faeb0d02b2b38786d4026b20fb137 Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra <6089438+Machi3mfl@users.noreply.github.com> Date: Mon, 19 Dec 2022 05:01:51 -0300 Subject: [PATCH 1/3] Fixed Inventory checks table filters by stats (#4999) * Fixed checks table filters by stats * Updated CHANGELOG * Fixed no applicable filter --- CHANGELOG.md | 1 + public/components/agents/sca/inventory.tsx | 3 ++- .../components/agents/sca/inventory/checks-table.tsx | 12 +++++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb4c1bbe9c..a679713f67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Fixed pagination to SCA table [#4653](https://github.com/wazuh/wazuh-kibana-app/issues/4653) - Fixed WAZUH_PROTOCOL param suggestion [#4849](https://github.com/wazuh/wazuh-kibana-app/pull/4849) - Raspbian OS, Ubuntu, Amazon Linux and Amazon Linux 2 commands in the wizard deploy agent now change when a different architecture is selected [#4876](https://github.com/wazuh/wazuh-kibana-app/pull/4876) [#4880](https://github.com/wazuh/wazuh-kibana-app/pull/4880) +- Fixed Inventory checks table filters by stats [#4999](https://github.com/wazuh/wazuh-kibana-app/pull/4999) - Fixed vulnerabilities default last scan date formatter [#4975](https://github.com/wazuh/wazuh-kibana-app/pull/4975) ## Wazuh v4.3.10 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4311 diff --git a/public/components/agents/sca/inventory.tsx b/public/components/agents/sca/inventory.tsx index d5de1ed4ef..45db9d3725 100644 --- a/public/components/agents/sca/inventory.tsx +++ b/public/components/agents/sca/inventory.tsx @@ -544,7 +544,7 @@ export class Inventory extends Component { { diff --git a/public/components/agents/sca/inventory/checks-table.tsx b/public/components/agents/sca/inventory/checks-table.tsx index d31d614e99..190d638382 100644 --- a/public/components/agents/sca/inventory/checks-table.tsx +++ b/public/components/agents/sca/inventory/checks-table.tsx @@ -8,6 +8,7 @@ import { getFilterValues } from './lib'; type Props = { agent: { [key: string]: any }; lookingPolicy: { [key: string]: any }; + filters: any[]; }; type State = { @@ -24,12 +25,12 @@ export class InventoryPolicyChecksTable extends Component { columnsChecks: any; constructor(props) { super(props); - const { agent, lookingPolicy } = this.props; + const { agent, lookingPolicy, filters } = this.props; this.state = { agent, lookingPolicy, itemIdToExpandedRowMap: {}, - filters: [], + filters: filters || [], pageTableChecks: { pageIndex: 0 }, }; this.suggestions = [ @@ -208,7 +209,12 @@ export class InventoryPolicyChecksTable extends Component { async componentDidMount() {} - async componentDidUpdate(prevProps, prevState) {} + async componentDidUpdate(prevProps) { + const { filters } = this.props + if (filters !== prevProps.filters) { + this.setState({ filters: filters }); + } + } componentWillUnmount() { this._isMount = false; From 02cde660fd3581f56d3a494643bb35a2b448aef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex?= Date: Mon, 19 Dec 2022 10:29:27 +0100 Subject: [PATCH 2/3] [Backport 4.4-7.10] Add osd 2.4 env (#5007) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add osd 2.4 env (#5001) * Add osd-dev version 2.4.0 * Add OSD 2.4.1 env Co-authored-by: Alex Ruiz Becerra (cherry picked from commit 2a1da470dd1967c8a2265b5ff647d03f2d34d8fd) Co-authored-by: Gabriel Díaz --- docker/images/osd-2.4.0-dev.Dockerfile | 21 +++++++++++++++++++++ docker/images/osd-2.4.1-dev.Dockerfile | 22 ++++++++++++++++++++++ docker/osd-dev/README.md | 4 ++++ docker/osd-dev/dev.sh | 4 ++++ 4 files changed, 51 insertions(+) create mode 100644 docker/images/osd-2.4.0-dev.Dockerfile create mode 100644 docker/images/osd-2.4.1-dev.Dockerfile diff --git a/docker/images/osd-2.4.0-dev.Dockerfile b/docker/images/osd-2.4.0-dev.Dockerfile new file mode 100644 index 0000000000..f3608c716c --- /dev/null +++ b/docker/images/osd-2.4.0-dev.Dockerfile @@ -0,0 +1,21 @@ +FROM node:14.20.0 AS builder-osd-2.4.0 +USER node +RUN git clone --depth 1 --branch 2.4.0 https://github.com/opensearch-project/OpenSearch-Dashboards.git /home/node/kbn +RUN chown node.node /home/node/kbn + +WORKDIR /home/node/kbn +RUN yarn config set registry http://host.docker.internal:4873 && \ + sed -i 's/https:\/\/registry.yarnpkg.com/http:\/\/host.docker.internal:4873/g' yarn.lock && \ + yarn osd bootstrap --production + +WORKDIR /home/node/kbn/plugins +RUN git clone --depth 1 --branch 2.4.0.0 https://github.com/opensearch-project/security-dashboards-plugin.git +WORKDIR /home/node/kbn/plugins/security-dashboards-plugin +RUN yarn install + +RUN mkdir -p /home/node/kbn/data/wazuh/config + +FROM node:14.20.0 +USER node +COPY --from=builder-osd-2.4.0 /home/node/kbn /home/node/kbn +WORKDIR /home/node/kbn diff --git a/docker/images/osd-2.4.1-dev.Dockerfile b/docker/images/osd-2.4.1-dev.Dockerfile new file mode 100644 index 0000000000..e8c2415ca8 --- /dev/null +++ b/docker/images/osd-2.4.1-dev.Dockerfile @@ -0,0 +1,22 @@ +FROM node:14.20.0 AS builder-osd-2.4.1 +USER node +RUN git clone --depth 1 --branch 2.4.1 https://github.com/opensearch-project/OpenSearch-Dashboards.git /home/node/kbn +RUN chown node.node /home/node/kbn + +WORKDIR /home/node/kbn +RUN yarn osd bootstrap --production + +WORKDIR /home/node/kbn/plugins +RUN git clone --depth 1 --branch 2.4.1.0 https://github.com/opensearch-project/security-dashboards-plugin.git +WORKDIR /home/node/kbn/plugins/security-dashboards-plugin +RUN yarn install + +RUN yarn config set registry http://host.docker.internal:4873 && \ + sed -i 's/https:\/\/registry.yarnpkg.com/http:\/\/host.docker.internal:4873/g' yarn.lock + +RUN mkdir -p /home/node/kbn/data/wazuh/config + +FROM node:14.20.0 +USER node +COPY --from=builder-osd-2.4.1 /home/node/kbn /home/node/kbn +WORKDIR /home/node/kbn diff --git a/docker/osd-dev/README.md b/docker/osd-dev/README.md index 078c0b8a0c..b4e0ed94a6 100644 --- a/docker/osd-dev/README.md +++ b/docker/osd-dev/README.md @@ -45,10 +45,14 @@ version. `OpenSearch` supported versions: - 1.2.4 - 2.3.0 +- 2.4.0 +- 2.4.1 `OpenSearch Dashboards` supported versions: - 1.2.0 - 2.3.0 +- 2.4.0 +- 2.4.1 We must use official `Wazuh Indexer` and `Wazuh Dashboard` images for testing! diff --git a/docker/osd-dev/dev.sh b/docker/osd-dev/dev.sh index 80102e6a18..7d08ae665c 100755 --- a/docker/osd-dev/dev.sh +++ b/docker/osd-dev/dev.sh @@ -6,6 +6,8 @@ os_versions=( '2.1.0' '2.2.1' '2.3.0' + '2.4.0' + '2.4.1' ) osd_versions=( @@ -14,6 +16,8 @@ osd_versions=( '2.1.0' '2.2.1' '2.3.0' + '2.4.0' + '2.4.1' ) usage() { From 3b398cbfb37605a47095da05687aa90e26b4a6a9 Mon Sep 17 00:00:00 2001 From: Maximiliano Ibarra <6089438+Machi3mfl@users.noreply.github.com> Date: Mon, 19 Dec 2022 10:00:53 -0300 Subject: [PATCH 3/3] Fixed paste value on server address selected (#4954) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed paste value on server address selected * Updated CHANGELOG Co-authored-by: Álex --- CHANGELOG.md | 2 +- public/controllers/agent/components/register-agent-service.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a679713f67..fed91b84a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Independently load each dashboard from the `Agents Overview` page [#4363](https://github.com/wazuh/wazuh-kibana-app/pull/4363) - The endpoint `/agents/summary/status` handler was adapted to the new interface. [#3874](https://github.com/wazuh/wazuh-kibana-app/pull/3874) - Updated and added operating systems, versions, architectures commands of Install and enroll the agent and commands of Start the agent in the deploy new agent section [#4458](https://github.com/wazuh/wazuh-kibana-app/pull/4458) -- Added cluster's IP and protocol as suggestions in the agent deployment wizard. [#4776](https://github.com/wazuh/wazuh-kibana-app/pull/4776) +- Added cluster's IP and protocol as suggestions in the agent deployment wizard. [#4776](https://github.com/wazuh/wazuh-kibana-app/pull/4776) [#4954](https://github.com/wazuh/wazuh-kibana-app/pull/4954) - Show OS name and OS version in the agent installation wizard. [#4851](https://github.com/wazuh/wazuh-kibana-app/pull/4851) - Changed the endpoint that updates the plugin configuration to support multiple settings. [#4501](https://github.com/wazuh/wazuh-kibana-app/pull/4501) - The button to export the app logs is now disabled when there are no results, instead of showing an error toast [#4972](https://github.com/wazuh/wazuh-kibana-app/pull/4972) diff --git a/public/controllers/agent/components/register-agent-service.ts b/public/controllers/agent/components/register-agent-service.ts index 246457aee6..b24cd67057 100644 --- a/public/controllers/agent/components/register-agent-service.ts +++ b/public/controllers/agent/components/register-agent-service.ts @@ -78,10 +78,11 @@ function getRemoteProtocol(protocols: Protocol[]) { */ async function getConnectionConfig(nodeSelected: ServerAddressOptions, defaultServerAddress?: string) { const nodeName = nodeSelected?.label; + const nodeIp = nodeSelected?.value; if(!defaultServerAddress){ if(nodeSelected.nodetype !== 'custom'){ const remoteConfig = await getRemoteConfiguration(nodeName); - return { serverAddress: remoteConfig.name, udpProtocol: remoteConfig.isUdp, connectionSecure: remoteConfig.haveSecureConnection }; + return { serverAddress: nodeIp, udpProtocol: remoteConfig.isUdp, connectionSecure: remoteConfig.haveSecureConnection }; }else{ return { serverAddress: nodeName, udpProtocol: false, connectionSecure: true }; }