Skip to content

Commit

Permalink
[Backport 4.4-1.2-wzd] Added new key request block in Registration se…
Browse files Browse the repository at this point in the history
…rvice config (#4322)

Added new key request block in Registration service config (#3956)

* Added new key request block

* Removed failed snapshots

* Updated some test snapshots

* Updated descriptions registration-service

(cherry picked from commit 2b6ecf3)

Co-authored-by: Maximiliano Ibarra <maximilianoaibarra@gmail.com>
  • Loading branch information
2 people authored and yenienserrano committed Sep 2, 2022
1 parent 8119a63 commit 5e230e4
Showing 1 changed file with 52 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,64 +17,95 @@ import WzConfigurationSettingsTabSelector from '../util-components/configuration
import withWzConfig from '../util-hocs/wz-config';
import WzNoConfig from '../util-components/no-config';
import { isString, renderValueNoThenEnabled } from '../utils/utils';
import { webDocumentationLink } from '../../../../../../../common/services/web_documentation';

const helpLinks = [
{
text: 'Wazuh agent enrollment',
href: webDocumentationLink('user-manual/agent-enrollment/index.html')
text: 'How to use the registration service',
href:
'https://documentation.wazuh.com/current/user-manual/registering/simple-registration-method.html',
},
{
text: 'Registration service reference',
href: webDocumentationLink('user-manual/reference/ossec-conf/auth.html')
}
href: 'https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/auth.html',
},
];

const mainSettings = [
{
field: 'disabled',
label: 'Service status',
render: renderValueNoThenEnabled
render: renderValueNoThenEnabled,
},
{ field: 'port', label: 'Listen to connections at port' },
{ field: 'use_source_ip', label: "Use client's source IP address" },
{ field: 'use_password', label: 'Use a password to register agents' },
{ field: 'purge', label: 'Purge agents list when removing agents' },
{
field: 'limit_maxagents',
label: 'Limit registration to maximum number of agents'
label: 'Limit registration to maximum number of agents',
},
{
field: 'force.enabled',
label: 'Force registration when using an existing IP address'
label: 'Force registration when using an existing IP address',
},
{
field: 'force.after_registration_time',
label: 'Specifies that the agent replacement will be performed only when the time (seconds) passed since the agent registration is greater than the value configured in the setting'
label:
'Specifies that the agent replacement will be performed only when the time (seconds) passed since the agent registration is greater than the value configured in the setting',
},
{
field: 'force.key_mismatch',
label: 'Avoid re-registering agents that already have valid keys'
label: 'Avoid re-registering agents that already have valid keys',
},
{
field: 'force.disconnected_time.enabled',
label: 'Specifies that the replacement will be performed only for agents that have been disconnected longer than a certain time'
label:
'Specifies that the replacement will be performed only for agents that have been disconnected longer than a certain time',
},
{
field: 'force.disconnected_time.value',
label: 'Seconds since an agent is in a disconnected state'
label: 'Seconds since an agent is in a disconnected state',
},
];

const keyRequestSettings = [
{
field: 'key_request.enabled',
label: 'Key request status',
render: renderValueYesThenEnabled,
},
{
field: 'key_request.exec_path',
label: 'Full path to the executable',
},
{
field: 'key_request.socket',
label: 'Full path to the Unix domain socket',
},
{
field: 'key_request.timeout',
label: 'Maximum time for waiting a response from the executable',
},
{
field: 'key_request.threads',
label: 'Number of threads for dispatching the external keys requests',
},
{
field: 'key_request.queue_size',
label: 'Indicates the maximum size of the queue for fetching external keys',
},
];

const sslSettings = [
{ field: 'ssl_verify_host', label: 'Verify agents using a CA certificate' },
{
field: 'ssl_auto_negotiate',
label: 'Auto-select the SSL negotiation method'
label: 'Auto-select the SSL negotiation method',
},
{ field: 'ssl_manager_ca', label: 'CA certificate location' },
{ field: 'ssl_manager_cert', label: 'Server SSL certificate location' },
{ field: 'ssl_manager_key', label: 'Server SSL key location' },
{ field: 'ciphers', label: 'Use the following SSL ciphers' }
{ field: 'ciphers', label: 'Use the following SSL ciphers' },
];

class WzRegistrationService extends Component {
Expand Down Expand Up @@ -112,6 +143,12 @@ class WzRegistrationService extends Component {
config={currentConfig['auth-auth'].auth}
items={mainSettings}
/>
<WzConfigurationSettingsGroup
title="Key request settings"
description="The key request feature allows to fetch agent keys from an external source, for example, a database"
config={currentConfig['auth-auth'].auth}
items={keyRequestSettings}
/>
<WzConfigurationSettingsGroup
title="SSL settings"
description="Applied when the registration service uses SSL certificates"
Expand All @@ -129,6 +166,4 @@ WzRegistrationService.propTypes = {
// currentConfig: PropTypes.object.isRequired
};

export default withWzConfig([{ component: 'auth', configuration: 'auth' }])(
WzRegistrationService
);
export default withWzConfig([{ component: 'auth', configuration: 'auth' }])(WzRegistrationService);

0 comments on commit 5e230e4

Please sign in to comment.