7 Network Working Group A. Melnikov
9 Document: draft-ietf-sasl-rfc2222bis-01.txt June 2003
13 Simple Authentication and Security Layer (SASL)
17 This document is an Internet Draft and is in full conformance with
18 all provisions of Section 10 of RFC 2026.
20 Internet Drafts are working documents of the Internet Engineering
21 Task Force (IETF), its Areas, and its Working Groups. Note that
22 other groups may also distribute working documents as Internet
23 Drafts. Internet Drafts are draft documents valid for a maximum of
24 six months. Internet Drafts may be updated, replaced, or obsoleted
25 by other documents at any time. It is not appropriate to use
26 Internet Drafts as reference material or to cite them other than as
29 The list of current Internet-Drafts can be accessed at
30 http://www.ietf.org/ietf/1id-abstracts.txt
32 The list of Internet-Draft Shadow Directories can be accessed at
33 http://www.ietf.org/shadow.html.
35 A revised version of this draft document will be submitted to the RFC
36 editor as a Draft Standard for the Internet Community. Discussion
37 and suggestions for improvement are requested. Distribution of this
58 A. Melnikov FORMFEED[Page i]
64 Internet DRAFT SASL 27 June 2003
69 SASL provides a method for adding authentication support with an
70 optional security layer to connection-based protocols. It also
71 describes a structure for authentication mechanisms. The result is
72 an abstraction layer between protocols and authentication mechanisms
73 such that any SASL-compatible authentication mechanism can be used
74 with any SASL-compatible protocol.
76 This document describes how a SASL authentication mechanism is
77 structured, how a protocol adds support for SASL, defines the
78 protocol for carrying a security layer over a connection, and defines
79 the EXTERNAL SASL authentication mechanism.
81 2. Organization of this document
83 2.1. How to read this document
85 This document is written to serve two different audiences, protocol
86 designers using this specification to support authentication in their
87 protocol, and implementors of clients or servers for those protocols
88 using this specification.
90 The sections "Overview", "Authentication Mechanisms", "Protocol
91 Profile Requirements", "Specific Issues", and "Security
92 Considerations" cover issues that protocol designers need to
93 understand and address in profiling this specification for use in a
96 Implementors of a protocol using this specification need the
97 protocol-specific profiling information in addition to the
98 information in this document.
100 2.2. Conventions used in this document
102 In examples, "C:" and "S:" indicate lines sent by the client and
105 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
106 in this document are to be interpreted as defined in "Key words for
107 use in RFCs to Indicate Requirement Levels" [KEYWORDS].
111 The Simple Authentication and Security Layer (SASL) is a method for
112 adding authentication support to connection-based protocols.
114 The SASL specification has three layers, as indicated in the diagram
118 A. Melnikov FORMFEED[Page 2]
124 Internet DRAFT SASL 27 June 2003
127 below. At the top, a protocol definition using SASL specifies a
128 profile, including a command for identifying and authenticating a
129 user to a server and for optionally negotiating a security layer for
130 subsequent protocol interactions. At the bottom, a SASL mechanism
131 definition specifies an authentication mechanism. The SASL
132 framework, specified by this document, constrains the behavior of
133 protocol profiles and mechanisms, separating protocol from mechanism
134 and defining how they interact.
136 SMTP Protocol LDAP Protocol Etc
137 Profile Profile . . .
143 EXTERNAL DIGEST-MD5 Etc
144 SASL mechanism SASL mechanism . . .
146 This separation between the definition of protocols and the
147 definition of authentication mechanisms is crucial. It permits an
148 authentication mechanism to be defined once, making it usable by any
149 SASL protocol profiles. In many implementations, the same SASL
150 mechanism code is used for multiple protocols.
152 4. Authentication mechanisms
154 SASL mechanisms are named by strings, from 1 to 20 characters in
155 length, consisting of upper-case letters, digits, hyphens, and/or
156 underscores. SASL mechanism names must be registered with the IANA.
157 IETF Standards Track documents may override this registration
158 requirement by reserving a portion of the SASL mechanism namespace
159 for their own use; the GSSAPI mechanism specification [SASL-GSSAPI]
160 does this. Procedures for registering new SASL mechanisms are given
161 in the section "Registration procedures".
163 The "sasl-mech" rule below defines the syntax of a SASL mechanism
164 name. This uses the augmented Backus-Naur Form (BNF) notation as
165 specified in [ABNF] and the ABNF core rules as specified in Appendix
166 A of the ABNF specification [ABNF].
168 sasl-mech = 1*20mech-char
169 mech-char = %x41-5A / DIGIT / "-" / "_"
170 ; mech names restricted to uppercase letters,
171 ; digits, "-" and "_"
178 A. Melnikov FORMFEED[Page 3]
184 Internet DRAFT SASL 27 June 2003
187 4.1. Authentication protocol exchange
189 A SASL mechanism is responsible for conducting an authentication
190 protocol exchange. This consists of a series of server challenges
191 and client responses, the contents of which are specific to and
192 defined by the mechanism. To the protocol, the challenges and
193 responses are opaque binary tokens of arbitrary length. The
194 protocol's profile then specifies how these binary tokens are then
195 encoded for transfer over the connection.
197 After receiving an authentication command or any client response, a
198 server mechanism may issue a challenge, indicate failure, or indicate
199 completion. The server mechanism MAY return additional data with a
200 completion indication. The protocol's profile specifies how each of
201 these is then represented over the connection.
203 After receiving a challenge, a client mechanism may issue a response
204 or abort the exchange. The protocol's profile specifies how each of
205 these is then represented over the connection.
207 During the authentication protocol exchange, the mechanism performs
208 authentication, transmits an authorization identity (frequently known
209 as a userid) from the client to server, and negotiates the use of a
210 mechanism-specific security layer. If the use of a security layer is
211 agreed upon, then the mechanism must also define or negotiate the
212 maximum security layer buffer size that each side is able to receive.
214 4.2. Authorization identities and proxy authentication
216 An authorization identity is a string of zero or more ISO 10646
217 [ISO-10646] coded characters. The NUL (U+0000) character is not
218 permitted in authorization identities. The meaning of an
219 authorization identity of the empty string (zero lenght) is defined
220 below in this section. The authorization identity is used by the
221 server as the primary identity for making access policy decisions.
223 The character encoding scheme used for transmitting an authorization
224 identity over protocol is specified in each authentication mechanism
225 (with the authentication mechanism's blob being further
226 restricted/encoded by the protocol profile). Per IETF character set
227 policy [CHARSET-POLICY], authentication mechanisms SHOULD encode
228 these and other strings in UTF-8 [UTF-8]. While some legacy
229 mechanisms are incapable of transmitting an authoriation identity
230 other than the empty string, newly defined mechanisms are expected to
231 be capable of carrying the entire Unicode repertoire (with the
232 exception of the NUL character). An authorization identity of the
233 empty string and and an absent authorization identity MUST be treated
234 as equivalent. However, mechanisms SHOULD NOT allow both (i.e. if
238 A. Melnikov FORMFEED[Page 4]
244 Internet DRAFT SASL 27 June 2003
247 authorization identity is transferred, it SHOULD NOT be an empty
250 The identity derived from the client's authentication credentials is
251 known as the "authentication identity". With any mechanism,
252 transmitting an authorization identity of the empty string directs
253 the server to derive an authorization identity from the client's
254 authentication identity.
256 If the authorization identity transmitted during the authentication
257 protocol exchange is not the empty string, this is typically referred
258 to as "proxy authentication". This feature permits agents such as
259 proxy servers to authenticate using their own credentials, yet
260 request the access privileges of the identity for which they are
263 The server makes an implementation defined policy decision as to
264 whether the authentication identity is permitted to have the access
265 privileges of the authorization identity and whether the
266 authorization identity is permitted to receive service. If it is
267 not, the server indicates failure of the authentication protocol
270 As a client might not have the same information as the server,
271 clients SHOULD NOT themselves try to derive authorization identities
272 from authentication identities when clients could instead transmit an
273 authorization identity of the empty string.
275 The server SHOULD verify the correctness of a received authorization
276 identity. Profiles whose authorization identities are simple user
277 names (e.g. IMAP [RFC 3501]) are encouraged to employ [SASLPrep]
278 profile [SASLPrep] of the "stringprep" algorithm [StringPrep] to
279 prepare these names for matching. If the preparation of the
280 authorization identity fails or results in an empty string, the
281 server MUST fail the authentication exchange. The only exception to
282 this rule is when the received authorization identity is already the
288 If use of a security layer is negotiated by the authentication
289 protocol exchange, the security layer is applied to all subsequent
290 data sent over the connection. The security layer takes effect
291 immediately following the last response of the authentication
292 exchange for data sent by the client and the completion indication
293 for data sent by the server.
298 A. Melnikov FORMFEED[Page 5]
304 Internet DRAFT SASL 27 June 2003
307 Once the security layer is in effect, the protocol stream is
308 processed by the security layer into buffers of security encoded
309 data. Each buffer of security encoded data is transferred over the
310 connection as a stream of octets prepended with a four octet field in
311 network byte order that represents the length of the following
312 buffer. The length of the security encoded data buffer MUST be no
313 larger than the maximum size that was either defined in the mechanism
314 specification or negotiated by the other side during the
315 authentication protocol exchange. Upon the receipt of a data buffer
316 which is larger than the defined/negotiated maximal buffer size, the
317 receiver SHOULD close the connection. This might be a sign of an
318 attack or a buggy implementation.
320 4.4. Character string issues
322 Per IETF character set policy [CHARSET-POLICY], authentication
323 mechanisms SHOULD encode character strings in UTF-8 [UTF-8]. In
324 order to avoid noninteroperability due to differing normalizations,
325 when a mechanism specifies that a string authentication identity or
326 password used as input to a cryptographic function (or used for
327 comparison) it SHOULD specify that the string first be prepared using
328 the "SASLPrep" profile [SASLPrep], of the "stringprep" algorithm
329 [StringPrep]. This should be done by both the client (upon getting
330 user input or retrieving a value from configuration) and by the
331 server (upon receiving the value from the client). If preparation
332 fails or results in an empty string, the client/server SHALL fail the
333 authentication exchange.
336 5. Protocol profile requirements
338 In order to use this specification, a protocol definition MUST supply
339 the following information:
341 A service name, to be selected from the IANA registry of "service"
342 elements for the GSSAPI host-based service name form. [GSSAPI] This
343 service name is made available to the authentication mechanism.
345 The registry is available at the URL
346 "http://www.iana.org/assignments/gssapi-service-names" A definition
347 of the command to initiate the authentication protocol exchange.
348 This command must have as a parameter the name of the mechanism being
349 selected by the client.
351 The command SHOULD have an optional parameter giving an initial
352 response. This optional parameter allows the client to avoid a round
353 trip when using a mechanism which is defined to have the client send
354 data first. When this initial response is sent by the client and the
358 A. Melnikov FORMFEED[Page 6]
364 Internet DRAFT SASL 27 June 2003
367 selected mechanism is defined to have the server start with an
368 initial challenge, the command fails. See section 6.1 of this
369 document for further information. A definition of the method by
370 which the authentication protocol exchange is carried out, including
371 how the challenges and responses are encoded, how the server
372 indicates completion or failure of the exchange, how the client
373 aborts an exchange, and how the exchange method interacts with any
374 line length limits in the protocol.
376 The command SHOULD have a method for the server to include an
377 optional challenge with a success notification. This allows the
378 server to avoid a round trip when using a mechanism which is defined
379 to have the server send additional data along with the indication of
380 successful completion. See section 6.2 of this document for further
383 Identification of the octet where any negotiated security layer
384 starts to take effect, in both directions.
386 If both TLS and SASL security layer are allowed to be negotiated by
387 the protocol, the protocol profile MUST define in which order they
388 are applied to a cleartext data sent over the connection.
390 In addition, a protocol profile SHOULD specify a mechanism through
391 which a client may obtain the names of the SASL mechanisms available
392 to it. This is typically done through the protocol's extensions or
393 capabilities mechanism.
395 A protocol profile MAY further refine the definition of an
396 authorization identity by adding additional syntactic restrictions
397 and protocol-specific semantics. A protocol profile MUST specify the
398 form of the authorization identity (as it is protocol specific, as
399 opposed to the authentication identity which is mechanism specific)
400 and how authorization identities are to be compared. Profiles whose
401 authorization identities are simple user names (e.g. IMAP [RFC 3501])
402 are encouraged to employ [SASLPrep] profile [SASLPrep] of the
403 "stringprep" algorithm [StringPrep] to prepare these names for
406 <<State if the protocol profile supports realms?>>
408 A protocol profile SHOULD NOT attempt to amend the definition of
409 mechanisms or make mechanism-specific encodings. This breaks the
410 separation between protocol and mechanism that is fundamental to the
418 A. Melnikov FORMFEED[Page 7]
424 Internet DRAFT SASL 27 June 2003
429 6.1. Client sends data first
431 Some mechanisms specify that the first data sent in the
432 authentication protocol exchange is from the client to the server.
434 If a protocol's profile permits the command which initiates an
435 authentication protocol exchange to contain an initial client
436 response, this parameter SHOULD be used with such mechanisms.
438 If the initial client response parameter is not given, or if a
439 protocol's profile does not permit the command which initiates an
440 authentication protocol exchange to contain an initial client
441 response, then the server issues a challenge with no data. The
442 client's response to this challenge is then used as the initial
443 client response. (The server then proceeds to send the next
444 challenge, indicates completion, or indicates failure.)
446 6.2. Server returns success with additional data
448 Some mechanisms may specify that additional data be sent to the
449 client along with an indication of successful completion of the
450 exchange. This data would, for example, authenticate the server to
453 If a protocol's profile does not permit this additional data to be
454 returned with a success indication, then the server issues the data
455 as a server challenge, without an indication of successful
456 completion. The client then responds with no data. After receiving
457 this empty response, the server then indicates successful completion
458 (with no additional data).
460 Client implementors should be aware of an additional failure case
461 that might occur when the profile supports sending the additional
462 data with success. Imagine that an active attacker is trying to
463 impersonate the server and sends a faked data, that should be used to
464 authenticate the server to the client, with success. (A similar
465 situation can happen when the server has a bug and produces the wrong
466 response). After checking the data the client will think that the
467 authentication exchange has failed, however the server will think
468 that the authentication exchange has completed successfully. At this
469 point the client can't abort the authentication exchange, it SHOULD
470 close the connection instead. However if the profile didn't support
471 sending of additional data with success, the client could have
472 aborted the exchange.
474 <<Should I add a flow diagram here or is it clear from the
478 A. Melnikov FORMFEED[Page 8]
484 Internet DRAFT SASL 27 June 2003
489 6.3. Multiple authentications
491 Unless otherwise stated by the protocol's profile, only one
492 successful SASL negotiation may occur in a protocol session. In this
493 case, once an authentication protocol exchange has successfully
494 completed, further attempts to initiate an authentication protocol
497 In the case that a profile explicitly permits multiple successful
498 SASL negotiations to occur, then in no case may multiple security
499 layers be simultaneously in effect. If a security layer is in effect
500 and a subsequent SASL negotiation selects a second security layer,
501 then the second security layer replaces the first. If a security
502 layer is in effect and a subsequent SASL negotiation selects no
503 security layer, the original security layer must be removed. The next
504 paragraph explains why this is important.
506 A security layer that remains in effect when a client, which already
507 has authenticated and established the security layer with "Realm A",
508 authenticates to "Realm B", without negotiating a new security layer,
509 enables "Realm B" to make guesses about previously observed
510 ciphertext using the web server's SASL engine as an oracle. "Realm
511 B" may observe how known cleartext is encrypted.
513 <<Is this too specific to HTTP SASL profile? Probably not, the same
514 can happen when there is a proxy/frontend talking to different
515 servers/backends. Should be reworked not to reference "realm"?>>
538 A. Melnikov FORMFEED[Page 9]
544 Internet DRAFT SASL 27 June 2003
547 +---------+ +---------+
549 | Realm B | | Realm A |
551 +---------+ +---------+
554 Traffic from | : | Encryption| | Traffic from A
555 B to client +-------->| end point |<-------+ to client
563 : | | Encryption tunnel, e.g. SASL or SSL,
564 : | | between the server
565 (1) Recording +---------:| | and a single client only.
566 encrypted | | Separate tunnels to different
567 traffic between | | clients.
568 Realm A and client +---+
571 +-----------> Traffic to clients
573 7. The EXTERNAL mechanism
575 The mechanism name associated with external authentication is
578 The client sends an initial response with the UTF-8 encoding of the
579 authorization identity. The form of the authorization identity is
580 further restricted by the application-level protocol's SASL profile.
582 The server uses information, external to SASL, to determine whether
583 the client is authorized to authenticate as the authorization
584 identity. If the client is so authorized, the server indicates
585 successful completion of the authentication exchange; otherwise the
586 server indicates failure.
588 The system providing this external information may be, for example,
591 If the client sends the empty string as the authorization identity
592 (thus requesting the authorization identity be derived from the
593 client's authentication credentials), the authorization identity is
594 to be derived from authentication credentials which exist in the
598 A. Melnikov FORMFEED[Page 10]
604 Internet DRAFT SASL 27 June 2003
607 system which is providing the external authentication.
611 The following syntax specification uses the augmented Backus-Naur
612 Form (BNF) notation as specified in [ABNF]. This uses the ABNF core
613 rules as specified in Appendix A of the ABNF specification [ABNF].
614 Non-terminals referenced but not defined below are as defined by
617 The "initial-response" rule below defines the initial response sent
618 from client to server.
620 initial-response = *( UTF8-char-no-null )
622 UTF8-char-no-null = UTF8-1-no-null / UTF8-2 / UTF8-3 / UTF8-4
624 UTF8-1-no-null = %x01-7F
629 The following is an example of an EXTERNAL authentication in the SMTP
630 protocol [SMTP-AUTH]. In this example, the client is proxy
631 authenticating, sending the authorization id "fred". The server has
632 determined the client's identity through IPsec and has a security
633 policy that permits that identity to proxy authenticate as any other
636 To the protocol profile, the four octet sequence "fred" is an opaque
637 binary blob. The SASL protocol profile for SMTP specifies that
638 server challenges and client responses are encoded in BASE64; the
639 BASE64 encoding of "fred" is "ZnJlZA==".
641 S: 220 smtp.example.com ESMTP server ready
642 C: EHLO jgm.example.com
643 S: 250-smtp.example.com
644 S: 250 AUTH DIGEST-MD5 EXTERNAL
645 C: AUTH EXTERNAL ZnJlZA==
646 S: 235 Authentication successful.
648 8. IANA Considerations
650 Registration of a SASL mechanism is done by filling in the template
651 in section 8.4 and sending it in to iana@iana.org. IANA has the
652 right to reject obviously bogus registrations, but will perform no
653 review of claims made in the registration form.
658 A. Melnikov FORMFEED[Page 11]
664 Internet DRAFT SASL 27 June 2003
667 There is no naming convention for SASL mechanisms; any name that
668 conforms to the syntax of a SASL mechanism name can be registered.
669 An IETF Standards Track document may reserve a portion of the SASL
670 mechanism namespace for its own use, amending the registration rules
671 for that portion of the namespace.
673 While the registration procedures do not require it, authors of SASL
674 mechanisms are encouraged to seek community review and comment
675 whenever that is feasible. Authors may seek community review by
676 posting a specification of their proposed mechanism as an internet-
677 draft. SASL mechanisms intended for widespread use should be
678 standardized through the normal IETF process, when appropriate.
680 8.1. Comments on SASL mechanism registrations
682 Comments on registered SASL mechanisms should first be sent to the
683 "owner" of the mechanism. Submitters of comments may, after a
684 reasonable attempt to contact the owner, request IANA to attach their
685 comment to the SASL mechanism registration itself. If IANA approves
686 of this the comment will be made accessible in conjunction with the
687 SASL mechanism registration itself.
689 8.2. Location of registered SASL mechanism list
691 SASL mechanism registrations are available at the URL
692 "http://www.iana.org/assignments/sasl-mechanisms" The SASL mechanism
693 description and other supporting material may also be published as an
694 Informational RFC by sending it to "rfc-editor@rfc-editor.org"
695 (please follow the instructions to RFC authors [RFC-INSTRUCTIONS]).
699 Once a SASL mechanism registration has been published by IANA, the
700 author may request a change to its definition. The change request
701 follows the same procedure as the registration request.
703 The owner of a SASL mechanism may pass responsibility for the SASL
704 mechanism to another person or agency by informing IANA; this can be
705 done without discussion or review.
707 The IESG may reassign responsibility for a SASL mechanism. The most
708 common case of this will be to enable changes to be made to
709 mechanisms where the author of the registration has died, moved out
710 of contact or is otherwise unable to make changes that are important
713 SASL mechanism registrations may not be deleted; mechanisms which are
714 no longer believed appropriate for use can be declared OBSOLETE by a
718 A. Melnikov FORMFEED[Page 12]
724 Internet DRAFT SASL 27 June 2003
727 change to their "intended use" field; such SASL mechanisms will be
728 clearly marked in the lists published by IANA.
730 The IESG is considered to be the owner of all SASL mechanisms which
731 are on the IETF standards track.
733 8.4. Registration template
736 Subject: Registration of SASL mechanism X
740 Security considerations:
742 Published specification (optional, recommended):
744 Person & email address to contact for further information:
748 (One of COMMON, LIMITED USE or OBSOLETE)
750 Owner/Change controller:
752 (Any other information that the author deems interesting may be
753 added below this line.)
756 8.5. The EXTERNAL mechanism registration
758 It is requested that the SASL Mechanism registry [IANA-SASL] entry
759 for the EXTERNAL mechanism be updated to reflect that this document
760 now provides its technical specification.
762 To: iana@iana.org Subject: Updated Registration of SASL mechanism
765 SASL mechanism name: EXTERNAL
767 Security considerations: See RFC XXXX, section 10.
769 Published specification (optional, recommended): RFC XXXX
771 Person & email address to contact for further information:
772 Alexey Melnikov <mel@isode.com>
774 Intended usage: COMMON
778 A. Melnikov FORMFEED[Page 13]
784 Internet DRAFT SASL 27 June 2003
787 Owner/Change controller: IESG <iesg@ietf.org>
789 Note: Updates existing entry for EXTERNAL
793 9.1. Normative References
795 [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
796 ABNF", RFC 2234, November 1997
798 [CHARSET-POLICY] Alvestrand, "IETF Policy on Character Sets and
799 Languages", RFC 2277, January 1998
801 [GSSAPI] Linn, "Generic Security Service Application Program
802 Interface, Version 2, Update 1", RFC 2743, January 2000
804 [ISO-10646] "Universal Multiple-Octet Coded Character Set (UCS) -
805 Architecture and Basic Multilingual Plane", ISO/IEC 10646-1 : 1993.
807 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
808 Requirement Levels", RFC 2119, March 1997
810 [Stringprep] P. Hoffman, M. Blanchet, "Preparation of
811 Internationalized Strings ("stringprep")", RFC 3454, December 2002.
813 [SASLPrep] Zeilenga, K., "SASLprep: Stringprep profile for user names
814 and passwords", Work in progress, draft-ietf-sasl-saslprep-XX.txt.
816 [UTF-8] Yergeau, "UTF-8, a transformation format of ISO 10646", work
817 in progress (draft-yergeau-rfc2279bis-XX) that replaces RFC 2279,
820 9.2. Informative References
822 <<Update the reference below>> [SASL-GSSAPI] Myers, "SASL GSSAPI
823 mechanisms", draft-ietf-cat-sasl-gssapi-XX.txt, September 2000
825 [SASL-OTP] Newman, "The One-Time-Password SASL Mechanism", RFC 2444,
828 [SMTP-AUTH] Myers, "SMTP Service Extension for Authentication", RFC
831 [RFC-INSTRUCTIONS] Postel, Reynolds, "Instructions to RFC Authors",
832 RFC 2223, October 1997
834 [IANA-SASL] IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL)
838 A. Melnikov FORMFEED[Page 14]
844 Internet DRAFT SASL 27 June 2003
847 MECHANISMS", http://www.iana.org/assignments/sasl-mechanisms.
849 10. Security considerations
851 Security issues are discussed throughout this memo.
853 The mechanisms that support integrity protection are designed such
854 that the negotiation of the security layer and authorization identity
855 is integrity protected. When the client selects a security layer
856 with at least integrity protection, this protects against an active
857 attacker hijacking the connection and modifying the authentication
858 exchange to negotiate a plaintext connection.
860 When a server or client supports multiple authentication mechanisms,
861 each of which has a different security strength, it is possible for
862 an active attacker to cause a party to use the least secure mechanism
863 supported. To protect against this sort of attack, a client or
864 server which supports mechanisms of different strengths should have a
865 configurable minimum strength that it will use. It is not sufficient
866 for this minimum strength check to only be on the server, since an
867 active attacker can change which mechanisms the client sees as being
868 supported, causing the client to send authentication credentials for
869 its weakest supported mechanism.
871 The client's selection of a SASL mechanism is done in the clear and
872 may be modified by an active attacker. It is important for any new
873 SASL mechanisms to be designed such that an active attacker cannot
874 obtain an authentication with weaker security properties by modifying
875 the SASL mechanism name and/or the challenges and responses.
877 Any protocol interactions prior to authentication are performed in
878 the clear and may be modified by an active attacker. In the case
879 where a client selects integrity protection, it is important that any
880 security-sensitive protocol negotiations be performed after
881 authentication is complete. Protocols should be designed such that
882 negotiations performed prior to authentication should be either
883 ignored or revalidated once authentication is complete.
885 When use of a security layer is negotiated by the authentication
886 protocol exchange, the receiver should handle gracefully any security
887 encoded data buffer larger than the defined/negotiated maximal size.
888 In particular, it must not blindly allocate the ammount of memory
889 specified in the buffer size field, as this might cause the "out of
890 memory" condition. If the receiver detects a large block, it SHOULD
891 close the connection.
893 "stringprep" and Unicode security considerations apply to
894 authentication identities, authorization identities and passwords.
898 A. Melnikov FORMFEED[Page 15]
904 Internet DRAFT SASL 27 June 2003
907 The EXTERNAL mechanism provides no security protection; it is
908 vulnerable to spoofing by either client or server, active attack, and
909 eavesdropping. It should only be used when external security
910 mechanisms are present and have sufficient strength.
921 This document is a revision of RFC 2222 written by John G. Myers
922 <jgmyers@netscape.com>. He also wrote the major part of this
925 Thank you to Magnus Nystrom for the ASCII picture used in section
928 <<Other people reviewed this document too. Mention some names?>>
931 13. Full Copyright Statement
933 Copyright (C) The Internet Society (2003). All Rights Reserved.
935 This document and translations of it may be copied and furnished to
936 others, and derivative works that comment on or otherwise explain it
937 or assist in its implementation may be prepared, copied, published
938 and distributed, in whole or in part, without restriction of any
939 kind, provided that the above copyright notice and this paragraph are
940 included on all such copies and derivative works. However, this
941 document itself may not be modified in any way, such as by removing
942 the copyright notice or references to the Internet Society or other
943 Internet organizations, except as needed for the purpose of
944 developing Internet standards in which case the procedures for
945 copyrights defined in the Internet Standards process must be
946 followed, or as required to translate it into languages other than
949 The limited permissions granted above are perpetual and will not be
950 revoked by the Internet Society or its successors or assigns.
952 This document and the information contained herein is provided on an
953 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
954 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
958 A. Melnikov FORMFEED[Page 16]
964 Internet DRAFT SASL 27 June 2003
967 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
968 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
969 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
973 Funding for the RFC Editor function is currently provided by the
976 Appendix A. Relation of SASL to transport security
978 Questions have been raised about the relationship between SASL and
979 various services (such as IPsec and TLS) which provide a secured
982 Two of the key features of SASL are:
984 The separation of the authorization identity from the identity in
985 the client's credentials. This permits agents such as proxy
986 servers to authenticate using their own credentials, yet request
987 the access privileges of the identity for which they are proxying.
989 Upon successful completion of an authentication exchange, the
990 server knows the authorization identity the client wishes to use.
991 This allows servers to move to a "user is authenticated" state in
994 These features are extremely important to some application protocols,
995 yet Transport Security services do not always provide them. To
996 define SASL mechanisms based on these services would be a very messy
997 task, as the framing of these services would be redundant with the
998 framing of SASL and some method of providing these important SASL
999 features would have to be devised.
1001 Sometimes it is desired to enable within an existing connection the
1002 use of a security service which does not fit the SASL model. (TLS is
1003 an example of such a service.) This can be done by adding a command,
1004 for example "STARTTLS", to the protocol. Such a command is outside
1005 the scope of SASL, and should be different from the command which
1006 starts a SASL authentication protocol exchange.
1008 In certain situations, it is reasonable to use SASL underneath one of
1009 these Transport Security services. The transport service would
1010 secure the connection, either service would authenticate the client,
1011 and SASL would negotiate the authorization identity. The SASL
1012 negotiation would be what moves the protocol from "unauthenticated"
1013 to "authenticated" state. The "EXTERNAL" SASL mechanism is
1014 explicitly intended to handle the case where the transport service
1018 A. Melnikov FORMFEED[Page 17]
1024 Internet DRAFT SASL 27 June 2003
1027 secures the connection and authenticates the client and SASL
1028 negotiates the authorization identity.
1030 When using SASL underneath a sufficiently strong Transport Security
1031 service, a SASL security layer would most likely be redundant. The
1032 client and server would thus probably want to negotiate off the use
1033 of a SASL security layer.
1035 Appendix B. IANA considerations
1037 The IANA is directed to modify the SASL mechanisms registry as
1040 Change the "Intended usage" of the KERBEROS_V4 and SKEY mechanism
1041 registrations to OBSOLETE. Change the "Published specification"
1042 of the EXTERNAL mechanism to this document.
1044 Appendix C. Changes since RFC 2222
1046 The GSSAPI mechanism was removed. It is now specified in a separate
1047 document [SASL-GSSAPI].
1049 The "KERBEROS_V4" mechanism defined in RFC 2222 is obsolete and has
1052 The "SKEY" mechanism described in RFC 2222 is obsolete and has been
1053 removed. It has been replaced by the OTP mechanism [SASL-OTP].
1055 The overview has been substantially reorganized and clarified.
1057 Clarified the definition and semantics of the authorization identity.
1059 Prohibited the NULL character in authorization identities.
1061 Added a section on character string issues.
1063 The word "must" in the first paragraph of the "Protocol profile
1064 requirements" section was changed to "MUST".
1066 Specified that protocol profiles SHOULD provide a way for clients to
1067 discover available SASL mechanisms.
1069 Made the requirement that protocol profiles specify the semantics of
1070 the authorization identity optional to the protocol profile.
1071 Clarified that such a specification is a refinement of the definition
1072 in the base SASL spec.
1074 Added a requirement discouraging protocol profiles from breaking the
1078 A. Melnikov FORMFEED[Page 18]
1084 Internet DRAFT SASL 27 June 2003
1087 separation between protocol and mechanism.
1089 Mentioned that standards track documents may carve out their own
1090 portions of the SASL mechanism namespace.
1092 Specified that the authorization identity in the EXTERNAL mechanism
1093 is encoded in UTF-8.
1095 Added a statement that a protocol profile SHOULD allow challenge data
1096 to be sent with a success indication.
1098 Added a security consideration for the EXTERNAL mechansim.
1100 Clarified sections concerning success with additional data.
1102 Updated IANA related URLs.
1104 Updated references and split them into Informative and Normative.
1106 Added text to the Security Considerations section regarding handling
1107 of extremely large SASL blocks.
1109 Replaced UTF-8 ABNF with the reference to the UTF-8 document.
1111 Added text about SASLPrep for authentication identities and
1114 Added paragraph about verifying authorization identities.
1116 This document requires to drop a security layer on reauthentication
1117 when no security layer is negotiated. This differs from RFC 2222,
1118 which required to keep the last security layer in this case.
1120 Added a protocol profile requirement to specify interaction between
1121 SASL and TLS security layers.
1138 A. Melnikov FORMFEED[Page 19]
1144 Internet DRAFT SASL 27 June 2003
1149 Status of this Memo .......................................... i
1150 1. Abstract ............................................... 2
1151 2. Organization of this document .......................... 2
1152 2.1. How to read this document .............................. 2
1153 2.2. Conventions used in this document ...................... 2
1154 3. Overview ............................................... 2
1155 4. Authentication mechanisms .............................. 3
1156 4.1. Authentication protocol exchange ....................... 4
1157 4.2. Authorization identities and proxy authentication ...... 4
1158 4.3. Security layers ........................................ 5
1159 4.4. Character string issues ................................ 6
1160 5. Protocol profile requirements .......................... 6
1161 6. Specific issues ........................................ 8
1162 6.1. Client sends data first ................................ 8
1163 6.2. Server returns success with additional data ............ 8
1164 6.3. Multiple authentications ............................... 9
1165 7. The EXTERNAL mechanism ................................ 10
1166 7.1. Formal syntax ......................................... 11
1167 7.2. Example ............................................... 11
1168 8. IANA Considerations ................................... 11
1169 8.1. Comments on SASL mechanism registrations .............. 12
1170 8.2. Location of registered SASL mechanism list ............ 12
1171 8.3. Change control ........................................ 12
1172 8.4. Registration template ................................. 13
1173 8.5. The EXTERNAL mechanism registration ................... 13
1174 9. References ............................................ 14
1175 9.1. Normative References .................................. 14
1176 9.2. Informative References ................................ 14
1177 10. Security considerations ............................... 15
1178 11. Editor's Address ...................................... 16
1179 12. Acknowledgments ....................................... 16
1180 13. Full Copyright Statement .............................. 16
1181 Appendix A. Relation of SASL to transport security .......... 17
1182 Appendix B. IANA considerations ............................. 18
1183 Appendix C. Changes since RFC 2222 .......................... 18
1200 A. Melnikov FORMFEED[Page ii]