RFC 2808

The SecurID(r) SASL Mechanism

๐Ÿ“… published April 2000, from ietf

RFC 2808: The SecurID(r) SASL Mechanism ๐ŸŽ€

Okay bestie, let's get into RFC 2808 ๐Ÿ’– It's from the Network Working Group, written by M. Nystrom at RSA Laboratories, and dated April 2000. The category is Informational, so it shares info with the Internet community and isn't a formal standard ๐ŸŒธ It doesn't list any RFCs it obsoletes or updates, so it's a solo queen moment โœจ


Status of This Memo โœจ

Okay so this memo is just giving info to the Internet community ๐Ÿ’… It does NOT specify an Internet standard of any kind, and distribution is unlimited, so share away ๐Ÿฆ‹

The Internet Society holds the copyright (2000), and all rights are reserved. Hands off, bestie ๐Ÿ™ˆ

Abstract ๐ŸŒˆ

SecurID is a hardware token card product (or a software emulation of one) made by RSA Security Inc., and it's used for end-user authentication. This document defines a SASL [RFC2222] authentication mechanism that uses these tokens, so they can be used in SASL environments. It's giving authentication and nothing else ๐Ÿ’œ It has no effect on the protocol encoding, and it isn't designed to provide integrity or confidentiality services.

This memo assumes you already know the basics of the SecurID token, its authentication protocol, and SASL ๐Ÿงš

How to read this document ๐Ÿ“–

The key words MUST, MUST NOT, SHALL, SHOULD and MAY in this document are to be interpreted as defined in [RFC2119]. These are the capitalised words that carry real weight, so pay attention to them ๐Ÿ‘‘

In examples, C: means the client sent it and S: means the server sent it ๐Ÿ’ฌ

1. Introduction ๐Ÿงš

The SECURID SASL mechanism is a great pick when a client is acting for a user but can't be fully trusted ๐Ÿซถ The reason it works is that a one-time passcode only gives the client one chance to act maliciously. Just know this mechanism handles authentication only โœจ

It also gives you a proper, formal way to plug the existing SecurID authentication method into SASL-enabled protocols, including IMAP [RFC2060], ACAP [RFC2244], POP3 [RFC1734] and LDAPv3 [RFC2251] ๐Ÿ“

2. Authentication Model ๐Ÿ”

So the SECURID SASL mechanism gives you two-factor user authentication, and here's how it works ๐Ÿ’–

There are basically three entities involved: a user who has a SecurID token, an application server the user wants to connect to, and an authentication server that can authenticate the user. The application server can act like a client toward the authentication server, passing along credentials and so on as needed. Unless it's explicitly mentioned, both servers are collectively called "the server" here. The protocol between the application server and the authentication server is outside the scope of this memo ๐Ÿ™ˆ The application client, acting for the user, is called "the client" ๐ŸŽ€

The mechanism uses a shared secret key, called the "seed", plus a personal identification number (PIN). Both the user and the authentication server know the PIN. The seed lives on the user's token and on the authentication server. This is where "two-factor authentication" comes from: the user needs physical access to the token and also needs to know the PIN to authenticate ๐Ÿ‘‘ The token takes the seed, the current time of day and the PIN, then generates a "PASSCODE(r)" and sends it to the server ๐Ÿ”ฅ

The SECURID SASL mechanism provides one service:

  • User authentication, where the user gives the server information so the server can authenticate them.

This mechanism is identified with the SASL key "SECURID" ๐Ÿฆ‹

3. Authentication Procedure ๐ŸŽ€

a) The client generates the credentials using local information: the seed, the current time and the user's PIN/password ๐Ÿ’…

b) If the underlying protocol allows it, the client sends the credentials to the server in an initial response message. If not, the client asks the server to start the authentication mechanism, then sends the credentials after the server responds. (Check [RFC2222] section 5.1 for more about the initial response option ๐Ÿง )

Unless the server requests a new PIN (see below), the contents of the client's initial response SHALL be as follows:

(1) An authorization identity. If this field is empty, it defaults to the authentication identity. This field MAY be used by system administrators or proxy servers to log in as a different user identity. This field MUST NOT be longer than 255 octets, SHALL be terminated by a NUL (0) octet, and MUST consist of UTF-8-encoded [RFC2279] printable characters only (US-ASCII [X3.4] is a subset of UTF-8) โœจ

(2) An authentication identity. This is the identity whose passcode will be used. If this field is empty, it's assumed to have been transferred by other means (for example, if the underlying protocol supports that, like [RFC2251]). This field MUST NOT be longer than 255 octets, SHALL be terminated by a NUL (0) octet, and MUST consist of UTF-8-encoded printable characters only ๐Ÿซถ

(3) A passcode. This is the one-time password that grants access. This field MUST NOT be shorter than 4 octets, MUST NOT be longer than 32 octets, SHALL be terminated by a NUL (0) octet, and MUST consist of UTF-8-encoded printable characters only. Passcodes usually have 4-8 digits ๐Ÿ”ข

The ABNF [RFC2234] form of this message looks like this:

credential-pdu = authorization-id authentication-id passcode [pin]

authorization-id = 0*255VUTF8 %x00

authentication-id = 0*255VUTF8 %x00

passcode = 4*32VUTF8 %x00

pin ::= 4*32VUTF8 %x00

VUTF8 = <Visible (printable) UTF8-encoded characters>

For the <pin> rule, check out d) below ๐Ÿ‘€

c) The server checks the credentials against its own info. If the check passes, the server sends back a success response, and after that the client is authenticated ๐ŸŽ‰ Otherwise, the check either failed, or the server needs another set of credentials from the client before it can authenticate the user ๐Ÿ˜ฌ

d) If the server needs another set of credentials, it asks for them now. The request looks like this, in ABNF notation:

server-request = passcode | pin

passcode      = "passcode" %x00

pin           = "pin" %x00 [suggested-pin]

suggested-pin = 4*32VUTF8 %x00 ; Between 4 and 32 UTF-8 characters

The 'passcode' choice gets sent when the server wants another passcode. The 'pin' choice gets sent when the server wants a new user PIN. In that message, the server either sends an empty string or suggests a new user PIN ๐Ÿ’œ

e) The client generates a new set of credentials using local info, based on what the server asked for, and sends them to the server. Authentication then continues from c) above ๐Ÿ”

Note 1: Case d) above can happen when the clocks that the server and the client rely on aren't synchronised โฐ

Note 2: If the server requests a new user PIN, the client MUST respond with a new user PIN (together with a passcode), encoded as a UTF-8 string. If the server suggests a PIN, the client accepts it by replying with the same PIN, but the client MAY replace it with another one. The length of the PIN depends on the application, and so do any other PIN requirements, like which characters are allowed. If the server doesn't accept the PIN the client sent, the client MUST be prepared to get either a message saying the authentication failed or another repeated request for a new PIN ๐Ÿ˜ญ How the server tells the client about PIN requirements is outside the scope of this memo. Still, some info MAY be included in error messages the server sends to the client, when that makes sense ๐ŸŒธ

4. Examples ๐ŸŒŸ

4.1 IMAP4

This example shows the SECURID SASL mechanism working with IMAP4. It's only there to illustrate how the protocol interacts, but the encodings are valid ๐Ÿ’–

The base64 encoding of the last client response, plus the "+ " before the response, is part of the IMAP4 profile, not this specification itself ๐Ÿง

S: * OK IMAP4 server ready
C: A001 CAPABILITY
S: * CAPABILITY IMAP4 AUTH=CRAM-MD5 AUTH=SECURID
S: A001 OK done
C: A002 AUTHENTICATE SECURID
S: +
C: AG1hZ251cwAxMjM0NTY3OAA=
S: A002 OK Welcome, SECURID authenticated user: magnus

4.2 LDAPv3

These examples show the SECURID SASL mechanism working with LDAPv3. They're only there to show the protocol interaction, but they do have valid encodings. The usernames, passcodes and PINs are totally made up ๐Ÿ™ˆ For readability, every message is shown in the value notation defined in [X680]. <credential-pdu> values are shown hex-encoded in the 'credentials' field of LDAP's 'BindRequest', and <server-request> values are shown hex-encoded in the 'serverSaslCreds' field of LDAP's 'BindResponse' ๐Ÿงš

4.2.1 LDAPv3 Example 1

Initial response message, successful authentication โœจ

C: { messageID 1,
     protocolOp bindRequest :
       { version 1,
         name '434E3D4D41474E5553'H, -- "CN=MAGNUS"
         authentication sasl :
           { mechanism '53454355524944'H, -- "SECURID"
             credentials '006d61676e757300313233343536373800'H
           }
       }
   }

S: { messageID 1,
     protocolOp bindResponse :
       { resultCode success,
         matchedDN  ''H,
         errorMessage ''H,
       }
   }

4.2.2 LDAPv3 Example 2

Initial response message, where the server needs a second passcode ๐Ÿ”ฅ

C:  {
    messageID 1,
    protocolOp bindRequest : {
        version 1,
        name '434E3D4D41474E5553'H, -- "CN=MAGNUS"
        authentication sasl : {
            mechanism '53454355524944'H, -- "SECURID"
            credentials '006d61676e757300313233343536373800'H
        }
    }
}

S:  {
    messageID 1,
    protocolOp bindResponse : {
        resultCode saslBindInProgress,
        matchedDN  ''H,
        errorMessage ''H,
        serverSaslCreds '70617373636f646500'H
    }
}

C:  {
    messageID 1,
    protocolOp bindRequest : {
        version 1,
        name '434E3D4D41474E5553'H, -- "CN=MAGNUS"
        authentication sasl : {
            mechanism '53454355524944'H, -- "SECURID"
            credentials '006d61676e757300383736353433323100'H
        }
    }
}

S:  {
    messageID 1,
    protocolOp bindResponse : {
        resultCode success,
        matchedDN  ''H,
        errorMessage ''H,
    }
}

4.2.3 LDAPv3 Example 3 ๐Ÿงš

Okay bestie, this one is the full plot twist ๐Ÿ˜ญ. The server says "hold up, you need a new PIN and passcode," then hands the client a suggested new PIN, and the client is like "yep, bet" and accepts it. Peak main character energy ๐Ÿ’…

C:  {
    messageID 1,
    protocolOp bindRequest : {
        version 1,
        name '434E3D4D41474E5553'H, -- "CN=MAGNUS"
        authentication sasl : {
            mechanism '53454355524944'H, -- "SECURID"
            credentials '006d61676e757300313233343536373800'H
        }
    }
}

S:  {
    messageID 1,
    protocolOp bindResponse : {
        resultCode saslBindInProgress,
        matchedDN  ''H,
        errorMessage ''H,
        serverSaslCreds '70696e006b616c6c6500'H
    }
}

C:  {
    messageID 1,
    protocolOp bindRequest : {
        version 1,
        name '434E3D4D41474E5553'H, -- "CN=MAGNUS"
        authentication sasl : {
            mechanism '53454355524944'H, -- "SECURID"
        credentials '006d61676e7573003837343434363734006b616c6c6500'H
        }
    }
}

S:  {
    messageID 1,
    protocolOp bindResponse : {
        resultCode success,
        matchedDN  ''H,
        errorMessage ''H,
    }
}

5. Security Considerations ๐Ÿ”

Okay, this part is serious, so read it with your whole brain ๐Ÿง . This mechanism only protects against passive eavesdropping. It does NOT give you session privacy, server authentication, or protection from active attacks ๐Ÿ’€. Man-in-the-middle attacks are a real threat, where an attacker pretends to be the application server so they can grab a valid passcode. Scary stuff ๐Ÿ™ˆ

To guard against that, the client SHOULD make sure the server is properly authenticated ๐Ÿ”’. When user PINs are sent over the wire, user authentication SHOULD happen on a server-authenticated, confidentiality-protected connection ๐Ÿซถ.

Server implementations MUST protect against replay attacks, because otherwise an attacker could get in just by replaying an old valid request ๐Ÿ˜ค. Clients MUST also protect against replay of PIN-change messages ๐Ÿ›ก๏ธ.

5.1 The Race Attack ๐Ÿ

Here's the drama: an attacker can listen to most of a passcode, guess the rest, and race the legit user to finish the login first ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ. As with OTP [RFC2289], conforming server implementations MUST protect against this race condition. One defense is outlined below, borrowed from [RFC2289]. Implementations MAY use this approach, or they MAY pick a different defense โœจ.

One possible defense is to stop a user from starting multiple authentication sessions at the same time ๐Ÿšซ. So once the real user has started authenticating, an attacker gets blocked until that first session finishes. With this approach, you need a timeout so that nobody can use it to pull off a denial of service attack โฐ.

6. IANA Considerations ๐Ÿ“‹

Registering SecurID as a SASL mechanism means implementers get a well-defined way to add this auth mechanism to their product, which is so iconic ๐Ÿฆ‹. 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 โš–๏ธ

Okay, legal stuff but make it cute ๐ŸŽ€. RSA Security Inc. doesn't claim the general constructions described in this memo, though the underlying techniques might be covered. Among those underlying techniques, the SecurID technology is covered by a bunch of US patents (and foreign counterparts), specifically US patent no. 4,885,778, no. 5,097,505, no. 5,168,520, and 5,657,388 ๐Ÿ“œ.

SecurID is a registered trademark, and PASSCODE is a trademark, of RSA Security Inc. โ„ข๏ธ

8. References ๐Ÿ“š

[RFC1734] Myers, J., "POP3 AUTHentication command", RFC 1734, December 1994.

[RFC2026] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.

[RFC2060] Crispin, M., "Internet Message Access Protocol - Version 4rev1", RFC 2060, December 1996.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2222] Myers, J., "Simple Authentication and Security Layer", RFC 2222, October 1997.

[RFC2234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.

[RFC2244] Newman, C. and J. Myers, "ACAP -- Application Configuration Access Protocol", RFC 2244, November 1997.

[RFC2251] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory Access Protocol (v3)", RFC 2251, December 1997.

[RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.

[RFC2289] Haller, N., Metz, C., Nesser, P. and M. Straw, "A One-Time Password System", RFC 2289, February 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," International Telecommunication Union, 1997.

9. Acknowledgements ๐Ÿ’œ

The author gratefully thanks the various reviewers of this memo, especially the ones from John Myers. Their feedback significantly clarified and improved this specification ๐Ÿซถ.

10. Author's Address ๐Ÿ“ฎ

Magnus Nystrom
RSA Laboratories
Box 10704
121 29 Stockholm
Sweden

Phone: +46 8 725 0900
EMail: magnus@rsasecurity.com

Here's the legal fine print, copied faithfully because it matters ๐Ÿงพ.

Copyright (C) The Internet Society (2000). 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 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.

Acknowledgement ๐ŸŒธ

Funding for the RFC Editor function is currently provided by the Internet Society. Thank you for reading, bestie ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from