|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.types.AbstractOperation
org.opends.server.core.BindOperationBasis
public class BindOperationBasis
This class defines an operation that may be used to authenticate a user to
the Directory Server. Note that for security restrictions, response messages
that may be returned to the client must be carefully cleaned to ensure that
they do not provide a malicious client with information that may be useful in
an attack. This does impact the debugability of the server, but that can
be addressed by calling the setAuthFailureReason method, which
can provide a reason for a failure in a form that will not be returned to the
client but may be written to a log file.
| Field Summary |
|---|
| Fields inherited from class org.opends.server.types.AbstractOperation |
|---|
cancelRequest, cancelResult, clientConnection, messageID, NO_RESPONSE_CONTROLS, operationID, useNanoTime |
| Fields inherited from interface org.opends.server.types.Operation |
|---|
LOCALBACKENDOPERATIONS |
| Constructor Summary | |
|---|---|
BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
ByteString rawBindDN,
ByteString simplePassword)
Creates a new simple bind operation with the provided information. |
|
BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
ByteString rawBindDN,
java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
Creates a new SASL bind operation with the provided information. |
|
BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
DN bindDN,
ByteString simplePassword)
Creates a new simple bind operation with the provided information. |
|
BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
DN bindDN,
java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
Creates a new SASL bind operation with the provided information. |
|
| Method Summary | |
|---|---|
void |
addResponseControl(Control control)
Adds the provided control to the set of controls to include in the response to the client. |
AuthenticationInfo |
getAuthenticationInfo()
Retrieves the authentication info that resulted from processing this bind operation. |
AuthenticationType |
getAuthenticationType()
Retrieves the authentication type for this bind operation. |
Message |
getAuthFailureReason()
Retrieves a human-readable message providing the reason that the authentication failed, if available. |
DN |
getBindDN()
Retrieves the bind DN for this bind operation. |
OperationType |
getOperationType()
Retrieves the operation type for this operation. |
java.lang.String |
getProtocolVersion()
Retrieves a string representation of the protocol version associated with this bind request. |
ByteString |
getRawBindDN()
Retrieves the raw, unprocessed bind DN for this bind operation as contained in the client request. |
java.lang.String[][] |
getRequestLogElements()
Retrieves a standard set of elements that should be logged in requests for this type of operation. |
java.util.List<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the client. |
java.lang.String[][] |
getResponseLogElements()
Retrieves a standard set of elements that should be logged in responses for this type of operation. |
Entry |
getSASLAuthUserEntry()
Retrieves the user entry associated with the SASL authentication attempt. |
ASN1OctetString |
getSASLCredentials()
Retrieves the SASL credentials for this bind operation. |
java.lang.String |
getSASLMechanism()
Retrieves the SASL mechanism for this bind operation. |
ASN1OctetString |
getServerSASLCredentials()
Retrieves the set of server SASL credentials to include in the bind response. |
ByteString |
getSimplePassword()
Retrieves the simple authentication password for this bind operation. |
DN |
getUserEntryDN()
Retrieves the user entry DN for this bind operation. |
void |
removeResponseControl(Control control)
Removes the provided control from the set of controls to include in the response to the client. |
void |
run()
Performs the work of actually processing this operation. |
void |
setAuthenticationInfo(AuthenticationInfo authInfo)
Specifies the authentication info that resulted from processing this bind operation. |
void |
setAuthFailureReason(Message message)
Specifies the reason that the authentication failed. |
void |
setProtocolVersion(java.lang.String protocolVersion)
Specifies the string representation of the protocol version associated with this bind request. |
void |
setRawBindDN(ByteString rawBindDN)
Specifies the raw, unprocessed bind DN for this bind operation. |
void |
setSASLAuthUserEntry(Entry saslAuthUserEntry)
Specifies the user entry associated with the SASL authentication attempt. |
void |
setSASLCredentials(java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
Specifies the SASL credentials for this bind operation. |
void |
setServerSASLCredentials(ASN1OctetString serverSASLCredentials)
Specifies the set of server SASL credentials to include in the bind response. |
void |
setSimplePassword(ByteString simplePassword)
Specifies the simple authentication password for this bind operation. |
void |
setUserEntryDN(DN userEntryDN)
Set the user entry DN for this bind operation. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this operation to the provided buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opends.server.types.operation.PreParseOperation |
|---|
addRequestControl, appendAdditionalLogMessage, appendErrorMessage, getAdditionalLogMessage, getErrorMessage, removeRequestControl, setAdditionalLogMessage, setErrorMessage |
| Methods inherited from interface org.opends.server.types.operation.PluginOperation |
|---|
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString |
| Constructor Detail |
|---|
public BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
ByteString rawBindDN,
ByteString simplePassword)
clientConnection - The client connection with which this operation
is associated.operationID - The operation ID for this operation.messageID - The message ID of the request with which this
operation is associated.requestControls - The set of controls included in the request.protocolVersion - The string representation of the protocol version
associated with this bind request.rawBindDN - The raw, unprocessed bind DN as provided in the
request from the client.simplePassword - The password to use for the simple
authentication.
public BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
ByteString rawBindDN,
java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
clientConnection - The client connection with which this operation
is associated.operationID - The operation ID for this operation.messageID - The message ID of the request with which this
operation is associated.requestControls - The set of controls included in the request.protocolVersion - The string representation of the protocol version
associated with this bind request.rawBindDN - The raw, unprocessed bind DN as provided in the
request from the client.saslMechanism - The SASL mechanism included in the request.saslCredentials - The optional SASL credentials included in the
request.
public BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
DN bindDN,
ByteString simplePassword)
clientConnection - The client connection with which this operation
is associated.operationID - The operation ID for this operation.messageID - The message ID of the request with which this
operation is associated.requestControls - The set of controls included in the request.protocolVersion - The string representation of the protocol version
associated with this bind request.bindDN - The bind DN for this bind operation.simplePassword - The password to use for the simple
authentication.
public BindOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
java.lang.String protocolVersion,
DN bindDN,
java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
clientConnection - The client connection with which this operation
is associated.operationID - The operation ID for this operation.messageID - The message ID of the request with which this
operation is associated.requestControls - The set of controls included in the request.protocolVersion - The string representation of the protocol version
associated with this bind request.bindDN - The bind DN for this bind operation.saslMechanism - The SASL mechanism included in the request.saslCredentials - The optional SASL credentials included in the
request.| Method Detail |
|---|
public final AuthenticationType getAuthenticationType()
getAuthenticationType in interface BindOperationgetAuthenticationType in interface PreParseBindOperationpublic final ByteString getRawBindDN()
getRawBindDN in interface BindOperationgetRawBindDN in interface PreParseBindOperationpublic final void setRawBindDN(ByteString rawBindDN)
setRawBindDN in interface BindOperationsetRawBindDN in interface PreParseBindOperationrawBindDN - The raw, unprocessed bind DN for this bind operation.public final DN getBindDN()
getRawBindDN method.
getBindDN in interface BindOperationnull if the
raw DN has not yet been processed.public final ByteString getSimplePassword()
getSimplePassword in interface BindOperationgetSimplePassword in interface PreParseBindOperationpublic final void setSimplePassword(ByteString simplePassword)
setSimplePassword in interface BindOperationsetSimplePassword in interface PreParseBindOperationsimplePassword - The simple authentication password for this bind
operation.public final java.lang.String getSASLMechanism()
getSASLMechanism in interface BindOperationgetSASLMechanism in interface PreParseBindOperationnull
if the bind does not use SASL authentication.public final ASN1OctetString getSASLCredentials()
getSASLCredentials in interface BindOperationgetSASLCredentials in interface PreParseBindOperationnull
if there are none or if the bind does not use SASL authentication.
public final void setSASLCredentials(java.lang.String saslMechanism,
ASN1OctetString saslCredentials)
setSASLCredentials in interface BindOperationsetSASLCredentials in interface PreParseBindOperationsaslMechanism - The SASL mechanism for this bind operation.saslCredentials - The SASL credentials for this bind operation, or
null if there are none.public final ASN1OctetString getServerSASLCredentials()
getServerSASLCredentials in interface BindOperationnull if there are none.public final void setServerSASLCredentials(ASN1OctetString serverSASLCredentials)
setServerSASLCredentials in interface BindOperationsetServerSASLCredentials in interface PreParseBindOperationserverSASLCredentials - The set of server SASL credentials to
include in the bind response.public final Entry getSASLAuthUserEntry()
getSASLAuthUserEntry in interface BindOperationnull if it was not a SASL authentication or the SASL
processing was not able to map the request to a user.public final void setSASLAuthUserEntry(Entry saslAuthUserEntry)
setSASLAuthUserEntry in interface BindOperationsaslAuthUserEntry - The user entry associated with the SASL
authentication attempt.public final Message getAuthFailureReason()
getAuthFailureReason in interface BindOperationnull if none is available.public final void setAuthFailureReason(Message message)
setAuthFailureReason in interface BindOperationsetAuthFailureReason in interface PreParseBindOperationmessage - providing the reason that the
authentication failed.public final DN getUserEntryDN()
getUserEntryDN in interface BindOperationnull if
the bind processing has not progressed far enough to identify the
user or if the user DN could not be determined.public final AuthenticationInfo getAuthenticationInfo()
getAuthenticationInfo in interface BindOperationpublic final void setAuthenticationInfo(AuthenticationInfo authInfo)
processSASLBind method.
setAuthenticationInfo in interface BindOperationauthInfo - The authentication info that resulted from processing
this bind operation.public final OperationType getOperationType()
getOperationType in interface OperationgetOperationType in interface PluginOperationgetOperationType in class AbstractOperationpublic final java.lang.String[][] getRequestLogElements()
null if there is no value for that
field.
getRequestLogElements in interface OperationgetRequestLogElements in class AbstractOperationpublic final java.lang.String[][] getResponseLogElements()
null if there is no value for that
field.
getResponseLogElements in interface OperationgetResponseLogElements in class AbstractOperationpublic final java.util.List<Control> getResponseControls()
getResponseControls in interface OperationgetResponseControls in interface PluginOperationgetResponseControls in class AbstractOperationpublic final void addResponseControl(Control control)
addResponseControl in interface OperationaddResponseControl in interface PreParseOperationaddResponseControl in class AbstractOperationcontrol - The control to add to the set of controls to
include in the response to the client.public final void removeResponseControl(Control control)
removeResponseControl in interface OperationremoveResponseControl in interface PreParseOperationremoveResponseControl in class AbstractOperationcontrol - The control to remove from the set of controls
to include in the response to the client.public final void toString(java.lang.StringBuilder buffer)
toString in interface OperationtoString in interface PluginOperationtoString in class AbstractOperationbuffer - The buffer into which a string representation of
this operation should be appended.public void setUserEntryDN(DN userEntryDN)
setUserEntryDN in interface BindOperationuserEntryDN - The user entry DN for this bind operation, or
null if the bind processing has not
progressed far enough to identify the user or if
the user DN could not be determined.public java.lang.String getProtocolVersion()
getProtocolVersion in interface BindOperationgetProtocolVersion in interface PreParseBindOperationpublic void setProtocolVersion(java.lang.String protocolVersion)
setProtocolVersion in interface BindOperationsetProtocolVersion in interface PreParseBindOperationprotocolVersion - The string representation of the protocol version
associated with this bind request.public final void run()
run in interface java.lang.Runnablerun in class AbstractOperation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||