3 Network Working Group Robert Siemborski
4 INTERNET-DRAFT Carnegie Mellon University
5 Intended Category: Standards Track December, 2003
8 IMAP Extension for SASL Initial Client Response
9 <draft-siemborski-imap-sasl-initial-response-02.txt>
13 This document is an Internet-Draft and is in full conformance with
14 all provisions of Section 10 of RFC2026.
16 Internet-Drafts are working documents of the Internet Task Force
17 (IETF), its areas, and its working groups. Note that other groups
18 may also distribute working documents as Internet-Drafts.
20 Internet-Drafts are draft documents valid for a maximum of six
21 months and may be updated, replaced, or obsoleted by other documents
22 at any time. It is inappropriate to use Internet Drafts as
23 reference material or to cite them other than as "work in progress."
25 The list of current Internet-Drafts can be accessed at
26 http://www.ietf.org/ietf/1id-abstracts.txt
28 The list of Internet-Draft Shadow Directories can be accessed at
29 http://www.ietf.org/shadow.html.
31 Distribution of this memo is unlimited.
35 To date, the Internet Message Access Protocol (IMAP) has used a
36 Simple Authentication and Security Layer (SASL) profile which always
37 required at least one complete round trip for an authentication, as
38 it did not support an initial client response argument. This
39 additional round trip at the beginning of the session is
40 undesirable, especially when round trip costs are high.
42 This document defines an extension to IMAP which allows clients and
43 servers to avoid this round trip by allowing an initial client
44 response argument to the IMAP AUTHENTICATE command.
54 Siemborski Expires May, 2004 [Page 1]
60 IMAP Extension for SASL Initial Client Response December, 2003
66 1. How to Read This Document . . . . . . . . . . . . . . . . . . . . 3
67 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 3
68 3. Changes to the IMAP AUTHENTICATE Command . . . . . . . . . . . . 3
69 4. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
70 5. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . 5
71 6. Security Considerations . . . . . . . . . . . . . . . . . . . . . 5
72 7. Intellectual Property Rights . . . . . . . . . . . . . . . . . . 6
73 8. Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
74 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
75 10. Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
76 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 8
77 12. Changes since -01 . . . . . . . . . . . . . . . . . . . . . . . 8
78 13. Changes since -00 . . . . . . . . . . . . . . . . . . . . . . . 8
114 Siemborski Expires May, 2004 [Page 2]
120 IMAP Extension for SASL Initial Client Response December, 2003
123 1. How to Read This Document
125 The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD
126 NOT", "RECOMMENDED", and "MAY" in this document are to be
127 interpreted as defined in "Key words for use in RFCs to Indicate
128 Requirement Levels" [KEYWORDS]
130 In examples, "C:" and "S:" indicate lines sent by the client and
133 Formal syntax is defined using [ABNF] as modified by [IMAP4].
137 The [SASL] initial client response extension is present in any
138 [IMAP4] server implementation which returns "SASL-IR" as one of the
139 supported capabilities in its CAPABILITY response.
141 Servers which support this extension will accept an optional initial
142 client response with the AUTHENTICATE command for any [SASL]
143 mechanisms which support it.
145 3. IMAP Changes to the IMAP AUTHENTICATE Command
147 This extension adds an optional second argument to the AUTHENTICATE
148 command that is defined in Section 6.2.2 of [IMAP4]. If this second
149 argument is present, it represents the contents of the "initial
150 client response" defined in section 5.1 of [SASL].
152 As with any other client response, this initial client response MUST
153 be encoded as defined in Section 3 of [BASE64]. It also MUST be
154 transmitted outside of a quoted string or literal. To send a zero-
155 length initial response, the client MUST send a single pad character
156 ("="). This indicates that the response is present, but is a zero-
159 When decoding the [BASE64] data in the initial client response,
160 decoding errors MUST be treated as [IMAP4] would handle them in any
161 normal SASL client response. In particular, the server should check
162 for any characters not explicitly allowed by the BASE64 alphabet, as
163 well as any sequence of BASE64 characters that contains the pad
164 character ('=') anywhere other than the end of the string (e.g.
165 "=AAA" and "AAA=BBB" are not allowed).
167 Note: support and use of the initial client response is optional for
168 both clients and servers. Servers which implement this extension
169 MUST support clients which omit the initial client response, and
170 clients which implement this extension MUST NOT send an initial
174 Siemborski Expires May, 2004 [Page 3]
180 IMAP Extension for SASL Initial Client Response December, 2003
183 client response to servers which do not advertise the SASL-IR
184 capability. In such a situation, clients MUST fall back to an
185 [IMAP4] compatible mode.
187 If either the client or the server do not support the SASL-IR
188 capability, a mechanism which uses an initial client response is
189 negotiated using the challenge/response exchange described in
190 [IMAP4], with an initial zero-length server challenge.
195 The following is an example authentication using the [PLAIN] SASL
196 mechanism (under a [TLS] protection layer) and an initial client
199 ... client connects to server and negotiates a TLS protection layer ...
201 S: * CAPABILITY IMAP4 IMAP4rev1 SASL-IR AUTH=PLAIN
203 C: A01 AUTHENTICATE PLAIN dGVzdAB0ZXN0AHRlc3Q=
204 S: A01 OK Success (tls protection)
206 Note that even when a server supports this extension, the following
207 negotiation (which does not use the initial response) is still valid
208 and MUST be supported by the server:
210 ... client connects to server and negotiates a TLS protection layer ...
212 S: * CAPABILITY IMAP4 IMAP4rev1 SASL-IR AUTH=PLAIN
214 C: A01 AUTHENTICATE PLAIN
215 (note that there is a space following the "+" in the following line)
217 C: dGVzdAB0ZXN0AHRlc3Q=
218 S: A01 OK Success (tls protection)
234 Siemborski Expires May, 2004 [Page 4]
240 IMAP Extension for SASL Initial Client Response December, 2003
243 The following is an example authentication using the EXTERNAL [SASL]
244 mechanism (under a [TLS] protection layer) and an empty initial
247 ... client connects to server and negotiates a TLS protection layer ...
249 S: * CAPABILITY IMAP4 IMAP4rev1 SASL-IR AUTH=PLAIN AUTH=EXTERNAL
251 C: A01 AUTHENTICATE EXTERNAL =
252 S: A01 OK Success (tls protection)
254 This is in contrast with the handling of such a situation when an
255 initial response is omitted:
257 ... client connects to server and negotiates a TLS protection layer ...
259 S: * CAPABILITY IMAP4 IMAP4rev1 SASL-IR AUTH=PLAIN AUTH=EXTERNAL
261 C: A01 AUTHENTICATE EXTERNAL
262 (note that there is a space following the "+" in the following line)
265 S: A01 OK Success (tls protection)
270 The following syntax specification uses the Augmented Bakus-Naur
271 Form [ABNF] notation. Non-terminals referenced but not defined
272 below are as defined by [IMAP4].
274 capability =/ "SASL-IR"
276 authenticate = "AUTHENTICATE" SP auth-type [SP (base64 / "=")]
278 ;;redefine AUTHENTICATE command defined in [IMAP4]
281 6. Security Considerations
283 The extension defined in this document is subject to many of the
284 Security Considerations defined in [IMAP4] and [SASL].
286 Server implementations MUST treat the omission of an initial client
287 response from the AUTHENTICATE command as defined by [IMAP4] (as if
288 this extension did not exist).
290 Although [IMAP4] has no express line length limitations, some
294 Siemborski Expires May, 2004 [Page 5]
300 IMAP Extension for SASL Initial Client Response December, 2003
303 implementations choose to enforce them anyway. Such implementations
304 MUST be aware that the addition of the initial response parameter to
305 AUTHENTICATE may increase the maximum line length that IMAP parsers
306 may expect to support. Server implementations MUST be able to
307 receive the largest possible initial client response that their
308 supported mechanisms might receive.
310 7. Intellectual Property Rights
312 The IETF takes no position regarding the validity or scope of any
313 intellectual property or other rights that might be claimed to
314 pertain to the implementation or use of the technology described in
315 this document or the extent to which any license under such rights
316 might or might not be available; neither does it represent that it
317 has made any effort to identify any such rights. Information on the
318 IETF's procedures with respect to rights in standards-track and
319 standards-related documentation can be found in BCP-11. Copies of
320 claims of rights made available for publication and any assurances
321 of licenses to be made available, or the result of an attempt made
322 to obtain a general license or permission for the use of such
323 proprietary rights by implementors or users of this specification
324 can be obtained from the IETF Secretariat.
326 The IETF invites any interested party to bring to its attention any
327 copyrights, patents or patent applications, or other proprietary
328 rights which may cover technology that may be required to practice
329 this standard. Please address the information to the IETF Executive
334 Copyright (C) The Internet Society (2003). All Rights Reserved.
336 This document and translations of it may be copied and furnished to
337 others, and derivative works that comment on or otherwise explain it
338 or assist in its implementation may be prepared, copied, published
339 and distributed, in whole or in part, without restriction of any
340 kind, provided that the above copyright notice and this paragraph
341 are included on all such copies and derivative works. However, this
342 document itself may not be modified in any way, such as by removing
343 the copyright notice or references to the Internet Society or other
344 Internet organizations, except as needed for the purpose of
345 developing Internet standards in which case the procedures for
346 copyrights defined in the Internet Standards process must be
347 followed, or as required to translate it into languages other than
350 This document and the information contained herein is provided on an
354 Siemborski Expires May, 2004 [Page 6]
360 IMAP Extension for SASL Initial Client Response December, 2003
363 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
364 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
365 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
366 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
367 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
372 The following documents contain normative definitions or
373 specifications that are necessary for correct understanding of this
376 [ABNF] Crocker, D., "Augmented BNF for Syntax Specifications:
377 ABNF", RFC 2234, November, 1997.
379 [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data
380 Encodings", RFC 3548, July 2003.
382 [IMAP4] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
383 4rev1", RFC 3501, March 2003.
385 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
386 Requirement Levels", BCP 14, RFC 2119, March 1997.
388 [SASL] Melnikov, A., "Simple Authentication and Security Layer
389 (SASL)", draft-ietf-sasl-rfc2222bis-*.txt, a work in
392 The following references are for informational purposes only:
394 [PLAIN] Newman, C. "Using TLS with IMAP, POP3, and ACAP", RFC 2595,
397 [TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC
400 10. Author's Address:
403 Carnegie Mellon, Andrew Systems Group
414 Siemborski Expires May, 2004 [Page 7]
420 IMAP Extension for SASL Initial Client Response December, 2003
425 The author would like to acknowledge the contributions of Ken
426 Murchison and Mark Crispin, along with the rest of the IMAPEXT
427 Working Group for their assistance in reviewing this document.
429 Alexey Melnikov and Cyrus Daboo also had some early discussions
432 12. Changes since -01
434 (RFC Editor: Remove this section before publication) - Remove
435 implicit SHOULD behavior for clients.
437 - Indicate that the Section 3 BASE64 encoding should be used.
439 13. Changes since -00
441 (RFC Editor: Remove this section before publication) - Add missing
442 CAPABILITY OK responses in examples
444 - Change capability string to "SASL-IR"
446 - Fix a nit regarding an "=" in the initial response ABNF
448 - Clean up wording of BASE64 decoding requirements to be more in
451 - Add examples of an empty initial client response, and move
452 examples into their own section
454 - Update SASL reference to rfc2222bis
474 Siemborski Expires May, 2004 [Page 8]