|
|||||||||
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 BindOperation
getAuthenticationType
in interface PreParseBindOperation
public final ByteString getRawBindDN()
getRawBindDN
in interface BindOperation
getRawBindDN
in interface PreParseBindOperation
public final void setRawBindDN(ByteString rawBindDN)
setRawBindDN
in interface BindOperation
setRawBindDN
in interface PreParseBindOperation
rawBindDN
- The raw, unprocessed bind DN for this bind operation.public final DN getBindDN()
getRawBindDN
method.
getBindDN
in interface BindOperation
null
if the
raw DN has not yet been processed.public final ByteString getSimplePassword()
getSimplePassword
in interface BindOperation
getSimplePassword
in interface PreParseBindOperation
public final void setSimplePassword(ByteString simplePassword)
setSimplePassword
in interface BindOperation
setSimplePassword
in interface PreParseBindOperation
simplePassword
- The simple authentication password for this bind
operation.public final java.lang.String getSASLMechanism()
getSASLMechanism
in interface BindOperation
getSASLMechanism
in interface PreParseBindOperation
null
if the bind does not use SASL authentication.public final ASN1OctetString getSASLCredentials()
getSASLCredentials
in interface BindOperation
getSASLCredentials
in interface PreParseBindOperation
null
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 BindOperation
setSASLCredentials
in interface PreParseBindOperation
saslMechanism
- 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 BindOperation
null
if there are none.public final void setServerSASLCredentials(ASN1OctetString serverSASLCredentials)
setServerSASLCredentials
in interface BindOperation
setServerSASLCredentials
in interface PreParseBindOperation
serverSASLCredentials
- The set of server SASL credentials to
include in the bind response.public final Entry getSASLAuthUserEntry()
getSASLAuthUserEntry
in interface BindOperation
null
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 BindOperation
saslAuthUserEntry
- The user entry associated with the SASL
authentication attempt.public final Message getAuthFailureReason()
getAuthFailureReason
in interface BindOperation
null
if none is available.public final void setAuthFailureReason(Message message)
setAuthFailureReason
in interface BindOperation
setAuthFailureReason
in interface PreParseBindOperation
message
- providing the reason that the
authentication failed.public final DN getUserEntryDN()
getUserEntryDN
in interface BindOperation
null
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 BindOperation
public final void setAuthenticationInfo(AuthenticationInfo authInfo)
processSASLBind
method.
setAuthenticationInfo
in interface BindOperation
authInfo
- The authentication info that resulted from processing
this bind operation.public final OperationType getOperationType()
getOperationType
in interface Operation
getOperationType
in interface PluginOperation
getOperationType
in class AbstractOperation
public final java.lang.String[][] getRequestLogElements()
null
if there is no value for that
field.
getRequestLogElements
in interface Operation
getRequestLogElements
in class AbstractOperation
public final java.lang.String[][] getResponseLogElements()
null
if there is no value for that
field.
getResponseLogElements
in interface Operation
getResponseLogElements
in class AbstractOperation
public final java.util.List<Control> getResponseControls()
getResponseControls
in interface Operation
getResponseControls
in interface PluginOperation
getResponseControls
in class AbstractOperation
public final void addResponseControl(Control control)
addResponseControl
in interface Operation
addResponseControl
in interface PreParseOperation
addResponseControl
in class AbstractOperation
control
- 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 Operation
removeResponseControl
in interface PreParseOperation
removeResponseControl
in class AbstractOperation
control
- 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 Operation
toString
in interface PluginOperation
toString
in class AbstractOperation
buffer
- The buffer into which a string representation of
this operation should be appended.public void setUserEntryDN(DN userEntryDN)
setUserEntryDN
in interface BindOperation
userEntryDN
- 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 BindOperation
getProtocolVersion
in interface PreParseBindOperation
public void setProtocolVersion(java.lang.String protocolVersion)
setProtocolVersion
in interface BindOperation
setProtocolVersion
in interface PreParseBindOperation
protocolVersion
- The string representation of the protocol version
associated with this bind request.public final void run()
run
in interface java.lang.Runnable
run
in class AbstractOperation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |