Adding support to disable SSL based connection to Elastic Search through a config parameter.
Support HTTP connection to Elastic search with default being HTTPS.
Status
-
Proposed -
Trialing -
Under review -
Approved -
Retired
Context & Scope
Currently connection to elastic search is mandated to be with SSL connection only. This is causing for a local setup development blocker, as it needs SSL enabled elastic search setup locally.
Decision
Rationale
Resolution
- Allow for user to explicitly switch off the use of HTTPS when making connection to elastic search endpoint.
- The default is still with SSL enforced. Its optional for anyone who wants to switch off to switch off SSL.
- This is achieved by doing changes at these places
- Core-lib changes
- Making changes in the core lib, by adding logic to the create of the elasticsearch client that provides way for getting the client with SSL and TLS not mandated.
- The setting of elastic search that enables/disables SSL has a default of having SSL "enabled".
- The setting lies in line with where the elastic creds are stored currently.
- The way to fetch values by default value is added.
- Indexer changes
- The changes are mostly to the test core.
- Ability to fetch the value of the config for SSL enablement with default as SSL enabled.
- Updating the client creation to define the scheme based on the flag that is set.
- Search changes
- The changes are similar to the indexer changes as at both places the test cores have a copy kind of notion for the ElasticUtils file.
- Core-lib changes
Next refactor (nice to have): Better to get the test core common functional items to a core test lib so as to reduce the multiple places of changes.
Tradeoff Analysis - Input to decision
Alternatives and implications
- This step could be an intermediate one for moving to profile based spring boot application launch.
- Profiles would help us segregate and override the required env variables based on profile selection during launch of service.
- Bringing profiles in one change is a larger change.
Decision criteria and tradeoffs
Decision timeline
Edited by Hema Vishnu Pola [Microsoft]