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

Migrate keystore to master #27066

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

pereyra-m
Copy link
Member

@pereyra-m pereyra-m commented Nov 26, 2024

Related issue
Closes #26971

Description

This PR migrates the wazuh-keystore to the master branch and adapts it to the project structure. The QA/UT tests and required utils were also migrated.

The OpenSSL v3.1.0 was added to vcpkg because it was missing and it was the closest version to the one used at branch v4.10.0.

The IndexerConnector class was updated to read the keystore and the plain text credentials were removed.

The SPECS and installer scripts were modified to include the new binary, but the RPM package can't be built due to previous errors.
The folders and binaries permissions were preserved but due to facebook/rocksdb#11503 the internal RocksDB files will have 644 instead of 640.

Until this PR is merged #26908, the root:wazuh permissions will be used instead of wazuh:wazuh.

Tests

I've installed a package built from this branch and configured the keystore credentials.
A test event is properly indexed

2024-11-27_20-44

@pereyra-m pereyra-m self-assigned this Nov 26, 2024
@pereyra-m pereyra-m linked an issue Nov 26, 2024 that may be closed by this pull request
2 tasks
@pereyra-m pereyra-m force-pushed the enhancement/26971-migrate-keystore-tool branch 2 times, most recently from 965bb18 to 19679b8 Compare November 27, 2024 07:39
@pereyra-m pereyra-m marked this pull request as ready for review November 27, 2024 07:41
@pereyra-m pereyra-m force-pushed the enhancement/26971-migrate-keystore-tool branch from bfc7565 to e44a47e Compare November 28, 2024 01:12
@pereyra-m pereyra-m force-pushed the enhancement/26971-migrate-keystore-tool branch 2 times, most recently from 4b0b74d to 6a755db Compare November 28, 2024 03:58
Copy link

Coverage reports

The coverage report can be downloaded from here

Module Line coverage Function coverage
base 81.4% ✅ 85.3% ✅
conf 94.1% ✅ 95.3% ✅
indexerconnector 94.7% ✅ 91.9% ✅
keystore 90.7% ✅ 91.7% ✅

🟢 All modules have passed the coverage check

@@ -189,11 +189,11 @@ jobs:
local coverage_filtered_file="${{github.workspace}}/${{env.BUILD_PATH}}/coverage_${module}_filtered.info"

# Generate the coverage report
lcov --no-external --capture --initial --directory ${module_build_path} --base-directory ${module_path} --exclude "${module_path}/test/*" --output-file ${coverage_base_file}
lcov --no-external --capture --initial --directory ${module_build_path} --base-directory ${module_path} --exclude "${module_path}/test/*" --output-file ${coverage_base_file} --ignore-errors unused,mismatch
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this flags to ignore some errors:

  • unused: the coverage reports that the keystore test folder exclusion is unused
  • mismatch: the GTest macros create a number line difference that causes confusion to lcov

@pereyra-m pereyra-m force-pushed the enhancement/26971-migrate-keystore-tool branch from 6a755db to 2157bda Compare November 28, 2024 12:53
Copy link

Coverage reports

The coverage report can be downloaded from here

Module Line coverage Function coverage
base 81.4% ✅ 85.3% ✅
conf 94.1% ✅ 95.3% ✅
indexerconnector 94.7% ✅ 91.9% ✅
keystore 90.7% ✅ 91.7% ✅

🟢 All modules have passed the coverage check

@pereyra-m pereyra-m force-pushed the enhancement/26971-migrate-keystore-tool branch 2 times, most recently from 96c2c86 to f6e3f90 Compare November 28, 2024 13:35
@pereyra-m pereyra-m force-pushed the enhancement/26971-migrate-keystore-tool branch from f6e3f90 to 7a70871 Compare November 28, 2024 13:38
Copy link

Coverage reports

The coverage report can be downloaded from here

Module Line coverage Function coverage
base 81.4% ✅ 85.3% ✅
conf 94.1% ✅ 95.3% ✅
indexerconnector 94.7% ✅ 91.9% ✅
keystore 90.7% ✅ 91.7% ✅

🟢 All modules have passed the coverage check

Copy link

Coverage reports

The coverage report can be downloaded from here

Module Line coverage Function coverage
base 81.4% ✅ 85.3% ✅
conf 94.1% ✅ 95.3% ✅
indexerconnector 94.7% ✅ 91.9% ✅
keystore 90.7% ✅ 91.7% ✅

🟢 All modules have passed the coverage check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate keystore tool
1 participant