Repository navigation
Point the indexer to the problems above when its prestart check fails - #2811
Open
patriiciacoboss wants to merge 1 commit into
Open
patriiciacoboss wants to merge 1 commit into
patriiciacoboss wants to merge 1 commit into
Conversation
fcaffieri
requested changes
Nov 10, 2026
fcaffieri
left a comment
Member
There was a problem hiding this comment.
LGTM. The closing lines now point to the problems above for passwords and certificates alike, match the manager and dashboard wording, and describe what the resolver checks (root owner, no group/other write).
- The issue suggested adding the group and
certificates-conf.sh --priv. When the prestart check fails onUNSAFE, the resolver stops before its ownchown root:wazuh-indexer, chmod 0640hint, so someone following this message could setroot:rootand then hit a read error in OpenSearch. Would it make sense to add something like "(certificates-conf.sh --privsets them: root, group 101, 0640)"?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related to #2792
When
resolve-credentials.sh --prestartrefuses to start, the Wazuh indexer entrypoint always ended with a message that sent the user toconfig/credentials/indexer.envand tocredentials-conf.sh, even when the lines above it were about certificate files, for exampleUNSAFE .../certs/indexer.pem: owned by uid 101, not root. The Wazuh manager entrypoint already says that the problems above must be solved. This PR makes the indexer message cover both kinds of problem.Changes
build-docker-images/wazuh-indexer/config/entrypoint.sh: replace the two closing lines of the--prestartblock with three that follow the manager entrypoint: the problems above must be solved, passwords go inconfig/credentials/indexer.env, and the certificates underconfig/*/certs, and any file that is mounted, must be owned by root and not writable by group or others. It does not nameconfig/wazuh_indexer/certs, which exists only in the single-node stack, or group 101, which the resolver does not check. The branch for missing keys is unchanged.CHANGELOG.md: add the entry under v5.0.0 > Fixed.Tests
bash -non the modified entrypoint.wazuh/wazuh-indexer:5.0.0-rc2(its/entrypoint.shhas the same lines 98-111 as5.0.0), this entrypoint mounted over it and throwaway certificates owned by uid 101 mounted in/usr/share/wazuh-indexer/config/certs: the container prints oneUNSAFE ... owned by uid 101, not rootline per file, theresolve-credentialsline and the three new lines, and exits with 1.UNSAFEline and no closing message are printed, and the entrypoint goes on and starts OpenSearch, which then stops by itself, outside of this change.