📄 rfc2829.txt
字号:
eavesdropping attacks, but does not provide protection
against active intermediary attacks.
(3) For a directory needing session protection and
authentication, the Start TLS extended operation [5], and
either the simple authentication choice or the SASL EXTERNAL
mechanism, are to be used together. Implementations SHOULD
support authentication with a password as described in
section 6.2, and SHOULD support authentication with a
certificate as described in section 7.1. Together, these
can provide integrity and disclosure protection of
transmitted data, and authentication of client and server,
including protection against active intermediary attacks.
If TLS is negotiated, the client MUST discard all information about
the server fetched prior to the TLS negotiation. In particular, the
value of supportedSASLMechanisms MAY be different after TLS has been
negotiated (specifically, the EXTERNAL mechanism or the proposed
PLAIN mechanism are likely to only be listed after a TLS negotiation
has been performed).
If a SASL security layer is negotiated, the client MUST discard all
information about the server fetched prior to SASL. In particular,
if the client is configured to support multiple SASL mechanisms, it
SHOULD fetch supportedSASLMechanisms both before and after the SASL
security layer is negotiated and verify that the value has not
changed after the SASL security layer was negotiated. This detects
active attacks which remove supported SASL mechanisms from the
supportedSASLMechanisms list, and allows the client to ensure that it
is using the best mechanism supported by both client and server
(additionally, this is a SHOULD to allow for environments where the
supported SASL mechanisms list is provided to the client through a
different trusted source, e.g. as part of a digitally signed object).
Wahl, et al. Standards Track [Page 6]
RFC 2829 Authentication Methods for LDAP May 2000
5. Anonymous authentication
Directory operations which modify entries or access protected
attributes or entries generally require client authentication.
Clients which do not intend to perform any of these operations
typically use anonymous authentication.
LDAP implementations MUST support anonymous authentication, as
defined in section 5.1.
LDAP implementations MAY support anonymous authentication with TLS,
as defined in section 5.2.
While there MAY be access control restrictions to prevent access to
directory entries, an LDAP server SHOULD allow an anonymously-bound
client to retrieve the supportedSASLMechanisms attribute of the root
DSE.
An LDAP server MAY use other information about the client provided by
the lower layers or external means to grant or deny access even to
anonymously authenticated clients.
5.1. Anonymous authentication procedure
An LDAP client which has not successfully completed a bind operation
on a connection is anonymously authenticated.
An LDAP client MAY also specify anonymous authentication in a bind
request by using a zero-length OCTET STRING with the simple
authentication choice.
5.2. Anonymous authentication and TLS
An LDAP client MAY use the Start TLS operation [5] to negotiate the
use of TLS security [6]. If the client has not bound beforehand,
then until the client uses the EXTERNAL SASL mechanism to negotiate
the recognition of the client's certificate, the client is
anonymously authenticated.
Recommendations on TLS ciphersuites are given in section 10.
An LDAP server which requests that clients provide their certificate
during TLS negotiation MAY use a local security policy to determine
whether to successfully complete TLS negotiation if the client did
not present a certificate which could be validated.
Wahl, et al. Standards Track [Page 7]
RFC 2829 Authentication Methods for LDAP May 2000
6. Password-based authentication
LDAP implementations MUST support authentication with a password
using the DIGEST-MD5 SASL mechanism for password protection, as
defined in section 6.1.
LDAP implementations SHOULD support authentication with the "simple"
password choice when the connection is protected against
eavesdropping using TLS, as defined in section 6.2.
6.1. Digest authentication
An LDAP client MAY determine whether the server supports this
mechanism by performing a search request on the root DSE, requesting
the supportedSASLMechanisms attribute, and checking whether the
string "DIGEST-MD5" is present as a value of this attribute.
In the first stage of authentication, when the client is performing
an "initial authentication" as defined in section 2.1 of [4], the
client sends a bind request in which the version number is 3, the
authentication choice is sasl, the sasl mechanism name is "DIGEST-
MD5", and the credentials are absent. The client then waits for a
response from the server to this request.
The server will respond with a bind response in which the resultCode
is saslBindInProgress, and the serverSaslCreds field is present. The
contents of this field is a string defined by "digest-challenge" in
section 2.1.1 of [4]. The server SHOULD include a realm indication
and MUST indicate support for UTF-8.
The client will send a bind request with a distinct message id, in
which the version number is 3, the authentication choice is sasl, the
sasl mechanism name is "DIGEST-MD5", and the credentials contain the
string defined by "digest-response" in section 2.1.2 of [4]. The
serv-type is "ldap".
The server will respond with a bind response in which the resultCode
is either success, or an error indication. If the authentication is
successful and the server does not support subsequent authentication,
then the credentials field is absent. If the authentication is
successful and the server supports subsequent authentication, then
the credentials field contains the string defined by "response-auth"
in section 2.1.3 of [4]. Support for subsequent authentication is
OPTIONAL in clients and servers.
Wahl, et al. Standards Track [Page 8]
RFC 2829 Authentication Methods for LDAP May 2000
6.2. "simple" authentication choice under TLS encryption
A user who has a directory entry containing a userPassword attribute
MAY authenticate to the directory by performing a simple password
bind sequence following the negotiation of a TLS ciphersuite
providing connection confidentiality [6].
The client will use the Start TLS operation [5] to negotiate the use
of TLS security [6] on the connection to the LDAP server. The client
need not have bound to the directory beforehand.
For this authentication procedure to be successful, the client and
server MUST negotiate a ciphersuite which contains a bulk encryption
algorithm of appropriate strength. Recommendations on cipher suites
are given in section 10.
Following the successful completion of TLS negotiation, the client
MUST send an LDAP bind request with the version number of 3, the name
field containing the name of the user's entry, and the "simple"
authentication choice, containing a password.
The server will, for each value of the userPassword attribute in the
named user's entry, compare these for case-sensitive equality with
the client's presented password. If there is a match, then the
server will respond with resultCode success, otherwise the server
will respond with resultCode invalidCredentials.
6.3. Other authentication choices with TLS
It is also possible, following the negotiation of TLS, to perform a
SASL authentication which does not involve the exchange of plaintext
reusable passwords. In this case the client and server need not
negotiate a ciphersuite which provides confidentiality if the only
service required is data integrity.
7. Certificate-based authentication
LDAP implementations SHOULD support authentication via a client
certificate in TLS, as defined in section 7.1.
7.1. Certificate-based authentication with TLS
A user who has a public/private key pair in which the public key has
been signed by a Certification Authority may use this key pair to
authenticate to the directory server if the user's certificate is
requested by the server. The user's certificate subject field SHOULD
be the name of the user's directory entry, and the Certification
Authority must be sufficiently trusted by the directory server to
Wahl, et al. Standards Track [Page 9]
RFC 2829 Authentication Methods for LDAP May 2000
have issued the certificate in order that the server can process the
certificate. The means by which servers validate certificate paths
is outside the scope of this document.
A server MAY support mappings for certificates in which the subject
field name is different from the name of the user's directory entry.
A server which supports mappings of names MUST be capable of being
configured to support certificates for which no mapping is required.
The client will use the Start TLS operation [5] to negotiate the use
of TLS security [6] on the connection to the LDAP server. The client
need not have bound to the directory beforehand.
In the TLS negotiation, the server MUST request a certificate. The
client will provide its certificate to the server, and MUST perform a
private key-based encryption, proving it has the private key
associated with the certificate.
As deployments will require protection of sensitive data in transit,
the client and server MUST negotiate a ciphersuite which contains a
bulk encryption algorithm of appropriate strength. Recommendations
of cipher suites are given in section 10.
The server MUST verify that the client's certificate is valid. The
server will normally check that the certificate is issued by a known
CA, and that none of the certificates on the client's certificate
chain are invalid or revoked. There are several procedures by which
the server can perform these checks.
Following the successful completion of TLS negotiation, the client
will send an LDAP bind request with the SASL "EXTERNAL" mechanism.
8. Other mechanisms
The LDAP "simple" authentication choice is not suitable for
authentication on the Internet where there is no network or transport
layer confidentiality.
As LDAP includes native anonymous and plaintext authentication
methods, the "ANONYMOUS" and "PLAIN" SASL mechanisms are not used
with LDAP. If an authorization identity of a form different from a
DN is requested by the client, a mechanism that protects the password
in transit SHOULD be used.
The following SASL-based mechanisms are not considered in this
document: KERBEROS_V4, GSSAPI and SKEY.
Wahl, et al. Standards Track [Page 10]
RFC 2829 Authentication Methods for LDAP May 2000
The "EXTERNAL" SASL mechanism can be used to request the LDAP server
make use of security credentials exchanged by a lower layer. If a TLS
session has not been established between the client and server prior
to making the SASL EXTERNAL Bind request and there is no other
external source of authentication credentials (e.g. IP-level
security [8]), or if, during the process of establishing the TLS
session, the server did not request the client's authentication
credentials, the SASL EXTERNAL bind MUST fail with a result code of
inappropriateAuthentication. Any client authentication and
authorization state of the LDAP association is lost, so the LDAP
association is in an anonymous state after the failure.
9. Authorization Identity
The authorization identity is carried as part of the SASL credentials
field in the LDAP Bind request and response.
When the "EXTERNAL" mechanism is being negotiated, if the credentials
field is present, it contains an authorization identity of the
authzId form described below.
Other mechanisms define the location of the authorization identity in
the credentials field.
The authorization identity is a string in the UTF-8 character set,
corresponding to the following ABNF [7]:
; Specific predefined authorization (authz) id schemes are
; defined below -- new schemes may be defined in the future.
authzId = dnAuthzId / uAuthzId
; distinguished-name-based authz id.
dnAuthzId = "dn:" dn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -