Class SecureSetting<T>
- java.lang.Object
-
- org.elasticsearch.common.settings.Setting<T>
-
- org.elasticsearch.common.settings.SecureSetting<T>
-
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public abstract class SecureSetting<T> extends Setting<T>
A secure setting. This class allows access to settings from the Elasticsearch keystore.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.common.settings.Setting
Setting.AffixKey, Setting.AffixSetting<T>, Setting.GroupKey, Setting.Key, Setting.ListKey, Setting.Property, Setting.SimpleKey, Setting.Validator<T>
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.common.settings.Setting
defaultValue
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
Modifier and Type Method Description void
diff(Settings.Builder builder, Settings source, Settings defaultSettings)
Overrides the diff operation to make this a no-op for secure settings as they shouldn't be returned in a diffboolean
exists(Settings settings)
Returns true if and only if this setting is present in the given settings instance.T
get(Settings settings)
Returns the settings value.T
getDefault(Settings settings)
Returns the default value for this setting.java.lang.String
getDefaultRaw(Settings settings)
Returns the default value string representation for this setting.static Setting<SecureString>
insecureString(java.lang.String name)
A setting which contains a sensitive string, but which for legacy reasons must be found outside secure settings.static Setting<java.io.InputStream>
secureFile(java.lang.String name, Setting<java.io.InputStream> fallback, Setting.Property... properties)
A setting which contains a file.static Setting<SecureString>
secureString(java.lang.String name, Setting<SecureString> fallback, Setting.Property... properties)
A setting which contains a sensitive string.-
Methods inherited from class org.elasticsearch.common.settings.Setting
affixKeySetting, boolSetting, boolSetting, boolSetting, byteSizeSetting, byteSizeSetting, byteSizeSetting, byteSizeSetting, byteSizeSetting, doubleSetting, doubleSetting, equals, existsOrFallbackExists, floatSetting, floatSetting, get, getConcreteSetting, getKey, getProperties, getRaw, getRawKey, getSettingsDependencies, groupSetting, groupSetting, hashCode, hasIndexScope, hasNodeScope, intSetting, intSetting, intSetting, intSetting, intSetting, isDeprecated, isDynamic, isFiltered, isFinal, isInternalIndex, isPrivateIndex, listSetting, listSetting, listSetting, listSetting, longSetting, match, memorySizeSetting, memorySizeSetting, memorySizeSetting, parseByteSize, parseInt, parseInt, parseLong, parseTimeValue, positiveTimeSetting, positiveTimeSetting, prefixKeySetting, simpleString, simpleString, simpleString, simpleString, simpleString, timeSetting, timeSetting, timeSetting, timeSetting, timeSetting, timeSetting, toString, toXContent, versionSetting
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Method Detail
-
getDefaultRaw
public java.lang.String getDefaultRaw(Settings settings)
Description copied from class:Setting
Returns the default value string representation for this setting.- Overrides:
getDefaultRaw
in classSetting<T>
- Parameters:
settings
- a settings object for settings that has a default value depending on another setting if available
-
getDefault
public T getDefault(Settings settings)
Description copied from class:Setting
Returns the default value for this setting.- Overrides:
getDefault
in classSetting<T>
- Parameters:
settings
- a settings object for settings that has a default value depending on another setting if available
-
exists
public boolean exists(Settings settings)
Description copied from class:Setting
Returns true if and only if this setting is present in the given settings instance. Note that fallback settings are excluded.
-
get
public T get(Settings settings)
Description copied from class:Setting
Returns the settings value. If the setting is not present in the given settings object the default value is returned instead.
-
diff
public void diff(Settings.Builder builder, Settings source, Settings defaultSettings)
Overrides the diff operation to make this a no-op for secure settings as they shouldn't be returned in a diff
-
secureString
public static Setting<SecureString> secureString(java.lang.String name, Setting<SecureString> fallback, Setting.Property... properties)
A setting which contains a sensitive string. This may be any sensitive string, e.g. a username, a password, an auth token, etc.
-
insecureString
public static Setting<SecureString> insecureString(java.lang.String name)
A setting which contains a sensitive string, but which for legacy reasons must be found outside secure settings.
-
secureFile
public static Setting<java.io.InputStream> secureFile(java.lang.String name, Setting<java.io.InputStream> fallback, Setting.Property... properties)
A setting which contains a file. Reading the setting opens an input stream to the file. This may be any sensitive file, e.g. a set of credentials normally in plaintext.
-
-