Skip to content
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

Last changes from Tag 4.2.0 4201 #3246

Merged
merged 12 commits into from
May 13, 2021
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixed check for TCP protocol in deploy new agent [#3163](https://github.com/wazuh/wazuh-kibana-app/pull/3163)
- Fixed RBAC issue with agent group permissions [#3181](https://github.com/wazuh/wazuh-kibana-app/pull/3181)
- Fixed change index pattern from menu doesn't work [#3187](https://github.com/wazuh/wazuh-kibana-app/pull/3187)

## Wazuh v4.1.5 - Kibana 7.10.0, 7.10.2, 7.11.2 - Revision 4107

### Added
- Added a warning message for the `Install and enroll the agent` step of `Deploy new agent` guide [#3238](https://github.com/wazuh/wazuh-kibana-app/pull/3238)
- Support for Kibana 7.11.2

### Fixed
- Conflict with the creation of the index pattern when performing the Health Check [#3223](https://github.com/wazuh/wazuh-kibana-app/pull/3223)

## Wazuh v4.1.5 - Kibana 7.10.0 , 7.10.2 - Revision 4106
Expand Down
4 changes: 2 additions & 2 deletions kibana.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "wazuh",
"version": "4.2.0-4201-8",
"version": "4.2.0-4201-10",
"kibanaVersion": "kibana",
"configPath": [
"wazuh"
Expand All @@ -27,4 +27,4 @@
],
"server": true,
"ui": true
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "wazuh",
"version": "4.2.0",
"revision": "4201-8",
"code": "4201-8",
"revision": "4201-10",
"code": "4201-10",
"kibana": {
"version": "7.10.2"
},
Expand Down Expand Up @@ -37,7 +37,7 @@
"test:browser": "plugin-helpers test:browser",
"test:jest": "node scripts/jest",
"generate:api-4.0-info": "cd scripts/generate-api-4.0-info;./generate-api-4.0-info.sh;cd ../..",
"prebuild": "node scripts/generate-build-version"
"prebuild": "node scripts/generate-build-version"
},
"dependencies": {
"angular-animate": "1.7.8",
Expand Down
13 changes: 9 additions & 4 deletions public/controllers/agent/components/register-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import {
EuiCallOut,
EuiSpacer,
EuiProgress,
EuiCode
EuiCode,
EuiLink
} from '@elastic/eui';
import { WzRequest } from '../../../react-services/wz-request';

Expand Down Expand Up @@ -447,9 +448,13 @@ export class RegisterAgent extends Component {
<div>
{this.state.selectedOS && (
<EuiText>
<p>
You can use this command to install and enroll the Wazuh agent in one or more hosts.
</p>
<p>You can use this command to install and enroll the Wazuh agent in one or more hosts.</p>
<EuiCallOut
color="warning"
title={<>Running this command on a host with an agent already installed upgrades the agent package without enrolling the agent. To enroll it, see the <EuiLink href="https://documentation.wazuh.com/current/user-manual/registering/index.html">Wazuh documentation</EuiLink>.</>}
iconType="iInCircle"
/>
<EuiSpacer />
<EuiCodeBlock style={codeBlock} language={language}>
{this.state.wazuhPassword ? this.obfuscatePassword(text) : text}
</EuiCodeBlock>
Expand Down
11 changes: 8 additions & 3 deletions server/lib/api-interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@

import axios, { AxiosResponse } from 'axios';
import { ManageHosts } from './manage-hosts';
import https from 'https';

process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
const httpsAgent = new https.Agent({
rejectUnauthorized: false,
});

const _axios = axios.create({ httpsAgent });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌🏼


interface APIHost{
url: string
Expand Down Expand Up @@ -54,7 +59,7 @@ export const authenticate = async (apiHostID: string, authContext?: any): Promis
...(!!authContext ? { data: authContext } : {})
};

const response: AxiosResponse = await axios(optionsRequest);
const response: AxiosResponse = await _axios(optionsRequest);
const token: string = (((response || {}).data || {}).data || {}).token;
if (!authContext) {
CacheInternalUserAPIHostToken.set(apiHostID, token);
Expand Down Expand Up @@ -107,7 +112,7 @@ export const requestAsCurrentUser = async (method: string, path: string, data: a
const request = async (method: string, path: string, data: any, options: any): Promise<AxiosResponse> => {
try{
const optionsRequest = await buildRequestOptions(method, path, data, options);
const response: AxiosResponse = await axios(optionsRequest);
const response: AxiosResponse = await _axios(optionsRequest);
return response;
}catch(error){
throw error;
Expand Down