INTERNET-DRAFT Editor: Kurt D. Zeilenga Intended Category: Standards Track OpenLDAP Foundation Expires in six months 23 June 2002 Updates: RFC 2595 Plain SASL Mechanism Status of Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. This document is intended to be, after appropriate review and revision, submitted to the RFC Editor as a Standards Track document. Distribution of this memo is unlimited. Technical discussion of this document will take place on the IETF SASL mailing list . Please send editorial comments directly to the document editor . Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as ``work in progress.'' The list of current Internet-Drafts can be accessed at . The list of Internet-Draft Shadow Directories can be accessed at . Copyright 2002, The Internet Society. All Rights Reserved. Please see the Copyright section near the end of this document for more information. Abstract Clear-text passwords are simple, interoperate with almost all existing operating system authentication databases, and are useful for a smooth transition to a more secure password-based authentication mechanism. The drawback is that they are unacceptable for use over an unencrypted Zeilenga Plain SASL Mechanism [Page 1] INTERNET-DRAFT draft-zeilenga-sasl-plain-00.txt 23 June 2002 network connection. This document defines the the SASL PLAIN authentication mechanism, intended to be used with confidentiality protection provided another layer (e.g. TLS). Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [KEYWORDS]. 1. Background and Intended Usage Clear-text passwords are simple, interoperate with almost all existing operating system authentication databases, and are useful for a smooth transition to a more secure password-based authentication mechanism. The drawback is that they are unacceptable for use over an unencrypted network connection. This document defines the "PLAIN" Simple Authentication and Security Layer ([SASL]) mechanism for use in protocols with no clear-text login command (e.g., ACAP). The PLAIN SASL mechanism MUST NOT be used without adequate security protection as the mechanism affords no integrity nor confidentiality protection itself. The PLAIN SASL mechanism MUST NOT be advertised unless a strong encryption layer (such as provided by [TLS]) is active. This document updates RFC 2595, replacing Section 6. Changes since RFC 2595 are detailed in Appendix A. 2. PLAIN SASL mechanism The mechanism consists of a single message from the client to the server. The client sends the authorization identity (identity to login as), followed by a NUL character, followed by the authentication identity (identity whose password will be used), followed by a NUL character, followed by the clear-text password. The client may leave the authorization identity empty if wishes the server to derive the authorization identity from the provided the authentication identity. The authorization identity, authentication identity, password, and the NUL character SHALL be transferred as [UTF-8] encoded string of printable [Unicode] characters in Unicode Normalisation Form KC [NFKC]. Zeilenga Plain SASL Mechanism [Page 2] INTERNET-DRAFT draft-zeilenga-sasl-plain-00.txt 23 June 2002 The following characters are considered non-printable: - control characters: U+0000..U+001F, U+007F..U+009F; - replacement character: U+FFFD; and - special characters and noncharacter: U+FEFF, U+FFFE, U+FFFF. The server will verify the authentication identity and password with the system authentication database and verify that the authentication credentials permit the client to login as the authorization identity. If both steps succeed, the user is logged in. The server MAY also use the password to initialize any new authentication database, such as one suitable for [CRAM-MD5] or [DIGEST-MD5]. message = [authorize-id] NUL authenticate-id NUL password authenticate-id = 1*UTF8-SAFE ; MUST accept up to 255 octets authorize-id = 1*UTF8-SAFE ; MUST accept up to 255 octets password = 1*UTF8-SAFE ; MUST accept up to 255 octets NUL = %x00 UTF8-SAFE = %x01-09 / %x0B-0C / %x0E-7F / UTF8-2 / UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6 UTF8-1 = %x80-BF UTF8-2 = %xC0-DF UTF8-1 UTF8-3 = %xE0-EF 2UTF8-1 UTF8-4 = %xF0-F7 3UTF8-1 UTF8-5 = %xF8-FB 4UTF8-1 UTF8-6 = %xFC-FD 5UTF8-1 4. Example Here is an example of how this might be used to initialize a CRAM-MD5 authentication database for ACAP: S: * ACAP (SASL "CRAM-MD5") (STARTTLS) C: a001 AUTHENTICATE "CRAM-MD5" S: + "<1896.697170952@postoffice.reston.mci.net>" C: "tim b913a602c7eda7a495b4e6e7334d3890" S: a001 NO (TRANSITION-NEEDED) "Please change your password, or use TLS to login" C: a002 STARTTLS S: a002 OK "Begin TLS negotiation now" S: * ACAP (SASL "CRAM-MD5" "PLAIN" "EXTERNAL") C: a003 AUTHENTICATE "PLAIN" {21+} C: timtanstaaftanstaaf S: a003 OK CRAM-MD5 password initialized Zeilenga Plain SASL Mechanism [Page 3] INTERNET-DRAFT draft-zeilenga-sasl-plain-00.txt 23 June 2002 Note: In this example, represents a single NUL (U+0000) octet. 5. Security Considerations The PLAIN mechanism relies on the TLS encryption layer for security. When used without TLS, it is vulnerable to a common network eavesdropping attack. Therefore PLAIN MUST NOT be advertised or used unless a suitable TLS encryption layer is active or backwards compatibility dictates otherwise. When the PLAIN mechanism is used, the server gains the ability to impersonate the user to all services with the same password regardless of any encryption provided by TLS or other network privacy mechanisms. While many other authentication mechanisms have similar weaknesses, stronger SASL mechanisms such as the Kerberos-based GSSAPI mechanism address this issue. Clients are encouraged to have an operational mode where all mechanisms which are likely to reveal the user's password to the server are disabled. Clients are encouraged to have an operational mode where all mechanisms which are likely to reveal the user's password to the server are disabled. It is RECOMMENDED that this mode be the default. The security considerations for SASL apply to the PLAIN mechanism. 6. IANA Considerations It is requested that the SASL Mechanism registry [IANA-SASL] entry for the PLAIN mechanism be updated to reflect that this document now provides its technical specification. To: iana@iana.org Subject: Updated Registration of SASL mechanism PLAIN SASL mechanism name: PLAIN Security considerations: See RFC XXXX. Published specification (optional, recommended): RFC XXXX Person & email address to contact for further information: Kurt Zeilenga Chris Neuman Intended usage: COMMON Author/Change controller: IESG Note: Updates existing entry for PLAIN 7. Acknowledgement Zeilenga Plain SASL Mechanism [Page 4] INTERNET-DRAFT draft-zeilenga-sasl-plain-00.txt 23 June 2002 This document is a revision of RFC 2595 by Chris Newman. 8. Normative References [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [KEYWORDS] S. Bradner, "Key words for use in RFCs to Indicate Requirement Levels", BCP 14 (also RFC 2119), March 1997. [NFKC] Davis, M., M. Durst, "Unicode Standard Annex #15: Unicode Normalisation Forms", An integral part of The Unicode Standard, Version 3.2.0 (http://www.unicode.org/reports/tr15/tr15-22.html). [SASL] Myers, J., "Simple Authentication and Security Layer (SASL)", RFC 2222bis (a work in progress). [TLS] T. Dierks, C. Allen, "The TLS Protocol Version 1.0", RFC 2246, January 1999. [UNICODE] The Unicode Consortium, "The Unicode Standard, Version 3.2.0", defined by: The Unicode Standard, Version 3.0 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), as amended by the Unicode Standard Annex #28: Unicode 3.2 (http://www.unicode.org/reports/tr28/tr28-3.html). [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998. 9. Informative References [IANA-SASL] IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL) MECHANISMS", http://www.iana.org/assignments/sasl- mechanisms. [DIGEST-MD5] P. Leach, C. Newman, "Using Digest Authentication as a SASL Mechanism", RFC 2831, May 2000. [CRAM-MD5] J. Klensin, R. Catoe, and P. Krumviede, "IMAP/POP AUTHorize Extension for Simple Challenge/Response", RFC 2195, September 1997. 10. Editor's Address Zeilenga Plain SASL Mechanism [Page 5] INTERNET-DRAFT draft-zeilenga-sasl-plain-00.txt 23 June 2002 Kurt Zeilenga OpenLDAP Foundation Email: kurt@OpenLDAP.org Appendix A. Changes since RFC 2595 Coming in next revision... Full Copyright Statement Copyright 2002, The Internet Society. All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE AUTHORS, THE INTERNET SOCIETY, AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Zeilenga Plain SASL Mechanism [Page 6]