idnits 2.17.1 draft-ietf-nntpext-authinfo-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3667, Section 5.1 on line 18. -- Found old boilerplate from RFC 3978, Section 5.5 on line 1025. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** The document seems to lack an RFC 3978 Section 5.4 Reference to BCP 78 -- however, there's a paragraph with a matching beginning. Boilerplate error? ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. ** The document seems to lack an RFC 3979 Section 5, para. 1 IPR Disclosure Acknowledgement -- however, there's a paragraph with a matching beginning. Boilerplate error? ( - It does however have an RFC 2026 Section 10.4(A) Disclaimer.) ** The document seems to lack an RFC 3979 Section 5, para. 2 IPR Disclosure Acknowledgement. ** The document seems to lack an RFC 3979 Section 5, para. 3 IPR Disclosure Invitation -- however, there's a paragraph with a matching beginning. Boilerplate error? ( - It does however have an RFC 2026 Section 10.4(B) IPR Disclosure Invitation.) ** The document uses RFC 3667 boilerplate or RFC 3978-like boilerplate instead of verbatim RFC 3978 boilerplate. After 6 May 2005, submission of drafts without verbatim RFC 3978 boilerplate is not accepted. The following non-3978 patterns matched text found in the document. That text should be removed or replaced: By submitting this Internet-Draft, I certify that any applicable patent or other IPR claims of which I am aware have been disclosed, or will be disclosed, and any of which I become aware will be disclosed, in accordance with RFC 3668. 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 : ---------------------------------------------------------------------------- ** There are 10 instances of too long lines in the document, the longest one being 3 characters in excess of 72. ** The abstract seems to contain references ([NNTP], [NNTP-COMMON], [SASL]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. -- The draft header indicates that this document updates RFC2970, but the abstract doesn't seem to mention this, which it should. 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). (Using the creation date from RFC2970, updated by this document, for RFC5378 checks: 1999-07-02) -- 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 2004) is 7132 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 669, but not defined == Missing Reference: 'S' is mentioned on line 670, but not defined -- Looks like a reference, but probably isn't: '1' on line 423 -- Looks like a reference, but probably isn't: '2' on line 428 == Unused Reference: 'ABNF' is defined on line 902, but no explicit reference was found in the text == Unused Reference: 'CRAM-MD5' is defined on line 935, but no explicit reference was found in the text == Unused Reference: 'SMTP' is defined on line 947, 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') ** Obsolete normative reference: RFC 3548 (ref. 'BASE64') (Obsoleted by RFC 4648) ** Obsolete normative reference: RFC 2831 (ref. 'DIGEST-MD5') (Obsoleted by RFC 6331) -- No information found for draft-ietf-nntpext-base- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'NNTP' -- No information found for draft-ietf-nntpext-tls-nntp- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'NNTP-TLS' -- No information found for draft-ietf-sasl-rfc2222bis- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'SASL' -- No information found for draft-ietf-sasl-saslprep- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'SASLprep' -- No information found for draft-hoffman-rfc3454bis- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'StringPrep' -- No information found for draft-ietf-sasl-crammd5- - is the name correct? -- No information found for draft-ietf-sasl-gssapi- - is the name correct? -- No information found for draft-ietf-sasl-plain- - is the name correct? -- Obsolete informational reference (is this intentional?): RFC 2821 (ref. 'SMTP') (Obsoleted by RFC 5321) Summary: 15 errors (**), 0 flaws (~~), 8 warnings (==), 21 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NNTP Extensions Working Group J. Vinocur 3 Internet Draft Cornell University 4 Updates: 2970 (if approved) K. Murchison 5 Expires: April 2005 Oceana Matrix Ltd. 6 C. Newman 7 Sun Microsystems 8 October 2004 10 NNTP Extension for Authentication 11 draft-ietf-nntpext-authinfo-05.txt 13 Status of this memo 15 By submitting this Internet-Draft, I certify that any applicable 16 patent or other IPR claims of which I am aware have been disclosed, 17 and any of which I become aware will be disclosed, in accordance 18 with RFC 3668. 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 23 Internet-Drafts. 25 Internet-Drafts are draft documents valid for a maximum of six 26 months and may be updated, replaced, or obsoleted by other 27 documents at any time. It is inappropriate to use Internet-Drafts 28 as reference material or to cite them other than as "work in 29 progress." 31 The list of current Internet-Drafts can be accessed at 32 http://www.ietf.org/ietf/1id-abstracts.txt. 34 The list of Internet-Draft Shadow Directories can be accessed at 35 http://www.ietf.org/shadow.html. 37 Copyright Notice 39 Copyright (C) The Internet Society (2004). 41 Abstract 43 This document defines an extension the Network News Transport 44 Protocol [NNTP] which allows a client to indicate an authentication 45 mechanism to the server, perform an authentication protocol 46 exchange, and optionally negotiate a security layer for subsequent 47 protocol interactions during the remainder of an NNTP session. 49 Section 3.1 of [NNTP-COMMON] summarizes some ad-hoc authentication 50 methods currently used in the NNTP protocol. This document updates 51 and formalizes the AUTHINFO USER/PASS authentication method and 52 deprecates the AUTHINFO SIMPLE and AUTHINFO GENERIC authentication 53 methods. Additionally, this document defines a profile of the 54 Simple Authentication and Security Layer [SASL] for NNTP. 56 Table of Contents 58 0. Changes from Previous Version ............................ 2 59 1. Introduction ............................................. 3 60 1.1. Conventions Used in this Document ................... 4 61 2. The AUTHINFO Extension ................................... 4 62 2.1. Advertising the AUTHINFO Extension .................. 4 63 2.2. Authenticating with the AUTHINFO Extension .......... 5 64 2.3. AUTHINFO USER/PASS Command .......................... 6 65 2.3.1. Usage .......................................... 6 66 2.3.2. Description .................................... 7 67 2.3.3. Examples ....................................... 8 68 2.4. AUTHINFO SASL Command ............................... 9 69 2.4.1. Usage .......................................... 9 70 2.4.2. Description .................................... 10 71 2.4.3. Examples ....................................... 12 72 3. Augmented BNF Syntax for the AUTHINFO Extension .......... 15 73 3.1. Commands ............................................ 15 74 3.2. Command Continuation ................................ 15 75 3.3. Responses ........................................... 16 76 3.4. LIST EXTENSIONS responses ........................... 16 77 3.5. General non-terminals ............................... 16 78 4. Summary of Response Codes ................................ 16 79 5. Authentication Tracking/Logging .......................... 17 80 6. Security Considerations .................................. 17 81 7. IANA Considerations ...................................... 18 82 7.1. IANA Considerations for SASL/GSSAPI services ........ 18 83 7.2. IANA Considerations for NNTP extensions ............. 18 84 8. References ............................................... 19 85 8.1. Normative References ................................ 19 86 8.2. Informative References .............................. 20 87 9. Authors' Addresses ....................................... 20 88 10. Acknowledgments ......................................... 21 89 11. Intellectual Property Rights ............................ 21 90 12. Copyright ............................................... 22 92 0. Changes from Previous Version 94 New: 95 o Added 502 as a possible response to AUTHINFO commands (when already 96 authenticated). 98 o Added notes that 480 is not a valid response to AUTHINFO commands 99 (3.2.1 of [NNTP] notwithstanding). 101 Changed: 102 o Rewrote Abstract. 103 o Moved service name of SASL profile to the top of 2.4.2 to make it 104 more prominent. 105 o Made some section references in IANA considerations more precise. 107 Clarified: 108 o Handling of the AUTHINFO extension label and command after 109 authentication. 110 o Ordering of SASL and TLS layers. 111 o Whitespace in SASL challenges/responses in examples is for 112 readability only. 114 Other: 115 o Assorted updates of phrasing and typographical varieties. 117 1. Introduction 119 Although NNTP [NNTP] has traditionally provided public access to 120 newsgroups, authentication is often useful, for example to control 121 resource consumption, to allow abusers of the POST command to be 122 identified, and to restrict access to "local" newsgroups. 124 The ad-hoc AUTHINFO USER and AUTHINFO PASS commands, documented in 125 [NNTP-COMMON], provide a very weak authentication mechanism in 126 widespread use by the installed base. Due to their insecurity and 127 ubiquity they are formalized in this specification, but only for 128 use in combination with appropriate security layers. 130 The ad-hoc AUTHINFO GENERIC command, also documented in [NNTP- 131 COMMON] but much less ubiquitous, provided an NNTP-specific 132 equivalent of the generic SASL [SASL] facility. This document 133 deprecates AUTHINFO GENERIC in favor of an AUTHINFO SASL 134 replacement so that NNTP can benefit from authentication mechanisms 135 developed for other SASL-enabled application protocols including 136 SMTP, POP, IMAP, LDAP, and BEEP. 138 This specification is to be read in conjunction with the NNTP base 139 specification [NNTP]. Except where specifically stated otherwise, 140 in the case of a conflict between these two documents [NNTP] takes 141 precedence over this one. 143 It is also recommended that this specification be read in 144 conjunction with the SASL base specification [SASL]. 146 1.1. Conventions Used in this Document 148 The notational conventions used in this document are the same as 149 those in [NNTP] and any term not defined in this document has the 150 same meaning as in that one. 152 The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD 153 NOT", "MAY", and "OPTIONAL" in this document are to be interpreted 154 as described in "Key words for use in RFCs to Indicate Requirement 155 Levels" [KEYWORDS]. 157 Terms related to authentication are defined in "On Internet 158 Authentication" [AUTH]. 160 In the examples, commands from the client are indicated with [C], 161 and responses from the server are indicated with [S]. 163 2. The AUTHINFO Extension 165 The AUTHINFO extension is used to authenticate a user. Note that 166 authorization is a matter of site policy, not network protocol, and 167 is therefore not discussed in this document. The server determines 168 authorization in whatever manner is defined by its implementation 169 as configured by the site administrator. 171 This extension provides three new commands: AUTHINFO USER, AUTHINFO 172 PASS, and AUTHINFO SASL. The label for this extension is AUTHINFO. 174 2.1. Advertising the AUTHINFO Extension 176 A server MUST implement at least one of the AUTHINFO USER or 177 AUTHINFO SASL commands in order to advertise the AUTHINFO extension 178 label in the response to the LIST EXTENSIONS command. The AUTHINFO 179 extension label contains an argument list detailing which 180 authentication commands are available. 182 The "USER" argument indicates that AUTHINFO USER/PASS is supported 183 as defined by Section 2.3 of this document. The "USER" argument 184 MUST NOT be advertised, and the AUTHINFO USER/PASS commands SHOULD 185 NOT be provided, unless a strong encryption layer (e.g. TLS [NNTP- 186 TLS]) is in use or backward compatibility dictates otherwise. 188 The "SASL:" argument indicates that AUTHINFO SASL is supported as 189 defined by Section 2.4 of this document. The "SASL:" argument is 190 followed immediately (no intervening whitespace) by a comma- 191 separated list of available SASL mechanism names, and the colon 192 (":") is always included even if no mechanisms are available. 194 The server may list the AUTHINFO capability with no arguments, 195 which indicates that it complies with this draft and does not 196 permit any authentication commands in its current state. In this 197 case, the client MUST NOT attempt to utilize any AUTHINFO commands, 198 even if it contains logic to do so (e.g. for backward compatibility 199 with servers that are not compliant with this specification). 201 Future extensions may add additional arguments to this capability. 202 Unrecognized arguments SHOULD be ignored or brought to the 203 attention of the user. 205 Example (here, the STARTTLS extension [NNTP-TLS] is also in use): 206 [C] LIST EXTENSIONS 207 [S] 202 Extensions supported: 208 [S] STARTTLS 209 [S] AUTHINFO SASL:CRAM-MD5,DIGEST-MD5,GSSAPI 210 [S] . 211 [C] STARTTLS 212 [S] 382 Continue with TLS negotiation 213 [TLS negotiation proceeds, further commands protected by TLS layer] 214 [C] LIST EXTENSIONS 215 [S] 202 Extensions supported: 216 [S] AUTHINFO USER SASL:CRAM-MD5,DIGEST-MD5,GSSAPI,PLAIN,EXTERNAL 217 [S] . 219 2.2. Authenticating with the AUTHINFO Extension 221 When an NNTP server responds to a client command with a 480 222 response, this indicates the client MUST authenticate and/or 223 authorize in order to use that command or access the indicated 224 resource. Use of the AUTHINFO command as described below is one 225 such way that a client can authenticate/authorize to the server. A 226 client intending to use AUTHINFO may issue the LIST EXTENSIONS 227 command to obtain the available authentication commands and 228 mechanisms before attempting authentication. 230 A client MAY attempt the first step of authentication at any time 231 during a session to acquire additional privileges without having 232 received a 480 response. The client MUST NOT under any 233 circumstances continue with any steps of authentication beyond the 234 first, unless the response code from the server indicates that the 235 authentication exchange is welcomed. In particular, anything other 236 than a 38x response code indicates that the client MUST NOT 237 continue the authentication exchange. 239 Servers are not required to accept unsolicited authentication 240 information from the client, therefore clients MUST accommodate 241 servers that reject such authentication information. Additionally, 242 servers may accept authentication information and yet still deny 243 access to some or all resources; the permanent 502 response 244 indicates a resource is unavailable even though authentication has 245 been performed (this is in contrast to the temporary 480 error 246 indicating that a resource is unavailable now but may become 247 available after authentication). 249 A server MUST NOT under any circumstances reply to an AUTHINFO 250 command with a 480 response. 252 After a successful authentication, the client MUST NOT issue 253 another AUTHINFO command in the same session and a server MUST 254 reject any further AUTHINFO commands with a 502 response. The 255 client SHOULD send a LIST EXTENSIONS command as the first command 256 after a successful authentication. 258 The extensions returned in response to a LIST EXTENSIONS command 259 received after authentication MAY be different that the list 260 returned before authentication. For example an NNTP server may not 261 want to advertise support for a specific extension unless a client 262 has been authenticated. 264 A server MUST NOT return the AUTHINFO extension label in response 265 to a LIST EXTENSIONS command received after authentication (since 266 no further AUTHINFO commands may be issued), unless a SASL security 267 layer was negotiated as part of the authentication. Per [SASL], if 268 a security layer has been established the server MUST continue to 269 advertise the AUTHINFO extension label with the same arguments as 270 before authentication so that the client may be able to detect a 271 possible active down-negotiation attack (note that clients still 272 MUST NOT issue further AUTHINFO commands). 274 2.3. AUTHINFO USER/PASS Command 276 This section supersedes the definition of the AUTHINFO USER and 277 AUTHINFO PASS commands as documented in Section 3.1.1 of [NNTP- 278 COMMON]. 280 These commands MUST NOT be pipelined. 282 2.3.1. Usage 284 Syntax 285 AUTHINFO USER username 286 AUTHINFO PASS password 288 Responses 289 281 Authentication accepted 290 381 Password required [1] 291 481 Authentication failed/rejected 292 482 Authentication commands issued out of sequence 293 502 Command unavailable [2] 295 [1] Only valid for AUTHINFO USER. Note that unlike traditional 3xx 296 codes which indicate that the client may continue the current 297 command, the legacy 381 code means that the AUTHINFO PASS command 298 must be used to complete the authentication exchange. 300 [2] If authentication has already occurred, AUTHINFO USER/PASS are 301 not valid commands (see section 2.2). 303 NOTE: Notwithstanding section 3.2.1 of [NNTP], the server MUST NOT 304 return 480 in response to AUTHINFO USER/PASS. 306 Parameters 307 username = UTF-8 string identifying the user/client 308 password = UTF-8 string representing the user's password 310 2.3.2. Description 312 The AUTHINFO USER and AUTHINFO PASS commands are used to present 313 clear text credentials to the server. These credentials consist of 314 a username or a username plus a password (the distinction is that a 315 password is expected to be kept secret while a username is not; 316 this does not directly affect the protocol but may have an impact 317 on user interfaces). The username is supplied through the AUTHINFO 318 USER command, and the password through the AUTHINFO PASS command. 320 If the server requires only a username, it MUST NOT give a 381 321 response to AUTHINFO USER and MUST give a 482 response to AUTHINFO 322 PASS. 324 If the server requires both username and password, the former MUST 325 be sent before the latter. The server will need to cache the 326 username until the password is received; it MAY require the 327 password to be sent in the immediately next command (in other 328 words, only caching the username until the next command is sent). 329 The server: 331 - MUST return a 381 response to AUTHINFO USER; 332 - MUST return a 482 response to AUTHINFO PASS if there is no 333 cached username; 334 - MUST use the argument of the most recent AUTHINFO USER for 335 authentication; 336 - MUST NOT return a 381 response to AUTHINFO PASS. 338 The server MAY determine whether or not a password is needed based 339 on the username. Thus the same server can respond with both 381 and 340 other response codes to AUTHINFO USER. 342 The AUTHINFO PASS command permits the client to use a clear-text 343 password to authenticate. A compliant implementation MUST NOT 344 implement this mechanism without also implementing support for TLS 345 [NNTP-TLS]. Use of this mechanism without an active strong 346 encryption layer is deprecated, as it exposes the user's password 347 to all parties on the network between the client and the server. 348 Any implementation of this mechanism SHOULD be configurable to 349 disable it whenever a strong encryption layer such as that provided 350 by [NNTP-TLS] is not active, and this configuration SHOULD be the 351 default. The server will use the 483 response code to indicate 352 that the datastream is insufficiently secure for the command being 353 attempted. 355 Usernames and passwords MUST use the UTF-8 [UTF-8] character set 356 and a client MUST convert any user input to UTF-8 if necessary. 358 Note that a server MAY, but is not required to, allow white space 359 characters in usernames and passwords. A server implementation MAY 360 blindly split command arguments at white space and therefore not 361 preserve the exact sequence of white space characters in the 362 username or password. Therefore a client SHOULD scan the username 363 and password for whitespace, and if detected, warn the user of the 364 likelihood of problems. The SASL PLAIN [PLAIN] mechanism is 365 recommended as an alternative, as it does not suffer from these 366 issues. 368 2.3.3. Examples 370 Example of successful AUTHINFO USER: 372 [C] AUTHINFO USER wilma 373 [S] 281 Authentication accepted 375 Example of successful AUTHINFO USER/PASS: 377 [C] AUTHINFO USER fred 378 [S] 381 Enter passphrase 379 [C] AUTHINFO PASS flintstone 380 [S] 281 Authentication accepted 382 Example of AUTHINFO USER/PASS requiring a security layer: 384 [C] AUTHINFO USER fred@stonecanyon.example 385 [S] 483 Encryption or stronger authentication required 387 Example of failed AUTHINFO USER/PASS: 389 [C] AUTHINFO USER barney 390 [S] 381 Enter passphrase 391 [C] AUTHINFO PASS flintstone 392 [S] 481 Authentication failed 394 Example of AUTHINFO PASS before AUTHINFO USER: 396 [C] AUTHINFO PASS flintstone 397 [S] 482 Authentication commands issued out of sequence 399 2.4. AUTHINFO SASL Command 401 This section defines a formal profile of the Simple Authentication 402 and Security Layer [SASL]. The use of the AUTHINFO GENERIC command 403 as documented in Section 3.1.3 of [NNTP-COMMON] as a way to perform 404 SASL authentication is deprecated in favor of the AUTHINFO SASL 405 command. A server SHOULD NOT advertise AUTHINFO GENERIC in the 406 list of capabilities returned by LIST EXTENSIONS. 408 This command MUST NOT be pipelined. 410 2.4.1. Usage 412 Syntax 413 AUTHINFO SASL mechanism [initial-response] 415 Responses 416 281 Authentication accepted 417 283 challenge Authentication accepted (with success data) [1] 418 383 challenge Continue with SASL exchange [1] 419 481 Authentication failed/rejected 420 482 SASL protocol error 421 502 Command unavailable [2] 423 [1] These responses MAY exceed 512 octets. The maximum length of 424 these responses is increased to that which can accommodate the 425 largest encoded challenge possible for any of the SASL mechanisms 426 supported by the implementation. 428 [2] If authentication has already occurred, AUTHINFO SASL is not a 429 valid command (see section 2.2). 431 NOTE: Notwithstanding section 3.2.1 of [NNTP], the server MUST NOT 432 return 480 in response to AUTHINFO USER/PASS. 434 Parameters 435 mechanism = String identifying a [SASL] authentication 436 mechanism. 437 initial-response = Optional initial client response. If present, 438 the response MUST be encoded as specified in 439 Section 3 of [BASE64]. 440 challenge = Server challenge. The challenge MUST be 441 encoded as specified in Section 3 of [BASE64]. 443 2.4.2. Description 445 The AUTHINFO SASL command initiates a [SASL] authentication 446 exchange between the client and the server. The client identifies 447 the SASL mechanism to use with the first parameter of the AUTHINFO 448 SASL command. If the server supports the requested authentication 449 mechanism, it performs the SASL exchange to authenticate the user. 450 Optionally, it also negotiates a security layer for subsequent 451 protocol interactions during this session. If the requested 452 authentication mechanism is invalid (e.g. is not supported), the 453 server rejects the AUTHINFO SASL command with a 501 reply. If the 454 requested authentication mechanism requires an encryption layer, 455 the server rejects the AUTHINFO SASL command with a 483 reply. 457 The service name specified by this protocol's profile of SASL is 458 "nntp". 460 The SASL authentication exchange consists of a series of server 461 challenges and client responses that are specific to the chosen 462 [SASL] mechanism. 464 A server challenge is sent as a 383 reply with a single argument 465 containing the [BASE64] encoded string supplied by the SASL 466 mechanism. A server challenge that has zero length MUST be sent as 467 a single equals sign ("=") and not omitted (in order to comply with 468 the [NNTP] requirement that responses always have the same number 469 of arguments). 471 A client response consists of a line containing a [BASE64] encoded 472 string. A client response that has zero length MUST be sent as a 473 single equals sign ("=") and not omitted (for consistency with the 474 server challenge format). If the client wishes to cancel the 475 authentication exchange, it issues a line with a single "*". If 476 the server receives such a response, it MUST reject the AUTHINFO 477 SASL command by sending a 481 reply. 479 Note that these [BASE64] strings can be much longer than normal 480 NNTP responses. Clients and servers MUST be able to handle the 481 maximum encoded size of challenges and responses generated by their 482 supported authentication mechanisms. This requirement is 483 independent of any line length limitations the client or server may 484 have in other parts of its protocol implementation. 486 The optional initial response argument to the AUTHINFO SASL command 487 is used to save a round trip when using authentication mechanisms 488 that support an initial client response. If the initial response 489 argument is omitted and the chosen mechanism requires an initial 490 client response, the server MUST proceed as defined in section 5.1 491 of [SASL]. In NNTP, a server challenge that contains no data is 492 equivalent to a zero length challenge and is encoded as a single 493 equals sign ("="). 495 Note that the AUTHINFO SASL command is still subject to the line 496 length limitations defined in [NNTP]. If use of the initial 497 response argument would cause the AUTHINFO SASL command to exceed 498 this length, the client MUST NOT use the initial response parameter 499 (and instead proceed as defined in section 5.1 of [SASL]). 501 If the client is transmitting an initial response of zero length, 502 it MUST instead transmit the response as a single equals sign 503 ("="). This indicates that the response is present, but contains 504 no data. 506 If the client uses an initial-response argument to the AUTHINFO 507 SASL command with a SASL mechanism that does not support an initial 508 client response, the server MUST reject the AUTHINFO SASL command 509 with a 482 reply. 511 If the server cannot [BASE64] decode any client response, it MUST 512 reject the AUTHINFO SASL command with a 504 reply. If the client 513 cannot BASE64 decode any of the server's challenges, it MUST cancel 514 the authentication using the "*" response. In particular, servers 515 and clients MUST reject (and not ignore) any character not 516 explicitly allowed by the BASE64 alphabet, and MUST reject any 517 sequence of BASE64 characters that contains the pad character ('=') 518 anywhere other than the end of the string (e.g. "=AAA" and 519 "AAA=BBB" are not allowed). 521 The authorization identity generated by this [SASL] exchange is a 522 simple username, and both client and server MUST use the [SASLprep] 523 profile of the [StringPrep] algorithm to prepare these names for 524 transmission or comparison. If preparation of the authorization 525 identity fails or results in an empty string (unless it was 526 transmitted as the empty string), the server MUST fail the 527 authentication with a 481 reply. 529 Should the client successfully complete the exchange, the server 530 issues either a 283 or 281 reply. If the server is unable to 531 authenticate the client, it MUST reject the AUTHINFO SASL command 532 with a 481 reply. If an AUTHINFO command fails, the client MAY 533 proceed without authentication. Alternatively, the client MAY try 534 another authentication mechanism, or present different credentials 535 by issuing another AUTHINFO command. 537 If the SASL mechanism returns additional data on success (e.g. 538 server authentication), the NNTP server issues a 283 reply with a 539 single argument containing the [BASE64] encoded string supplied by 540 the SASL mechanism. If no additional data is returned on success, 541 the server issues a 281 reply. 543 If a security layer is negotiated during the SASL exchange, it 544 takes effect for the client on the octet immediately following the 545 CRLF that concludes the last response generated by the client. For 546 the server, it takes effect immediately following the CRLF of its 547 success reply. 549 When a security layer takes effect, the server MUST discard any 550 knowledge obtained from the client that was not obtained from the 551 SASL negotiation itself. Likewise, the client MUST discard any 552 knowledge obtained from the server, such as the list of NNTP 553 extensions, that was not obtained from the SASL negotiation itself. 554 (Note that a client MAY compare the advertised SASL mechanisms 555 before and after authentication in order to detect an active down- 556 negotiation attack.) 558 When both TLS [NNTP-TLS] and SASL security layers are in effect, 559 the TLS encoding MUST be applied after the SASL encoding (the 560 cleartext data is always SASL encoded first and then the resultant 561 data is TLS encoded). 563 To ensure interoperability, client and server implementations of 564 this extension MUST implement the [DIGEST-MD5] SASL mechanism. 566 If AUTHINFO USER/PASS and AUTHINFO SASL are both implemented, the 567 SASL [PLAIN] mechanism SHOULD also be implemented, as the 568 functionality of DIGEST-MD5 is insufficient for some environments 569 (e.g. the server may need to pass the raw password off to an 570 external authentication service). The SASL PLAIN mechanism is 571 preferred over AUTHINFO USER, even if there is not a strong 572 encryption layer active, because it eliminates limitations that 573 AUTHINFO USER/PASS has with regards to white space characters being 574 used in usernames and passwords. 576 2.4.3. Examples 577 Example of the [PLAIN] SASL mechanism under a TLS layer, using an 578 initial client response: 580 [C] LIST EXTENSIONS 581 [S] 202 Extensions supported: 582 [S] STARTTLS 583 [S] AUTHINFO SASL:CRAM-MD5,DIGEST-MD5,GSSAPI 584 [S] . 585 [C] STARTTLS 586 [S] 382 Continue with TLS negotiation 587 [TLS negotiation proceeds, further commands protected by TLS layer] 588 [C] LIST EXTENSIONS 589 [S] 202 Extensions supported: 590 [S] AUTHINFO USER SASL:CRAM-MD5,DIGEST-MD5,GSSAPI,PLAIN,EXTERNAL 591 [S] . 592 [C] AUTHINFO SASL PLAIN AHRlc3QAMTIzNA== 593 [S] 281 Authentication accepted 595 Example of the EXTERNAL SASL mechanism under a TLS layer, using the 596 authorization identity derived from the client TLS certificate, and 597 thus a zero-length initial client response (commands prior to 598 AUTHINFO SASL are the same as the previous example and have been 599 omitted): 601 [C] AUTHINFO SASL EXTERNAL = 602 [S] 281 Authentication accepted 604 Example of the [DIGEST-MD5] SASL mechanism, which includes a server 605 challenge and server success data (whitespace has been inserted for 606 clarity; base64-encoded data is actually sent as a single line with 607 no embedded whitespace): 609 [C] AUTHINFO SASL DIGEST-MD5 610 [S] 383 bm9uY2U9InNheUFPaENFS0dJZFBNSEMwd3RsZUxxT0ljT0kyd1FZSWU0 611 enplQXR1aVE9IixyZWFsbT0iZWFnbGUub2NlYW5hLmNvbSIscW9wPSJhdXRo 612 LGF1dGgtaW50LGF1dGgtY29uZiIsY2lwaGVyPSJyYzQtNDAscmM0LTU2LHJj 613 NCxkZXMsM2RlcyIsbWF4YnVmPTQwOTYsY2hhcnNldD11dGYtOCxhbGdvcml0 614 aG09bWQ1LXNlc3M= 615 [C] dXNlcm5hbWU9InRlc3QiLHJlYWxtPSJlYWdsZS5vY2VhbmEuY29tIixub25j 616 ZT0ic2F5QU9oQ0VLR0lkUE1IQzB3dGxlTHFPSWNPSTJ3UVlJZTR6emVBdHVp 617 UT0iLGNub25jZT0iMFkzSlFWMlRnOVNjRGlwK08xU1ZDMHJoVmcvLytkbk9J 618 aUd6LzdDZU5KOD0iLG5jPTAwMDAwMDAxLHFvcD1hdXRoLWNvbmYsY2lwaGVy 619 PXJjNCxtYXhidWY9MTAyNCxkaWdlc3QtdXJpPSJubnRwL2xvY2FsaG9zdCIs 620 cmVzcG9uc2U9ZDQzY2Y2NmNmZmE5MDNmOWViMDM1NmMwOGEzZGIwZjI= 621 [S] 283 cnNwYXV0aD1kZTJlMTI3ZTVhODFjZGE1M2Q5N2FjZGEzNWNkZTgzYQ== 623 Example of a failed authentication due to bad [GSSAPI] credentials. 624 Note that while the mechanism can utilize the initial response, the 625 client does not send it because of the limitation on command 626 lengths, resulting in a zero-length server challenge (here 627 whitespace has been inserted for clarity; base64-encoded data is 628 actually sent as a single line with no embedded whitespace): 630 [C] AUTHINFO SASL GSSAPI 631 [S] 383 = 632 [C] YIICOAYJKoZIhvcSAQICAQBuggInMIICI6ADAgEFoQMCAQ6iBwMFACAAAACj 633 ggE/YYIBOzCCATegAwIBBaEYGxZURVNULk5FVC5JU0MuVVBFTk4uRURVoiQw 634 IqADAgEDoRswGRsEbmV3cxsRbmV0bmV3cy51cGVubi5lZHWjge8wgeygAwIB 635 EKEDAgECooHfBIHcSQfLKC8vm2i17EXmomwk6hHvjBY/BnKnvvDTrbno3198 636 vlX2RSUt+CjuAKhcDcj4DW0gvZEqH7t5v9yWedzztlpaThebBat6hQNr9NJP 637 ozh1/+74HUwhGWb50KtjuftO/ftQ8q0nTuYKgIq6PM4tp2ddo1IfpjfdNR9E 638 95GFi3y1uBT7lQOwtQbRJUjPSO3ijdue9V7cNNVmYsBsqNsaHhvlBJEXf4WJ 639 djH8yG+Dw/gX8fUTtC5fDpB5zLt01mkSXh6Wc4UhqQtwZBI2t/+TpX1okbg6 640 Hr1ZZupeH6SByjCBx6ADAgEQooG/BIG8GnCmcXWtqhXh48dGTLHQgJ04K5Fj 641 RMMq2qPSbiha9lq0osqR2KAnQA6LioWYxU+6yPKpBDSC5WOT441fUfkM8iAL 642 kW3uNc+luFCGcnDsacrmoVU7Y6Akcp9m7Fm7orRc+TWSWPpBg3OR2oG3ATW0 643 0NAz8TT06VOLVxIMUTINKdYVI/Ja7f3sy+/N4LGkJqScCQOwlo5tfDWn/UQF 644 iTWo5Zw435rH8pjy2smQCnqC14v3NMAWTu4j+dzHUNw= 645 [S] 481 Authentication error 647 Example of a client aborting in the midst of an exchange: 649 [C] AUTHINFO SASL GSSAPI 650 [S] 383 = 651 [C] * 652 [S] 481 Authentication aborted as requested 654 Example of attempting to use a mechanism that is not supported by 655 the server: 657 [C] AUTHINFO SASL EXAMPLE 658 [S] 501 Mechanism not recognized 660 Example of attempting to use a mechanism that requires a security 661 layer: 663 [C] AUTHINFO SASL PLAIN 664 [S] 483 Encryption or stronger authentication required 666 Example of using an initial response with a mechanism that doesn't 667 support it (server must start the exchange): 669 [C] AUTHINFO SASL CRAM-MD5 AHRlc3QAMTIzNA== 670 [S] 482 SASL protocol error 672 3. Augmented BNF Syntax for the AUTHINFO Extension 674 This section describes the syntax of the AUTHINFO extension. It 675 extends the syntax in [NNTP], and non-terminals not defined in this 676 document are defined there. 678 3.1. Commands 680 This syntax extends the non-terminal "command", which represents an 681 NNTP command. 683 command =/ authinfo-user-command / 684 authinfo-pass-command / 685 authinfo-sasl-command 687 authinfo-user-command = "AUTHINFO" WS "USER" WS username 688 authinfo-pass-command = "AUTHINFO" WS "PASS" WS password 689 authinfo-sasl-command = "AUTHINFO" WS "SASL" WS mechanism 690 [WS initial-response] 692 username = 1*user-pass-char 693 password = 1*user-pass-char 694 user-pass-char = P-CHAR 695 initial-response = base64-opt 697 NOTE: A server implementation MAY parse AUTHINFO USER and AUTHINFO 698 PASS specially as to allow white space to be used within the 699 username or password. Such implementations accept the additional 700 syntax (making these two items inconsistent with "x-argument" in 701 section 9.1 of [NNTP]): 703 user-pass-char =/ SP / TAB 705 In doing so, the grammar can become ambiguous if the username or 706 password begins or ends with white space. To solve this ambiguity, 707 such implementations typically treat everything between the first 708 white space character following "USER"/"PASS" and CRLF as the 709 username/password. 711 3.2. Command Continuation 713 This syntax extends the non-terminal "command-continuation", which 714 represents the further material sent by the client in the case of 715 multi-stage commands. 717 command-continuation =/ authinfo-sasl-continuation 718 authinfo-sasl-continuation = ("*" / base64-opt) CRLF 719 ; client must send a continuation following each 720 ; "383" response from the server 722 3.3. Responses 724 This syntax extends the non-terminal "simple-response-content" for 725 the various commands in this specification. 727 simple-response-content =/ response-sasl-content 728 response-sasl-content = "283" SP base64 / "383" SP base64-opt 730 3.4. LIST EXTENSIONS responses 732 This syntax defines the specific LIST EXTENSIONS responses for the 733 AUTHINFO extension. 735 extension-descriptor =/ authinfo-extension 736 authinfo-extension = %x41.55.54.48.49.4E.46.4F ; "AUTHINFO" 737 *(SPA authinfo-extension-arg) 738 authinfo-extension-arg = "USER" / 739 "SASL:" [mechanism *("," mechanism)] 741 3.5. General non-terminals 743 mechanism = 1*20mech-char 744 mech-char = UPPER / DIGIT / "-" / "_" 746 base64-opt = "=" / base64 748 4. Summary of Response Codes 750 This section contains a list of every new response code defined in 751 this document, whether it is multi-line, which commands can 752 generate it, what arguments it has, and what its meaning is. 754 Response code 281 755 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL 756 Meaning: authentication accepted 758 Response code 283 759 Generated by: AUTHINFO SASL 760 1 argument: challenge 761 Meaning: authentication accepted (with success data) 763 Response code 381 764 Generated by: AUTHINFO USER 765 Meaning: password required via AUTHINFO PASS command. Note 766 that this code is used for backwards compatibility and does 767 not conform to the traditional use of 3xx codes. 769 Response code 383 770 Generated by: AUTHINFO SASL 771 1 argument: challenge 772 Meaning: continue with SASL exchange 774 Response code 481 775 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL 776 Meaning: authentication failed/rejected 778 Response code 482 779 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL 780 Meaning: authentication commands issued out of sequence or 781 SASL protocol error 783 5. Authentication Tracking/Logging 785 This section contains implementation suggestions and notes of best 786 current practice, and does not specify further network protocol 787 requirements. 789 Once authenticated, the authorization identity presented in the 790 AUTHINFO exchange (username when using USER/PASS) SHOULD be 791 included in an audit trail associating the identity with any 792 articles supplied during a POST operation, and this configuration 793 SHOULD be the default. This may be accomplished, for example, by 794 inserting headers in the posted articles or by a server logging 795 mechanism. The server MAY provide a facility for disabling the 796 procedure described above, as some users or administrators may 797 consider it a violation of privacy. 799 6. Security Considerations 801 Security issues are discussed throughout this memo. 803 Before the [SASL] negotiation has begun, any protocol interactions 804 may have been performed in the clear and may have been modified by 805 an active attacker. For this reason, clients and servers MUST 806 discard any knowledge obtained prior to the start of the SASL 807 negotiation upon the establishment of a security layer. 809 Servers MAY implement a policy whereby the connection is dropped 810 after a number of failed authentication attempts. If they do so, 811 they SHOULD NOT drop the connection until at least 3 attempts at 812 authentication have failed. 814 Implementations MUST support a configuration where authentication 815 mechanisms that are vulnerable to passive eavesdropping attacks 816 (such as AUTHINFO USER/PASS and SASL [PLAIN]) are not advertised or 817 used without the presence of an external security layer such as TLS 818 [NNTP-TLS]. 820 When multiple authentication mechanisms are permitted by both 821 client and server, an active attacker can cause a down-negotiation 822 to the weakest mechanism. For this reason, both clients and 823 servers SHOULD be configurable to forbid use of weak mechanisms. 825 7. IANA Considerations 827 7.1. IANA Considerations for SASL/GSSAPI services 829 Please register the SASL/GSSAPI service name "nntp". This service 830 name refers to authenticated use of Usenet news service when 831 provided via the [NNTP] protocol. 833 o Published Specification: This document. 835 o Author, Change Controller, and Contact for Further Information: 836 Author of this document. 838 7.2. IANA Considerations for NNTP extensions 840 Below is a formal definition of the AUTHINFO extension as required 841 by Section 8 of [NNTP] for the IANA registry. 843 o This extension provides an extensible mechanism for NNTP 844 authentication via a variety of methods. 846 o The extension-label is "AUTHINFO". 848 o The extension-label has two possible optional arguments "USER" 849 and "SASL:" (as defined in Section 2.1) indicating which 850 variants of the AUTHINFO command are supported. 852 o The extension defines three new commands, AUTHINFO USER, 853 AUTHINFO PASS, and AUTHINFO SASL, whose behavior, arguments, and 854 responses are defined in Sections 2.3 and 2.4. 856 o The extension does not associate any new responses with pre- 857 existing NNTP commands. 859 o The extension may affect the overall behavior of both server and 860 client, in that the AUTHINFO SASL command requires that 861 subsequent communication to be transmitted via an intermediary 862 security layer. 864 o The extension does not affect the maximum length of commands or 865 of initial response lines of pre-existing responses. 867 o The extension defines two new responses, 283 and 383, whose 868 lengths may exceed 512 octets. The maximum length of these 869 responses is increased to that which can accommodate the largest 870 encoded challenge possible for any of the SASL mechanisms 871 supported by the implementation. 873 o The extension does not alter pipelining, but AUTHINFO commands 874 cannot be pipelined. 876 o Use of this extension may alter the output from LIST EXTENSIONS. 877 Once any AUTHINFO command has been used successfully, the server 878 may alter the list of arguments for the AUTHINFO capability 879 (although the capability itself must still be listed, even with 880 zero arguments). However, if a SASL security layer has been 881 negotiated, the server SHOULD continue to advertise the "SASL:" 882 argument with the same list of mechanisms, because the client 883 may wish to compare the pre- and post-authentication list of 884 SASL mechanisms in order to detect active down-negotiation 885 attacks. 887 o The extension does not cause any pre-existing command to produce 888 a 401, 480, or 483 response. 890 o The AUTHINFO commands can be used before or after the MODE 891 READER command, with the same semantics. 893 o Published Specification: This document. 895 o Author, Change Controller, and Contact for Further Information: 896 Author of this document. 898 8. References 900 8.1. Normative References 902 [ABNF] Crocker, D., Overell, P., "Augmented BNF for Syntax 903 Specifications: ABNF", RFC 2234, November 1997. 905 [AUTH] Haller, N., Atkinson, R., "On Internet Authentication", 906 RFC 1704, Bell Communications Research, October 1994. 908 [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data 909 Encodings", RFC 3548, July 2003. 911 [DIGEST-MD5] Leach, P., Newman, C., "Using Digest Authentication as 912 a SASL Mechanism", RFC 2831, May 2000. 914 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 915 Requirement Levels", RFC 2119, Harvard University, March 1997. 917 [NNTP] Feather, C., "Network News Transport Protocol", 918 draft-ietf-nntpext-base-*.txt, Work in Progress. 920 [NNTP-TLS] Vinocur, J., "Using TLS with NNTP", 921 draft-ietf-nntpext-tls-nntp-*.txt, Work in Progress. 923 [SASL] Melnikov, A., "Simple Authentication and Security Layer 924 (SASL)", draft-ietf-sasl-rfc2222bis-*.txt, Work in Progress. 926 [SASLprep] Zeilega, K., "SASLprep: Stringprep profile for user names 927 and passwords", draft-ietf-sasl-saslprep-*.txt, Work in Progress. 929 [StringPrep] Hoffman, P. and Blanchet, M., "Preparation of 930 Internationalized Strings ("stringprep")", 931 draft-hoffman-rfc3454bis-*.txt, Work in Progress. 933 8.2. Informative References 935 [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", draft- 936 ietf-sasl-crammd5-*.txt, Work in Progress. 938 [GSSAPI] Melnikov, A., "SASL GSSAPI Mechanisms", draft-ietf-sasl- 939 gssapi-*.txt, Work in Progress. 941 [NNTP-COMMON] Barber, S., "Common NNTP Extensions", RFC 2980, 942 Academ Consulting Services, October 2000. 944 [PLAIN] Zeilenga, K., "The Plain SASL Mechanism", draft-ietf-sasl- 945 plain-*.txt, Work in Progress. 947 [SMTP] Klensin, J., "Simple Mail Transport Protocol", RFC 2821, 948 AT&T Laboratories, April 2001. 950 [UTF-8] Yergeau, F. "UTF-8, a transformation format of ISO 10646", 951 RFC 3629, Alis Technologies, November 2003. 953 9. Authors' Addresses 955 Jeffrey M. Vinocur 956 Department of Computer Science 957 Upson Hall 958 Cornell University 959 Ithaca, NY 14853 USA 961 Email: vinocur@cs.cornell.edu 963 Kenneth Murchison 964 Oceana Matrix Ltd. 965 21 Princeton Place 966 Orchard Park, NY 14127 USA 968 Email: ken@oceana.com 970 Chris Newman 971 Sun Microsystems 972 1050 Lakes Drive, Suite 250 973 West Covina, CA 91790 USA 975 Email: cnewman@iplanet.com 977 10. Acknowledgments 979 A significant amount of the authentication text was originally from 980 the NNTP revision or common authentication specs written by Stan 981 Barber. A significant amount of the SASL text was lifted from the 982 revisions to RFC 1734 and RFC 2554 by Rob Siemborski. 984 Special acknowledgment also goes to Russ Allbery, Clive Feather, 985 and others who commented privately on intermediate revisions of 986 this document, as well as the members of the IETF NNTP Working 987 Group for continual (yet sporadic) insight in discussion. 989 11. Intellectual Property Rights 991 The IETF takes no position regarding the validity or scope of any 992 intellectual property or other rights that might be claimed to 993 pertain to the implementation or use of the technology described in 994 this document or the extent to which any license under such rights 995 might or might not be available; neither does it represent that it 996 has made any effort to identify any such rights. Information on 997 the IETF's procedures with respect to rights in standards-track and 998 standards-related documentation can be found in BCP-11. Copies of 999 claims of rights made available for publication and any assurances 1000 of licenses to be made available, or the result of an attempt made 1001 to obtain a general license or permission for the use of such 1002 proprietary rights by implementers or users of this specification 1003 can be obtained from the IETF Secretariat. 1005 The IETF invites any interested party to bring to its attention any 1006 copyrights, patents or patent applications, or other proprietary 1007 rights which may cover technology that may be required to practice 1008 this standard. Please address the information to the IETF 1009 Executive Director. 1011 12. Copyright 1013 Copyright (C) The Internet Society (2004). This document is 1014 subject to the rights, licenses and restrictions contained in BCP 1015 78, and except as set forth therein, the authors retain all their 1016 rights." 1018 This document and the information contained herein are provided on 1019 an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE 1020 REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND 1021 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, 1022 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT 1023 THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR 1024 ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 1025 PARTICULAR PURPOSE.