Skip to content

Conversation

@jsinovassin
Copy link
Contributor

@jsinovassin jsinovassin commented Oct 13, 2025

https://issues.apache.org/jira/browse/UNOMI-911

This pull request refactors the way SSL context is handled when creating the Elasticsearch client. The main changes focus on ensuring that the SSL context is only set when the "trust all certificates" option is enabled.

Elasticsearch client initialization improvements:

  • Refactored the client builder logic in ElasticSearchPersistenceServiceImpl.java to initialize ElasticsearchClientFactory.ClientBuilder once and only set the SSL context if sslTrustAllCertificates is true, avoiding unnecessary SSL context usage.
  • Moved the call to set the SSL context (sslContext) on the client builder inside the conditional block for sslTrustAllCertificates, ensuring it is only set when appropriate.

@Fgerthoffert Fgerthoffert requested a review from jayblanc October 13, 2025 11:40
@jsinovassin jsinovassin merged commit 1a2d899 into master Oct 13, 2025
5 checks passed
@jsinovassin jsinovassin deleted the fix-connection-to-es branch October 13, 2025 12:35
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.

2 participants