Package org.opends.server.extensions
Class PemKeyManagerProvider
java.lang.Object
org.opends.server.api.KeyManagerProvider<PemKeyManagerProviderCfg>
org.opends.server.extensions.PemKeyManagerProvider
- All Implemented Interfaces:
ConfigurationChangeListener<PemKeyManagerProviderCfg>
public final class PemKeyManagerProvider
extends KeyManagerProvider<PemKeyManagerProviderCfg>
implements ConfigurationChangeListener<PemKeyManagerProviderCfg>
A
KeyManagerProvider
that reads keys from PEM files in a configured file system directory and automatically
reacts to file modification, deletion or addition.-
Nested Class Summary
Nested classes/interfaces inherited from class org.opends.server.api.KeyManagerProvider
KeyManagerProvider.CertificateMonitor
-
Constructor Summary
ConstructorDescriptionConstructs a PemKeyManagerProvider with the default clock. -
Method Summary
Modifier and TypeMethodDescriptionapplyConfigurationChange
(PemKeyManagerProviderCfg configuration) Applies the configuration changes to this change listener.protected void
Performs any other finalization actions that may be necessary by this key manager provider implementation.Retrieves a set ofKeyManager
objects that may be used for interactions requiring access to a key manager.Returns the keystore used by this key manager provider.void
initializeKeyManagerProvider
(PemKeyManagerProviderCfg configuration) Initializes this key manager provider based on the information in the provided key manager provider configuration.boolean
isConfigurationAcceptable
(PemKeyManagerProviderCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the provided configuration is acceptable for this key manager provider.boolean
isConfigurationChangeAcceptable
(PemKeyManagerProviderCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.Methods inherited from class org.opends.server.api.KeyManagerProvider
containsAtLeastOneKey, finalizeKeyManagerProvider, getConfig, getName, getServerContext, registerCertificateMonitorEntries, setConfig, setServerContext, toString
-
Constructor Details
-
PemKeyManagerProvider
public PemKeyManagerProvider()Constructs a PemKeyManagerProvider with the default clock.
-
-
Method Details
-
initializeKeyManagerProvider
public void initializeKeyManagerProvider(PemKeyManagerProviderCfg configuration) throws InitializationException Description copied from class:KeyManagerProvider
Initializes this key manager provider based on the information in the provided key manager provider configuration.- Specified by:
initializeKeyManagerProvider
in classKeyManagerProvider<PemKeyManagerProviderCfg>
- Parameters:
configuration
- The key manager provider configuration that contains the information to use to initialize this key manager provider.- Throws:
InitializationException
- If a problem occurs during initialization that is not related to the server configuration.
-
finalizeKeyManagerProviderImpl
protected void finalizeKeyManagerProviderImpl()Description copied from class:KeyManagerProvider
Performs any other finalization actions that may be necessary by this key manager provider implementation.- Specified by:
finalizeKeyManagerProviderImpl
in classKeyManagerProvider<PemKeyManagerProviderCfg>
-
getKeyManagers
Description copied from class:KeyManagerProvider
Retrieves a set ofKeyManager
objects that may be used for interactions requiring access to a key manager.- Specified by:
getKeyManagers
in classKeyManagerProvider<PemKeyManagerProviderCfg>
- Returns:
- A set of
KeyManager
objects that may be used for interactions requiring access to a key manager.
-
getKeyStore
Description copied from class:KeyManagerProvider
Returns the keystore used by this key manager provider.- Specified by:
getKeyStore
in classKeyManagerProvider<PemKeyManagerProviderCfg>
- Returns:
- The
KeyStore
used by this key manager provider.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(PemKeyManagerProviderCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from class:KeyManagerProvider
Indicates whether the provided configuration is acceptable for this key manager provider. It should be possible to call this method on an uninitialized key manager provider instance in order to determine whether the key manager provider would be able to use the provided configuration.- Overrides:
isConfigurationAcceptable
in classKeyManagerProvider<PemKeyManagerProviderCfg>
- Parameters:
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.- Returns:
true
if the provided configuration is acceptable for this key manager provider, orfalse
if not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(PemKeyManagerProviderCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<PemKeyManagerProviderCfg>
- Parameters:
configuration
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed change is acceptable, orfalse
if it is not.
-
applyConfigurationChange
Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<PemKeyManagerProviderCfg>
- Parameters:
configuration
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-