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

Make WAZUH_DATA_CONFIG_DIRECTORY_PATH Customizable #7184

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker/osd-dev/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ services:
- ${OSD_PORT}:5601
environment:
- 'LOGS=/proc/1/fd/1'
# https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/#interpolation-syntax
- WAZUH_CONFIG_PATH=${WAZUH_CONFIG_PATH:-/home/node/kbn/data/wazuh/config}
entrypoint: ['tail', '-f', '/dev/null']
volumes:
- osd_cache:/home/node/.cache
Expand All @@ -247,7 +249,7 @@ services:
- '${SRC}/wazuh-check-updates:/home/node/kbn/plugins/wazuh-check-updates'
- wd_certs:/home/node/kbn/certs/
- ${WAZUH_DASHBOARD_CONF}:/home/node/kbn/config/opensearch_dashboards.yml
- ./config/${OSD_MAJOR}/osd/wazuh.yml:/home/node/kbn/data/wazuh/config/wazuh.yml
- ./config/${OSD_MAJOR}/osd/wazuh.yml:${WAZUH_CONFIG_PATH}/wazuh.yml

idpsec:
image: quay.io/keycloak/keycloak:19.0.1
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/common/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*

Check failure on line 1 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

Definition for rule 'import/no-unused-modules' was not found
* Wazuh app - Wazuh Constants file
* Copyright (C) 2015-2022 Wazuh, Inc.
*
Expand Down Expand Up @@ -39,8 +39,8 @@
export const WAZUH_INDEX_TYPE_STATISTICS = 'statistics';
export const WAZUH_STATISTICS_DEFAULT_PREFIX = 'wazuh';
export const WAZUH_STATISTICS_DEFAULT_NAME = 'statistics';
export const WAZUH_STATISTICS_PATTERN = `${WAZUH_STATISTICS_DEFAULT_PREFIX}-${WAZUH_STATISTICS_DEFAULT_NAME}-*`;

Check failure on line 42 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

This line has a length of 112. Maximum allowed is 100
export const WAZUH_STATISTICS_TEMPLATE_NAME = `${WAZUH_STATISTICS_DEFAULT_PREFIX}-${WAZUH_STATISTICS_DEFAULT_NAME}`;

Check failure on line 43 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

This line has a length of 116. Maximum allowed is 100
export const WAZUH_STATISTICS_DEFAULT_INDICES_SHARDS = 1;
export const WAZUH_STATISTICS_DEFAULT_INDICES_REPLICAS = 0;
export const WAZUH_STATISTICS_DEFAULT_CREATION = 'w';
Expand Down Expand Up @@ -74,7 +74,7 @@
{ ssh: true },
{ apache: true, alerts: 2000 },
{ web: true },
{ windows: { service_control_manager: true }, alerts: 1000 },

Check failure on line 77 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

Identifier 'service_control_manager' is not in camel case
{ github: true },
],
[WAZUH_SAMPLE_ALERTS_CATEGORY_AUDITING_POLICY_MONITORING]: [
Expand Down Expand Up @@ -131,7 +131,7 @@
);

export const WAZUH_DATA_CONFIG_APP_PATH = path.join(
WAZUH_DATA_CONFIG_DIRECTORY_PATH,
process.env.WAZUH_CONFIG_PATH || WAZUH_DATA_CONFIG_DIRECTORY_PATH,
'wazuh.yml',
);

Expand Down Expand Up @@ -235,7 +235,7 @@
export const HEALTH_CHECK = 'health-check';

// Health check
export const HEALTH_CHECK_REDIRECTION_TIME = 300; //ms

Check failure on line 238 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

Expected space or tab after '//' in comment

// Plugin platform settings
// Default timeFilter set by the app
Expand Down Expand Up @@ -344,7 +344,7 @@
NOT_SYNCED: 'not synced',
};

// The status code can be seen here https://github.com/wazuh/wazuh/blob/686068a1f05d806b2e3b3d633a765320ae7ae114/src/wazuh_db/wdb.h#L55-L61

Check failure on line 347 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

This line has a length of 139. Maximum allowed is 100

export const AGENT_STATUS_CODE = [
{
Expand Down Expand Up @@ -408,7 +408,7 @@
};

type TPluginSettingOptionsSelect = {
select: { text: string; value: any }[];

Check failure on line 411 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

Unexpected any. Specify a different type
};

type TPluginSettingOptionsEditor = {
Expand Down Expand Up @@ -451,8 +451,8 @@
type TPluginSettingOptionsSwitch = {
switch: {
values: {
disabled: { label?: string; value: any };

Check failure on line 454 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

Unexpected any. Specify a different type
enabled: { label?: string; value: any };

Check failure on line 455 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

Unexpected any. Specify a different type
};
};
};
Expand Down Expand Up @@ -488,7 +488,7 @@
defaultBlock?: string;
/* Transform the value defined in the configuration file to be consumed by the Configuration
service */
transformFrom?: (value: any) => any;

Check failure on line 491 in plugins/wazuh-core/common/constants.ts

View workflow job for this annotation

GitHub Actions / Ensure the code format on the changed files

Unexpected any. Specify a different type
};
};
// Default value.
Expand Down
Loading