Package org.opends.server.extensions
Class ScramSha512SASLMechanismHandler
java.lang.Object
org.opends.server.api.SASLMechanismHandler<C>
org.opends.server.extensions.ScramSha512SASLMechanismHandler
- All Implemented Interfaces:
ConfigurationChangeListener<ScramSha512SaslMechanismHandlerCfg>
This class defines the SCRAM-SHA-512 SASL mechanism defined in RFCs 5802, 5803 and 7677.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionApplies the configuration changes to this change listener.voidPerforms any finalization that may be necessary for this SASL mechanism handler.Returns the SASL mechanism name.voidinitializeSASLMechanismHandler(ScramSha512SaslMechanismHandlerCfg cfg, ServerContext serverContext) Initializes this SASL mechanism handler based on the information in the provided configuration entry.booleanisConfigurationChangeAcceptable(ScramSha512SaslMechanismHandlerCfg cfg, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.booleanIndicates whether this SASL mechanism is password-based or uses some other form of credentials (e.g., an SSL client certificate or Kerberos ticket).booleanisSecure()Indicates whether this 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.Methods inherited from class org.opends.server.api.SASLMechanismHandler
isConfigurationAcceptable
-
Constructor Details
-
ScramSha512SASLMechanismHandler
public ScramSha512SASLMechanismHandler()
-
-
Method Details
-
getMechanismName
Description copied from class:SASLMechanismHandlerReturns the SASL mechanism name.- Specified by:
getMechanismNamein classSASLMechanismHandler<ScramSha512SaslMechanismHandlerCfg>- Returns:
- the SASL mechanism name.
-
initializeSASLMechanismHandler
public void initializeSASLMechanismHandler(ScramSha512SaslMechanismHandlerCfg cfg, ServerContext serverContext) throws ConfigException 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<C extends SaslMechanismHandlerCfg>- Parameters:
cfg- The configuration to use to initialize this SASL mechanism handler.serverContext- The server context- Throws:
ConfigException- If an unrecoverable problem arises in the process of performing the initialization.
-
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<C extends SaslMechanismHandlerCfg>
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(ScramSha512SaslMechanismHandlerCfg cfg, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein interfaceConfigurationChangeListener<C extends SaslMechanismHandlerCfg>- Parameters:
cfg- 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
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein interfaceConfigurationChangeListener<C extends SaslMechanismHandlerCfg>- Parameters:
cfg- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
processSASLBind
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<C extends SaslMechanismHandlerCfg>- Parameters:
bindOp- The SASL bind operation to be processed.
- The
-
isPasswordBased
public boolean isPasswordBased()Description copied from class:SASLMechanismHandlerIndicates whether this 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<C extends SaslMechanismHandlerCfg>- Returns:
trueif this SASL mechanism is password-based, orfalseif it uses some other form of credentials.
-
isSecure
public boolean isSecure()Description copied from class:SASLMechanismHandlerIndicates whether this 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<C extends SaslMechanismHandlerCfg>- Returns:
trueif this SASL mechanism should be considered secure, orfalseif not.
-