idnits 2.17.1 draft-ietf-ldapbis-authmeth-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document is more than 15 pages and seems to lack a Table of Contents. == There are 2 instances of lines with non-ascii characters in the document. == The page length should not exceed 58 lines per page, but there was 1 longer page, the longest (page 31) being 59 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. == The 'Obsoletes: ' line in the draft header should list only the _numbers_ of the RFCs which will be obsoleted by this document (if approved); it should not include the word 'RFC' in the list. -- The draft header indicates that this document obsoletes RFC2829, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 19, 2001) is 8317 days in the past. Is this intentional? Checking references for intended status: Draft Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? 'ReqsKeywords' on line 1201 looks like a reference -- Missing reference section? 'SASL' on line 1350 looks like a reference -- Missing reference section? 'TLS' on line 1207 looks like a reference -- Missing reference section? '4' on line 971 looks like a reference -- Missing reference section? 'LDAPv3' on line 1304 looks like a reference -- Missing reference section? 'APPLICATION 0' on line 234 looks like a reference -- Missing reference section? '0' on line 536 looks like a reference -- Missing reference section? 'RFC1777' on line 257 looks like a reference -- Missing reference section? 'APPLICATION 1' on line 291 looks like a reference -- Missing reference section? 'ABNF' on line 1184 looks like a reference -- Missing reference section? 'RFC2222' on line 406 looks like a reference -- Missing reference section? 'RFC2401' on line 1193 looks like a reference -- Missing reference section? 'APPLICATION 23' on line 535 looks like a reference -- Missing reference section? 'APPLICATION 24' on line 555 looks like a reference -- Missing reference section? '10' on line 557 looks like a reference -- Missing reference section? '11' on line 558 looks like a reference -- Missing reference section? 'AuthMeth' on line 833 looks like a reference -- Missing reference section? 'IPSEC' on line 1187 looks like a reference -- Missing reference section? 'RFC2831' on line 1196 looks like a reference -- Missing reference section? '6' on line 1167 looks like a reference -- Missing reference section? '5' on line 1039 looks like a reference Summary: 3 errors (**), 0 flaws (~~), 6 warnings (==), 24 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Individual Submission R. Harrison, Editor 2 Internet Draft Novell, Inc. 3 Document: draft-ietf-ldapbis-authmeth-01.txt July 19, 2001 4 Intended Category: Draft Standard 5 Obsoletes: RFC 2829, RFC 2830 7 Authentication Methods 8 and 9 Connection Level Security Mechanisms 10 for LDAPv3 12 Status of this Memo 14 This document is an Internet-Draft and is in full conformance with 15 all provisions of Section 10 of RFC2026. 17 This document is intended to be, after appropriate review and 18 revision, submitted to the RFC Editor as a Standard Track document. 19 Distribution of this memo is unlimited. Technical discussion of 20 this document will take place on the IETF LDAP Extension Working 21 Group mailing list . Please send 22 editorial comments directly to the author 23 . 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF), its areas, and its working groups. Note that 27 other groups may also distribute working documents as Internet- 28 Drafts. Internet-Drafts are draft documents valid for a maximum of 29 six months and may be updated, replaced, or obsoleted by other 30 documents at any time. It is inappropriate to use Internet-Drafts 31 as reference material or to cite them other than as "work in 32 progress." 34 The list of current Internet-Drafts can be accessed at 35 http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet- 36 Draft Shadow Directories can be accessed at 37 http://www.ietf.org/shadow.html. 39 Abstract 41 This document describes LDAPv3 authentication methods and connection 42 level security mechanisms that are required of all conforming LDAPv3 43 server implementations and makes recommendations for combinations of 44 these mechanisms to be used in various deployment circumstances. 46 Among the mechanisms described are 48 - the LDAPv3 Bind operation used for authenticating LDAP clients 49 to LDAP servers. 51 - the Start TLS operation used to initiate Transport Layer 52 Security on an established connection between an LDAP client and 53 server. 55 Authentication Methods for LDAPv3 July 19, 2001 57 - various forms of authentication including anonymous 58 authentication, password-based authentication, and certificate 59 based authentication. 61 1. Conventions Used in this Document 63 In this document, the term "user" represents any application which 64 is an LDAP client using the directory to retrieve or store 65 information. 67 Several terms and concepts relating to authentication and 68 authorization are presented in Appendix B of this document. While 69 the definition of these terms and concepts is outside the scope of 70 this document, an understanding of them is prerequisite to 71 understanding much of the material in this document. Readers who are 72 unfamiliar with security-related concepts are encouraged to review 73 Appendix B before reading the remainder of this document. 75 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 76 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 77 document are to be interpreted as described in RFC 2119 78 [ReqsKeywords]. 80 2. Introduction 82 LDAPv3 is a powerful access protocol for directories. It offers 83 means of searching, fetching and manipulating directory content, and 84 ways to access a rich set of security functions. 86 It is vital that these security functions be interoperable among all 87 LDAP clients and servers on the Internet; therefore there has to be 88 a minimum subset of security functions that is common to all 89 implementations that claim LDAPv3 conformance. 91 Basic threats to an LDAP directory service include: 93 (1) Unauthorized access to directory data via data-fetching 94 operations, 96 (2) Unauthorized access to reusable client authentication 97 information by monitoring others' access, 99 (3) Unauthorized access to directory data by monitoring others' 100 access, 102 (4) Unauthorized modification of directory data, 104 (5) Unauthorized modification of configuration information, 106 (6) Unauthorized or excessive use of resources (denial of service), 107 and 108 Authentication Methods for LDAPv3 July 19, 2001 110 (7) Spoofing of directory: Tricking a client into believing that 111 information came from the directory when in fact it did not, 112 either by modifying data in transit or misdirecting the client's 113 connection. 115 Threats (1), (4), (5) and (6) are due to hostile clients. Threats 116 (2), (3) and (7) are due to hostile agents on the path between 117 client and server, or posing as a server. 119 The LDAP protocol suite can be protected with the following security 120 mechanisms: 122 (1) Client authentication by means of the SASL [SASL] mechanism set, 123 possibly backed by the TLS [TLS] credentials exchange mechanism, 125 (2) Client authorization by means of access control based on the 126 requestor's authenticated identity, 128 (3) Data integrity protection by means of the TLS protocol or data- 129 integrity SASL mechanisms, 131 (4) Protection against snooping by means of the TLS protocol or 132 data-encrypting SASL mechanisms, 134 (5) Resource usage limitation by means of administrative limits on 135 service controls, and 137 (6) Server authentication by means of the TLS protocol or SASL 138 mechanism. 140 At the moment, imposition of access controls is done by means 141 outside the scope of the LDAP protocol. 143 3. Required Security Mechanisms 145 It is clear that allowing any implementation, faced with the above 146 requirements, to pick and choose among the possible alternatives is 147 not a strategy that is likely to lead to interoperability. In the 148 absence of mandates, clients will be written that do not support any 149 security function supported by the server, or worse, support only 150 mechanisms like cleartext passwords that provide clearly inadequate 151 security. 153 Active intermediary attacks are the most difficult for an attacker 154 to perform, and for an implementation to protect against. Methods 155 that protect only against hostile client and passive eavesdropping 156 attacks are useful in situations where the cost of protection 157 against active intermediary attacks is not justified based on the 158 perceived risk of active intermediary attacks. 160 Given the presence of the Directory, there is a strong desire to see 161 mechanisms where identities take the form of an LDAP distinguished 162 name and authentication data can be stored in the directory; this 163 Authentication Methods for LDAPv3 July 19, 2001 165 means that either this data is useless for faking authentication 166 (like the Unix "/etc/passwd" file format used to be), or its content 167 is never passed across the wire unprotected - that is, it's either 168 updated outside the protocol or it is only updated in sessions well 169 protected against snooping. It is also desirable to allow 170 authentication methods to carry authorization identities based on 171 existing forms of user identities for backwards compatibility with 172 non-LDAP-based authentication services. 174 Therefore, the following implementation conformance requirements are 175 in place: 177 (1) For a read-only, public directory, anonymous authentication, 178 described in section 5, can be used. 180 (2) Implementations providing password-based authenticated access 181 MUST support authentication using the DIGEST-MD5 SASL mechanism 182 [4], as described in section 6.2. This provides client 183 authentication with protection against passive eavesdropping 184 attacks, but does not provide protection against active 185 intermediary attacks. 187 (3) For a directory needing session protection and authentication, 188 the Start TLS operation described in section 5, and either the 189 simple authentication choice or the SASL EXTERNAL mechanism, are 190 to be used together. Implementations SHOULD support 191 authentication with a password as described in section 7.2, and 192 SHOULD support authentication with a certificate as described in 193 section 8.1. Together, these can provide integrity and 194 disclosure protection of transmitted data, and authentication of 195 client and server, including protection against active 196 intermediary attacks. 198 If TLS is negotiated, the client MUST discard all information about 199 the server fetched prior to the TLS negotiation. In particular, the 200 value of supportedSASLMechanisms MAY be different after TLS has been 201 negotiated (specifically, the EXTERNAL mechanism or the proposed 202 PLAIN mechanism are likely to only be listed after a TLS negotiation 203 has been performed). 205 If a SASL security layer is negotiated, the client MUST discard all 206 information about the server fetched prior to SASL. In particular, 207 if the client is configured to support multiple SASL mechanisms, it 208 SHOULD fetch supportedSASLMechanisms both before and after the SASL 209 security layer is negotiated and verify that the value has not 210 changed after the SASL security layer was negotiated. This detects 211 active attacks which remove supported SASL mechanisms from the 212 supportedSASLMechanisms list, and allows the client to ensure that 213 it is using the best mechanism supported by both client and server 214 (additionally, this is a SHOULD to allow for environments where the 215 supported SASL mechanisms list is provided to the client through a 216 different trusted source, e.g. as part of a digitally signed 217 object). 219 Authentication Methods for LDAPv3 July 19, 2001 221 Appendix A contains example deployment scenarios that list the 222 mechanisms that might be used to achieve a reasonable level of 223 security in various circumstances. 225 4. Bind Operation 227 The Bind operation allows authentication information to be exchanged 228 between the client and server. 230 4.1 Bind Request 232 The Bind Request is defined in section 4.2 of [LDAPv3] as follows: 234 BindRequest ::= [APPLICATION 0] SEQUENCE { 235 version INTEGER (1 .. 127), 236 name LDAPDN, 237 authentication AuthenticationChoice } 239 AuthenticationChoice ::= CHOICE { 240 simple [0] OCTET STRING, 241 -- 1 and 2 reserved 242 sasl [ReqsKeywords] SaslCredentials 243 } 245 SaslCredentials ::= SEQUENCE { 246 mechanism LDAPString, 247 credentials OCTET STRING OPTIONAL } 249 Parameters of the Bind Request are: 251 - version: A version number indicating the version of the protocol 252 to be used in this protocol session. This document describes 253 version 3 of the LDAP protocol. Note that there is no version 254 negotiation, and the client just sets this parameter to the 255 version it desires. If the client requests protocol version 2, a 256 server that supports the version 2 protocol as described in 257 [RFC1777] will not return any v3-specific protocol fields. (Note 258 that not all LDAP servers will support protocol version 2, since 259 they may be unable to generate the attribute syntaxes associated 260 with version 2.) 262 - name: The name of the directory object that the client wishes to 263 bind as. This field may take on a null value (a zero length 264 string) for the purposes of anonymous binds, when authentication 265 has been performed at a lower layer, or when using SASL 266 credentials with a mechanism that includes the name in the 267 credentials. Server behavior is undefined when the name is a 268 null value, simple authentication is used, and a password is 269 specified. Note that the server SHOULD NOT perform any alias 270 dereferencing in determining the object to bind as. 272 Authentication Methods for LDAPv3 July 19, 2001 274 - authentication: information used to authenticate the name, if 275 any, provided in the Bind Request. 277 Upon receipt of a Bind Request, a protocol server will authenticate 278 the requesting client, if necessary. The server will then return a 279 Bind Response to the client indicating the status of the 280 authentication. 282 Authorization is the use of this authentication information when 283 performing operations. Authorization MAY be affected by factors 284 outside of the LDAP Bind request, such as lower layer security 285 services. 287 4.2. Bind Response 289 The Bind Response is defined in section 4.2 of [LDAPv3] as follows. 291 BindResponse ::= [APPLICATION 1] SEQUENCE { 292 COMPONENTS OF LDAPResult, 293 serverSaslCreds [ABNF] OCTET STRING OPTIONAL } 295 BindResponse consists simply of an indication from the server of the 296 status of the client's request for authentication. 298 If the bind was successful, the resultCode will be success. 299 Otherwise it will be one of: 301 - operationsError: server encountered an internal error. 303 - protocolError: unrecognized version number or incorrect PDU 304 structure. 306 - authMethodNotSupported: unrecognized SASL mechanism name. 308 - strongAuthRequired: the server requires authentication be 309 performed with a SASL mechanism. 311 - referral: this server cannot accept this bind and the client 312 should try another. 314 - saslBindInProgress: the server requires the client to send a new 315 bind request, with the same sasl mechanism, to continue the 316 authentication process. 318 - inappropriateAuthentication: the server requires the client 319 which had attempted to bind anonymously or without supplying 320 credentials to provide some form of credentials. 322 - invalidCredentials: the wrong password was supplied or the SASL 323 credentials could not be processed. 325 - unavailable: the server is shutting down. 327 Authentication Methods for LDAPv3 July 19, 2001 329 If the server does not support the client's requested protocol 330 version it MUST set the resultCode to protocolError. 332 If the client receives a BindResponse response where the resultCode 333 was protocolError it MUST close the connection as the server will be 334 unwilling to accept further operations. (This is for compatibility 335 with earlier versions of LDAP, in which the bind was always the 336 first operation and there was no negotiation.) 338 The serverSaslCreds are used as part of a SASL-defined bind 339 mechanism to allow the client to authenticate the server to which it 340 is communicating, or to perform "challenge-response" authentication. 341 If the client bound with the password choice, or the SASL mechanism 342 does not require the server to return information to the client, 343 then this field is not to be included in the result. 345 4.3. Sequencing of the Bind Operation 347 4.3.1. Effect of Multiple Bind Requests 349 Subsequent to sending a bind request, A client MAY send a bind 350 request to change its identity. Such a bind request has the effect 351 of abandoning all operations outstanding on the connection. (This 352 simplifies server implementation.) Authentication from earlier binds 353 are subsequently ignored, and so if the bind fails, the connection 354 will be treated as anonymous (see section 4.3.3). If a SASL transfer 355 encryption or integrity mechanism has been negotiated, and that 356 mechanism does not support the changing of credentials from one 357 identity to another, then the client MUST instead establish a new 358 connection. 360 For some SASL authentication mechanisms, it may be necessary for the 361 client to invoke the BindRequest multiple times. If at any stage the 362 client wishes to abort the bind process it MAY unbind and then drop 363 the underlying connection. Clients MUST NOT invoke operations 364 between two Bind requests made as part of a multi-stage bind. 366 4.3.2. Aborting SASL Bind Negotiation 368 A client may abort a SASL bind negotiation by sending a BindRequest 369 with a different value in the mechanism field of SaslCredentials, or 370 an AuthenticationChoice other than sasl. 372 If the client sends a BindRequest with the sasl mechanism field as 373 an empty string, the server MUST return a BindResponse with 374 authMethodNotSupported as the resultCode. This will allow clients to 375 abort a negotiation if it wishes to try again with the same SASL 376 mechanism. 378 4.3.3. Unbound Connection Treated as Anonymous 380 Unlike LDAP v2, the client need not send a Bind Request in the first 381 PDU of the connection. The client may request any operations and the 382 Authentication Methods for LDAPv3 July 19, 2001 384 server MUST treat these as anonymous. If the server requires that 385 the client bind before browsing or modifying the directory, the 386 server MAY reject a request other than binding, unbinding or an 387 extended request with the "operationsError" result. 389 If the client did not bind before sending a request and receives an 390 operationsError, it may then send a Bind Request. If this also fails 391 or the client chooses not to bind on the existing connection, it 392 will close the connection, reopen it and begin again by first 393 sending a PDU with a Bind Request. This will aid in interoperating 394 with servers implementing other versions of LDAP. 396 4.4. Using SASL for Other Security Services 398 The simple authentication option provides minimal authentication 399 facilities, with the contents of the authentication field consisting 400 only of a cleartext password. Note that the use of cleartext 401 passwords is not recommended over open networks when the underlying 402 transport service cannot guarantee confidentiality; see the 403 "Security Considerations" section. 405 The sasl choice allows for any mechanism defined for use with SASL 406 [RFC2222]. The mechanism field contains the name of the mechanism. 407 The credentials field contains the arbitrary data used for 408 authentication, inside an OCTET STRING wrapper. Note that unlike 409 some Internet application protocols where SASL is used, LDAP is not 410 text-based, thus no base64 transformations are performed on the 411 credentials. 413 If any SASL-based integrity or confidentiality services are enabled, 414 they take effect following the transmission by the server and 415 reception by the client of the final BindResponse with resultCode 416 success. 418 The client can request that the server use authentication 419 information from a lower layer protocol by using the SASL EXTERNAL 420 mechanism. 422 4.4.1. Use of ANONYMOUS and PLAIN SASL Mechanisms 424 As LDAP includes native anonymous and plaintext authentication 425 methods, the "ANONYMOUS" and "PLAIN" SASL mechanisms are not used 426 with LDAP. If an authorization identity of a form different from a 427 DN is requested by the client, a mechanism that protects the 428 password in transit SHOULD be used. 430 4.4.2. Use of EXTERNAL SASL Mechanism 432 The "EXTERNAL" SASL mechanism can be used to request the LDAP server 433 make use of security credentials exchanged by a lower layer. If a 434 TLS session has not been established between the client and server 435 prior to making the SASL EXTERNAL Bind request and there is no other 436 external source of authentication credentials (e.g. IP-level 437 Authentication Methods for LDAPv3 July 19, 2001 439 security [RFC2401]), or if, during the process of establishing the 440 TLS session, the server did not request the client's authentication 441 credentials, the SASL EXTERNAL bind MUST fail with a result code of 442 inappropriateAuthentication. Any client authentication and 443 authorization state of the LDAP association is lost, so the LDAP 444 association is in an anonymous state after the failure. 446 4.4.3. SASL Mechanisms not Considered in this Document 448 The following SASL-based mechanisms are not considered in this 449 document: KERBEROS_V4, GSSAPI and SKEY. 451 4.5. SASL Authorization Identity 453 The authorization identity is carried as part of the SASL 454 credentials field in the LDAP Bind request and response. 456 When the "EXTERNAL" SASL mechanism is being negotiated, if the 457 credentials field is present, it contains an authorization identity 458 of the authzId form described below. 460 Other mechanisms define the location of the authorization identity 461 in the credentials field. 463 4.5.1. Authorization Identity Syntax 465 The authorization identity is a string in the UTF-8 character set, 466 corresponding to the following ABNF grammar [ABNF]: 468 ; Specific predefined authorization (authz) id schemes are 469 ; defined below -- new schemes may be defined in the future. 471 authzId = dnAuthzId / uAuthzId 473 ; distinguished-name-based authz id. 474 dnAuthzId = "dn:" dn 475 dn = utf8string ; with syntax defined in RFC 2253 477 ; unspecified authorization id, UTF-8 encoded. 478 uAuthzId = "u:" userid 479 userid = utf8string ; syntax unspecified 481 4.5.1.1. DN-based Authorization Identity 483 All servers that support the storage of authentication credentials, 484 such as passwords or certificates, in the directory MUST support the 485 dnAuthzId choice. The format for distinguishedName is defined in 486 Section 3 of draft-zeilenga-ldapbis-rfc2253-01.txt. 488 4.5.1.2. Unspecified Authorization Identity 489 Authentication Methods for LDAPv3 July 19, 2001 491 The uAuthzId choice allows for compatibility with client 492 applications that wish to authenticate to a local directory but do 493 not know their own distinguished name or that do not have a 494 directory entry. The format of utf8string is defined as only a 495 sequence of UTF-8 encoded ISO 10646 characters, and further 496 interpretation is subject to prior agreement between the client and 497 server. 499 For example, the userid could identify a user of a specific 500 directory service, or be a login name or the local-part of an RFC 501 822 email address. In general a uAuthzId MUST NOT be assumed to be 502 globally unique. 504 Additional authorization identity schemes MAY be defined in future 505 versions of this document. 507 4.6. SASL Service Name for LDAP 509 For use with SASL [SASL], a protocol must specify a service name to 510 be used with various SASL mechanisms, such as GSSAPI. For LDAP, the 511 service name is "ldap", which has been registered with the IANA as a 512 GSSAPI service name. 514 4.7. SASL Integrity and Privacy Protections 516 Any negotiated SASL integrity and privacy protections SHALL start on 517 the first octet of the first LDAP PDU following successful 518 completion of the SASL bind operation. If lower level security layer 519 is negotiated, such as TLS, any SASL security services SHALL be 520 layered on top of such security layers regardless of the order of 521 their negotiation. 523 5. Start TLS Operation 525 The Start Transport Layer Security (StartTLS) operation provides the 526 ability to establish Transport Layer Security [TLS] on an LDAP 527 association. 529 5.1. Start TLS Request 531 A client requests TLS establishment by transmitting a Start TLS 532 request PDU to the server. The Start TLS request is defined in terms 533 of the [LDAPv3] ExtendedRequest as follows: 535 ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 536 requestName [0] LDAPOID, 537 requestValue [LDAPv3] OCTET STRING OPTIONAL } 539 The requestName portion of the Start TLS request MUST be the OID 540 "1.3.6.1.4.1.1466.20037". 542 The requestValue field is absent. 544 Authentication Methods for LDAPv3 July 19, 2001 546 The client MUST NOT send any PDUs on this connection following this 547 request until it receives a Start TLS extended response. 549 5.2. Start TLS Response 551 When a Start TLS request is made, the server MUST return a Start TLS 552 response PDU to the requestor. The Start TLS response id defined in 553 terms of the [LDAPv3] ExtendedResponse as follows: 555 ExtendedResponse ::= [APPLICATION 24] SEQUENCE { 556 COMPONENTS OF LDAPResult, 557 responseName [10] LDAPOID OPTIONAL, 558 response [11] OCTET STRING OPTIONAL } 560 The responseName portion of the Start TLS response MUST be the OID 561 "1.3.6.1.4.1.1466.20037". (Note that this OID is the same OID value 562 used in the requestName of the Start TLS request.) 564 The response field is absent. 566 The server MUST set the resultCode field to either success or one of 567 the other values outlined in section 5.2.2. 569 5.2.1. "Success" Response 571 If the ExtendedResponse contains a resultCode of success, this 572 indicates that the server is willing and able to negotiate TLS. 573 Refer to section 3, below, for details. 575 5.2.2. Response other than "success" 577 If the ExtendedResponse contains a resultCode other than success, 578 this indicates that the server is unwilling or unable to negotiate 579 TLS. 581 If the Start TLS extended request was not successful, the resultCode 582 will be one of: 584 operationsError (operations sequencing incorrect; e.g. TLS already 585 established) 587 protocolError (TLS not supported or incorrect PDU structure) 589 referral (this server doesn't do TLS, try this one) 591 unavailable (e.g. some major problem with TLS, or server is 592 shutting down) 594 The server MUST return operationsError if the client violates any of 595 the Start TLS extended operation sequencing requirements described 596 in section 5.3, below. 598 Authentication Methods for LDAPv3 July 19, 2001 600 If the server does not support TLS (whether by design or by current 601 configuration), it MUST set the resultCode to protocolError (see 602 section 4.1.1 of [LDAPv3]), or to referral. The server MUST include 603 an actual referral value in the LDAP Result if it returns a 604 resultCode of referral. The client's current session is unaffected 605 if the server does not support TLS. The client MAY proceed with any 606 LDAP operation, or it MAY close the connection. 608 The server MUST return unavailable if it supports TLS but cannot 609 establish a TLS connection for some reason, e.g. the certificate 610 server not responding, it cannot contact its TLS implementation, or 611 if the server is in process of shutting down. The client MAY retry 612 the StartTLS operation, or it MAY proceed with any other LDAP 613 operation, or it MAY close the connection. 615 5.3. Sequencing of the Start TLS Operation 617 This section describes the overall procedures clients and servers 618 MUST follow for TLS establishment. These procedures take into 619 consideration various aspects of the overall security of the LDAP 620 association including discovery of resultant security level and 621 assertion of the client's authorization identity. 623 Note that the precise effects, on a client's authorization identity, 624 of establishing TLS on an LDAP association are described in detail 625 in section 5.5. 627 5.3.1. Requesting to Start TLS on an LDAP Association 629 The client MAY send the Start TLS extended request at any time after 630 establishing an LDAP association, except that in the following cases 631 the client MUST NOT send a Start TLS extended request: 633 - if TLS is currently established on the connection, or 634 - during a multi-stage SASL negotiation, or 635 - if there are any LDAP operations outstanding on the 636 connection. 638 The result of violating any of these requirements is a resultCode of 639 operationsError, as described above in section 2.3. 641 The client MAY have already performed a Bind operation when it sends 642 a Start TLS request, or the client might have not yet bound. 644 If the client did not establish a TLS connection before sending any 645 other requests, and the server requires the client to establish a 646 TLS connection before performing a particular request, the server 647 MUST reject that request with a confidentialityRequired or 648 strongAuthRequired result. The client MAY send a Start TLS extended 649 request, or it MAY choose to close the connection. 651 5.3.2. Starting TLS 652 Authentication Methods for LDAPv3 July 19, 2001 654 The server will return an extended response with the resultCode of 655 success if it is willing and able to negotiate TLS. It will return 656 other resultCodes, documented above, if it is unable. 658 In the successful case, the client, which has ceased to transfer 659 LDAP requests on the connection, MUST either begin a TLS negotiation 660 or close the connection. The client will send PDUs in the TLS Record 661 Protocol directly over the underlying transport connection to the 662 server to initiate TLS negotiation [TLS]. 664 5.3.3. TLS Version Negotiation 666 Negotiating the version of TLS or SSL to be used is a part of the 667 TLS Handshake Protocol, as documented in [TLS]. Please refer to that 668 document for details. 670 5.3.4. Discovery of Resultant Security Level 672 After a TLS connection is established on an LDAP association, both 673 parties MUST individually decide whether or not to continue based on 674 the privacy level achieved. Ascertaining the TLS connection's 675 privacy level is implementation dependent, and accomplished by 676 communicating with one's respective local TLS implementation. 678 If the client or server decides that the level of authentication or 679 privacy is not high enough for it to continue, it SHOULD gracefully 680 close the TLS connection immediately after the TLS negotiation has 681 completed (see sections 5.4.1 and 5.5.2 below). If the client 682 decides to continue, it MAY attempt to Start TLS again, it MAY send 683 an unbind request, or it MAY send any other LDAP request. 685 5.3.5. Assertion of Client's Authorization Identity 687 The client MAY, upon receipt of a Start TLS response indicating 688 success, assert that a specific authorization identity be utilized 689 in determining the client's authorization status. The client 690 accomplishes this via an LDAP Bind request specifying a SASL 691 mechanism of "EXTERNAL" [SASL] (see section 5.5.1.2 below). 693 5.3.6. Server Identity Check 695 The client MUST check its understanding of the server's hostname 696 against the server's identity as presented in the server's 697 Certificate message, in order to prevent man-in-the-middle attacks. 699 Matching is performed according to these rules: 701 - The client MUST use the server hostname it used to open the LDAP 702 connection as the value to compare against the server name as 703 expressed in the server's certificate. The client MUST NOT use 704 the server's canonical DNS name or any other derived form of 705 name. 707 Authentication Methods for LDAPv3 July 19, 2001 709 - If a subjectAltName extension of type dNSName is present in the 710 certificate, it SHOULD be used as the source of the server's 711 identity. 713 - Matching is case-insensitive. 715 - The "*" wildcard character is allowed. If present, it applies 716 only to the left-most name component. 718 E.g. *.bar.com would match a.bar.com, b.bar.com, etc. but not 719 bar.com. If more than one identity of a given type is present in 720 the certificate (e.g. more than one dNSName name), a match in any 721 one of the set is considered acceptable. 723 If the hostname does not match the dNSName-based identity in the 724 certificate per the above check, user-oriented clients SHOULD either 725 notify the user (clients MAY give the user the opportunity to 726 continue with the connection in any case) or terminate the 727 connection and indicate that the server's identity is suspect. 728 Automated clients SHOULD close the connection, returning and/or 729 logging an error indicating that the server's identity is suspect. 731 Beyond the server identity checks described in this section, clients 732 SHOULD be prepared to do further checking to ensure that the server 733 is authorized to provide the service it is observed to provide. The 734 client MAY need to make use of local policy information. 736 5.3.7. Refresh of Server Capabilities Information 738 The client MUST refresh any cached server capabilities information 739 (e.g. from the server's root DSE; see section 3.4 of [LDAPv3]) upon 740 TLS session establishment. This is necessary to protect against 741 active-intermediary attacks that may have altered any server 742 capabilities information retrieved prior to TLS establishment. The 743 server MAY advertise different capabilities after TLS establishment. 745 5.4. Closing a TLS Connection 747 Two forms of TLS connection closure--graceful and abrupt--are 748 supported. 750 5.4.1. Graceful Closure 752 Either the client or server MAY terminate the TLS connection on an 753 LDAP association by sending a TLS closure alert. This will leave the 754 LDAP association intact. 756 Before closing a TLS connection, the client MUST [RGH18]either wait 757 for any outstanding LDAP operations to complete, or explicitly 758 abandon them [LDAPv3]. 760 After the initiator of a close has sent a TLS closure alert, it MUST 761 discard any TLS messages until it has received a TLS closure alert 762 Authentication Methods for LDAPv3 July 19, 2001 764 from the other party. It will cease to send TLS Record Protocol 765 PDUs, and following the receipt of the alert, MAY send and receive 766 LDAP PDUs. 768 The other party, if it receives a TLS closure alert, MUST 769 immediately transmit a TLS closure alert. It will subsequently 770 cease to send TLS Record Protocol PDUs, and MAY send and receive 771 LDAP PDUs. 773 5.4.2. Abrupt Closure 775 Either the client or server MAY abruptly close the entire LDAP 776 association and any TLS connection established on it by dropping the 777 underlying TCP connection. In this circumstance, a server MAY send 778 the client a Notice of Disconnection [LDAPv3] before dropping the 779 TCP connection. 781 5.5. Effects of TLS on a Client's Authorization Identity 783 This section describes the effects on a client's authorization 784 identity brought about by establishing TLS on an LDAP association. 785 The default effects are described first, and next the facilities for 786 client assertion of authorization identity are discussed including 787 error conditions. Lastly, the effects of closing the TLS connection 788 are described. 790 Authorization identities and related concepts are described in 791 Appendix B. 793 5.5.1. TLS Connection Establishment Effects 795 5.5.1.1. Default Effects 797 Upon establishment of the TLS connection onto the LDAP association, 798 any previously established authentication and authorization 799 identities MUST remain in force, including anonymous state. This 800 holds even in the case where the server requests client 801 authentication via TLS -- e.g. requests the client to supply its 802 certificate during TLS negotiation (see [TLS]). 804 5.5.1.2. Client Assertion of Authorization Identity 806 A client MAY either implicitly request that its LDAP authorization 807 identity be derived from its authenticated TLS credentials or it MAY 808 explicitly provide an authorization identity and assert that it be 809 used in combination with its authenticated TLS credentials. The 810 former is known as an implicit assertion, and the latter as an 811 explicit assertion. 813 5.5.1.2.1. Implicit Assertion 815 An implicit authorization identity assertion is accomplished after 816 TLS establishment by invoking a Bind request of the SASL form using 817 Authentication Methods for LDAPv3 July 19, 2001 819 the "EXTERNAL" mechanism name [SASL, LDAPv3] that SHALL NOT include 820 the optional credentials octet string (found within the 821 SaslCredentials sequence in the Bind Request). The server will 822 derive the client's authorization identity from the authentication 823 identity supplied in the client's TLS credentials (typically a 824 public key certificate) according to local policy. The underlying 825 mechanics of how this is accomplished are implementation specific. 827 5.5.1.2.2. Explicit Assertion 829 An explicit authorization identity assertion is accomplished after 830 TLS establishment by invoking a Bind request of the SASL form using 831 the "EXTERNAL" mechanism name [SASL, LDAPv3] that SHALL include the 832 credentials octet string. This string MUST be constructed as 833 documented in section 9 of [AuthMeth]. 835 5.5.1.2.3. Error Conditions 837 For either form of assertion, the server MUST verify that the 838 client's authentication identity as supplied in its TLS credentials 839 is permitted to be mapped to the asserted authorization identity. 840 The server MUST reject the Bind operation with an invalidCredentials 841 resultCode in the Bind response if the client is not so authorized. 843 Additionally, with either form of assertion, if a TLS session has 844 not been established between the client and server prior to making 845 the SASL EXTERNAL Bind request and there is no other external source 846 of authentication credentials (e.g. IP-level security [IPSEC]), or 847 if, during the process of establishing the TLS session, the server 848 did not request the client's authentication credentials, the SASL 849 EXTERNAL bind MUST fail with a result code of 850 inappropriateAuthentication. 852 After the above Bind operation failures, any client authentication 853 and authorization state of the LDAP association is lost, so the LDAP 854 association is in an anonymous state after the failure. TLS 855 connection state is unaffected, though a server MAY end the TLS 856 connection, via a TLS close_notify message, based on the Bind 857 failure (as it MAY at any time). 859 5.5.2. TLS Connection Closure Effects 861 Closure of the TLS connection MUST cause the LDAP association to 862 move to an anonymous authentication and authorization state 863 regardless of the state established over TLS and regardless of the 864 authentication and authorization state prior to TLS connection 865 establishment. 867 6. Anonymous Authentication 869 Directory operations that modify entries or access protected 870 attributes or entries generally require client authentication. 871 Clients that do not intend to perform any of these operations 872 Authentication Methods for LDAPv3 July 19, 2001 874 typically use anonymous authentication. Servers SHOULD NOT allow 875 clients with anonymous authentication to modify directory entries or 876 access sensitive information in directory entries. 878 LDAP implementations MUST support anonymous authentication, as 879 defined in section 6.1. 881 LDAP implementations MAY support anonymous authentication with TLS, 882 as defined in section 6.2. 884 While there MAY be access control restrictions to prevent access to 885 directory entries, an LDAP server SHOULD allow an anonymously-bound 886 client to retrieve the supportedSASLMechanisms attribute of the root 887 DSE. 889 An LDAP server MAY use other information about the client provided 890 by the lower layers or external means to grant or deny access even 891 to anonymously authenticated clients. 893 6.1. Anonymous Authentication Procedure 895 An LDAPv3 client that has not successfully completed a bind 896 operation on a connection is anonymously authenticated. See section 897 4.3.3. 899 An LDAP client MAY also choose to explicitly bind anonymously. A 900 client that wishes to do so MUST choose the simple authentication 901 option in the Bind Request (see section XXX) and set the password to 902 be of zero length. (This is often done by LDAPv2 clients.) Typically 903 the name is also of zero length. 905 6.2. Anonymous Authentication and TLS 907 An LDAP client MAY use the Start TLS operation (section 4) to 908 negotiate the use of TLS security [TLS]. If the client has not bound 909 beforehand, then until the client uses the EXTERNAL SASL mechanism 910 to negotiate the recognition of the client's certificate, the client 911 is anonymously authenticated. 913 Recommendations on TLS ciphersuites are given in section 10. 915 An LDAP server which requests that clients provide their certificate 916 during TLS negotiation MAY use a local security policy to determine 917 whether to successfully complete TLS negotiation if the client did 918 not present a certificate which could be validated. 920 7. Password-based authentication 922 7.1. Simple authentication 924 The LDAP "simple" authentication choice is not suitable for 925 authentication in environments where there is no network or 926 transport layer confidentiality. LDAP implementations SHOULD support 927 Authentication Methods for LDAPv3 July 19, 2001 929 authentication with the "simple" authentication choice when the 930 connection is protected against eavesdropping using TLS, as defined 931 in section 6.3. LDAP implementations SHOULD NOT support 932 authentication with the "simple" authentication choice unless the 933 data on the connection is protected using TLS or other privacy and 934 data-integrity protection. 936 7.2. Digest Authentication 938 LDAP implementations MUST support authentication with a password 939 using the DIGEST-MD5 SASL mechanism for password protection. 941 An LDAP client MAY determine whether the server supports this 942 mechanism by performing a search request on the root DSE, requesting 943 the supportedSASLMechanisms attribute, and checking whether the 944 string "DIGEST-MD5" is present as a value of this attribute. 946 In the first stage of authentication, when the client is perfCorming 947 an "initial authentication" as defined in section 2.1 of [RFC2831], 948 the client sends a bind request in which the version number is 3, 949 the authentication choice is sasl, the sasl mechanism name is 950 "DIGEST- MD5", and the credentials are absent. The client then waits 951 for a response from the server to this request. 953 The server will respond with a bind response in which the resultCode 954 is saslBindInProgress, and the serverSaslCreds field is present. The 955 contents of this field is a string defined by "digest-challenge" in 956 section 2.1.1 of [RFC2831]. The server SHOULD include a realm 957 indication and MUST indicate support for UTF-8. 959 The client will send a bind request with a distinct message id, in 960 which the version number is 3, the authentication choice is sasl, 961 the sasl mechanism name is "DIGEST-MD5", and the credentials contain 962 the string defined by "digest-response" in section 2.1.2 of 963 [RFC2831]. The serv-type is "ldap". 965 The server will respond with a bind response in which the resultCode 966 is either success, or an error indication. If the authentication is 967 successful and the server does not support subsequent 968 authentication, then the credentials field is absent. If the 969 authentication is successful and the server supports subsequent 970 authentication, then the credentials field contains the string 971 defined by "response-auth" in section 2.1.3 of [4]. Support for 972 subsequent authentication is OPTIONAL in clients and servers. 974 7.3. "simple" authentication choice under TLS encryption 976 Following the negotiation of an appropriate TLS ciphersuite 977 providing connection confidentiality [6], a client MAY authenticate 978 to a directory that supports the simple authentication choice by 979 performing a simple bind operation. 981 Authentication Methods for LDAPv3 July 19, 2001 983 The client will use the Start TLS operation [5] to negotiate the use 984 of TLS security [6] on the connection to the LDAP server. The client 985 need not have bound to the directory beforehand. 987 For this authentication procedure to be successful, the client and 988 server MUST negotiate a ciphersuite which contains a bulk encryption 989 algorithm of appropriate strength. Recommendations on cipher suites 990 are given in section 10. 992 Following the successful completion of TLS negotiation, the client 993 MUST send an LDAP bind request with the version number of 3, the 994 name field containing a DN , and the "simple" authentication choice, 995 containing a password. 997 7.3.1 "simple" Authentication Choice 999 DSAs that map the DN sent in the bind request to a directory entry 1000 with a userPassword attribute will, for each value of the 1001 userPassword attribute in the named user's entry, compare these for 1002 case-sensitive equality with the client's presented password. If 1003 there is a match, then the server will respond with resultCode 1004 success, otherwise the server will respond with resultCode 1005 invalidCredentials. 1007 7.4. Other authentication choices with TLS 1009 It is also possible, following the negotiation of TLS, to perform a 1010 SASL authentication that does not involve the exchange of plaintext 1011 reusable passwords. In this case the client and server need not 1012 negotiate a ciphersuite which provides confidentiality if the only 1013 service required is data integrity. 1015 8. Certificate-based authentication 1017 LDAP implementations SHOULD support authentication via a client 1018 certificate in TLS, as defined in section 7.1. 1020 8.1. Certificate-based authentication with TLS 1022 A user who has a public/private key pair in which the public key has 1023 been signed by a Certification Authority may use this key pair to 1024 authenticate to the directory server if the user's certificate is 1025 requested by the server. The user's certificate subject field SHOULD 1026 be the name of the user's directory entry, and the Certification 1027 Authority that issued the user�s certificate must be sufficiently 1028 trusted by the directory server in order for the server to process 1029 the certificate. The means by which servers validate certificate 1030 paths is outside the scope of this document. 1032 A server MAY support mappings for certificates in which the subject 1033 field name is different from the name of the user's directory entry. 1034 A server which supports mappings of names MUST be capable of being 1035 configured to support certificates for which no mapping is required. 1037 Authentication Methods for LDAPv3 July 19, 2001 1039 The client will use the Start TLS operation [5] to negotiate the use 1040 of TLS security [6] on the connection to the LDAP server. The client 1041 need not have bound to the directory beforehand. 1043 In the TLS negotiation, the server MUST request a certificate. The 1044 client will provide its certificate to the server, and MUST perform 1045 a private key-based encryption, proving it has the private key 1046 associated with the certificate. 1048 In deployments that require protection of sensitive data in transit, 1049 the client and server MUST negotiate a ciphersuite which contains a 1050 bulk encryption algorithm of appropriate strength. Recommendations 1051 of cipher suites are given in section 10. 1053 The server MUST verify that the client's certificate is valid. The 1054 server will normally check that the certificate is issued by a known 1055 CA, and that none of the certificates on the client's certificate 1056 chain are invalid or revoked. There are several procedures by which 1057 the server can perform these checks. 1059 Following the successful completion of TLS negotiation, the client 1060 will send an LDAP bind request with the SASL "EXTERNAL" mechanism. 1062 9. TLS Ciphersuites 1064 The following ciphersuites defined in [6] MUST NOT be used for 1065 confidentiality protection of passwords or data: 1067 TLS_NULL_WITH_NULL_NULL 1068 TLS_RSA_WITH_NULL_MD5 1069 TLS_RSA_WITH_NULL_SHA 1071 The following ciphersuites defined in [6] can be cracked easily 1072 (less than a day of CPU time on a standard CPU in 2000). These 1073 ciphersuites are NOT RECOMMENDED for use in confidentiality 1074 protection of passwords or data. Client and server implementers 1075 SHOULD carefully consider the value of the password or data being 1076 protected before using these ciphersuites: 1078 TLS_RSA_EXPORT_WITH_RC4_40_MD5 1079 TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 1080 TLS_RSA_EXPORT_WITH_DES40_CBC_SHA 1081 TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA 1082 TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA 1083 TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA 1084 TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA 1085 TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 1086 TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA 1088 The following ciphersuites are vulnerable to man-in-the-middle 1089 attacks, and SHOULD NOT be used to protect passwords or sensitive 1090 Authentication Methods for LDAPv3 July 19, 2001 1092 data, unless the network configuration is such that the danger of a 1093 man-in-the-middle attack is tolerable: 1095 TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 1096 TLS_DH_anon_WITH_RC4_128_MD5 1097 TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA 1098 TLS_DH_anon_WITH_DES_CBC_SHA 1099 TLS_DH_anon_WITH_3DES_EDE_CBC_SHA 1101 A client or server that supports TLS MUST support 1102 TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA and MAY support other ciphersuites 1103 offering equivalent or better protection. 1105 10. Security Considerations 1107 Security issues are discussed throughout this memo; the 1108 (unsurprising) conclusion is that mandatory security is important, 1109 and that session encryption is required when snooping is a problem. 1111 Servers are encouraged to prevent modifications by anonymous users. 1112 Servers may also wish to minimize denial of service attacks by 1113 timing out idle connections, and returning the unwillingToPerform 1114 result code rather than performing computationally expensive 1115 operations requested by unauthorized clients. 1117 A connection on which the client has not performed the Start TLS 1118 operation or negotiated a suitable SASL mechanism for connection 1119 integrity and encryption services is subject to man-in-the-middle 1120 attacks to view and modify information in transit. 1122 10.1. Start TLS Security Considerations 1124 The goals of using the TLS protocol with LDAP are to ensure 1125 connection confidentiality and integrity, and to optionally provide 1126 for authentication. TLS expressly provides these capabilities, as 1127 described in [TLS]. 1129 All security gained via use of the Start TLS operation is gained by 1130 the use of TLS itself. The Start TLS operation, on its own, does not 1131 provide any additional security. 1133 The use of TLS does not provide or ensure for confidentiality and/or 1134 non-repudiation of the data housed by an LDAP-based directory 1135 server. Nor does it secure the data from inspection by the server 1136 administrators. Once established, TLS only provides for and ensures 1137 confidentiality and integrity of the operations and data in transit 1138 over the LDAP association, and only if the implementations on the 1139 client and server support and negotiate it. 1141 The level of security provided though the use of TLS depends 1142 directly on both the quality of the TLS implementation used and the 1143 style of usage of that implementation. Additionally, an active- 1144 Authentication Methods for LDAPv3 July 19, 2001 1146 intermediary attacker can remove the Start TLS extended operation 1147 from the supportedExtension attribute of the root DSE. Therefore, 1148 both parties SHOULD independently ascertain and consent to the 1149 security level achieved once TLS is established and before beginning 1150 use of the TLS connection. For example, the security level of the 1151 TLS connection might have been negotiated down to plaintext. 1153 Clients SHOULD either warn the user when the security level achieved 1154 does not provide confidentiality and/or integrity protection, or be 1155 configurable to refuse to proceed without an acceptable level of 1156 security. 1158 Client and server implementors SHOULD take measures to ensure proper 1159 protection of credentials and other confidential data where such 1160 measures are not otherwise provided by the TLS implementation. 1162 Server implementors SHOULD allow for server administrators to elect 1163 whether and when connection confidentiality and/or integrity is 1164 required, as well as elect whether and when client authentication 1165 via TLS is required. 1166 Additional security considerations relating to the EXTERNAL 1167 mechanism to negotiate TLS can be found in [SASL] and [6]. 1169 11. Acknowledgements 1171 This document combines information originally contained in RFC 2829, 1172 RFC 2830 and portions of RFC 2251. The author acknowledges the work 1173 of Harald Tveit Alvestrand, Jeff Hodges, Tim Howes, Steve Kille, RL 1174 "Bob" Morgan , and Mark Wahl, each of whom authored one or more of 1175 these documents. RFC 2829 and RFC 2830 were products of the IETF 1176 LDAPEXT Working Group. RFC 2251 was a product of the ASID Working 1177 Group. 1179 This document is based upon input of the IETF LDAP Revision working 1180 group. The contributions of its members is greatly appreciated. 1182 12. Bibliography 1184 [ABNF] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1185 Specifications: ABNF", RFC 2234, November 1997. 1187 [IPSEC] Kent, S. and R. Atkinson, "Security Architecture for the 1188 Internet Protocol", RFC 2401, November 1998. 1190 [LDAPv3] Wahl, M., Kille S. and T. Howes, "Lightweight Directory 1191 Access Protocol (v3)", RFC 2251, December 1997. 1193 [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the 1194 Internet Protocol", RFC 2401, November 1998. 1196 [RFC2831] Leach, P. and C. Newman, "Using Digest Authentication as a 1197 SASL Mechanism", RFC 2831, May 2000. 1199 Authentication Methods for LDAPv3 July 19, 2001 1201 [ReqsKeywords] Bradner, S., "Key Words for use in RFCs to Indicate 1202 Requirement Levels", BCP 14, RFC 2119, March 1997. 1204 [SASL] Myers, J., "Simple Authentication and Security Layer (SASL)", 1205 RFC 2222, October 1997. 1207 [TLS] Dierks, T. and C. Allen. "The TLS Protocol Version 1.0", RFC 1208 2246, January 1999. 1210 13. Author's Address 1212 Roger Harrison 1213 Novell, Inc. 1214 1800 S. Novell Place 1215 Provo, UT 84606 1216 +1 801 861 2642 1217 roger_harrison@novell.com 1219 14. Full Copyright Statement 1221 Copyright (C) The Internet Society (2000). All Rights Reserved. 1223 This document and translations of it may be copied and furnished to 1224 others, and derivative works that comment on or otherwise explain it 1225 or assist in its implementation may be prepared, copied, published 1226 and distributed, in whole or in part, without restriction of any 1227 kind, provided that the above copyright notice and this paragraph 1228 are included on all such copies and derivative works. However, this 1229 document itself may not be modified in any way, such as by removing 1230 the copyright notice or references to the Internet Society or other 1231 Internet organizations, except as needed for the purpose of 1232 developing Internet standards in which case the procedures for 1233 copyrights defined in the Internet Standards process must be 1234 followed, or as required to translate it into languages other than 1235 English. 1237 The limited permissions granted above are perpetual and will not be 1238 revoked by the Internet Society or its successors or assigns. 1240 This document and the information contained herein is provided on an 1241 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 1242 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 1243 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 1244 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 1245 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1247 Appendix A. Example Deployment Scenarios 1249 The following scenarios are typical for LDAP directories on the 1250 Internet, and have different security requirements. (In the 1251 following, "sensitive" means data that will cause real damage to the 1252 Authentication Methods for LDAPv3 July 19, 2001 1254 owner if revealed; there may be data that is protected but not 1255 sensitive). This is not intended to be a comprehensive list, other 1256 scenarios are possible, especially on physically protected networks. 1258 (1) A read-only directory, containing no sensitive data, accessible 1259 to "anyone", and TCP connection hijacking or IP spoofing is not 1260 a problem. This directory requires no security functions except 1261 administrative service limits. 1263 (2) A read-only directory containing no sensitive data; read access 1264 is granted based on identity. TCP connection hijacking is not 1265 currently a problem. This scenario requires a secure 1266 authentication function. 1268 (3) A read-only directory containing no sensitive data; and the 1269 client needs to ensure that the directory data is authenticated 1270 by the server and not modified while being returned from the 1271 server. 1273 (4) A read-write directory, containing no sensitive data; read 1274 access is available to "anyone", update access to properly 1275 authorized persons. TCP connection hijacking is not currently a 1276 problem. This scenario requires a secure authentication 1277 function. 1279 (5) A directory containing sensitive data. This scenario requires 1280 session confidentiality protection AND secure authentication. 1282 Appendix B. Authentication and Authorization: Definitions and Concepts 1284 This appendix defines basic terms, concepts, and interrelationships 1285 regarding authentication, authorization, credentials, and identity. 1286 These concepts are used in describing how various security 1287 approaches are utilized in client authentication and authorization. 1289 B.1. Access Control Policy 1291 An access control policy is a set of rules defining the protection 1292 of resources, generally in terms of the capabilities of persons or 1293 other entities accessing those resources. A common expression of an 1294 access control policy is an access control list. Security objects 1295 and mechanisms, such as those described here, enable the expression 1296 of access control policies and their enforcement. Access control 1297 policies are typically expressed in terms of access control 1298 attributes as described below. 1300 B.2. Access Control Factors 1302 A request, when it is being processed by a server, may be associated 1303 with a wide variety of security-related factors (section 4.2 of 1304 [LDAPv3]). The server uses these factors to determine whether and 1305 how to process the request. These are called access control factors 1306 (ACFs). They might include source IP address, encryption strength, 1307 Authentication Methods for LDAPv3 July 19, 2001 1309 the type of operation being requested, time of day, etc. Some 1310 factors may be specific to the request itself, others may be 1311 associated with the connection via which the request is transmitted, 1312 others (e.g. time of day) may be "environmental". 1314 Access control policies are expressed in terms of access control 1315 factors. E.g., a request having ACFs i,j,k can perform operation Y 1316 on resource Z. The set of ACFs that a server makes available for 1317 such expressions is implementation-specific. 1319 B.3. Authentication, Credentials, Identity 1321 Authentication credentials are the evidence supplied by one party to 1322 another, asserting the identity of the supplying party (e.g. a user) 1323 who is attempting to establish an association with the other party 1324 (typically a server). Authentication is the process of generating, 1325 transmitting, and verifying these credentials and thus the identity 1326 they assert. An authentication identity is the name presented in a 1327 credential. 1329 There are many forms of authentication credentials -- the form used 1330 depends upon the particular authentication mechanism negotiated by 1331 the parties. For example: X.509 certificates, Kerberos tickets, 1332 simple identity and password pairs. Note that an authentication 1333 mechanism may constrain the form of authentication identities used 1334 with it. 1336 B.4. Authorization Identity 1338 An authorization identity is one kind of access control factor. It 1339 is the name of the user or other entity that requests that 1340 operations be performed. Access control policies are often expressed 1341 in terms of authorization identities; e.g., entity X can perform 1342 operation Y on resource Z. 1344 The authorization identity bound to an association is often exactly 1345 the same as the authentication identity presented by the client, but 1346 it may be different. SASL allows clients to specify an authorization 1347 identity distinct from the authentication identity asserted by the 1348 client's credentials. This permits agents such as proxy servers to 1349 authenticate using their own credentials, yet request the access 1350 privileges of the identity for which they are proxying [SASL]. Also, 1351 the form of authentication identity supplied by a service like TLS 1352 may not correspond to the authorization identities used to express a 1353 server's access control policy, requiring a server-specific mapping 1354 to be done. The method by which a server composes and validates an 1355 authorization identity from the authentication credentials supplied 1356 by a client is implementation-specific. 1358 Appendix C. RFC 2829 Change History 1360 This appendix lists the changes made to the text of RFC 2829 in 1361 preparing this document. 1363 Authentication Methods for LDAPv3 July 19, 2001 1365 C.0. General Editorial Changes 1366 Version -00 1368 - Changed other instances of the term LDAP to LDAPv3 where v3 of 1369 the protocol is implied. Also made all references to LDAPv3 use 1370 the same wording. 1372 - Miscellaneous grammatical changes to improve readability. 1374 - Made capitalization in section headings consistent. 1376 Version -01 1378 - Changed title to reflect inclusion of material from RFC 2830 and 1379 2251. 1381 C.1. Changes to Section 1 1383 Version -01 1385 - Moved conventions used in document to a separate section. 1387 C.2. Changes to Section 2 1389 Version -01 1391 - Moved section to an appendix. 1393 C.3. Changes to Section 3 1395 Version -01 1397 - Moved section to an appendix. 1399 C.4 Changes to Section 4 1401 Version -00 1403 - Changed "Distinguished Name" to "LDAP distinguished name". 1405 C.5. Changes to Section 5 1407 Version -00 1409 - Added the following sentence: "Servers SHOULD NOT allow clients 1410 with anonymous authentication to modify directory entries or 1411 access sensitive information in directory entries." 1413 C.5.1. Changes to Section 5.1 1415 Version -00 1416 Authentication Methods for LDAPv3 July 19, 2001 1418 - Replaced the text describing the procedure for performing an 1419 anonymous bind (protocol) with a reference to section 4.2 of RFC 1420 2251 (the protocol spec). 1422 Version -01 1424 - Brought text describing procedure for performing an anonymous 1425 bind from section 4.2 of RFC 2251 bis. This text will be 1426 removed from the draft standard version of that document. 1428 C.6. Changes to Section 6. 1430 Version -00 1432 Reorganized text in section 6.1 as follows: 1434 1. Added a new section (6.1) titled "Simple Authentication" and 1435 moved one of two introductory paragraphs for section 6 into 1436 section 6.1. Added sentences to the paragraph indicating: 1438 a. simple authentication is not suitable for environments where 1439 confidentiality is not available. 1441 b. LDAP implementations SHOULD NOT support simple 1442 authentication unless confidentiality and data integrity 1443 mechanisms are in force. 1445 2. Moved first paragraph of section 6 (beginning with "LDAP 1446 implementations MUST support authentication with a password�") 1447 to section on Digest Authentication (Now section 6.2). 1449 C.6.1. Changes to Section 6.1. 1451 Version -00 Renamed section to 6.2 1453 - Added sentence from original section 6 indicating that the 1454 DIGEST-MD5 SASL mechanism is required for all conforming LDAPv3 1455 implementations 1457 C.6.2 Changes to Section 6.2 1459 Version -00 1461 - Renamed section to 6.3 1463 - Reworded first paragraph to remove reference to user and the 1464 userPassword password attribute Made the first paragraph more 1465 general by simply saying that if a directory supports simple 1466 authentication that the simple bind operation MAY performed 1467 following negotiation of a TLS ciphersuite that supports 1468 confidentiality. 1470 Authentication Methods for LDAPv3 July 19, 2001 1472 - Replaced "the name of the user's entry" with "a DN" since not 1473 all bind operations are performed on behalf of a "user." 1475 - Added Section 6.3.1 heading just prior to paragraph 5. 1477 - Paragraph 5: replaced "The server" with "DSAs that map the DN 1478 sent in the bind request to a directory entry with a 1479 userPassword attribute." 1481 C.6.3. Changes to section 6.3. 1483 Version -00 1485 - Renamed to section 6.4. 1487 C.7. Changes to section 7. 1489 none 1491 C.7.1. Changes to section 7.1. 1493 Version -00 1495 - Clarified the entity issuing a certificate by moving the phrase 1496 "to have issued the certificate" immediately after 1497 "Certification Authority." 1499 C.8. Changes to section 8. 1501 Version -00 1503 - Removed the first paragraph because simple authentication is 1504 covered explicitly in section 6. 1506 - Added section 8.1. heading just prior to second paragraph. 1508 - Added section 8.2. heading just prior to third paragraph. 1510 - Added section 8.3. heading just prior to fourth paragraph. 1512 Version -01 1514 - Moved entire section 8 of RFC 2829 into section 3.4 (Using SASL 1515 for Other Security Services) to bring material on SASL 1516 mechanisms together into one location. 1518 C.9. Changes to section 9. 1520 Version -00 1522 - Paragraph 2: changed "EXTERNAL mechanism" to "EXTERNAL SASL 1523 mechanism." 1524 Authentication Methods for LDAPv3 July 19, 2001 1526 - Added section 9.1. heading. 1528 - Modified a comment in the ABNF from "unspecified userid" to 1529 "unspecified authz id". 1531 - Deleted sentence, "A utf8string is defined to be the UTF-8 1532 encoding of one or more ISO 10646 characters," because it is 1533 redundant. 1535 - Added section 9.1.1. heading. 1537 - Added section 9.1.2. heading. 1539 Version -01 1541 - Moved entire section 9 to become section 3.5 so that it would be 1542 with other SASL material. 1544 C.10. Changes to Section 10. 1546 Version -00 1548 - Updated reference to cracking from a week of CPU time in 1997 to 1549 be a day of CPU time in 2000. 1551 - Added text: "These ciphersuites are NOT RECOMMENDED for use... 1552 and server implementers SHOULD" to sentence just prior the 1553 second list of ciphersuites. 1555 - Added text: "and MAY support other ciphersuites offering 1556 equivalent or better protection," to the last paragraph of the 1557 section. 1559 C.11. Changes to Section 11. 1561 Version -01 1563 - Moved to section 3.6 to be with other SASL material. 1565 C.12. Changes to Section 12. 1567 Version -00 1569 - Inserted new section 12 that specifies when SASL protections 1570 begin following SASL negotiation, etc. The original section 12 1571 is renumbered to become section 13. 1573 Version -01 1575 - Moved to section 3.7 to be with other SASL material. 1577 C.13 Changes to Section 13 (original section 12). 1579 Authentication Methods for LDAPv3 July 19, 2001 1581 None 1583 Appendix D. RFC 2830 Change History 1585 This appendix lists the changes made to the text of RFC 2830 in 1586 preparing this document. 1588 D.0. General Editorial Changes 1590 - Material showing the PDUs for the Start TLS response was broken 1591 out into a new section. 1593 - The wording of the definition of the Start TLS request and Start 1594 TLS response was changed to make them parallel. NO changes were 1595 made to the ASN.1 definition or the associated values of the 1596 parameters. 1598 - A separate section heading for graceful TLS closure was added 1599 for parallelism with section on abrupt TLS closure. 1601 Appendix E. RFC 2251 Change History 1603 This appendix lists the changes made to the text of RFC 2251 in 1604 preparing this document. 1606 E.0. General Editorial Changes 1608 - All material from section 4.2 of RFC 2251 was moved into this 1609 document. 1611 - A new section was created for the Bind Request 1613 - Section 4.2.1 of RFC 2251 (Sequencing Bind Request) was moved 1614 after the section on the Bind Response for parallelism with the 1615 presentation of the Start TLS operations. The section was also 1616 subdivided to explicitly call out the various effects being 1617 described within it. 1619 - All SASL profile information from RFC 2829 was brought within 1620 the discussion of the Bind operation (primarily sections 4.4 - 1621 4.7). 1623 Appendix F. Issues to be Resolved 1625 This appendix lists open questions and issues that need to be 1626 resolved before work on this document is deemed complete. 1628 F.1. 1630 Section 1 lists 6 security mechanisms that can be used by LDAP 1631 servers. I'm not sure what mechanism 5, "Resource limitation by 1632 means of administrative limits on service controls" means. 1634 Authentication Methods for LDAPv3 July 19, 2001 1636 F.2. 1638 Section 2 paragraph 1 defines the term, "sensitive." Do we want to 1639 bring this term and other security-related terms in alignment with 1640 usage with the IETF security glossary (RFC 2828)? 1642 F.3. 1644 Section 2, deployment scenario 2: What is meant by the term "secure 1645 authentication function?" 1647 F.4. 1649 Section 3, deployment scenario 3: What is meant by the phrase, 1650 "directory data is authenticated by the server?" 1652 F.5. 1654 Section 4 paragraph 3: What is meant by the phrase, "this means that 1655 either this data is useless for faking authentication (like the Unix 1656 "/etc/passwd" file format used to be)?" 1658 F.6. 1660 Section 4 paragraph 7 begins: "For a directory needing session 1661 protection..." Is this referring to data confidentiality or data 1662 integrity or both? 1664 F.7. 1666 Section 4 paragraph 8 indicates that "information about the server 1667 fetched fetched prior to the TLS negotiation" must be discarded. Do 1668 we want to explicitly state that this applies to information fetched 1669 prior to the *completion* of the TLS negotiation or is this going 1670 too far? 1672 F.8. 1674 Section 4 paragraph 9 indicates that clients SHOULD check the 1675 supportedSASLMechanisms list both before and after a SASL security 1676 layer is negotiated to ensure that they are using the best available 1677 security mechanism supported mutually by the client and server. A 1678 note at the end of the paragraph indicates that this is a SHOULD 1679 since there are environments where the client might get a list of 1680 supported SASL mechanisms from a different trusted source. 1682 I wonder if the intent of this could be restated more plainly using 1683 one of these two approaches (I've paraphrased for the sake of 1684 brevity): 1686 Approach 1: Clients SHOULD check the supportedSASLMechanisms list 1687 both before and after SASL negotiation or clients SHOULD use a 1688 Authentication Methods for LDAPv3 July 19, 2001 1690 different trusted source to determine available supported SASL 1691 mechanisms. 1693 Approach 2: Clients MUST check the supportedSASLMechanisms list both 1694 before and after SASL negotiation UNLESS they use a different 1695 trusted source to determine available supported SASL mechanisms. 1697 F.9. 1699 Section 6.3.1 states: "DSAs that map the DN sent in the bind request 1700 to a directory entry with a userPassword attribute will... compare 1701 [each value in the named user's entry]... with the presented 1702 password." This implies that this this applies only to user entries 1703 with userPassword attributes. What about other types of entries 1704 that might allow passwords and might store in the password 1705 information in other attributes? Do we want to make this text more 1706 general? 1708 F.10 userPassword and simple bind 1710 We need to be sure that we don't require userPassword to be the only 1711 attribute used for authenticating via simple bind. (See 2251 sec 4.2 1712 and authmeth 6.3.1. Work with Jim Sermersheim on resolution to this. 1713 On publication state something like: "This is the specific 1714 implementation of what we discussed in our general reorg 1715 conversation on the list." (Source: Kurt Zeilenga) 1717 F.11 Meaning of LDAP Association 1719 The original RFC 2830 uses the term "LDAP association" in describing 1720 a connection between an LDAP client and server regardless of the 1721 state of TLS on that connection. This term needs to be defined or 1722 possibly changed. 1724 F.12. Is DIGEST-MD5 mandatory for all implementations? 1726 Reading 2829bis I think DIGEST-MD5 is mandatory ONLY IF your server 1727 supports password based authentication...but the following makes it 1728 sound mandatory to provide BOTH password authentication AND DIGEST- 1729 MD5: 1731 "6.2. Digest authentication 1733 LDAP implementations MUST support authentication with a password 1734 using the DIGEST-MD5 SASL mechanism for password protection, as 1735 defined in section 6.1." 1737 The thing is for acl it would be nice (though not critical) to be 1738 able to default the required authentication level for a subject to a 1739 single "fairly secure" mechanism--if there is no such mandatory 1740 authentication scheme then you cannot do that. (Source: Rob Byrne) 1741 Authentication Methods for LDAPv3 July 19, 2001 1743 F.13. Ordering of authentication levels requested 1745 Again on the subject of authentication level, is it possible to 1746 define an ordering on authentication levels which defines their 1747 relative "strengths" ? This would be useful in acl as you could say 1748 things like"a given aci grants access to a given subject at this 1749 authentication level AND ABOVE". David Chadwick raised this before 1750 in the context of denying access to a subject at a given 1751 authentication level, in which case he wanted to express "deny 1752 access to this subject at this authentication level AND TO ALL 1753 IDENTITIES AUTHENTICATED BELOW THAT LEVEL". (Source: Rob Byrne) 1755 F.14. Document vulnerabilities of various mechanisms 1757 While I'm here...in 2829, I think it would be good to have some 1758 comments or explicit reference to a place where the security 1759 properties of the particular mandatory authentication schemes are 1760 outlined. When I say "security properties" I mean stuff like "This 1761 scheme is vulnerable to such and such attacks, is only safe if the 1762 key size is > 50, this hash is widely considered the best, etc...". 1763 I think an LDAP implementor is likely to be interested in that 1764 information, without having to wade through the security RFCs. 1765 (Source: Rob Byrne) 1767 F.15. Include a StartTLS state transition table 1769 The pictoral representation it is nominally based on is here (URL 1770 possibly folded): 1772 http://www.stanford.edu/~hodges/doc/LDAPAssociationStateDiagram- 1773 1999-12-14.html 1775 (Source: Jeff Hodges) 1777 F.16. Empty sasl credentials question 1779 I spent some more time looking microscopically at ldap-auth-methods 1780 and ldap-ext-tls drafts. The drafts say that the credential must 1781 have the form dn:xxx or u:xxx or be absent, and although they don't 1782 say what to do in the case of an empty octet string I would say that 1783 we could send protocolError (claim it is a bad PDU). 1785 There is still the question of what to do if the credential is 'dn:' 1786 (or 'u:') followed by the empty string. (Source: ariel@columbia.edu 1787 via Jeff Hodges) 1789 F.17. Hostname check from MUST to SHOULD? 1791 I am uneasy about the hostname check. My experience from PKI with 1792 HTTP probably is a contributing factor; we have people using the 1793 short hostname to get to a server which naturally has the FQDN in 1794 the certificate, no end of problems. I have a certificate on my 1795 laptop which has the FQDN for the casse when the system is on our 1796 Authentication Methods for LDAPv3 July 19, 2001 1798 Columbia network with a fixed IP; when I dial in however, I have 1799 some horrible dialup name, and using the local https server becomes 1800 annoying. Issuing a certificate in the name 'localhost' is not a 1801 solution! Wildcard match does not solve this problem. For these 1802 reasons I am inclined to argue for 'SHOULD' instead of 1803 'MUST' in paragraph... 1805 Also, The hostname check against the name in the certificate is a 1806 very weak means of preventing man-in-the-middle attacks; the proper 1807 solution is not here yet (SecureDNS or some equivalent). Faking out 1808 DNS is not so hard, and we see this sort of thing in the press on a 1809 pretty regular basis, where site A hijacks the DNS server for site B 1810 and gets all their requests. Some mention of this should be made in 1811 the draft. (Source: ariel@columbia.edu via Jeff Hodges) 1813 F.18. Must SASL DN exist in the directory? 1815 If the 'dn:' form of sasl creds is used, is it the intention of the 1816 draft(ers) that this DN must exist in the directory and the client 1817 will have the privileges associated with that entry, or can the 1818 server map the sasl DN to perhaps some other DN in the directory, 1819 in an implementation-dependent fashion? 1821 We already know that if *no* sasl credentials are presented, the DN 1822 or altname in the client certificate may be mapped to a DN in an 1823 implementation-dependent fashion, or indeed to something not in the 1824 directory at all. (Right?) (Source: ariel@columbia.edu via Jeff 1825 Hodges)