public final class BindOperationBasis extends AbstractOperation implements BindOperation, PreOperationBindOperation, PreParseBindOperation, PostOperationBindOperation, PostResponseBindOperation
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.NO_RESPONSE_CONTROLS, requestContext
Constructor and Description |
---|
BindOperationBasis(org.forgerock.services.context.Context context,
BindRequest request)
Creates a new bind operation with the provided information.
|
Modifier and Type | Method and Description |
---|---|
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.
|
LocalizableMessage |
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.
|
String |
getProtocolVersion()
Retrieves a string representation of the protocol version associated with this bind request.
|
Dn |
getProxiedAuthorizationDN()
Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.
|
ByteString |
getRawBindDN()
Retrieves the raw, unprocessed bind DN for this bind operation as contained in the client request.
|
List<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the client.
|
Entry |
getSASLAuthUserEntry()
Retrieves the user entry associated with the SASL authentication attempt.
|
ByteString |
getSASLCredentials()
Retrieves the SASL credentials for this bind operation.
|
String |
getSASLMechanism()
Retrieves the SASL mechanism for this bind operation.
|
SaslServer |
getSaslServer()
Returns the
SaslServer to use by the underlying connection, or null if SASL integrity and/or
privacy protection must not be enabled. |
ByteString |
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(LocalizableMessage message)
Specifies the reason that the authentication failed.
|
void |
setProtocolVersion(String protocolVersion)
Specifies the string representation of the protocol version associated with this bind request.
|
void |
setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
Set the proxied authorization DN for this operation if proxied authorization has been requested.
|
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(String saslMechanism,
ByteString saslCredentials)
Specifies the SASL credentials for this bind operation.
|
void |
setSaslServer(SaslServer saslServer)
Sets the SASL server.
|
void |
setServerSASLCredentials(ByteString 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(StringBuilder buffer)
Appends a string representation of this operation to the provided buffer.
|
void |
updateOperationErrMsgAndResCode()
Updates the error message and the result code of the operation.
|
addAdditionalLogItem, addPostReadResponse, addPreReadResponse, addRequestControl, appendErrorMessage, appendMaskedErrorMessage, checkAttributeConformsToSyntax, checkIfBackendIsWritable, checkIfCanceled, disconnectClient, dontSynchronize, equals, evaluateProxyAuthControls, filterNonDisclosableMatchedDN, findMatchedDN, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getClientConnection, getConnectionID, getContext, getErrorMessage, getLocalBackend, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, hashCode, invokePostResponseCallbacks, isHumanReadable, isInnerOperation, isInternalOperation, isProxyAuthzControl, isSynchronizationOperation, mustCheckSchema, newDirectoryException, operationCompleted, processOperationResult, processOperationResult, registerPostResponseCallback, removeAllDisallowedControls, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setProcessingStartTime, setProcessingStopTime, setReferralURLs, setResponseData, setResult, setResultCode, setResultCodeAndMessageNoInfoDisclosure, setSynchronizationOperation, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAdditionalLogItem, addRequestControl, appendErrorMessage, appendMaskedErrorMessage, disconnectClient, dontSynchronize, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getClientConnection, getConnectionID, getContext, getErrorMessage, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, isInnerOperation, isInternalOperation, isSynchronizationOperation, operationCompleted, registerPostResponseCallback, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setReferralURLs, setResponseData, setResult, setResultCode, setSynchronizationOperation, toString
addAdditionalLogItem, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, setErrorMessage
addAdditionalLogItem, addRequestControl, appendErrorMessage, getAdditionalLogItems, getErrorMessage, setErrorMessage
addAdditionalLogItem, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, getMatchedDN, getReferralURLs, getResultCode, setErrorMessage, setMatchedDN, setReferralURLs, setResponseData, setResultCode
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControl, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString
public BindOperationBasis(org.forgerock.services.context.Context context, BindRequest request)
context
- The context with which this operation is associated.request
- The bind request.public Dn getProxiedAuthorizationDN()
Operation
getProxiedAuthorizationDN
in interface Operation
null
if proxied authorization has not been requested.public void setProxiedAuthorizationDN(Dn proxiedAuthorizationDN)
Operation
setProxiedAuthorizationDN
in interface Operation
proxiedAuthorizationDN
- The proxied authorization DN for this operation if proxied authorization has been requested, or
null
if proxied authorization has not been requested.public final AuthenticationType getAuthenticationType()
BindOperation
getAuthenticationType
in interface BindOperation
getAuthenticationType
in interface PostOperationBindOperation
getAuthenticationType
in interface PostResponseBindOperation
getAuthenticationType
in interface PreOperationBindOperation
getAuthenticationType
in interface PreParseBindOperation
public final ByteString getRawBindDN()
BindOperation
getRawBindDN
in interface BindOperation
getRawBindDN
in interface PostOperationBindOperation
getRawBindDN
in interface PostResponseBindOperation
getRawBindDN
in interface PreOperationBindOperation
getRawBindDN
in interface PreParseBindOperation
public final void setRawBindDN(ByteString rawBindDN)
BindOperation
setRawBindDN
in interface BindOperation
setRawBindDN
in interface PreParseBindOperation
rawBindDN
- The raw, unprocessed bind DN for this bind operation.public final Dn getBindDN()
BindOperation
getRawBindDN
method.getBindDN
in interface BindOperation
getBindDN
in interface PostOperationBindOperation
getBindDN
in interface PostResponseBindOperation
getBindDN
in interface PreOperationBindOperation
null
if the raw DN has not yet been processed.public final ByteString getSimplePassword()
BindOperation
getSimplePassword
in interface BindOperation
getSimplePassword
in interface PostOperationBindOperation
getSimplePassword
in interface PostResponseBindOperation
getSimplePassword
in interface PreOperationBindOperation
getSimplePassword
in interface PreParseBindOperation
public final void setSimplePassword(ByteString simplePassword)
BindOperation
setSimplePassword
in interface BindOperation
setSimplePassword
in interface PreParseBindOperation
simplePassword
- The simple authentication password for this bind operation.public final String getSASLMechanism()
BindOperation
getSASLMechanism
in interface BindOperation
getSASLMechanism
in interface PostOperationBindOperation
getSASLMechanism
in interface PostResponseBindOperation
getSASLMechanism
in interface PreOperationBindOperation
getSASLMechanism
in interface PreParseBindOperation
null
if the bind does not use SASL
authentication.public final ByteString getSASLCredentials()
BindOperation
getSASLCredentials
in interface BindOperation
getSASLCredentials
in interface PostOperationBindOperation
getSASLCredentials
in interface PostResponseBindOperation
getSASLCredentials
in interface PreOperationBindOperation
getSASLCredentials
in interface PreParseBindOperation
null
if there are none or if the bind does
not use SASL authentication.public final void setSASLCredentials(String saslMechanism, ByteString saslCredentials)
BindOperation
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 ByteString getServerSASLCredentials()
BindOperation
getServerSASLCredentials
in interface BindOperation
getServerSASLCredentials
in interface PostOperationBindOperation
getServerSASLCredentials
in interface PostResponseBindOperation
null
if there are
none.public final void setServerSASLCredentials(ByteString serverSASLCredentials)
BindOperation
setServerSASLCredentials
in interface BindOperation
setServerSASLCredentials
in interface PostOperationBindOperation
setServerSASLCredentials
in interface PreOperationBindOperation
setServerSASLCredentials
in interface PreParseBindOperation
serverSASLCredentials
- The set of server SASL credentials to include in the bind response.public final Entry getSASLAuthUserEntry()
BindOperation
getSASLAuthUserEntry
in interface BindOperation
getSASLAuthUserEntry
in interface PostOperationBindOperation
getSASLAuthUserEntry
in interface PostResponseBindOperation
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)
BindOperation
setSASLAuthUserEntry
in interface BindOperation
saslAuthUserEntry
- The user entry associated with the SASL authentication attempt.public final LocalizableMessage getAuthFailureReason()
BindOperation
getAuthFailureReason
in interface BindOperation
getAuthFailureReason
in interface PostOperationBindOperation
getAuthFailureReason
in interface PostResponseBindOperation
null
if
none is available.public final void setAuthFailureReason(LocalizableMessage message)
BindOperation
setAuthFailureReason
in interface BindOperation
setAuthFailureReason
in interface PostOperationBindOperation
setAuthFailureReason
in interface PreOperationBindOperation
setAuthFailureReason
in interface PreParseBindOperation
message
- providing the reason that the authentication failed.public final Dn getUserEntryDN()
BindOperation
getUserEntryDN
in interface BindOperation
getUserEntryDN
in interface PostOperationBindOperation
getUserEntryDN
in interface PostResponseBindOperation
getUserEntryDN
in interface PreOperationBindOperation
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()
BindOperation
getAuthenticationInfo
in interface BindOperation
public final void setAuthenticationInfo(AuthenticationInfo authInfo)
BindOperation
processSASLBind
method.setAuthenticationInfo
in interface BindOperation
authInfo
- The authentication info that resulted from processing this bind operation.public final OperationType getOperationType()
Operation
getOperationType
in interface Operation
getOperationType
in interface PluginOperation
public final List<Control> getResponseControls()
Operation
getResponseControls
in interface Operation
getResponseControls
in interface PluginOperation
public final void addResponseControl(Control control)
Operation
addResponseControl
in interface Operation
addResponseControl
in interface PostOperationOperation
addResponseControl
in interface PreOperationOperation
addResponseControl
in interface PreParseOperation
control
- The control to add to the set of controls to include in the response to the client.public final void removeResponseControl(Control control)
Operation
removeResponseControl
in interface Operation
removeResponseControl
in interface PostOperationOperation
removeResponseControl
in interface PreOperationOperation
removeResponseControl
in interface PreParseOperation
control
- The control to remove from the set of controls to include in the response to the client.public final void toString(StringBuilder buffer)
Operation
toString
in interface Operation
toString
in interface PluginOperation
buffer
- The buffer into which a string representation of this operation should be appended.public void setUserEntryDN(Dn userEntryDN)
BindOperation
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 String getProtocolVersion()
BindOperation
getProtocolVersion
in interface BindOperation
getProtocolVersion
in interface PostOperationBindOperation
getProtocolVersion
in interface PostResponseBindOperation
getProtocolVersion
in interface PreOperationBindOperation
getProtocolVersion
in interface PreParseBindOperation
public void setProtocolVersion(String protocolVersion)
BindOperation
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()
Operation
public void updateOperationErrMsgAndResCode()
AbstractOperation
updateOperationErrMsgAndResCode
in class AbstractOperation
public SaslServer getSaslServer()
BindOperation
SaslServer
to use by the underlying connection, or null
if SASL integrity and/or
privacy protection must not be enabled.getSaslServer
in interface BindOperation
SaslServer
to use by the underlying connection, or null
if SASL integrity and/or
privacy protection must not enabled.public void setSaslServer(SaslServer saslServer)
BindOperation
setSaslServer
in interface BindOperation
saslServer
- the SASL server to setCopyright 2010-2020 ForgeRock AS.