INTERNET-DRAFT M. Nystrom Expires: December 1999 J. Brainard Intended Category: Informational RSA Laboratories June 1999 The SecurID(r) SASL Mechanism Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of [RFC2026]. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups and individuals 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 http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft expires in December, 1999. Comments and suggestions on this document are encouraged. Comments on this document should be sent directly to the author. Abstract SecurID is a hardware token card product (or software emulation thereof) produced by Security Dynamics, which is used for end-user authentication. This document defines a SASL authentication mechanism using these tokens, thereby providing a means for such tokens to be used in SASL [RFC2222] environments. This mechanism is only for authentication, and has no effect on the protocol encoding and is not designed to provide integrity or confidentiality services. This memo assumes the reader has basic familiarity with the SecurID token, its associated authentication protocol and SASL. How to read this document The key words "MUST", "SHOULD" and "MAY" in this document are to be Nystrom & Brainard Expires: December 1999 [Page 1] INTERNET DRAFT SecurID SASL Mechanism June 1999 interpreted as defined in [RFC2119]. In examples, "C:" and "S:" indicate messages sent by the client and server respectively. 1. Introduction The SECURID SASL mechanism is a good choice for usage scenarios where a client, acting on behalf of a user, is untrusted, as a one-time passcode will only give the client a single opportunity to act maliciously. This mechanism provides authentication only. The SECURID SASL mechanism provides a formal way to integrate the existing SecurID authentication method into SASL-enabled protocols including IMAP [RFC2060], ACAP [RFC2244], POP3 [RFC1734] and LDAPv3 [RFC2251]. 2. Authentication Model The SECURID SASL mechanism provides one-way two-factor based authentication as defined below. There are basically three entities in the authentication mechanism described here: A user, possessing a SecurID token, an application server, to which the user wants to connect, and an authentication server, capable of authenticating the user. Even though the application server in practice may function as a client with respect to the authentication server, relaying authentication credentials etc as needed, both servers are, unless explicitly mentioned, collectively termed "the server" here. The protocol used between the application server and the authentication server is outside the scope of this memo. The application client, acting on behalf of the user, is termed "the client". The mechanism is based on the use of a shared secret key, or 'seed', and a personal identification number (PIN), which is known both by the user and the authentication server. Hence the term 'two-factor authentication'. The secret seed is stored on a token that the client (user) possesses, as well as on the authentication server. Given the seed, current time of day, and the PIN, a "PASSCODE(r)" is generated by the user's token and sent to the server. The SECURID SASL mechanism provides one service: - Client authentication where the client provides information to the server, so that the server can authenticate the client. This mechanism is identified with the SASL key "SECURID". Nystrom & Brainard Expires: December 1999 [Page 2] INTERNET DRAFT SecurID SASL Mechanism June 1999 3. Authentication Procedure a) The client generates the credentials using local information (seed, current time and user PIN/password). b) If the underlying protocol permits, the client sends credentials to the server in an initial response message. Otherwise, the client sends a request to the server to initiate the authentication mechanism, and sends credentials after the server's response (see [RFC2222] section 5.1 for more information regarding the initial response option). Unless the server requests a new PIN (see below), the contents of the clients initial response SHALL be as follows: (1) An authorization identity. When this field isn't present, this defaults to the authentication identity. This field may be used by system administrators or proxy servers to login with a different user identity. (2) An authentication identity. The identity whose passcode will be used. If this field isn't present, it is assumed to have been transferred by other means (e.g. if the underlying protocol has support for this, like [RFC2251]). (3) A passcode. The one-time password that will be used to grant access. This message is defined in ASN.1 [X680] as follows: SecurIDSASLCredentialsPDU ::= SEQUENCE { version INTEGER {v1(0)} (v1,...) DEFAULT v1, authorizationID UTF8String OPTIONAL, authenticationID [0] IMPLICIT UTF8String OPTIONAL, passcode OCTET STRING (SIZE (4..32)), pin UTF8String (SIZE (4..32)) OPTIONAL, ... -- For future extensions } (The 'pin' field shall only be present when the server has sent a request for a new user PIN.) Values shall be DER-encoded [X690] before transformed in accordance with the underlying protocol. Passcodes usually consist of 4-8 digits. c) The server verifies these credentials using its own information. If the verification succeeds, the server sends back a Nystrom & Brainard Expires: December 1999 [Page 3] INTERNET DRAFT SecurID SASL Mechanism June 1999 response indicating success to the client. After receiving this response, the client is authenticated. Otherwise, the verification either failed or the server needs an additional set of credentials from the client in order to authenticate the user. d) If the server needs an additional set of credentials, it requests them now. The request has the following format and shall be DER-encoded before being transformed in accordance with the underlying protocol: SecurIDSASLCredentialsRequest ::= SEQUENCE { version INTEGER {v1(0)} (v1,...) DEFAULT v1, request CHOICE { passcode NULL, pin UTF8String (SIZE (0|4..32)), ... -- For future extensions } } The 'passcode' choice will be sent when the server requests a passcode. The 'pin' choice will be sent when the server requests a new user password. The server will either send an empty string or suggest a new user PIN in this message. e) The client generates a new set of credentials using local information and depending on the servers request and sends them to the server. Authentication now continues as in c) above. Note 1: Case d) above may occur e.g. when the clocks on which the server and the client relies are not synchronized. Note 2: If the server requested a new user PIN, the client MUST respond with a new user PIN (together with a passcode), encoded as a UTF8String. If the server supplied the client with a suggested PIN, the client accepts this by replying with the same PIN, but MAY replace it with another one. The length of the PIN is application- dependent as is any other requirements for the PIN, e.g. allowed characters. If the server for some reason does not accept the received PIN, the client MUST be prepared to receive either a message indicating the failure of the authentication or a repeated request for a new PIN. Mechanisms for transferring knowledge about PIN requirements from the server to the client is outside of the scope for this memo. However, some information MAY be provided in error messages transferred from the server to the client when applicable. 4. Examples 4.1 IMAP4 Nystrom & Brainard Expires: December 1999 [Page 4] INTERNET DRAFT SecurID SASL Mechanism June 1999 The following example shows the use of the SECURID SASL mechanism with IMAP4. The example is only designed to illustrate the protocol interaction but does provide valid encoding examples. S: * OK IMAP4 server ready C: AOO1 CAPABILITY S: * CAPABILITY IMAP4 AUTH=CRAM-MD5 AUTH=SECURID S: A001 OK done C: AOO2 AUTHENTICATE SECURID S: + C: MBKABm1hZ251cwQIMTIzNDU2Nzg= S: AOO2 OK Welcome, SECURID authenticated user: magnus 4.2 LDAPv3 The following examples show the use of the SECURID SASL mechanism with LDAPv3. The examples are only designed to illustrate the protocol interaction, but does provide valid encoding examples. Usernames, passcodes and PINs are of course fictitious. For readability, all messages is shown in the value-notation defined in [X680]. 4.2.1 LDAPv3 Example 1 Initial response message, successful authentication. C: { messageID 1, protocolOp bindRequest : { version 1, name '434E3D4D41474E5553'H, authentication sasl : { mechanism '53454355524944'H, credentials '300A04083132333435363738'H } } } S: { messageID 1, protocolOp bindResponse : { resultCode success, matchedDN ''H, errorMessage ''H, } } 4.2.2 LDAPv3 Example 2 Initial response message, server requires second passcode. Nystrom & Brainard Expires: December 1999 [Page 5] INTERNET DRAFT SecurID SASL Mechanism June 1999 C: { messageID 1, protocolOp bindRequest : { version 1, name '434E3D4D41474E5553'H, authentication sasl : { mechanism '53454355524944'H, credentials '300A04083132333435363738'H } } } S: { messageID 1, protocolOp bindResponse : { resultCode saslBindInProgress, matchedDN ''H, errorMessage ''H, serverSaslCreds '30020500'H } } C: { messageID 1, protocolOp bindRequest : { version 1, name '434E3D4D41474E5553'H, authentication sasl : { mechanism '53454355524944'H, credentials '300A04083131333335353636'H } } } S: { messageID 1, protocolOp bindResponse : { resultCode success, matchedDN ''H, errorMessage ''H, } } 4.2.3 LDAPv3 Example 3 Initial response message, server requires new PIN and passcode, and supplies client with a suggested new PIN (which the client accepts). C: { messageID 1, protocolOp bindRequest : { version 1, Nystrom & Brainard Expires: December 1999 [Page 6] INTERNET DRAFT SecurID SASL Mechanism June 1999 name '434E3D4D41474E5553'H, authentication sasl : { mechanism '53454355524944'H, credentials '300A04083132333435363738'H } } } S: { messageID 1, protocolOp bindResponse : { resultCode saslBindInProgress, matchedDN ''H, errorMessage ''H, serverSaslCreds '30070C056B616C6C65'H } } C: { messageID 1, protocolOp bindRequest : { version 1, name '434E3D4D41474E5553'H, authentication sasl : { mechanism '53454355524944'H, credentials '3011040831323334353637380C056B616C6C65'H } } } S: { messageID 1, protocolOp bindResponse : { resultCode success, matchedDN ''H, errorMessage ''H, } } 5. Security Considerations This mechanism does not provide session privacy, server authentication or protection from active attacks. In particular, man-in-the-middle attacks, were an attacker acts as an application server in order to acquire a valid passcode are possible. In order to protect against such attacks, the client SHOULD make sure that the server is properly authenticated. When user PINs are transmitted, authentication SHOULD take place on an authenticated and confidentiality-protected connection. Server implementations MUST protect against replay attacks. Nystrom & Brainard Expires: December 1999 [Page 7] INTERNET DRAFT SecurID SASL Mechanism June 1999 Implementations MUST support passcodes with at least a length of 4 characters, in order to protect against passcode-guessing attacks. 6. IANA Considerations By registering the SecurID protocol as a SASL mechanism, implementers will have a well-defined way of adding this authentication mechanism to their product. Here is the registration template for the SECURID SASL mechanism: SASL mechanism name: SECURID Security Considerations: See corresponding section of this memo Published specification: This memo Person & email address to contact for further information: See author's address section below Intended usage: COMMON Author/Change controller: See author's address section below 7. Intellectual Property Considerations Neither RSA Data Security Inc. or Security Dynamics Technologies Inc. makes any claims on the general constructions described in this memo, although underlying techniques may be covered. Among the underlying techniques, the SecurID technology is covered by a number of US patents, in particular US patent no. 4,885,778, no. 5,097,505, no. 5,168,520, and 5,657,388. Security Dynamics and SecurID are registered trademarks, and PASSCODE is a trademark, of Security Dynamics Technologies, Inc. 8. Copyright Copyright (C) The Internet Society (date). 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. Nystrom & Brainard Expires: December 1999 [Page 8] INTERNET DRAFT SecurID SASL Mechanism June 1999 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 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. 9. References [RFC1734] Myers, J., "POP3 AUTHentication command," IETF RFC 1734, December 1994. [RFC2026] Bradner, S., "The Internet Standards Process -- Revision 3," IETF RFC 2026, October 1996. [RFC2060] Crispin, M., "Internet Message Access Protocol - Version 4rev1," IETF RFC 2060, December 1996. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels," IETF RFC 2119, March 1997. [RFC2222] Myers, J., "Simple Authentication and Security Layer," IETF RFC 2222, October 1997. [RFC2244] Newman, C., "RFC2244 -- Application Configuration Access Protocol," IETF RFC 2244, November 1997. [RFC2251] Wahl, M., et al, "Lightweight Directory Access Protocol (v3)," IETF RFC 2252, December 1997. [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO 10646," IETF RFC 2279, January 1998. [X3.4] ANSI, "ANSI X3.4: Information Systems - Coded Character Sets - 7-Bit American National Standard Code for Information Interchange (7-Bit ASCII)," American National Standards Institute. [X680] ITU-T, "Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation," ITU-T Recommendation X.680, 1994. [X690] ITU-T, "Information technology - ASN.1 encoding rules: SPecification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)," ITU-T Recommendation X.690, 1994. Nystrom & Brainard Expires: December 1999 [Page 9] INTERNET DRAFT SecurID SASL Mechanism June 1999 10. Acknowledgements The authors gratefully acknowledge the contributions of various reviewers of this memo, in particular the ones from John Myers. They have significantly clarified and improved the utility of this specification. 11. Author's Address Magnus Nystr÷m RSA Laboratories 20 Crosby Drive Bedford, MA 01730 Phone: +1-781-687-7000 Email: magnus@rsa.com John Brainard RSA Laboratories 20 Crosby Drive Bedford, MA 01730 Phone: +1-781-687-7000 Email: jbrainard@rsa.com Nystrom & Brainard Expires: December 1999 [Page 10]