diff --git a/CHANGELOG.md b/CHANGELOG.md index 30c58a9119..d274b169fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ All notable changes to the Wazuh app project will be documented in this file. - A solaris command has been fixed [5035](https://github.com/wazuh/wazuh-kibana-app/pull/5035) - Fixed commands: Aix, OpenSUSE, Alpine, Suse11, Fedora, HP, Oracle Linux 5, Amazon Linux 2, Centos5. Changed the word 'or higher' in buttons to '+'.Fixed validations for Hp, Solaris and Alpine. [5045](https://github.com/wazuh/wazuh-kibana-app/pull/5045) - Fixed error in Github module PDF report. [5069](https://github.com/wazuh/wazuh-kibana-app/pull/5069) +- Fixed password input in deploy new agent section [5098](https://github.com/wazuh/wazuh-kibana-app/pull/5098) - Fixed error when clicking on the selectors of agents in the group agents management [#5094](https://github.com/wazuh/wazuh-kibana-app/pull/5094) - Fixed menu content panel is displayed in the wrong place. [5092](https://github.com/wazuh/wazuh-kibana-app/pull/5092) - Fixed greyed and disabled menu section names [#5101](https://github.com/wazuh/wazuh-kibana-app/pull/5101) diff --git a/public/controllers/agent/components/register-agent.js b/public/controllers/agent/components/register-agent.js index 74068b20ee..cbc24446c5 100644 --- a/public/controllers/agent/components/register-agent.js +++ b/public/controllers/agent/components/register-agent.js @@ -9,7 +9,7 @@ * * Find more information about this on the LICENSE file. */ -import React, { Component, Fragment, useState } from 'react'; +import React, { Component, Fragment } from 'react'; import { version } from '../../../../package.json'; import { WazuhConfig } from '../../../react-services/wazuh-config'; import { @@ -18,7 +18,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel, - EuiButtonGroup, EuiComboBox, EuiFieldText, EuiText, @@ -256,7 +255,7 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedVersion === 'ubuntu14' ) { return 'service wazuh-agent start'; - } + } else return ''; } systemSelectorNet() { @@ -266,13 +265,13 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedVersion === 'windows7' ) { return 'NET START WazuhSvc'; - } + } else return ''; } systemSelectorWazuhControlMacos() { if (this.state.selectedVersion == 'sierra') { return '/Library/Ossec/bin/wazuh-control start'; - } + } else return ''; } systemSelectorWazuhControl() { @@ -283,13 +282,13 @@ export const RegisterAgent = withErrorBoundary( this.state.selectedVersion === '3.12.12' ) { return '/var/ossec/bin/wazuh-control start'; - } + } else return ''; } systemSelectorInitD() { if (this.state.selectedVersion === '11.31') { return '/sbin/init.d/wazuh-agent start'; - } + } else return ''; } selectSYS(sys) { @@ -1082,7 +1081,8 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, title='This section could not be displayed because you do not have permission to get access to the registration service.' iconType='iInCircle' /> - ) : this.state.connectionSecure === true && + ) : this.state.selectedOS && + this.state.connectionSecure === true && this.state.udpProtocol === false ? ( {this.state.agentName.length > 0 ? ( @@ -1125,7 +1125,9 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, )}
- {this.state.wazuhPassword && !this.state.showPassword + {this.state.wazuhPassword && + !this.state.showPassword && + !['sol', 'hp', 'alpine'].includes(this.state.selectedOS) ? this.obfuscatePassword(text) : text} @@ -1180,26 +1182,29 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, > ) : this.state.selectedVersion == '6.1 TL9' ? ( - - Might require some extra installation{' '} - - steps - - . - - } - > + <> + + Might require some extra installation{' '} + + steps + + . + + } + > + + ) : this.state.selectedVersion == '11.31' ? ( <> - Might require some extra installation{' '} - - steps - - . - - } - > + <> + + Might require some extra installation{' '} + + steps + + . + + } + > + + ) : ( '' )} - {this.state.needsPassword && ( + {this.state.needsPassword && + !['sol', 'hp', 'alpine'].includes(this.state.selectedOS) ? ( this.setShowPassword(active)} /> + ) : ( + '' )} - ) : this.state.connectionSecure === false ? ( + ) : this.state.selectedOS && this.state.connectionSecure === false ? (

You can use this command to install and enroll the Wazuh agent @@ -1369,7 +1380,9 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, )}

- {this.state.wazuhPassword && !this.state.showPassword + {this.state.wazuhPassword && + !this.state.showPassword && + !['sol', 'hp', 'alpine'].includes(this.state.selectedOS) ? this.obfuscatePassword(text) : text} @@ -1393,63 +1406,67 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ) : ( - -

- You can use this command to install and enroll the Wazuh agent - in one or more hosts. -

- - - {windowsAdvice} - {this.state.selectedVersion === 'windowsxp' && ( - <> - - - - )} - {this.state.selectedVersion === 'windowsserver2008' && ( - <> - - - - )} -
- - {this.state.wazuhPassword && !this.state.showPassword - ? this.obfuscatePassword(text) - : text} - - - {copy => ( -
-

- Copy command -

-
- )} -
-
- {this.state.needsPassword && ( - this.setShowPassword(active)} + this.state.selectedOS && ( + +

+ You can use this command to install and enroll the Wazuh agent + in one or more hosts. +

+ - )} - -
+ + {windowsAdvice} + {this.state.selectedVersion === 'windowsxp' && ( + <> + + + + )} + {this.state.selectedVersion === 'windowsserver2008' && ( + <> + + + + )} +
+ + {this.state.wazuhPassword && + !this.state.showPassword && + !['sol', 'hp', 'alpine'].includes(this.state.selectedOS) + ? this.obfuscatePassword(text) + : text} + + + {copy => ( +
+

+ Copy command +

+
+ )} +
+
+ {this.state.needsPassword && ( + this.setShowPassword(active)} + /> + )} + +
+ ) )}
); @@ -1689,11 +1706,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1701,11 +1721,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1713,11 +1736,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1725,11 +1751,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1737,11 +1766,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1749,11 +1781,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1761,11 +1796,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1773,11 +1811,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1785,11 +1826,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1797,11 +1841,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1809,11 +1856,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1821,11 +1871,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1833,11 +1886,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1845,11 +1901,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1857,11 +1916,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1869,11 +1931,14 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the version', - children: this.setVersion(version)} />, + children: ( + this.setVersion(version)} + /> + ), }, ] : []), @@ -1884,11 +1949,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1896,11 +1966,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1908,11 +1983,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1929,11 +2009,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1946,11 +2031,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1960,11 +2050,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1972,11 +2067,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1985,11 +2085,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -1997,11 +2102,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -2009,11 +2119,16 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, ? [ { title: 'Choose the architecture', - children: this.setArchitecture(architecture)} /> + children: ( + + this.setArchitecture(architecture) + } + /> + ), }, ] : []), @@ -2037,7 +2152,13 @@ apk add wazuh-agent=${this.state.wazuhVersion}-r1`, }, ] : []), - ...(!(!this.state.needsPassword || this.state.hidePasswordInput) + ...(!( + !this.state.needsPassword || + this.state.hidePasswordInput || + !!['solaris10', 'solaris11', '11.31', '3.12.12'].includes( + this.state.selectedVersion, + ) + ) ? [ { title: 'Wazuh password',