Module org.elasticsearch.server
Class SecureClusterStateSettings
java.lang.Object
org.elasticsearch.common.settings.SecureClusterStateSettings
- All Implemented Interfaces:
Closeable,AutoCloseable,Writeable,SecureSettings
Implementation of
SecureSettings that represents secrets in cluster state. Secrets are stored as byte arrays along with
their SHA-256 digests. Provides functionality to read and serialize secure settings to broadcast them as part of cluster state.
Does not provide any encryption.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionSecureClusterStateSettings(Map<String, byte[]> settings) SecureClusterStateSettings(SecureSettings secureSettings) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanReturn a file setting.Returns the names of all secure settings available.byte[]getSHA256Digest(String setting) Return a string setting.inthashCode()booleanisLoaded()Returns true iff the settings are loaded and retrievable.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
SecureClusterStateSettings
-
SecureClusterStateSettings
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
isLoaded
public boolean isLoaded()Description copied from interface:SecureSettingsReturns true iff the settings are loaded and retrievable.- Specified by:
isLoadedin interfaceSecureSettings
-
getSettingNames
Description copied from interface:SecureSettingsReturns the names of all secure settings available.- Specified by:
getSettingNamesin interfaceSecureSettings
-
getString
Description copied from interface:SecureSettingsReturn a string setting. TheSecureStringshould be closed once it is used.- Specified by:
getStringin interfaceSecureSettings
-
getFile
Description copied from interface:SecureSettingsReturn a file setting. TheInputStreamshould be closed once it is used.- Specified by:
getFilein interfaceSecureSettings
-
getSHA256Digest
- Specified by:
getSHA256Digestin interfaceSecureSettings
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSecureSettings
-
equals
-
hashCode
public int hashCode()
-