-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Core/Infra/SettingsSettings infrastructure and APIsSettings infrastructure and APIs
Description
Setting.exists is implemented by checking whether the key is in Settings.keySet()
But keySet returns the union of standard settings and secure settings, so this means that a setting is considered to exist if it is in either elasticsearch.yml or elasticsearch.keystore
However Setting.get() does not read secure settings, so code that tries to do
if (setting.exists()) {
return setting.get();
} else {
// ...
}
Will do the wrong thing if the setting has been (presumably incorrectly) added to the keystore.
My proposal would be to add a keySet(boolean includeSecureSettings) to Settings, and have exists (in non-secure Setting) call that with false.
Metadata
Metadata
Assignees
Labels
:Core/Infra/SettingsSettings infrastructure and APIsSettings infrastructure and APIs