idnits 2.17.1 draft-ietf-nntpext-tls-nntp-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There are 5 instances of too long lines in the document, the longest one being 5 characters in excess of 72. ** The abstract seems to contain references ([NNTP], [TLS]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 2003) is 7497 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'C' is mentioned on line 332, but not defined == Missing Reference: 'S' is mentioned on line 333, but not defined -- Looks like a reference, but probably isn't: '1' on line 168 == Unused Reference: 'SMTP' is defined on line 447, but no explicit reference was found in the text == Unused Reference: 'HTTP' is defined on line 462, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Downref: Normative reference to an Informational RFC: RFC 1704 (ref. 'AUTH') == Outdated reference: A later version (-27) exists of draft-ietf-nntpext-base-20 ** Obsolete normative reference: RFC 2821 (ref. 'SMTP') (Obsoleted by RFC 5321) ** Obsolete normative reference: RFC 2246 (ref. 'TLS') (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 3546 (ref. 'TLS-EXT') (Obsoleted by RFC 4366) -- Obsolete informational reference (is this intentional?): RFC 2616 (ref. 'HTTP') (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) Summary: 9 errors (**), 0 flaws (~~), 8 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group J. Vinocur 2 INTERNET DRAFT Cornell University 3 Document: draft-ietf-nntpext-tls-nntp-01.txt C. Newman 4 Sun Microsystems 5 October 2003 7 Using TLS with NNTP 9 Status of this memo 11 This document is an Internet-Draft and is in full conformance with 12 all provisions of Section 10 of RFC 2026. 14 Internet-Drafts are working documents of the Internet Engineering 15 Task Force (IETF), its areas, and its working groups. Note that 16 other groups may also distribute working documents as 17 Internet-Drafts. 19 Internet-Drafts are draft documents valid for a maximum of six 20 months and may be updated, replaced, or obsoleted by other 21 documents at any time. It is inappropriate to use Internet-Drafts 22 as reference material or to cite them other than as "work in 23 progress." 25 The list of current Internet-Drafts can be accessed at 26 http://www.ietf.org/ietf/1id-abstracts.html. 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 Copyright Notice 33 Copyright (C) The Internet Society (2002). All Rights Reserved. 35 Abstract 37 This memo defines an extension to the Network News Transport 38 Protocol [NNTP] to provide connection-based encryption (via 39 Transport Layer Security [TLS]). The primary goal is to provide 40 encryption for single-link confidentiality purposes, but data 41 integrity and (optional) certificate-based peer entity 42 authentication are also possible. 44 Table of Contents 46 0. Changes from Previous Version ............................ 2 47 1. Introduction ............................................. 3 48 1.1. Conventions Used in this Document ................... 3 49 2. Advertising Capabilities with the Extensions Mechanism ... 3 50 3. STARTTLS Command ......................................... 4 51 3.1. Usage ............................................... 4 52 3.2. Description ......................................... 4 53 3.2.1. Processing After the STARTTLS Command .......... 5 54 3.2.2. Result of the STARTTLS Command ................. 6 55 3.3. Examples ............................................ 7 56 4. Augmented BNF Syntax for STARTTLS ........................ 8 57 5. Security Considerations .................................. 8 58 6. Acknowledgements ......................................... 10 59 7. Normative References ..................................... 10 60 8. Informative References ................................... 10 61 9. Authors' Addresses ....................................... 11 63 0. Changes from Previous Version 65 New: 66 o Text needed to comply with extensions framework guidelines: 67 - Allows 483 to be returned for most commands 68 - No pipelining 69 - Not impacted by MODE READER 70 o Examples section 72 Changed: 73 o Welcome banner is *not* reissued after STARTTLS 74 o STARTTLS on an already-secure link gives 502 (not 580) 75 o Failed negotiation gives 580 on the reestablished insecure link 76 o Removed MULTIDOMAIN, need is resolved by RFC 3546 (a SHOULD) 77 o Removed definition of 483, which is now included in base spec 78 o Use HDR instead of PAT in the LIST EXTENSIONS example 80 Clarified: 81 o When the capability can be advertised 82 o The specifc octet where encrypted session begins 84 Other: 85 o Reformatting to match base spec style 86 o Assorted updates of phrasing and typographical varieties 87 o Updated several references per new versions of documents 89 1. Introduction 91 Historically, unencrypted NNTP [NNTP] connections were satisfactory 92 for most purposes. However, sending passwords unencrypted over the 93 network is no longer appropriate, and sometimes strong encryption 94 is desired for the entire connection. 96 The STARTTLS extension provides a way to use the popular TLS [TLS] 97 service with the existing NNTP protocol. The current 98 (unstandardized) use of TLS for NNTP is most commonly on a 99 dedicated TCP port; this practice is discouraged for the reasons 100 documented in section 7 of "Using TLS with IMAP, POP3 and ACAP" 101 [TLS-IMAPPOP]. Therefore, this specification formalizes and 102 extends the STARTTLS command already in occasional use by the 103 installed base. 105 1.1. Conventions Used in this Document 107 The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD 108 NOT", "MAY", and "OPTIONAL" in this document are to be interpreted 109 as described in "Key words for use in RFCs to Indicate Requirement 110 Levels" [KEYWORDS]. 112 Terms related to authentication are defined in "On Internet 113 Authentication" [AUTH]. 115 This document assumes you are familiar with NNTP [NNTP] and TLS 116 [TLS]. 118 In the examples, commands from the client are indicated with [C], 119 and responses from the server are indicated with [S]. 121 2. Advertising Capabilities with the Extensions Mechanism 123 The LIST EXTENSIONS command, documented in section 8 of [NNTP], 124 provides a mechanism for clients to discover what extensions are 125 available. 127 A server supporting the STARTTLS command as defined in section 4 128 will advertise the "STARTTLS" capability in response to the LIST 129 EXTENSIONS command. However, this capability is not advertised 130 after successful authentication [NNTP-AUTH], nor is it advertised 131 once a TLS layer is active (see section 4.2.2). This capability 132 may be advertised both before and after any use of MODE READER, 133 with the same semantics. 135 As the STARTTLS command is related to security, cached results of 136 LIST EXTENSIONS from a previous session MUST NOT be used, as per 137 section 11.6 of [NNTP]. 139 Example: 140 [C] LIST EXTENSIONS 141 [S] 202 Extensions supported: 142 [S] OVER 143 [S] HDR 144 [S] LISTGROUP 145 [S] STARTTLS 146 [S] . 148 Note that the STARTTLS command constitutes a mode change and thus 149 clients MUST wait for completion prior to sending additional 150 commands. 152 3. STARTTLS Command 154 3.1. Usage 156 This command MUST NOT be pipelined. 158 Syntax 159 STARTTLS 161 Responses 162 382 Continue with TLS negotiation 163 403 TLS temporarily not available 164 501 Command not supported or command syntax error 165 502 Command unavailable [1] 166 580 TLS negotiation failed 168 [1] If a TLS layer is already active, or authentication has 169 occurred, STARTTLS is not a valid command (see sections 4.2 and 170 4.2.2). 172 Clients MUST support other response codes by processing them based 173 on the first digit. However, the server MUST NOT return 483 in 174 response to STARTTLS. (See section 3.2.1 of [NNTP].) 176 3.2. Description 178 A client issues the STARTTLS command to request negotiation of TLS. 179 The client MUST NOT send any additional commands on the socket 180 until after it has received the server response to the command; 181 this command MUST NOT be pipelined as per section 3.2 of [NNTP]. 182 The STARTTLS command is usually used to request session encryption, 183 although it can be used for client certificate authentication. 185 An NNTP server MAY require the client to perform a TLS negotiation 186 before accepting any commands. In this case, the server SHOULD 187 return the 483 encryption-required response code to every command 188 other than HELP, LIST EXTENSIONS, QUIT, and any commands that 189 establish encryption, such as STARTTLS; the server MUST NOT return 190 483 in response to these commands. Additionally, the client MAY 191 decide to establish a security layer without first receiving a 483 192 response. 194 If the client receives a failure response to STARTTLS, the client 195 must decide whether or not to continue the NNTP session. Such a 196 decision is based on local policy. For instance, if TLS was being 197 used for client authentication, the client might try to continue 198 the session, in case the server allows it to do so even with no 199 authentication. However, if TLS was being negotiated for 200 encryption, a client that gets a failure response needs to decide 201 whether to continue without TLS encryption, to wait and try again 202 later, or to give up and notify the user of the error. 204 After receiving a 382 response to a STARTTLS command, the client 205 MUST start the TLS negotiation before giving any other NNTP 206 commands. The TLS negotiation begins with the first octet 207 following the CRLF of the 382 response. If, after having issued 208 the STARTTLS command, the client finds out that some failure 209 prevents it from actually starting a TLS handshake, then it SHOULD 210 immediately close the connection. 212 Servers MUST be able to understand backwards-compatible TLS Client 213 Hello messages (provided that client_version is TLS 1.0 or later), 214 and clients MAY use backwards-compatible Client Hello messages. 215 Neither clients or servers are required to actually support Client 216 Hello messages for anything other than TLS 1.0. However, the TLS 217 extension for Server Name Indication [TLS-EXT] SHOULD be 218 implemented by all clients; it also SHOULD be implemented by any 219 server implementing STARTTLS that is known by multiple names 220 (otherwise it is not possible for a server with several hostnames 221 to present the correct certificate to the client). 223 Although current use of TLS most often involves the dedication of 224 port 563 for NNTP over TLS, the continued use of TLS on a separate 225 port is discouraged for the reasons documented in section 7 of 226 "Using TLS with IMAP, POP3 and ACAP" [TLS-IMAPPOP]. 228 3.2.1. Processing After the STARTTLS Command 230 After the TLS handshake has been completed successfully, both 231 parties MUST immediately decide whether or not to continue based on 232 the authentication and privacy achieved. The NNTP client and 233 server may decide to move ahead even if the TLS negotiation ended 234 with no authentication and/or no privacy because NNTP services are 235 often performed without authentication or privacy, but some NNTP 236 clients or servers may want to continue only if a particular level 237 of authentication and/or privacy was achieved. 239 If the NNTP client decides that the level of authentication or 240 privacy is not high enough for it to continue, it SHOULD issue a 241 QUIT command immediately after the TLS negotiation is complete. If 242 the NNTP server decides that the level of authentication or privacy 243 is not high enough for it to continue, it SHOULD do at least one of 244 (1) close the connection, being aware that the client may interpret 245 this behavior as a network problem and immediately reconnect and 246 issue the same command sequence, or (2) keep the connection open 247 and reply to NNTP commands from the client with the 483 response 248 code (with a possible text string such as "Command refused due to 249 lack of security"), however this behavior may tie up resources 250 unacceptably. 252 The decision of whether or not to believe the authenticity of the 253 other party in a TLS negotiation is a local matter. However, some 254 general rules for the decisions are: 256 o The client MAY check that the identity presented in the server's 257 certificate matches the intended server hostname or domain. 258 This check is not required (and may fail in the absence of the 259 TLS server_name extension [TLS-EXT], as described above), but if 260 it is implemented and the match fails, the client SHOULD either 261 request explicit user confirmation, or terminate the connection 262 but allow the user to disable the check in the future. 263 o Generally an NNTP server would want to accept any verifiable 264 certificate from a client, however authentication can be done 265 using the client certificate (perhaps in combination with the 266 SASL EXTERNAL mechanism [NNTP-AUTH], although an implementation 267 supporting STARTTLS is not required to support SASL in general 268 or that mechanism in particular). The server MAY use 269 information about the client certificate for identification of 270 connections or posted articles (either in its logs or directly 271 in posted articles). 273 3.2.2. Result of the STARTTLS Command 275 If the TLS handshake fails in such a way that recovery is possible, 276 the server will send a 580 response (without encryption), beginning 277 with the first post-handshake octet. 279 Upon successful completion of the TLS handshake, the NNTP protocol 280 is reset to the initial state (the state in NNTP directly after the 281 connection is established). The server MUST discard any knowledge 282 obtained from the client, such as the current newsgroup and article 283 number, that was not obtained from the TLS negotiation itself; 284 immediately after the TLS handshake, the server MUST NOT issue a 285 welcome banner and MUST be prepared to accept commands from the 286 client. The client MUST discard any knowledge obtained from the 287 server, such as the list of NNTP service extensions, which was not 288 obtained from the TLS negotiation itself. 290 The extensions returned in response to a LIST EXTENSIONS command 291 received after the TLS handshake MAY be different than the list 292 returned before the TLS handshake. For example, an NNTP server 293 supporting SASL [NNTP-AUTH] might not want to advertise support for 294 a particular mechanism unless a client has sent an appropriate 295 client certificate during a TLS handshake. 297 Both the client and the server MUST know if there is a TLS session 298 active. A client MUST NOT attempt to start a TLS session if a TLS 299 session is already active. A server MUST NOT return the STARTTLS 300 extension in response to a LIST EXTENSIONS command received after a 301 TLS handshake has completed, and a server MUST respond with a 502 302 response code if a STARTTLS command is received while a TLS session 303 is already active. 305 3.3. Examples 307 Example of a client being prompted to use encryption and 308 negotiating it successfully (showing the removal of STARTTLS from 309 the extensions list once a TLS layer is active), followed by an 310 (inappropriate) attempt by the client to initiate another TLS 311 negotiation: 312 [C] LIST EXTENSIONS 313 [S] 202 Extensions supported: 314 [S] STARTTLS 315 [S] OVER 316 [S] . 317 [C] GROUP local.confidential 318 [S] 483 Encryption or stronger authentication required 319 [C] STARTTLS 320 [S] 382 Continue with TLS negotiation 321 [TLS negotiation occurs here] 322 [Following successful negotiation, traffic is via the TLS layer] 323 [C] LIST EXTENSIONS 324 [S] 202 Extensions supported: 325 [S] OVER 326 [S] . 327 [C] STARTTLS 328 [S] 502 STARTTLS not allowed with active TLS layer 330 Example of a request to begin TLS negotiation declined by the 331 server: 332 [C] STARTTLS 333 [S] 403 TLS temporarily not available 335 4. Augmented BNF Syntax for STARTTLS 337 This amends the formal syntax for NNTP [NNTP] to add the STARTTLS 338 command. The syntax is defined using ABNF [ABNF], including the 339 core rules from section 6 of [ABNF]. 341 command /= starttls-command 342 starttls-command = "STARTTLS" *WSP CRLF 343 ; WSP and CRLF are defined in sec. 13 of [NNTP] 345 5. Security Considerations 347 In general, the security considerations of the TLS protocol [TLS] 348 and any implemented extensions [TLS-EXT] are applicable here; only 349 the most important are highlighted specifically below. Also, this 350 extension is not intended to cure the security considerations 351 described in section 14 of [NNTP]; those considerations remain 352 relevant to any NNTP implementation. 354 Use of STARTTLS cannot protect protocol exchanges conducted prior 355 to authentication. For this reason, the LIST EXTENSIONS command 356 SHOULD be re-issued after successful negotiation of a security 357 layer, and other protocol state SHOULD be re-negotiated as well. 359 It should be noted that NNTP is not an end-to-end mechanism. Thus, 360 if an NNTP client/server pair decide to add TLS privacy, they are 361 securing the transport only for that link. Further, because 362 delivery of a single piece of news may go between more than two 363 NNTP servers, adding TLS privacy to one pair of servers does not 364 mean that the entire NNTP chain has been made private. Further, 365 just because an NNTP server can authenticate an NNTP client, it 366 does not mean that the articles from the NNTP client were 367 authenticated by the NNTP client when the client received them. 369 Both the NNTP client and server must check the result of the TLS 370 negotiation to see whether an acceptable degree of authentication 371 and privacy was achieved. Ignoring this step completely 372 invalidates using TLS for security. The decision about whether 373 acceptable authentication or privacy was achieved is made locally, 374 is implementation-dependent, and is beyond the scope of this 375 document. 377 The NNTP client and server should note carefully the result of the 378 TLS negotiation. If the negotiation results in no privacy, or if 379 it results in privacy using algorithms or key lengths that are 380 deemed not strong enough, or if the authentication is not good 381 enough for either party, the client may choose to end the NNTP 382 session with an immediate QUIT command, or the server may choose 383 not to accept any more NNTP commands. 385 The client and server should also be aware that the TLS protocol 386 permits privacy and security capabilities to be renegotiated mid- 387 connection (see section 7.4.1 of [TLS]). For example, one of the 388 parties may desire minimal encryption after any authentication 389 steps have been performed. This underscores the fact that security 390 is not present simply because TLS has been negotiated; the nature 391 of the established security layer must be considered. 393 A man-in-the-middle attack can be launched by deleting the 382 394 response from the server. This would cause the client not to try to 395 start a TLS session. Another man-in-the-middle attack is to allow 396 the server to announce its STARTTLS capability, but to alter the 397 client's request to start TLS and the server's response. An NNTP 398 client can partially protect against these attacks by recording the 399 fact that a particular NNTP server offers TLS during one session 400 and generating an alarm if it does not appear in the LIST 401 EXTENSIONS response for a later session (of course, the STARTTLS 402 extension would not be listed after a security layer is in place). 404 If the TLS negotiation fails or if the client receives a 483 405 response, the client has to decide what to do next. The client has 406 to choose among three main options: to go ahead with the rest of 407 the NNTP session, to retry TLS at a later time, or to give up and 408 postpone newsreading activity. If a failure or error occurs, the 409 client can assume that the server may be able to negotiate TLS in 410 the future, and should try to negotiate TLS in a later session. 411 However, if the client and server were only using TLS for 412 authentication and no previous 480 response was received, the 413 client may want to proceed with the NNTP session, in case some of 414 the operations the client wanted to perform are accepted by the 415 server even if the client is unauthenticated. 417 Before the TLS handshake has begun, any protocol interactions are 418 performed in the clear and may be modified by an active attacker. 419 For this reason, clients and servers MUST discard any sensitive 420 knowledge obtained prior to the start of the TLS handshake upon 421 completion of the TLS handshake. 423 6. Acknowledgements 425 A significant amount of the STARTTLS text was lifted from RFC 3207 426 by Paul Hoffman. 428 Special acknowledgement goes also to the people who commented 429 privately on intermediate revisions of this document, as well as 430 the members of the IETF NNTP Working Group for continual insight in 431 discussion. 433 7. Normative References 435 [ABNF] Crocker, D., Overell, P., "Augmented BNF for Syntax 436 Specifications: ABNF", RFC 2234, November 1997. 438 [AUTH] Haller, N., Atkinson, R., "On Internet Authentication", RFC 1704, 439 October 1994. 441 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 442 Requirement Levels", RFC 2119, March 1997. 444 [NNTP] Feather, C., "Network News Transport Protocol" 445 (draft-ietf-nntpext-base-20.txt). 447 [SMTP] Klensin, J., "Simple Mail Transport Protocol", RFC 2821, April 448 2001. 450 [TLS] Dierks, T., Allen, C., "The TLS Protocol Version 1.0", RFC 2246, 451 January 1999. 453 [TLS-EXT] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 454 Wright, T., "Transport Layer Security (TLS) Extensions", RFC 3546, June 455 2003. 457 [TLS-IMAPPOP] Newman, C., "Using TLS with IMAP, POP3 and ACAP", RFC 458 2595, June 1999. 460 8. Informative References 462 [HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, 463 L., Leach, P., Berners-Lee, T., "Hypertext Transfer Protocol -- 464 HTTP/1.1", RFC 2616, June 1999. 466 [NNTP-AUTH] Vinocur, J., Newman, C., "NNTP Extension for 467 Authentication", Work in Progress. 469 9. Authors' Addresses 471 Jeffrey M. Vinocur 472 Department of Computer Science 473 Upson Hall 474 Cornell University 475 Ithaca, NY 14853 477 EMail: vinocur@cs.cornell.edu 479 Chris Newman 480 Sun Microsystems 481 1050 Lakes Drive, Suite 250 482 West Covina, CA 91790 484 EMail: cnewman@iplanet.com 486 Full Copyright Statement 488 Copyright (C) The Internet Society (2002). All Rights Reserved. 490 This document and translations of it may be copied and furnished to 491 others, and derivative works that comment on or otherwise explain 492 it or assist in its implementation may be prepared, copied, 493 published and distributed, in whole or in part, without restriction 494 of any kind, provided that the above copyright notice and this 495 paragraph are included on all such copies and derivative works. 496 However, this document itself may not be modified in any way, such 497 as by removing the copyright notice or references to the Internet 498 Society or other Internet organizations, except as needed for the 499 purpose of developing Internet standards in which case the 500 procedures for copyrights defined in the Internet Standards process 501 must be followed, or as required to translate it into languages 502 other than English. 504 The limited permissions granted above are perpetual and will not be 505 revoked by the Internet Society or its successors or assigns. 507 This document and the information contained herein is provided on 508 an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET 509 ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR 510 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 511 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 512 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.