T
- The type of key manager provider configuration handled by this key manager provider implementation.@PublicAPI(stability=VOLATILE, mayInstantiate=false, mayExtend=true, mayInvoke=true) public abstract class KeyManagerProvider<T extends KeyManagerProviderCfg> extends Object
javax.net.ssl.KeyManager
objects for use when
performing SSL communication.Modifier and Type | Class and Description |
---|---|
static class |
KeyManagerProvider.CertificateMonitor
This class implements a monitor provider that will report alias name and expiry date for each X509 certificate
associated to a key manager provider.
|
Constructor and Description |
---|
KeyManagerProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsAtLeastOneKey()
Verifies that the keystore has at least one usable key.
|
boolean |
containsKeyWithAlias(String alias)
Verifies that an alias is defined in the scope of this Key Manager.
|
void |
finalizeKeyManagerProvider()
Deregister certificate monitor entries associated to this key manager provider from the server and performs
any other finalization that may be necessary.
|
protected abstract void |
finalizeKeyManagerProviderImpl()
Performs any other finalization actions that may be necessary by this key manager provider implementation.
|
protected T |
getConfig()
Returns the configuration associated to this key manager provider.
|
abstract KeyManager[] |
getKeyManagers()
Retrieves a set of
KeyManager objects that may be used for interactions requiring access to a key
manager. |
protected abstract KeyStore |
getKeyStore()
Returns the keystore used by this key manager provider.
|
protected String |
getName()
Returns the name of this key manager provider to be used in certificate monitor entries.
|
abstract void |
initializeKeyManagerProvider(T configuration)
Initializes this key manager provider based on the information in the provided key manager provider
configuration.
|
boolean |
isConfigurationAcceptable(T configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this key manager provider.
|
void |
registerCertificateMonitorEntries()
Registers one certificate monitor entry for each X509 certificate present in this key manager provider.
|
protected void |
setConfig(T currentConfig)
Sets the configuration associated to this key manager provider.
|
String |
toString() |
public abstract void initializeKeyManagerProvider(T configuration) throws ConfigException, InitializationException
configuration
- The key manager provider configuration that contains the information to use to initialize this key
manager provider.ConfigException
- If an unrecoverable problem arises in the process of performing the initialization as a result of the
server configuration.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.public boolean containsKeyWithAlias(String alias)
alias
- The alias to check.public boolean containsAtLeastOneKey()
public boolean isConfigurationAcceptable(T configuration, List<LocalizableMessage> unacceptableReasons)
configuration
- The key manager provider configuration for which to make the determination.unacceptableReasons
- A list that may be used to hold the reasons that the provided configuration is not acceptable.true
if the provided configuration is acceptable for this key manager provider, or false
if not.public final void finalizeKeyManagerProvider()
protected abstract void finalizeKeyManagerProviderImpl()
public abstract KeyManager[] getKeyManagers() throws LdapException
KeyManager
objects that may be used for interactions requiring access to a key
manager.KeyManager
objects that may be used for interactions requiring access to a key manager.LdapException
- If a problem occurs while attempting to obtain the set of key managers.public final void registerCertificateMonitorEntries()
protected abstract KeyStore getKeyStore() throws LdapException
KeyStore
used by this key manager provider.LdapException
- If a problem occurs while attempting to retrieve the keystore.protected final T getConfig()
KeyManagerProvider
.protected final void setConfig(T currentConfig)
currentConfig
- The configuration to associate to this KeyManagerProvider
protected String getName()
Default implementation returns the name of this key manager provider configuration.
KeyManagerProvider
Copyright 2010-2022 ForgeRock AS.