kibana/x-pack/plugins
Patrick Mueller ff546a1af4
[actions] for simplistic email servers, set rejectUnauthorized to false (#91760)
resolves https://github.com/elastic/kibana/issues/91686

The poor email action has not had great success in setting TLS options
correctly.  Prior to 7.11, it was basically always setting `rejectUnauthorized`
to false, so was never validating certificates.  Starting in 7.11.0, it
started respecting TLS certificates, but there are some simple/test servers
in use that use self-signed certificates.

The real fix for this will be the resolution of issue
https://github.com/elastic/kibana/issues/80120 , but until then, this PR
does a special-case check if the `secure` option is off (so the email client
connects with a plain socket and then upgrades to TLS via STARTTLS) and both
the user and password for the server are not set, then it will use
`rejectUnauthorized: false`.  Otherwise, it uses the global configured value
of this setting.

This also changes some other cases, where `secure: true` often did not
set any `rejectUnauthorized` property at all, and so did not get verified.
Now in all cases, `rejectUnauthorized` will be set, and the value will
correspond to the globally configured value, except for the special case
checked here, and when a proxy is in use (that logic did not change).

So it is possible this would break customers, who were using insecure servers
and email action worked, but with this fix the connections will be rejected.
They should have been rejected all this time though.

The work-around for this problem, if we don't implement a fix like this, is
that customers will need to set the global `rejectUnauthorized` to `false`,
which means NONE of their TLS connections for any actions will be verified.
Which seems extreme.
2021-03-01 16:30:21 -05:00
..
actions [actions] for simplistic email servers, set rejectUnauthorized to false (#91760) 2021-03-01 16:30:21 -05:00
alerting_builtins
alerts [Telemetry] Full schema definition (#90273) 2021-03-01 18:30:51 +00:00
apm Hide instances latency distribution chart (#92869) 2021-03-01 15:16:29 -06:00
audit_trail
banners
beats_management
canvas [Expressions] [Lens] Add id and copyMetaFrom arg to mapColumn fn + add configurable onError argument to math fn (#90481) 2021-02-25 09:43:15 +01:00
case [Security Solution][Case] Migrate category & subcategory fields of ServiceNow ITSM connector (#93092) 2021-03-01 16:21:00 -05:00
cloud
code
console_extensions
cross_cluster_replication
dashboard_enhanced
dashboard_mode
data_enhanced
discover_enhanced
drilldowns Remove "beta" label from URL Drilldown as it is now GA (#92859) 2021-03-01 12:54:07 +01:00
embeddable_enhanced
encrypted_saved_objects
enterprise_search [App Search] Create Curation view/functionality (#92560) 2021-02-25 17:07:05 -05:00
event_log [Event Log] Extended README.md with the documentation for a REST API and Start plugin contract. (#92562) 2021-02-25 08:59:30 -08:00
features
file_upload
fleet [Fleet] Add new index to fleet for artifacts being served out of fleet-server (#92860) 2021-02-25 16:42:50 -05:00
global_search
global_search_bar
global_search_providers
graph
grokdebugger
index_lifecycle_management [ILM] Fix replicas not showing (#92782) 2021-02-25 18:05:19 +01:00
index_management
infra Added alerting ui mock for jest test (#92604) 2021-03-01 12:55:41 +01:00
ingest_manager
ingest_pipelines
lens [Lens] Fix Workspace hidden when using Safari (#92616) 2021-02-25 09:42:50 +01:00
license_management
licensing
lists [Security Solution][Exceptions] - Fixes exceptions builder UI where invalid values can cause overwrites of other values (#90634) 2021-02-24 18:32:44 -08:00
logstash
maps [Maps] fix MapboxDraw import from pointing to dist just pointing to folder (#93087) 2021-03-01 14:11:39 -07:00
maps_legacy_licensing
ml Cleanup spaces plugin (#91976) 2021-03-01 07:56:44 -05:00
monitoring
observability
osquery
painless_lab
remote_clusters
reporting [Reporting] Remove unused priority field (#92552) 2021-03-01 10:41:08 -07:00
rollup [Rollup] Fix use of undefined value in JS import (#92791) 2021-02-25 18:09:14 +01:00
runtime_fields
saved_objects_tagging
searchprofiler
security Cleanup spaces plugin (#91976) 2021-03-01 07:56:44 -05:00
security_solution [Security Solution][Detecttions] Indicator enrichment tweaks (#92989) 2021-03-01 14:57:35 -06:00
snapshot_restore
spaces [Telemetry] Full schema definition (#90273) 2021-03-01 18:30:51 +00:00
stack_alerts
task_manager
telemetry_collection_xpack [Telemetry] Full schema definition (#90273) 2021-03-01 18:30:51 +00:00
transform
translations Control round and decimal places in Gauge Visualization when using aggregate functions like average (#91293) 2021-03-01 14:58:16 +03:00
triggers_actions_ui Added alerting ui mock for jest test (#92604) 2021-03-01 12:55:41 +01:00
ui_actions_enhanced
upgrade_assistant [Upgrade Assistant] Align code between branches (#91862) 2021-02-24 16:15:06 -05:00
uptime
watcher
xpack_legacy