From 162a2a99034af5b310a8759b423c9eadac8ff58c Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Sun, 23 Jun 2019 12:03:55 +0100 Subject: [PATCH] [MM-16244] Add Elasticsearch SkipTLSVerification parameter to the config (#11189) * [MM-16244] Add Elasticsearch SkipTLSVerification parameter to the config * Add SkipTLSVerification config parameter to the diagnostics * Update diagnostics key for consistency Co-Authored-By: George Goldberg --- app/diagnostics.go | 1 + model/config.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/app/diagnostics.go b/app/diagnostics.go index 55d0279543..9a7061e8ab 100644 --- a/app/diagnostics.go +++ b/app/diagnostics.go @@ -570,6 +570,7 @@ func (a *App) trackConfig() { "live_indexing_batch_size": *cfg.ElasticsearchSettings.LiveIndexingBatchSize, "bulk_indexing_time_window_seconds": *cfg.ElasticsearchSettings.BulkIndexingTimeWindowSeconds, "request_timeout_seconds": *cfg.ElasticsearchSettings.RequestTimeoutSeconds, + "skip_tls_verification": *cfg.ElasticsearchSettings.SkipTLSVerification, "trace": *cfg.ElasticsearchSettings.Trace, }) diff --git a/model/config.go b/model/config.go index b6fc1ec4e3..9e4c0f3691 100644 --- a/model/config.go +++ b/model/config.go @@ -2033,6 +2033,7 @@ type ElasticsearchSettings struct { LiveIndexingBatchSize *int `restricted:"true"` BulkIndexingTimeWindowSeconds *int `restricted:"true"` RequestTimeoutSeconds *int `restricted:"true"` + SkipTLSVerification *bool `restricted:"true"` Trace *string `restricted:"true"` } @@ -2113,6 +2114,10 @@ func (s *ElasticsearchSettings) SetDefaults() { s.RequestTimeoutSeconds = NewInt(ELASTICSEARCH_SETTINGS_DEFAULT_REQUEST_TIMEOUT_SECONDS) } + if s.SkipTLSVerification == nil { + s.SkipTLSVerification = NewBool(false) + } + if s.Trace == nil { s.Trace = NewString("") }