diff --git a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java index 22eee8052f9..10c746ca83b 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/security/authc/RealmSettings.java @@ -34,7 +34,8 @@ import static org.elasticsearch.xpack.security.Security.setting; * Instead, realm configuration relies on the validator parameter to * {@link Setting#groupSetting(String, Consumer, Setting.Property...)} in order to validate each realm in a way that respects the * declared type. - * Internally, this validation delegates to {@link AbstractScopedSettings#validate(Settings)} so that validation is reasonably aligned + * Internally, this validation delegates to {@link AbstractScopedSettings#validate(Settings, boolean)} so that validation is reasonably + * aligned * with the way we validate settings globally. *

*

@@ -172,7 +173,7 @@ public class RealmSettings { settingSet.add(ORDER_SETTING); final AbstractScopedSettings validator = new AbstractScopedSettings(settings, settingSet, Setting.Property.NodeScope) { }; try { - validator.validate(settings); + validator.validate(settings, false); } catch (RuntimeException e) { throw new IllegalArgumentException("incorrect configuration for realm [" + getFullSettingKey(name, "") + "] of type " + type, e); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java index 32857ce64d1..ab4da6cd6a4 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/security/authc/pki/PkiRealmTests.java @@ -275,7 +275,7 @@ public class PkiRealmTests extends ESTestCase { List> settingList = new ArrayList<>(); RealmSettings.addSettings(settingList, Collections.emptyList()); ClusterSettings clusterSettings = new ClusterSettings(settings, new HashSet<>(settingList)); - clusterSettings.validate(settings); + clusterSettings.validate(settings, false); assertSettingDeprecationsAndWarnings(new Setting[] { SSLConfigurationSettings.withoutPrefix().legacyTruststorePassword }); }