Commit b050108a b050108a063312172e01e777bc04d6e2ae94a1eb by Sam Roberts

Added two new RFCs relevant to IMAP AUTH extension mechanisms.

1 parent ce42d4a0
...@@ -129,7 +129,7 @@ For more information on, ...@@ -129,7 +129,7 @@ For more information on,
129 129
130 @itemize @bullet 130 @itemize @bullet
131 @item 131 @item
132 on SMTP 132 SMTP
133 133
134 @itemize @minus 134 @itemize @minus
135 @item 135 @item
...@@ -140,7 +140,7 @@ on SMTP ...@@ -140,7 +140,7 @@ on SMTP
140 @end itemize 140 @end itemize
141 141
142 @item 142 @item
143 on POP3 143 POP3
144 144
145 @itemize @minus 145 @itemize @minus
146 @item 146 @item
...@@ -161,7 +161,7 @@ Protocol (POP3)} ...@@ -161,7 +161,7 @@ Protocol (POP3)}
161 @end itemize 161 @end itemize
162 162
163 @item 163 @item
164 on IMAP4 164 IMAP4
165 165
166 @itemize @minus 166 @itemize @minus
167 @item 167 @item
...@@ -181,10 +181,17 @@ on IMAP4 ...@@ -181,10 +181,17 @@ on IMAP4
181 181
182 @item 182 @item
183 @cite{RFC 2192: IMAP URL Scheme} 183 @cite{RFC 2192: IMAP URL Scheme}
184
185 @item
186 @cite{RFC 1731: IMAP4 Authentication Mechanisms}
187
188 @item
189 @cite{RFC 2245: Anonymous SASL Mechanism}
190
184 @end itemize 191 @end itemize
185 192
186 @item 193 @item
187 on message formats 194 message formats
188 195
189 @itemize @minus 196 @itemize @minus
190 @item 197 @item
...@@ -211,7 +218,7 @@ Conformance Criteria and Examples} ...@@ -211,7 +218,7 @@ Conformance Criteria and Examples}
211 @end itemize 218 @end itemize
212 219
213 @item 220 @item
214 on miscellaneous related topics 221 miscellaneous related topics
215 222
216 @itemize @minus 223 @itemize @minus
217 @item 224 @item
......
1
2
3
4
5
6
7 Network Working Group J. Myers
8 Request for Comments: 1731 Carnegie Mellon
9 Category: Standards Track December 1994
10
11
12 IMAP4 Authentication Mechanisms
13
14 Status of this Memo
15
16 This document specifies an Internet standards track protocol for the
17 Internet community, and requests discussion and suggestions for
18 improvements. Please refer to the current edition of the "Internet
19 Official Protocol Standards" (STD 1) for the standardization state
20 and status of this protocol. Distribution of this memo is unlimited.
21
22
23 1. Introduction
24
25 The Internet Message Access Protocol, Version 4 [IMAP4] contains the
26 AUTHENTICATE command, for identifying and authenticating a user to an
27 IMAP4 server and for optionally negotiating a protection mechanism
28 for subsequent protocol interactions. This document describes
29 several authentication mechanisms for use by the IMAP4 AUTHENTICATE
30 command.
31
32
33 2. Kerberos version 4 authentication mechanism
34
35 The authentication type associated with Kerberos version 4 is
36 "KERBEROS_V4".
37
38 The data encoded in the first ready response contains a random 32-bit
39 number in network byte order. The client should respond with a
40 Kerberos ticket and an authenticator for the principal
41 "imap.hostname@realm", where "hostname" is the first component of the
42 host name of the server with all letters in lower case and where
43 "realm" is the Kerberos realm of the server. The encrypted checksum
44 field included within the Kerberos authenticator should contain the
45 server provided 32-bit number in network byte order.
46
47 Upon decrypting and verifying the ticket and authenticator, the
48 server should verify that the contained checksum field equals the
49 original server provided random 32-bit number. Should the
50 verification be successful, the server must add one to the checksum
51 and construct 8 octets of data, with the first four octets containing
52 the incremented checksum in network byte order, the fifth octet
53 containing a bit-mask specifying the protection mechanisms supported
54 by the server, and the sixth through eighth octets containing, in
55
56
57
58 Myers [Page 1]
59
60 RFC 1731 IMAP4 Authentication Mechanisms December 1994
61
62
63 network byte order, the maximum cipher-text buffer size the server is
64 able to receive. The server must encrypt the 8 octets of data in the
65 session key and issue that encrypted data in a second ready response.
66 The client should consider the server authenticated if the first four
67 octets the un-encrypted data is equal to one plus the checksum it
68 previously sent.
69
70 The client must construct data with the first four octets containing
71 the original server-issued checksum in network byte order, the fifth
72 octet containing the bit-mask specifying the selected protection
73 mechanism, the sixth through eighth octets containing in network byte
74 order the maximum cipher-text buffer size the client is able to
75 receive, and the following octets containing a user name string. The
76 client must then append from one to eight octets so that the length
77 of the data is a multiple of eight octets. The client must then PCBC
78 encrypt the data with the session key and respond to the second ready
79 response with the encrypted data. The server decrypts the data and
80 verifies the contained checksum. The username field identifies the
81 user for whom subsequent IMAP operations are to be performed; the
82 server must verify that the principal identified in the Kerberos
83 ticket is authorized to connect as that user. After these
84 verifications, the authentication process is complete.
85
86 The protection mechanisms and their corresponding bit-masks are as
87 follows:
88
89 1 No protection mechanism
90 2 Integrity (krb_mk_safe) protection
91 4 Privacy (krb_mk_priv) protection
92
93
94 EXAMPLE: The following are two Kerberos version 4 login scenarios
95 (note that the line breaks in the sample authenticators are for
96 editorial clarity and are not in real authenticators)
97
98 S: * OK IMAP4 Server
99 C: A001 AUTHENTICATE KERBEROS_V4
100 S: + AmFYig==
101 C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
102 +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
103 WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
104 S: + or//EoAADZI=
105 C: DiAF5A4gA+oOIALuBkAAmw==
106 S: A001 OK Kerberos V4 authentication successful
107
108
109
110
111
112
113
114 Myers [Page 2]
115
116 RFC 1731 IMAP4 Authentication Mechanisms December 1994
117
118
119 S: * OK IMAP4 Server
120 C: A001 AUTHENTICATE KERBEROS_V4
121 S: + gcfgCA==
122 C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
123 +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
124 WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
125 S: A001 NO Kerberos V4 authentication failed
126
127
128 3. GSSAPI authentication mechanism
129
130 The authentication type associated with all mechanisms employing the
131 GSSAPI [RFC1508] is "GSSAPI".
132
133 The first ready response issued by the server contains no data. The
134 client should call GSS_Init_sec_context, passing in 0 for
135 input_context_handle (initially) and a targ_name equal to output_name
136 from GSS_Import_Name called with input_name_type of NULL and
137 input_name_string of "SERVICE:imap@hostname" where "hostname" is the
138 fully qualified host name of the server with all letters in lower
139 case. The client must then respond with the resulting output_token.
140 If GSS_Init_sec_context returns GSS_CONTINUE_NEEDED, then the client
141 should expect the server to issue a token in a subsequent ready
142 response. The client must pass the token to another call to
143 GSS_Init_sec_context.
144
145 If GSS_Init_sec_context returns GSS_COMPLETE, then the client should
146 respond with any resulting output_token. If there is no
147 output_token, the client should respond with no data. The client
148 should then expect the server to issue a token in a subsequent ready
149 response. The client should pass this token to GSS_Unseal and
150 interpret the first octet of resulting cleartext as a bit-mask
151 specifying the protection mechanisms supported by the server and the
152 second through fourth octets as the maximum size output_message to
153 send to the server. The client should construct data, with the first
154 octet containing the bit-mask specifying the selected protection
155 mechanism, the second through fourth octets containing in network
156 byte order the maximum size output_message the client is able to
157 receive, and the remaining octets containing a user name string. The
158 client must pass the data to GSS_Seal with conf_flag set to FALSE,
159 and respond with the generated output_message. The client can then
160 consider the server authenticated.
161
162 The server must issue a ready response with no data and pass the
163 resulting client supplied token to GSS_Accept_sec_context as
164 input_token, setting acceptor_cred_handle to NULL (for "use default
165 credentials"), and 0 for input_context_handle (initially). If
166 GSS_Accept_sec_context returns GSS_CONTINUE_NEEDED, the server should
167
168
169
170 Myers [Page 3]
171
172 RFC 1731 IMAP4 Authentication Mechanisms December 1994
173
174
175 return the generated output_token to the client in a ready response
176 and pass the resulting client supplied token to another call to
177 GSS_Accept_sec_context.
178
179 If GSS_Accept_sec_context returns GSS_COMPLETE, then if an
180 output_token is returned, the server should return it to the client
181 in a ready response and expect a reply from the client with no data.
182 Whether or not an output_token was returned, the server then should
183 then construct 4 octets of data, with the first octet containing a
184 bit-mask specifying the protection mechanisms supported by the server
185 and the second through fourth octets containing in network byte order
186 the maximum size output_token the server is able to receive. The
187 server must then pass the plaintext to GSS_Seal with conf_flag set to
188 FALSE and issue the generated output_message to the client in a ready
189 response. The server must then pass the resulting client supplied
190 token to GSS_Unseal and interpret the first octet of resulting
191 cleartext as the bit-mask for the selected protection mechanism, the
192 second through fourth octets as the maximum size output_message to
193 send to the client, and the remaining octets as the user name. Upon
194 verifying the src_name is authorized to authenticate as the user
195 name, The server should then consider the client authenticated.
196
197 The protection mechanisms and their corresponding bit-masks are as
198 follows:
199
200 1 No protection mechanism
201 2 Integrity protection.
202 Sender calls GSS_Seal with conf_flag set to FALSE
203 4 Privacy protection.
204 Sender calls GSS_Seal with conf_flag set to TRUE
205
206
207 4. S/Key authentication mechanism
208
209 The authentication type associated with S/Key [SKEY] is "SKEY".
210
211 The first ready response issued by the server contains no data. The
212 client responds with the user name string.
213
214 The data encoded in the second ready response contains the decimal
215 sequence number followed by a single space and the seed string for
216 the indicated user. The client responds with the one-time-password,
217 as either a 64-bit value in network byte order or encoded in the "six
218 English words" format.
219
220 Upon successful verification of the one-time-password, the server
221 should consider the client authenticated.
222
223
224
225
226 Myers [Page 4]
227
228 RFC 1731 IMAP4 Authentication Mechanisms December 1994
229
230
231 S/Key authentication does not provide for any protection mechanisms.
232
233
234 EXAMPLE: The following are two S/Key login scenarios.
235
236 S: * OK IMAP4 Server
237 C: A001 AUTHENTICATE SKEY
238 S: +
239 C: bW9yZ2Fu
240 S: + OTUgUWE1ODMwOA==
241 C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA==
242 S: A001 OK S/Key authentication successful
243
244
245 S: * OK IMAP4 Server
246 C: A001 AUTHENTICATE SKEY
247 S: +
248 C: c21pdGg=
249 S: + OTUgUWE1ODMwOA==
250 C: BsAY3g4gBNo=
251 S: A001 NO S/Key authentication failed
252
253
254 5. References
255
256 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version 4",
257 RFC 1730, University of Washington, December 1994.
258
259 [RFC1508] Linn, J., "Generic Security Service Application Program
260 Interface", RFC 1508, Geer Zolot Associates, September 1993.
261
262 [SKEY] Haller, Neil M. "The S/Key One-Time Password System",
263 Bellcore, Morristown, New Jersey, October 1993,
264 thumper.bellcore.com:pub/nmh/docs/ISOC.symp.ps
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282 Myers [Page 5]
283
284 RFC 1731 IMAP4 Authentication Mechanisms December 1994
285
286
287 6. Security Considerations
288
289 Security issues are discussed throughout this memo.
290
291
292 7. Author's Address
293
294 John G. Myers
295 Carnegie-Mellon University
296 5000 Forbes Ave.
297 Pittsburgh PA, 15213-3890
298
299 EMail: jgm+@cmu.edu
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338 Myers [Page 6]
339
1
2
3
4
5
6
7 Network Working Group C. Newman
8 Request for Comments: 2245 Innosoft
9 Category: Standards Track November 1997
10
11
12 Anonymous SASL Mechanism
13
14 Status of this Memo
15
16 This document specifies an Internet standards track protocol for the
17 Internet community, and requests discussion and suggestions for
18 improvements. Please refer to the current edition of the "Internet
19 Official Protocol Standards" (STD 1) for the standardization state
20 and status of this protocol. Distribution of this memo is unlimited.
21
22 Copyright Notice
23
24 Copyright (C) The Internet Society (1997). All Rights Reserved.
25
26 Abstract
27
28 It is common practice on the Internet to permit anonymous access to
29 various services. Traditionally, this has been done with a plain
30 text password mechanism using "anonymous" as the user name and
31 optional trace information, such as an email address, as the
32 password. As plaintext login commands are not permitted in new IETF
33 protocols, a new way to provide anonymous login is needed within the
34 context of the SASL [SASL] framework.
35
36 1. Conventions Used in this Document
37
38 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
39 in this document are to be interpreted as defined in "Key words for
40 use in RFCs to Indicate Requirement Levels" [KEYWORDS].
41
42 2. Anonymous SASL mechanism
43
44 The mechanism name associated with anonymous access is "ANONYMOUS".
45 The mechanism consists of a single message from the client to the
46 server. The client sends optional trace information in the form of a
47 human readable string. The trace information should take one of
48 three forms: an Internet email address, an opaque string which does
49 not contain the '@' character and can be interpreted by the system
50 administrator of the client's domain, or nothing. For privacy
51 reasons, an Internet email address should only be used with
52 permission from the user.
53
54
55
56
57
58 Newman Standards Track [Page 1]
59
60 RFC 2245 Anonymous SASL Mechanism November 1997
61
62
63 A server which permits anonymous access will announce support for the
64 ANONYMOUS mechanism, and allow anyone to log in using that mechanism,
65 usually with restricted access.
66
67 The formal grammar for the client message using Augmented BNF [ABNF]
68 follows.
69
70 message = [email / token]
71
72 TCHAR = %x20-3F / %x41-7E
73 ;; any printable US-ASCII character except '@'
74
75 email = addr-spec
76 ;; as defined in [IMAIL], except with no free
77 ;; insertion of linear-white-space, and the
78 ;; local-part MUST either be entirely enclosed in
79 ;; quotes or entirely unquoted
80
81 token = 1*255TCHAR
82
83 3. Example
84
85
86 Here is a sample anonymous login between an IMAP client and server.
87 In this example, "C:" and "S:" indicate lines sent by the client and
88 server respectively. If such lines are wrapped without a new "C:" or
89 "S:" label, then the wrapping is for editorial clarity and is not
90 part of the command.
91
92 Note that this example uses the IMAP profile [IMAP4] of SASL. The
93 base64 encoding of challenges and responses, as well as the "+ "
94 preceding the responses are part of the IMAP4 profile, not part of
95 SASL itself. Newer profiles of SASL will include the client message
96 with the AUTHENTICATE command itself so the extra round trip below
97 (the server response with an empty "+ ") can be eliminated.
98
99 In this example, the user's opaque identification token is "sirhc".
100
101 S: * OK IMAP4 server ready
102 C: A001 CAPABILITY
103 S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=CRAM-MD5 AUTH=ANONYMOUS
104 S: A001 OK done
105 C: A002 AUTHENTICATE ANONYMOUS
106 S: +
107 C: c2lyaGM=
108 S: A003 OK Welcome, trace information has been logged.
109
110
111
112
113
114 Newman Standards Track [Page 2]
115
116 RFC 2245 Anonymous SASL Mechanism November 1997
117
118
119 4. Security Considerations
120
121 The anonymous mechanism grants access to information by anyone. For
122 this reason it should be disabled by default so the administrator can
123 make an explicit decision to enable it.
124
125 If the anonymous user has any write privileges, a denial of service
126 attack is possible by filling up all available space. This can be
127 prevented by disabling all write access by anonymous users.
128
129 If anonymous users have read and write access to the same area, the
130 server can be used as a communication mechanism to anonymously
131 exchange information. Servers which accept anonymous submissions
132 should implement the common "drop box" model which forbids anonymous
133 read access to the area where anonymous submissions are accepted.
134
135 If the anonymous user can run many expensive operations (e.g., an
136 IMAP SEARCH BODY command), this could enable a denial of service
137 attack. Servers are encouraged to limit the number of anonymous
138 users and reduce their priority or limit their resource usage.
139
140 If there is no idle timeout for the anonymous user and there is a
141 limit on the number of anonymous users, a denial of service attack is
142 enabled. Servers should implement an idle timeout for anonymous
143 users.
144
145 The trace information is not authenticated so it can be falsified.
146 This can be used as an attempt to get someone else in trouble for
147 access to questionable information. Administrators trying to trace
148 abuse need to realize this information may be falsified.
149
150 A client which uses the user's correct email address as trace
151 information without explicit permission may violate that user's
152 privacy. Information about who accesses an anonymous archive on a
153 sensitive subject (e.g., sexual abuse) has strong privacy needs.
154 Clients should not send the email address without explicit permission
155 of the user and should offer the option of supplying no trace token
156 -- thus only exposing the source IP address and time. Anonymous
157 proxy servers could enhance this privacy, but would have to consider
158 the resulting potential denial of service attacks.
159
160 Anonymous connections are susceptible to man in the middle attacks
161 which view or alter the data transferred. Clients and servers are
162 encouraged to support external integrity and encryption mechanisms.
163
164 Protocols which fail to require an explicit anonymous login are more
165 susceptible to break-ins given certain common implementation
166 techniques. Specifically, Unix servers which offer user login may
167
168
169
170 Newman Standards Track [Page 3]
171
172 RFC 2245 Anonymous SASL Mechanism November 1997
173
174
175 initially start up as root and switch to the appropriate user id
176 after an explicit login command. Normally such servers refuse all
177 data access commands prior to explicit login and may enter a
178 restricted security environment (e.g., the Unix chroot function) for
179 anonymous users. If anonymous access is not explicitly requested,
180 the entire data access machinery is exposed to external security
181 attacks without the chance for explicit protective measures.
182 Protocols which offer restricted data access should not allow
183 anonymous data access without an explicit login step.
184
185 5. References
186
187 [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
188 Specifications: ABNF", RFC 2234, November 1997.
189
190 [IMAIL] Crocker, D., "Standard for the Format of Arpa Internet Text
191 Messages", STD 11, RFC 822, August 1982.
192
193 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
194 4rev1", RFC 2060, December 1996.
195
196 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
197 Requirement Levels", RFC 2119, March 1997.
198
199 [SASL] Myers, J., "Simple Authentication and Security Layer (SASL)",
200 RFC 2222, October 1997.
201
202 6. Author's Address
203
204 Chris Newman
205 Innosoft International, Inc.
206 1050 Lakes Drive
207 West Covina, CA 91790 USA
208
209 Email: chris.newman@innosoft.com
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226 Newman Standards Track [Page 4]
227
228 RFC 2245 Anonymous SASL Mechanism November 1997
229
230
231 7. Full Copyright Statement
232
233 Copyright (C) The Internet Society (1997). All Rights Reserved.
234
235 This document and translations of it may be copied and furnished to
236 others, and derivative works that comment on or otherwise explain it
237 or assist in its implementation may be prepared, copied, published
238 and distributed, in whole or in part, without restriction of any
239 kind, provided that the above copyright notice and this paragraph are
240 included on all such copies and derivative works. However, this
241 document itself may not be modified in any way, such as by removing
242 the copyright notice or references to the Internet Society or other
243 Internet organizations, except as needed for the purpose of
244 developing Internet standards in which case the procedures for
245 copyrights defined in the Internet Standards process must be
246 followed, or as required to translate it into languages other than
247 English.
248
249 The limited permissions granted above are perpetual and will not be
250 revoked by the Internet Society or its successors or assigns.
251
252 This document and the information contained herein is provided on an
253 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
254 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
255 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
256 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
257 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282 Newman Standards Track [Page 5]
283