Skip to content

Commit

Permalink
Merge branch '4.4-7.10' into 4958-fix-commands-in--deploy-new-agent-s…
Browse files Browse the repository at this point in the history
…ection
  • Loading branch information
chantal-kelm authored Dec 19, 2022
2 parents 94affee + 3b398cb commit c51bf98
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:/wazuh/wazuh-kibana-app/pull/4363)
- The endpoint `/agents/summary/status` handler was adapted to the new interface. [#3874](https:/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:/wazuh/wazuh-kibana-app/pull/4458)
- Added cluster's IP and protocol as suggestions in the agent deployment wizard. [#4776](https:/wazuh/wazuh-kibana-app/pull/4776)
- Added cluster's IP and protocol as suggestions in the agent deployment wizard. [#4776](https:/wazuh/wazuh-kibana-app/pull/4776) [#4954](https:/wazuh/wazuh-kibana-app/pull/4954)
- Show OS name and OS version in the agent installation wizard. [#4851](https:/wazuh/wazuh-kibana-app/pull/4851)
- Changed the endpoint that updates the plugin configuration to support multiple settings. [#4501](https:/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:/wazuh/wazuh-kibana-app/pull/4972)
Expand All @@ -47,6 +47,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed WAZUH_PROTOCOL param suggestion [#4849](https:/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:/wazuh/wazuh-kibana-app/pull/4876) [#4880](https:/wazuh/wazuh-kibana-app/pull/4880)
- Fixed commands in the deploy new agent section(most of the commands are missing '-1') [#4962](https:/wazuh/wazuh-kibana-app/pull/4962)
- Fixed Inventory checks table filters by stats [#4999](https:/wazuh/wazuh-kibana-app/pull/4999)
- Fixed vulnerabilities default last scan date formatter [#4975](https:/wazuh/wazuh-kibana-app/pull/4975)

## Wazuh v4.3.10 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4311
Expand Down
21 changes: 21 additions & 0 deletions docker/images/osd-2.4.0-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -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:/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:/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
22 changes: 22 additions & 0 deletions docker/images/osd-2.4.1-dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -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:/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:/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
4 changes: 4 additions & 0 deletions docker/osd-dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
4 changes: 4 additions & 0 deletions docker/osd-dev/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ os_versions=(
'2.1.0'
'2.2.1'
'2.3.0'
'2.4.0'
'2.4.1'
)

osd_versions=(
Expand All @@ -14,6 +16,8 @@ osd_versions=(
'2.1.0'
'2.2.1'
'2.3.0'
'2.4.0'
'2.4.1'
)

usage() {
Expand Down
3 changes: 2 additions & 1 deletion public/components/agents/sca/inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ export class Inventory extends Component<InventoryProps, InventoryState> {
<EuiStat
title={this.buttonStat(
this.state.lookingPolicy.invalid,
'result',
'status',
'not applicable'
)}
description="Not applicable"
Expand Down Expand Up @@ -578,6 +578,7 @@ export class Inventory extends Component<InventoryProps, InventoryState> {
<EuiFlexItem>
<InventoryPolicyChecksTable
agent={this.props.agent}
filters={this.state.filters}
lookingPolicy={this.state.lookingPolicy}
/>
</EuiFlexItem>
Expand Down
12 changes: 9 additions & 3 deletions public/components/agents/sca/inventory/checks-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getFilterValues } from './lib';
type Props = {
agent: { [key: string]: any };
lookingPolicy: { [key: string]: any };
filters: any[];
};

type State = {
Expand All @@ -24,12 +25,12 @@ export class InventoryPolicyChecksTable extends Component<Props, State> {
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 = [
Expand Down Expand Up @@ -208,7 +209,12 @@ export class InventoryPolicyChecksTable extends Component<Props, State> {

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down

0 comments on commit c51bf98

Please sign in to comment.