Package org.opends.server.extensions
Class AnonymousSASLMechanismHandler
java.lang.Object
org.opends.server.api.SASLMechanismHandler<AnonymousSaslMechanismHandlerCfg>
org.opends.server.extensions.AnonymousSASLMechanismHandler
public final class AnonymousSASLMechanismHandler
extends SASLMechanismHandler<AnonymousSaslMechanismHandlerCfg>
This class provides an implementation of a SASL mechanism, as defined in RFC 4505, that does not perform any
authentication. That is, anyone attempting to bind with this SASL mechanism will be successful and will be given the
rights of an unauthenticated user. The request may or may not include a set of SASL credentials which will serve as
trace information. If provided, then that trace information will be written to the server error log.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this SASL mechanism handler. -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms any finalization that may be necessary for this SASL mechanism handler.Returns the SASL mechanism name.voidinitializeSASLMechanismHandler(AnonymousSaslMechanismHandlerCfg configuration, ServerContext serverContext) Initializes this SASL mechanism handler based on the information in the provided configuration entry.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 bindOperation) Processes the SASL bind operation.Methods inherited from class org.opends.server.api.SASLMechanismHandler
isConfigurationAcceptable
-
Constructor Details
-
AnonymousSASLMechanismHandler
public AnonymousSASLMechanismHandler()Creates a new instance of this SASL mechanism handler. No initialization should be done in this method, as it should all be performed in theinitializeSASLMechanismHandlermethod.
-
-
Method Details
-
getMechanismName
Description copied from class:SASLMechanismHandlerReturns the SASL mechanism name.- Specified by:
getMechanismNamein classSASLMechanismHandler<AnonymousSaslMechanismHandlerCfg>- Returns:
- the SASL mechanism name.
-
initializeSASLMechanismHandler
public void initializeSASLMechanismHandler(AnonymousSaslMechanismHandlerCfg configuration, ServerContext serverContext) 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<AnonymousSaslMechanismHandlerCfg>- Parameters:
configuration- The configuration to use to initialize this SASL mechanism handler.serverContext- The server context
-
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<AnonymousSaslMechanismHandlerCfg>
-
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<AnonymousSaslMechanismHandlerCfg>- Parameters:
bindOperation- 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<AnonymousSaslMechanismHandlerCfg>- 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<AnonymousSaslMechanismHandlerCfg>- Returns:
trueif this SASL mechanism should be considered secure, orfalseif not.
-