Package com.hazelcast.config
Class JavaKeyStoreSecureStoreConfig
java.lang.Object
com.hazelcast.config.SecureStoreConfig
com.hazelcast.config.JavaKeyStoreSecureStoreConfig
Java KeyStore Secure Store configuration.
The Java KeyStore Secure Store exposes (symmetric) encryption keys stored in a Java KeyStore
with path, type, and password as specified by getType()
, getPath()
, and
getPassword()
, respectively. The Java KeyStore SecureStore loads all symmetric keys
available in the KeyStore and treats them as versions of a single key. More specifically:
- If an alias for the current encryption key is set (see
setCurrentKeyAlias(String)
), the corresponding KeyStore entry is treated as the current version of the encryption key, while any other entries are treated as historical versions of the encryption key. - If an alias for the current encryption key is not set, the KeyStore entry with an alias that comes last in alphabetical order is treated as the current version of the encryption key, while any other entries are treated as historical versions of the encryption key.
- The KeyStore entries are expected to use the same password as the KeyStore.
Only file-based KeyStores are supported.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default Java KeyStore type (PKCS12).static final int
Default interval (in seconds) for polling for changes in the KeyStore: 0 (polling disabled). -
Constructor Summary
ConstructorDescriptionCreates a new Java KeyStore Secure Store configuration.Creates a new Java KeyStore Secure Store configuration. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Returns the alias for the current encryption key entry ornull
if no alias is set.Returns the Java KeyStore password.getPath()
Returns the Java KeyStore file path.int
Returns the polling interval (in seconds) for checking for changes in the KeyStore.getType()
Returns the type of the Java KeyStore.final int
hashCode()
setCurrentKeyAlias
(String currentKeyAlias) Sets the alias for the current encryption key entry.setPassword
(String password) Sets the Java KeyStore password.Sets the Java KeyStore file path.setPollingInterval
(int pollingInterval) Sets the polling interval (in seconds) for checking for changes in the KeyStore.Sets the Java KeyStore type (PKCS12, JCEKS etc.)toString()
-
Field Details
-
DEFAULT_KEYSTORE_TYPE
The default Java KeyStore type (PKCS12).- See Also:
-
DEFAULT_POLLING_INTERVAL
public static final int DEFAULT_POLLING_INTERVALDefault interval (in seconds) for polling for changes in the KeyStore: 0 (polling disabled).- See Also:
-
-
Constructor Details
-
JavaKeyStoreSecureStoreConfig
public JavaKeyStoreSecureStoreConfig()Creates a new Java KeyStore Secure Store configuration. -
JavaKeyStoreSecureStoreConfig
Creates a new Java KeyStore Secure Store configuration.- Parameters:
path
- the KeyStore file path
-
-
Method Details
-
getType
Returns the type of the Java KeyStore.- Returns:
- the Java KeyStore type
-
setType
Sets the Java KeyStore type (PKCS12, JCEKS etc.)- Parameters:
type
- the KeyStore type- Returns:
- the updated
JavaKeyStoreSecureStoreConfig
instance - Throws:
IllegalArgumentException
- if type is {code null}
-
getPath
Returns the Java KeyStore file path.- Returns:
- the file path
-
setPath
Sets the Java KeyStore file path.- Parameters:
path
- the file path- Returns:
- the updated
JavaKeyStoreSecureStoreConfig
instance - Throws:
IllegalArgumentException
- if path is {code null}
-
getPassword
Returns the Java KeyStore password.- Returns:
- the password
-
setPassword
Sets the Java KeyStore password.- Parameters:
password
- the KeyStore password- Returns:
- the updated
JavaKeyStoreSecureStoreConfig
instance
-
getCurrentKeyAlias
Returns the alias for the current encryption key entry ornull
if no alias is set.- Returns:
- the alias or
null
-
setCurrentKeyAlias
Sets the alias for the current encryption key entry.- Parameters:
currentKeyAlias
- the alias for the current encryption key ornull
- Returns:
- the updated
JavaKeyStoreSecureStoreConfig
instance
-
getPollingInterval
public int getPollingInterval()Returns the polling interval (in seconds) for checking for changes in the KeyStore.- Returns:
- the polling interval
-
setPollingInterval
Sets the polling interval (in seconds) for checking for changes in the KeyStore. The value 0 disables polling.- Parameters:
pollingInterval
- the polling interval- Returns:
- the updated
JavaKeyStoreSecureStoreConfig
instance - Throws:
IllegalArgumentException
- if pollingInterval is less than zero
-
toString
-
equals
-
hashCode
public final int hashCode()
-