Package org.opends.server.extensions
Class DigestMD5SASLMechanismHandler
- java.lang.Object
-
- org.opends.server.api.SASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg>
-
- org.opends.server.extensions.DigestMD5SASLMechanismHandler
-
- All Implemented Interfaces:
ConfigurationChangeListener<DigestMD5SASLMechanismHandlerCfg>
public class DigestMD5SASLMechanismHandler extends SASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg> implements ConfigurationChangeListener<DigestMD5SASLMechanismHandlerCfg>
This class provides an implementation of a SASL mechanism that authenticates clients through DIGEST-MD5.
-
-
Constructor Summary
Constructors Constructor Description DigestMD5SASLMechanismHandler()Creates a new instance of this SASL mechanism handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResultapplyConfigurationChange(DigestMD5SASLMechanismHandlerCfg configuration)Applies the configuration changes to this change listener.voidfinalizeSASLMechanismHandler()Performs any finalization that may be necessary for this SASL mechanism handler.voidinitializeSASLMechanismHandler(DigestMD5SASLMechanismHandlerCfg configuration)Initializes this SASL mechanism handler based on the information in the provided configuration entry.booleanisConfigurationAcceptable(SASLMechanismHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the provided configuration is acceptable for this SASL mechanism handler.booleanisConfigurationChangeAcceptable(DigestMD5SASLMechanismHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the proposed change to the configuration is acceptable to this change listener.booleanisPasswordBased(String mechanism)Indicates whether the specified SASL mechanism is password-based or uses some other form of credentials (e.g., an SSL client certificate or Kerberos ticket).booleanisSecure(String mechanism)Indicates whether the specified SASL mechanism should be considered secure (i.e., it does not expose the authentication credentials in a manner that is useful to a third-party observer, and other aspects of the authentication are generally secure).voidprocessSASLBind(BindOperation bindOp)Processes the SASL bind operation.
-
-
-
Method Detail
-
initializeSASLMechanismHandler
public void initializeSASLMechanismHandler(DigestMD5SASLMechanismHandlerCfg configuration) throws ConfigException, InitializationException
Description copied from class:SASLMechanismHandlerInitializes this SASL mechanism handler based on the information in the provided configuration entry. It should also register itself with the Directory Server for the particular kinds of SASL mechanisms that it will process.- Specified by:
initializeSASLMechanismHandlerin classSASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg>- Parameters:
configuration- The configuration to use to initialize this SASL mechanism handler.- Throws:
ConfigException- If an unrecoverable problem arises in the process of performing the initialization.InitializationException- If a problem occurs during initialization that is not related to the server configuration.
-
finalizeSASLMechanismHandler
public void finalizeSASLMechanismHandler()
Description copied from class:SASLMechanismHandlerPerforms any finalization that may be necessary for this SASL mechanism handler. By default, no finalization is performed.- Overrides:
finalizeSASLMechanismHandlerin classSASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg>
-
processSASLBind
public void processSASLBind(BindOperation bindOp)
Description copied from class:SASLMechanismHandlerProcesses the SASL bind operation. SASL mechanism implementations must ensure that the following actions are taken during the processing of this method:- The
BindOperation.setResultCodemethod must be used to set the appropriate result code. - If the SASL processing gets far enough to be able to map
the request to a user entry (regardless of whether the
authentication is ultimately successful), then this method
must call the
BindOperation.setSASLAuthUserEntrymethod to provide it with the entry for the user that attempted to authenticate. - If the bind processing was successful, then the
BindOperation.setAuthenticationInfomethod must be used to set the authentication info for the bind operation. - If the bind processing was not successful, then the
BindOperation.setAuthFailureReasonmethod should be used to provide a message explaining why the authentication failed.
- Specified by:
processSASLBindin classSASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg>- Parameters:
bindOp- The SASL bind operation to be processed.
- The
-
isPasswordBased
public boolean isPasswordBased(String mechanism)
Description copied from class:SASLMechanismHandlerIndicates whether the specified SASL mechanism is password-based or uses some other form of credentials (e.g., an SSL client certificate or Kerberos ticket).- Specified by:
isPasswordBasedin classSASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg>- Parameters:
mechanism- The name of the mechanism for which to make the determination. This will only be invoked with names of mechanisms for which this handler has previously registered.- Returns:
trueif this SASL mechanism is password-based, orfalseif it uses some other form of credentials.
-
isSecure
public boolean isSecure(String mechanism)
Description copied from class:SASLMechanismHandlerIndicates whether the specified SASL mechanism should be considered secure (i.e., it does not expose the authentication credentials in a manner that is useful to a third-party observer, and other aspects of the authentication are generally secure).- Specified by:
isSecurein classSASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg>- Parameters:
mechanism- The name of the mechanism for which to make the determination. This will only be invoked with names of mechanisms for which this handler has previously registered.- Returns:
trueif this SASL mechanism should be considered secure, orfalseif not.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(SASLMechanismHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from class:SASLMechanismHandlerIndicates whether the provided configuration is acceptable for this SASL mechanism handler. It should be possible to call this method on an uninitialized SASL mechanism handler instance in order to determine whether the SASL mechanism handler would be able to use the provided configuration.
Note that implementations which use a subclass of the provided configuration class will likely need to cast the configuration to the appropriate subclass type.- Overrides:
isConfigurationAcceptablein classSASLMechanismHandler<DigestMD5SASLMechanismHandlerCfg>- Parameters:
configuration- The SASL mechanism handler 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:
trueif the provided configuration is acceptable for this SASL mechanism handler, orfalseif not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(DigestMD5SASLMechanismHandlerCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein interfaceConfigurationChangeListener<DigestMD5SASLMechanismHandlerCfg>- 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
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(DigestMD5SASLMechanismHandlerCfg configuration)
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein interfaceConfigurationChangeListener<DigestMD5SASLMechanismHandlerCfg>- Parameters:
configuration- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
-