OpenSearch/x-pack/plugin/security
Tim Vernum 59da7c3cc4
Improve error message for 6.x style realm settings (#36876)
Realm settings were changed in #30241 in a non-BWC way.
If you try and start a 7.x node using a 6.x config style, then the
default error messages do not adequately describe the cause of
the problem, or the solution.

This change detects the when realms are using the 6.x style and fails
with a specific error message.

This detection is a best-effort, and will detect issues when the
realms have not been modified to use the 7.x style, but may not detect
situations where the configuration was partially changed.

e.g. We can detect this:

    xpack.security.authc:
      realms.pki1.type: pki
      realms.pki1.order: 3
      realms.pki1.ssl.certificate_authorities: [ "ca.crt" ]

But this (where the "order" has been updated, but the "ssl.*" has not)
will fall back to the standard "unknown setting" check

    xpack.security.authc:
      realms.pki.pki1.order: 3
      realms.pki1.ssl.certificate_authorities: [ "ca.crt" ]

Closes: #36026
2018-12-21 12:02:02 +11:00
..
cli Converting randomized testing to create a separate unitTest task instead of replacing the builtin test task (#36311) 2018-12-19 08:25:20 +02:00
forbidden Migrate x-pack-elasticsearch source to elasticsearch 2018-04-20 15:29:54 -07:00
licenses LOGGING: Upgrade to Log4J 2.11.1 (#32616) 2018-08-06 14:56:21 +02:00
src Improve error message for 6.x style realm settings (#36876) 2018-12-21 12:02:02 +11:00
build.gradle Converting randomized testing to create a separate unitTest task instead of replacing the builtin test task (#36311) 2018-12-19 08:25:20 +02:00