HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
4. If the method of authentication is LDAP_AUTH_SASL (SASL authentication), the server
determines whether the SASL mechanism (specified in the request) is supported.
If the SASL mechanism is not supported by the server, the server sends an
[LDAP_AUTH_METHOD_NOT_SUPPORTED] result code back to the client and ends the
processing of the bind request.
5. If the method of authentication is LDAP_AUTH_SIMPLE (simple authentication), the server
checks if the DN is an empty string or if there are no credentials.
If the DN is an empty string, if the DN is not specified, or if no credentials are specified, the
server assumes that the client is binding anonymously and sends an [LDAP_SUCCESS]
result code back to the client.
The DN and authentication method for the connection, which are used to determine access
rights for all operations performed through the connection, are left as NULL and
SLAPD_AUTH_NONE, respectively.
6. If the DN specified in the request is not served by this Directory Server (for example, if the
DN is uid=moxcross,dc=example,dc=com, and the directory root of the server is
dc=example,dc=com), the server sends one of the following two results back to the client
and ends the processing of the bind request:
If the server is configured with a default referral (that is, an LDAP URL which identifies
an LDAP server that handles referrals), the server sends an [LDAP_REFERRAL] result
code back to the client, or [LDAP_PARTIAL_RESULTS] if the client only supports the
LDAPv2 protocol.
If the server is not configured with a default referral, the server sends an
[LDAP_NO_SUCH_OBJECT] result code back to the client.
7. The server puts the information from the bind request into the parameter block:
SLAPI_BIND_TARGET is set to the DN as which the client is authenticating.
SLAPI_BIND_METHOD is set to the authentication method (for example,
LDAP_AUTH_SIMPLE or LDAP_AUTH_SASL).
SLAPI_BIND_CREDENTIALS is set to the credentials (for example, the password)
included in the request.
SLAPI_BIND_SASLMECHANISM (if the authentication method is LDAP_AUTH_SASL)
is set to the name of the SASL mechanism that the client is using for authentication.
8. If the DN is the root DN or the update DN (the DN of the master entity responsible for
replicating the directory), the server authenticates the client.
If the credentials are correct, the server sets the SLAPI_CONN_DN parameter to the DN
and the SLAPI_CONN_AUTHTYPE parameter to LDAP_AUTH_SIMPLE. The server sends
an [LDAP_SUCCESS] result code back to the client and ends the processing of the bind
request.
If the credentials are incorrect, the server sends an [LDAP_INVALID_CREDENTIALS]
result code back to the client and ends the processing of the bind request.
9. At this point, the server calls any preoperation bind plug-in functions. If the function returns
a nonzero value, the server ends the processing of the bind request.
If you are writing your own plug-in function to handle authentication, you should return a
nonzero value so that the server does not attempt to continue processing the bind request.
10. The server calls the back end bind function. The bind function returns one of the following
values:
70 Defining functions for authentication