mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Xpack side of elastic/elasticsearch#27161 (elastic/x-pack-elasticsearch#2851)
Original commit: elastic/x-pack-elasticsearch@31fdcdf583
This commit is contained in:
parent
fd392627a0
commit
92f87cab14
@ -34,7 +34,8 @@ import static org.elasticsearch.xpack.security.Security.setting;
|
||||
* Instead, realm configuration relies on the <code>validator</code> parameter to
|
||||
* {@link Setting#groupSetting(String, Consumer, Setting.Property...)} in order to validate each realm in a way that respects the
|
||||
* declared <code>type</code>.
|
||||
* 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.
|
||||
* </p>
|
||||
* <p>
|
||||
@ -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);
|
||||
|
@ -275,7 +275,7 @@ public class PkiRealmTests extends ESTestCase {
|
||||
List<Setting<?>> 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 });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user