OpenSearch/x-pack/plugin
Ioannis Kakavas 12ba9e3e16
Gracefully handle exceptions from Security Providers (#65464) (#65554)
In certain situations, such as when configured in FIPS 140 mode,
the Java security provider in use might throw a subclass of
java.lang.Error. We currently do not catch these and as a result
the JVM exits, shutting down elasticsearch.

This commit attempts to address this by catching subclasses of Error
that might be thrown for instance when a PBKDF2 implementation
is used from a Security Provider in FIPS 140 mode, with the password
input being less than 14 bytes (112 bits).

- In our PBKDF2 family of hashers, we catch the Error and
throw an ElasticsearchException while creating or verifying the
hash. We throw on verification instead of simply returning false
on purpose so that the message bubbles up and the cause becomes
obvious (otherwise it would be indistinguishable from a wrong
password).
- In KeyStoreWrapper, we catch the Error in order to wrap and re-throw 
a GeneralSecurityException with a helpful message. This can happen when 
using any of the keystore CLI commands, when the node starts or when we 
attempt to reload secure settings.
- In the `elasticsearch-users` tool, we catch the ElasticsearchException that
the Hasher class re-throws and throw an appropriate UserException.

Tests are missing because it's not trivial to set CI in fips approved mode
right now, and thus any tests would need to be muted. There is a parallel
effort in #64024 to enable that and tests will be added in a followup.
2020-11-26 17:04:34 +02:00
..
analytics Fixup reduceRandom tests (#65263) 2020-11-20 13:10:34 -05:00
async [7.x] Remove integTest task from PluginBuildPlugin (#61879) (#62135) 2020-09-09 14:25:41 -05:00
async-search Mute AsyncSearchActionIT.testRetryVersionConflict (#64919) 2020-11-11 14:01:33 +01:00
autoscaling Autoscaling decision return absolute capacity (#61575) (#62670) 2020-09-19 09:05:23 +02:00
ccr Stop renew retention leases when follow task fails (#65168) 2020-11-18 15:53:55 -05:00
core Gracefully handle exceptions from Security Providers (#65464) (#65554) 2020-11-26 17:04:34 +02:00
data-streams Deprecate REST access to System Indices (#63274) (Original #60945) 2020-10-06 13:41:40 -06:00
deprecation Remove deprecation indexing code from 7.10 (#63942) 2020-10-21 16:28:21 +01:00
enrich Deprecate REST access to System Indices (#63274) (Original #60945) 2020-10-06 13:41:40 -06:00
eql EQL: [Tests] Adjust README for preserving test data (#65460) 2020-11-25 14:30:25 +01:00
frozen-indices Make keep alive optional in PointInTimeBuilder (#62720) 2020-09-22 18:52:54 -04:00
graph Deprecate REST access to System Indices (#63274) (Original #60945) 2020-10-06 13:41:40 -06:00
identity-provider [DOCS] Fix case for 'Boolean' (#64299) (#64342) 2020-10-29 10:05:57 -04:00
ilm [7.10] Fix SetSingleNodeAllocateStep for data tier deployments (#64679) (#64730) 2020-11-06 10:12:16 -07:00
logstash Handle missing logstash index exceptions (#63753) 2020-10-15 09:45:02 -06:00
mapper-constant-keyword Convert TextFieldMapper to parametrized form (#63269) (#63392) 2020-10-07 13:26:25 +01:00
mapper-flattened Fix test compilation 2020-10-28 08:58:09 +01:00
mapper-unsigned-long Disable using unsigned_long in scripts (#64552) (#64557) 2020-11-03 16:38:50 -05:00
mapper-version Remove dependency from version plugin. 2020-10-18 14:09:32 -07:00
ml [7.10][ML] Increase timeout waiting for DFA jobs to finish in integ tests (#65126) (#65131) 2020-11-17 16:46:17 +02:00
monitoring Deprecate REST access to System Indices (#63274) (Original #60945) 2020-10-06 13:41:40 -06:00
ql {S,E}QL: Fix optimization of `NotEquals` in conjunctions (#65331) (#65449) 2020-11-24 13:20:32 -05:00
repositories-metering-api [7.x] Remove integTest task from PluginBuildPlugin (#61879) (#62135) 2020-09-09 14:25:41 -05:00
rollup [7.x] Generalize AsyncTwoPhaseIndexer first phase (#61739) (#62482) 2020-09-17 11:57:22 +03:00
search-business-rules [7.x] Remove integTest task from PluginBuildPlugin (#61879) (#62135) 2020-09-09 14:25:41 -05:00
searchable-snapshots Fix SearchableSnapshotsIntegTests.testCreateAndRestoreSearchableSnapshot (#65343) (#65351) 2020-11-23 12:30:18 +01:00
security Gracefully handle exceptions from Security Providers (#65464) (#65554) 2020-11-26 17:04:34 +02:00
spatial Removes yaml circuit-breaker tests for geoshape geogrid aggs (#64420) 2020-10-30 08:07:12 -07:00
sql {S,E}QL: Fix optimization of `NotEquals` in conjunctions (#65331) (#65449) 2020-11-24 13:20:32 -05:00
src Validate PIT on _msearch (#63167) 2020-11-05 15:38:28 +01:00
stack [7.x] Add "synthetics-*-*" templates for synthetics fleet data (#62193) (#62346) 2020-09-14 17:14:34 -06:00
transform [7.10][Transform] add support for unsigned_long data type (#63957) 2020-10-20 21:05:46 +02:00
vectors Fix sparse vector test 2020-11-12 20:10:07 +00:00
voting-only-node [7.x] Remove integTest task from PluginBuildPlugin (#61879) (#62135) 2020-09-09 14:25:41 -05:00
watcher Include the entire response in error message in case of reporting generation error. (#64979) 2020-11-25 09:24:08 +01:00
wildcard Make array value parsing flag more robust. (#63371) 2020-10-06 17:49:25 -07:00
build.gradle Fix Eclipse build (#62733) (#62786) 2020-09-22 17:44:25 -04:00