public class JavaKeyStoreSecureStoreConfig extends SecureStoreConfig
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:
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.Only file-based KeyStores are supported.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_KEYSTORE_TYPE
The default Java KeyStore type (PKCS12).
|
static int |
DEFAULT_POLLING_INTERVAL
Default interval (in seconds) for polling for changes in the KeyStore: 0 (polling
disabled).
|
Constructor and Description |
---|
JavaKeyStoreSecureStoreConfig()
Creates a new Java KeyStore Secure Store configuration.
|
JavaKeyStoreSecureStoreConfig(File path)
Creates a new Java KeyStore Secure Store configuration.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getCurrentKeyAlias()
Returns the alias for the current encryption key entry or
null if no alias is set. |
String |
getPassword()
Returns the Java KeyStore password.
|
File |
getPath()
Returns the Java KeyStore file path.
|
int |
getPollingInterval()
Returns the polling interval (in seconds) for checking for changes in the KeyStore.
|
String |
getType()
Returns the type of the Java KeyStore.
|
int |
hashCode() |
JavaKeyStoreSecureStoreConfig |
setCurrentKeyAlias(String currentKeyAlias)
Sets the alias for the current encryption key entry.
|
JavaKeyStoreSecureStoreConfig |
setPassword(String password)
Sets the Java KeyStore password.
|
JavaKeyStoreSecureStoreConfig |
setPath(File path)
Sets the Java KeyStore file path.
|
JavaKeyStoreSecureStoreConfig |
setPollingInterval(int pollingInterval)
Sets the polling interval (in seconds) for checking for changes in the KeyStore.
|
JavaKeyStoreSecureStoreConfig |
setType(String type)
Sets the Java KeyStore type (PKCS12, JCEKS etc.)
|
String |
toString() |
public static final String DEFAULT_KEYSTORE_TYPE
public static final int DEFAULT_POLLING_INTERVAL
public JavaKeyStoreSecureStoreConfig()
public JavaKeyStoreSecureStoreConfig(File path)
path
- the KeyStore file pathpublic String getType()
public JavaKeyStoreSecureStoreConfig setType(String type)
type
- the KeyStore typeJavaKeyStoreSecureStoreConfig
instanceIllegalArgumentException
- if type is {code null}public File getPath()
public JavaKeyStoreSecureStoreConfig setPath(File path)
path
- the file pathJavaKeyStoreSecureStoreConfig
instanceIllegalArgumentException
- if path is {code null}public String getPassword()
public JavaKeyStoreSecureStoreConfig setPassword(String password)
password
- the KeyStore passwordJavaKeyStoreSecureStoreConfig
instancepublic String getCurrentKeyAlias()
null
if no alias is set.null
public JavaKeyStoreSecureStoreConfig setCurrentKeyAlias(String currentKeyAlias)
currentKeyAlias
- the alias for the current encryption key or null
JavaKeyStoreSecureStoreConfig
instancepublic int getPollingInterval()
public JavaKeyStoreSecureStoreConfig setPollingInterval(int pollingInterval)
pollingInterval
- the polling intervalJavaKeyStoreSecureStoreConfig
instanceIllegalArgumentException
- if pollingInterval is less than zeroCopyright © 2024 Hazelcast, Inc.. All rights reserved.