-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Merge 4.5.0 into 4.5.1 (#5719) * Update test snapshots for 4.5 (#5601) * Add missing supported versions to the Docker environments (#5584) feat(environments): add latest versions to Docker environments - Add Kibana versions: 7.17.7, 7.17.8, 7.17.9 and 7.17.10 - Add OpenSearch: 2.6.0 - Add OpenSearch Dashboards: 2.6.0 - Add Wazuh 4.4.1, 4.4.2, 4.4.3 and 4.4.4 * Update test snapshost * Update API data to 4.5 * Update branch patterns for GH Actions --------- Co-authored-by: Antonio <[email protected]> * Fix API reference links in endpoints.json * Merge 4.4 into 4.5.0 (#5669) Merge v4.4.5-2.6.0 into 4.4 (#5665) * Bump Wazuh and platform versions for v4.4.5 (#5639) * Update changelog * Update opensearch_dashboards.json * Update package.json * Update readme * Update tag script * Change tag.py version value * Empty tag suffix * Prepare tag.py for v4.4.5-rc1 (#5645) Add -rc1 tag suffix * Fix incompatible version of triple-beam subdependency (#5652) fix: add yarn.lock file and set version of triple-beam in yarn.lock * Update unit-test.yml (#5655) * Add support for Wazuh 4.4.5-rc2 (#5659) * Update revision of v4.4.5 in the Changelog * Bump v4.4.5-2.6.0-rc2 --------- Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]> Co-authored-by: Álex Ruiz <[email protected]> Co-authored-by: Antonio <[email protected]> * Update release utilities (#5677) * feat: update release utilities to current process - Add new bump script - Port tag.py to NodeJS and allow receive parameters from stdin - Add RELEASING.md file with information about the release process related to the usage of the included scripts - Add release:bump and release:tag package scripts to run these process * remove: remove scripts/tag.py and reference in the Makefile * fix: fix help text in bump and tag scripts * remove: remove stage and commit properties from the package.json * remove: test related to stage property in the package.json * fix: check if there are changes to commit in the tag script - Code formatting - Fix variable name --------- Co-authored-by: Álex Ruiz <[email protected]> Co-authored-by: Ian Yenien Serrano <[email protected]> Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]> * Fix API request to get the manager labels and broken documentation link (#5687) * fix: broken documentation link * changelog: add pull request entry * fix: changed API endpoint to get the manager labels and managing the data to render * changelog: add pull request entry * changelog: fix entry * changelog: fix entry * Add response to imposter --------- Co-authored-by: yenienserrano <[email protected]> * Fix server side query in pdf report filter (#5714) * Add server side query * Fix reporting unit test * Remove duplicated allowed agents filter and gdpr-pci-tsc filters * Code cleaning * Added Changelog * Fix deep clone filters * Fix server side requirement query * Fix rootkit filter * Update API data for 4.5.1 (#5758) update: API data * Fix outdated year in PDF report footer (#5766) * Fix year in PDF footer * Modify changelog * Change tests to match the new value * Change md5 in reporting test * Change md5 in reporting test * Revert accidental change * Revert accidental change * Fix md5 in test * Change md5 in test * Change md5 in test * Merge 4.5 into 4.5.1 (#5773) * Update test snapshots for 4.5 (#5601) * Add missing supported versions to the Docker environments (#5584) feat(environments): add latest versions to Docker environments - Add Kibana versions: 7.17.7, 7.17.8, 7.17.9 and 7.17.10 - Add OpenSearch: 2.6.0 - Add OpenSearch Dashboards: 2.6.0 - Add Wazuh 4.4.1, 4.4.2, 4.4.3 and 4.4.4 * Update test snapshost * Update API data to 4.5 * Update branch patterns for GH Actions --------- Co-authored-by: Antonio <[email protected]> * Fix API reference links in endpoints.json * Merge 4.4 into 4.5.0 (#5669) Merge v4.4.5-2.6.0 into 4.4 (#5665) * Bump Wazuh and platform versions for v4.4.5 (#5639) * Update changelog * Update opensearch_dashboards.json * Update package.json * Update readme * Update tag script * Change tag.py version value * Empty tag suffix * Prepare tag.py for v4.4.5-rc1 (#5645) Add -rc1 tag suffix * Fix incompatible version of triple-beam subdependency (#5652) fix: add yarn.lock file and set version of triple-beam in yarn.lock * Update unit-test.yml (#5655) * Add support for Wazuh 4.4.5-rc2 (#5659) * Update revision of v4.4.5 in the Changelog * Bump v4.4.5-2.6.0-rc2 --------- Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]> Co-authored-by: Álex Ruiz <[email protected]> Co-authored-by: Antonio <[email protected]> * Update release utilities (#5677) * feat: update release utilities to current process - Add new bump script - Port tag.py to NodeJS and allow receive parameters from stdin - Add RELEASING.md file with information about the release process related to the usage of the included scripts - Add release:bump and release:tag package scripts to run these process * remove: remove scripts/tag.py and reference in the Makefile * fix: fix help text in bump and tag scripts * remove: remove stage and commit properties from the package.json * remove: test related to stage property in the package.json * fix: check if there are changes to commit in the tag script - Code formatting - Fix variable name * Bump v4.5.0-2.6.0-alpha1 * Update README.md --------- Co-authored-by: Álex Ruiz <[email protected]> Co-authored-by: Antonio <[email protected]> Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]> --------- Co-authored-by: Antonio <[email protected]> Co-authored-by: Álex Ruiz <[email protected]> Co-authored-by: Nicolas Agustin Guevara Pihen <[email protected]> Co-authored-by: Federico Rodriguez <[email protected]>
- Loading branch information
1 parent
d3a7f8a
commit 806c063
Showing
25 changed files
with
580 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -278,7 +278,7 @@ export const ASSETS_PUBLIC_URL = '/plugins/wazuh/public/assets/'; | |
// Reports | ||
export const REPORTS_LOGO_IMAGE_ASSETS_RELATIVE_PATH = 'images/logo_reports.png'; | ||
export const REPORTS_PRIMARY_COLOR = '#256BD1'; | ||
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © 2022 Wazuh, Inc.'; | ||
export const REPORTS_PAGE_FOOTER_TEXT = 'Copyright © 2023 Wazuh, Inc.'; | ||
export const REPORTS_PAGE_HEADER_TEXT = '[email protected]\nhttps://wazuh.com'; | ||
|
||
// Plugin platform | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,67 @@ | ||
import { | ||
formatLabelValuePair, | ||
formatSettingValueToFile, | ||
getCustomizationSetting | ||
} from "./settings"; | ||
formatLabelValuePair, | ||
formatSettingValueToFile, | ||
getCustomizationSetting, | ||
} from './settings'; | ||
|
||
describe('[settings] Methods', () => { | ||
describe('formatLabelValuePair: Format the label-value pairs used to display the allowed values', () => { | ||
it.each` | ||
label | value | expected | ||
${'TestLabel'} | ${true} | ${'true (TestLabel)'} | ||
${'true'} | ${true} | ${'true'} | ||
`( | ||
`label: $label | value: $value | expected: $expected`, | ||
({ label, expected, value }) => { | ||
expect(formatLabelValuePair(label, value)).toBe(expected); | ||
}, | ||
); | ||
}); | ||
|
||
describe('formatLabelValuePair: Format the label-value pairs used to display the allowed values', () => { | ||
it.each` | ||
label | value | expected | ||
${'TestLabel'} | ${true} | ${'true (TestLabel)'} | ||
${'true'} | ${true} | ${'true'} | ||
`(`label: $label | value: $value | expected: $expected`, ({ label, expected, value }) => { | ||
expect(formatLabelValuePair(label, value)).toBe(expected); | ||
}); | ||
}); | ||
describe('formatSettingValueToFile: Format setting values to save in the configuration file', () => { | ||
it.each` | ||
input | expected | ||
${'test'} | ${'"test"'} | ||
${'test space'} | ${'"test space"'} | ||
${'test\nnew line'} | ${'"test\\nnew line"'} | ||
${''} | ${'""'} | ||
${1} | ${1} | ||
${true} | ${true} | ||
${false} | ${false} | ||
${['test1']} | ${'["test1"]'} | ||
${['test1', 'test2']} | ${'["test1","test2"]'} | ||
`(`input: $input | expected: $expected`, ({ input, expected }) => { | ||
expect(formatSettingValueToFile(input)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('formatSettingValueToFile: Format setting values to save in the configuration file', () => { | ||
it.each` | ||
input | expected | ||
${'test'} | ${'\"test\"'} | ||
${'test space'} | ${'\"test space\"'} | ||
${'test\nnew line'} | ${'\"test\\nnew line\"'} | ||
${''} | ${'\"\"'} | ||
${1} | ${1} | ||
${true} | ${true} | ||
${false} | ${false} | ||
${['test1']} | ${'[\"test1\"]'} | ||
${['test1', 'test2']} | ${'[\"test1\",\"test2\"]'} | ||
`(`input: $input | expected: $expected`, ({ input, expected }) => { | ||
expect(formatSettingValueToFile(input)).toBe(expected); | ||
}); | ||
}); | ||
|
||
describe('getCustomizationSetting: Get the value for the "customization." settings depending on the "customization.enabled" setting', () => { | ||
it.each` | ||
customizationEnabled | settingKey | configValue | expected | ||
${true} | ${'customization.logo.app'} | ${'custom-image-app.png'} | ${'custom-image-app.png'} | ||
${true} | ${'customization.logo.app'} | ${''} | ${''} | ||
${false} | ${'customization.logo.app'} | ${'custom-image-app.png'} | ${''} | ||
${false} | ${'customization.logo.app'} | ${''} | ${''} | ||
${true} | ${'customization.reports.footer'} | ${'Custom footer'} | ${'Custom footer'} | ||
${true} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2022 Wazuh, Inc.'} | ||
${false} | ${'customization.reports.footer'} | ${'Custom footer'} | ${'Copyright © 2022 Wazuh, Inc.'} | ||
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2022 Wazuh, Inc.'} | ||
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2022 Wazuh, Inc.'} | ||
${true} | ${'customization.reports.header'} | ${'Custom header'} | ${'Custom header'} | ||
${true} | ${'customization.reports.header'} | ${''} | ${'[email protected]\nhttps://wazuh.com'} | ||
${false} | ${'customization.reports.header'} | ${'Custom header'} | ${'[email protected]\nhttps://wazuh.com'} | ||
${false} | ${'customization.reports.header'} | ${''} | ${'[email protected]\nhttps://wazuh.com'} | ||
`(`customizationEnabled: $customizationEnabled | settingKey: $settingKey | configValue: $configValue | expected: $expected`, ({ configValue, customizationEnabled, expected, settingKey }) => { | ||
const configuration = { | ||
'customization.enabled': customizationEnabled, | ||
[settingKey]: configValue | ||
}; | ||
expect(getCustomizationSetting(configuration, settingKey)).toBe(expected); | ||
}); | ||
}); | ||
describe('getCustomizationSetting: Get the value for the "customization." settings depending on the "customization.enabled" setting', () => { | ||
it.each` | ||
customizationEnabled | settingKey | configValue | expected | ||
${true} | ${'customization.logo.app'} | ${'custom-image-app.png'} | ${'custom-image-app.png'} | ||
${true} | ${'customization.logo.app'} | ${''} | ${''} | ||
${false} | ${'customization.logo.app'} | ${'custom-image-app.png'} | ${''} | ||
${false} | ${'customization.logo.app'} | ${''} | ${''} | ||
${true} | ${'customization.reports.footer'} | ${'Custom footer'} | ${'Custom footer'} | ||
${true} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2023 Wazuh, Inc.'} | ||
${false} | ${'customization.reports.footer'} | ${'Custom footer'} | ${'Copyright © 2023 Wazuh, Inc.'} | ||
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2023 Wazuh, Inc.'} | ||
${false} | ${'customization.reports.footer'} | ${''} | ${'Copyright © 2023 Wazuh, Inc.'} | ||
${true} | ${'customization.reports.header'} | ${'Custom header'} | ${'Custom header'} | ||
${true} | ${'customization.reports.header'} | ${''} | ${'[email protected]\nhttps://wazuh.com'} | ||
${false} | ${'customization.reports.header'} | ${'Custom header'} | ${'[email protected]\nhttps://wazuh.com'} | ||
${false} | ${'customization.reports.header'} | ${''} | ${'[email protected]\nhttps://wazuh.com'} | ||
`( | ||
`customizationEnabled: $customizationEnabled | settingKey: $settingKey | configValue: $configValue | expected: $expected`, | ||
({ configValue, customizationEnabled, expected, settingKey }) => { | ||
const configuration = { | ||
'customization.enabled': customizationEnabled, | ||
[settingKey]: configValue, | ||
}; | ||
expect(getCustomizationSetting(configuration, settingKey)).toBe( | ||
expected, | ||
); | ||
}, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var path = context.request.path; | ||
var pathConfiguration = path.split('/'); | ||
pathConfiguration.splice(0, 5); | ||
console.log(pathConfiguration); | ||
switch (pathConfiguration[0]) { | ||
case 'labels': | ||
respond() | ||
.withStatusCode(200) | ||
.withFile('agents/configuration/agent_labels.json'); | ||
|
||
break; | ||
default: | ||
respond().withStatusCode(200).withFile('agents/configuration/default.json'); | ||
break; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"data": { | ||
"labels": [ | ||
{ | ||
"value": "customLabel", | ||
"key": "custom", | ||
"hidden": "no" | ||
} | ||
] | ||
}, | ||
"error": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"data": { | ||
"client": { | ||
"config-profile": "ubuntu, ubuntu20, ubuntu20.04", | ||
"notify_time": 10, | ||
"time-reconnect": 60, | ||
"force_reconnect_interval": 0, | ||
"ip_update_interval": 0, | ||
"auto_restart": "yes", | ||
"remote_conf": "yes", | ||
"crypto_method": "aes", | ||
"server": [ | ||
{ | ||
"address": "nginx-lb/172.25.0.4", | ||
"port": 1514, | ||
"max_retries": 5, | ||
"retry_interval": 10, | ||
"protocol": "tcp" | ||
} | ||
], | ||
"enrollment": [ | ||
{ | ||
"enabled": "yes", | ||
"delay_after_enrollment": 20, | ||
"port": 1515, | ||
"ssl_cipher": "HIGH:!ADH:!EXP:!MD5:!RC4:!3DES:!CAMELLIA:@STRENGTH", | ||
"auto_method": "no" | ||
} | ||
] | ||
} | ||
}, | ||
"error": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"data": { | ||
"affected_items": [ | ||
{ | ||
"labels": [ | ||
{ | ||
"value": "customLabel", | ||
"key": "custom", | ||
"hidden": "no" | ||
} | ||
] | ||
} | ||
], | ||
"total_affected_items": 1, | ||
"total_failed_items": 0, | ||
"failed_items": [] | ||
}, | ||
"message": "Active configuration was successfully read in specified node.", | ||
"error": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var path = context.request.path; | ||
var pathConfiguration = path.split('/'); | ||
pathConfiguration.splice(0, 4); | ||
switch (pathConfiguration[0]) { | ||
case 'labels': | ||
respond() | ||
.withStatusCode(200) | ||
.withFile('manager/configuration/agent_labels.json'); | ||
|
||
break; | ||
case 'reports': | ||
respond() | ||
.withStatusCode(200) | ||
.withFile('manager/configuration/monitor_reports.json'); | ||
|
||
break; | ||
default: | ||
respond() | ||
.withStatusCode(200) | ||
.withFile('manager/configuration/default.json'); | ||
break; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"data": { | ||
"affected_items": [ | ||
{ | ||
"labels": [ | ||
{ | ||
"value": "customLabel", | ||
"key": "custom", | ||
"hidden": "no" | ||
} | ||
] | ||
} | ||
], | ||
"total_affected_items": 1, | ||
"total_failed_items": 0, | ||
"failed_items": [] | ||
}, | ||
"message": "Active configuration was successfully read in specified node.", | ||
"error": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"data": { | ||
"affected_items": [ | ||
{ | ||
"global": { | ||
"email_notification": "no", | ||
"logall": "no", | ||
"logall_json": "no", | ||
"integrity_checking": 8, | ||
"rootkit_detection": 8, | ||
"host_information": 8, | ||
"prelude_output": "no", | ||
"zeromq_output": "no", | ||
"jsonout_output": "yes", | ||
"alerts_log": "yes", | ||
"stats": 4, | ||
"memory_size": 8192, | ||
"white_list": [ | ||
"127.0.0.1", | ||
"80.58.61.250", | ||
"80.58.61.254", | ||
"localhost.localdomain" | ||
], | ||
"rotate_interval": 0, | ||
"max_output_size": 0 | ||
} | ||
} | ||
], | ||
"total_affected_items": 1, | ||
"total_failed_items": 0, | ||
"failed_items": [] | ||
}, | ||
"message": "Active configuration was successfully read in specified node", | ||
"error": 0 | ||
} |
16 changes: 16 additions & 0 deletions
16
docker/imposter/manager/configuration/monitor_reports.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"data": { | ||
"affected_items": [{ | ||
"reports": [{ | ||
"category": "syscheck", | ||
"title": "Daily report: File changes", | ||
"email_to": "[email protected]" | ||
}] | ||
}], | ||
"total_affected_items": 1, | ||
"total_failed_items": 0, | ||
"failed_items": [] | ||
}, | ||
"message": "Could not read active configuration in specified node", | ||
"error": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.