Skip to content

Commit

Permalink
Added new key request block in Registration service config (#3956)
Browse files Browse the repository at this point in the history
* Added new key request block

* Removed failed snapshots

* Updated some test snapshots

* Updated descriptions registration-service
  • Loading branch information
Machi3mfl authored Jul 11, 2022
1 parent 3977e45 commit 2b6ecf3
Showing 1 changed file with 51 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,66 +16,96 @@ import WzConfigurationSettingsGroup from '../util-components/configuration-setti
import WzConfigurationSettingsTabSelector from '../util-components/configuration-settings-tab-selector';
import withWzConfig from '../util-hocs/wz-config';
import WzNoConfig from '../util-components/no-config';
import { isString, renderValueNoThenEnabled } from '../utils/utils';
import { isString, renderValueNoThenEnabled, renderValueYesThenEnabled } from '../utils/utils';

const helpLinks = [
{
text: 'How to use the registration service',
href:
'https://documentation.wazuh.com/current/user-manual/registering/simple-registration-method.html'
'https://documentation.wazuh.com/current/user-manual/registering/simple-registration-method.html',
},
{
text: 'Registration service reference',
href:
'https://documentation.wazuh.com/current/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 @@ -113,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 @@ -130,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 2b6ecf3

Please sign in to comment.