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 TypeMethodDescriptionvoid
close()
boolean
Return a file setting.Returns the names of all secure settings available.byte[]
getSHA256Digest
(String setting) Return a string setting.int
hashCode()
boolean
isLoaded()
Returns true iff the settings are loaded and retrievable.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Constructor Details
-
SecureClusterStateSettings
-
SecureClusterStateSettings
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
isLoaded
public boolean isLoaded()Description copied from interface:SecureSettings
Returns true iff the settings are loaded and retrievable.- Specified by:
isLoaded
in interfaceSecureSettings
-
getSettingNames
Description copied from interface:SecureSettings
Returns the names of all secure settings available.- Specified by:
getSettingNames
in interfaceSecureSettings
-
getString
Description copied from interface:SecureSettings
Return a string setting. TheSecureString
should be closed once it is used.- Specified by:
getString
in interfaceSecureSettings
-
getFile
Description copied from interface:SecureSettings
Return a file setting. TheInputStream
should be closed once it is used.- Specified by:
getFile
in interfaceSecureSettings
-
getSHA256Digest
- Specified by:
getSHA256Digest
in interfaceSecureSettings
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceSecureSettings
-
equals
-
hashCode
public int hashCode()
-