idnits 2.17.1 draft-ietf-nntpext-authinfo-02.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 17. ** The document claims conformance with section 10 of RFC 2026, but uses some RFC 3978/3979 boilerplate. As RFC 3978/3979 replaces section 10 of RFC 2026, you should not claim conformance with it if you have changed to using RFC 3978/3979 boilerplate. ** 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. ** The document seems to lack an RFC 3978 Section 5.5 (updated by RFC 4748) Disclaimer -- however, there's a paragraph with a matching beginning. Boilerplate error? ** 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? ** 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? ** 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 5 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. 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 (July 2004) is 7222 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: 'NNTP-COM-MON' is mentioned on line 96, but not defined == Missing Reference: 'C' is mentioned on line 615, but not defined == Missing Reference: 'S' is mentioned on line 616, but not defined -- Looks like a reference, but probably isn't: '1' on line 369 == Unused Reference: 'ABNF' is defined on line 835, but no explicit reference was found in the text == Unused Reference: 'CRAM-MD5' is defined on line 868, but no explicit reference was found in the text == Unused Reference: 'SMTP' is defined on line 880, 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: 16 errors (**), 0 flaws (~~), 9 warnings (==), 18 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Vinocur 3 Internet Draft Cornell University 4 Document: draft-ietf-nntpext-authinfo-02.txt C. Newman 5 Sun Microsystems 6 K. Murchison 7 Oceana Matrix Ltd. 8 July 2004 10 NNTP Extension for Authentication 12 Status of this memo 14 By submitting this Internet-Draft, I certify that any applicable 15 patent or other IPR claims of which I am aware have been disclosed, 16 and any of which I become aware will be disclosed, in accordance 17 with RFC 3668. 19 This document is an Internet-Draft and is in full conformance with 20 all provisions of Section 10 of RFC 2026. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as 25 Internet-Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six 28 months and may be updated, replaced, or obsoleted by other 29 documents at any time. It is inappropriate to use Internet-Drafts 30 as reference material or to cite them other than as "work in 31 progress." 33 The list of current Internet-Drafts can be accessed at 34 http://www.ietf.org/ietf/1id-abstracts.txt. 36 The list of Internet-Draft Shadow Directories can be accessed at 37 http://www.ietf.org/shadow.html. 39 Abstract 41 This document defines a profile of the Simple Authentication and 42 Security Layer [SASL] for the Network News Transport Protocol 43 [NNTP] protocol and updates/deprecates information contained in 44 Section 3.1 of [NNTP-COMMON]. This extension allows an NNTP client 45 to indicate an authentication mechanism to the server, perform an 46 authentication protocol exchange, and optionally negotiate a secu- 47 rity layer for subsequent protocol interactions during the 48 remainder of an NNTP session. 50 Table of Contents 52 1. Introduction ............................................. 2 53 1.1. Conventions Used in this Document ................... 3 54 2. The AUTHINFO Extension ................................... 3 55 2.1. AUTHINFO USER/PASS .................................. 5 56 2.1.1. Usage .......................................... 6 57 2.1.2. Description .................................... 6 58 2.1.3. Examples ....................................... 7 59 2.2. AUTHINFO SASL ....................................... 8 60 2.2.1. Usage .......................................... 8 61 2.2.2. Description .................................... 8 62 2.2.3. Examples ....................................... 11 63 3. Augmented BNF Syntax for the AUTHINFO Extension .......... 13 64 3.1. Commands ............................................ 14 65 3.2. Command Continuation ................................ 14 66 3.3. Responses ........................................... 14 67 3.4. LIST EXTENSIONS responses ........................... 14 68 3.5. General non-terminals ............................... 15 69 4. Summary of Response Codes ................................ 15 70 5. Authentication Tracking/Logging .......................... 15 71 6. Security Considerations .................................. 16 72 7. IANA Considerations ...................................... 16 73 7.1. IANA Considerations for SASL/GSSAPI services ........ 16 74 7.2. IANA Considerations for NNTP extensions ............. 17 75 8. References ............................................... 18 76 8.1. Normative References ................................ 18 77 8.2. Informative References .............................. 19 78 9. Authors' Addresses ....................................... 19 79 10. Acknowledgments ......................................... 20 80 11. Intellectual Property Rights ............................ 20 81 12. Copyright ............................................... 20 83 1. Introduction 85 Although NNTP [NNTP] has traditionally provided public access to 86 newsgroups, authentication is often useful, for example to control 87 resource consumption, to allow abusers of the POST command to be 88 identified, and to restrict access to "local" newsgroups. 90 The ad-hoc AUTHINFO USER and AUTHINFO PASS commands, documented in 91 [NNTP-COMMON], provide a very weak authentication mechanism in 92 widespread use by the installed base. Due to their insecurity and 93 ubiquity they are formalized in this specification, but only for 94 use in combination with appropriate security layers. 96 The ad-hoc AUTHINFO GENERIC command, also documented in [NNTP-COM- 97 MON] but much less ubiquitous, provided an NNTP-specific equivalent 98 of the generic SASL [SASL] facility. This document deprecates 99 AUTHINFO GENERIC in favor of an AUTHINFO SASL replacement so that 100 NNTP can benefit from authentication mechanisms developed for other 101 SASL-enabled application protocols including SMTP, POP, IMAP, LDAP, 102 and BEEP. 104 This specification is to be read in conjunction with the NNTP base 105 specification [NNTP]. Except where specifically stated otherwise, 106 in the case of a conflict between these two documents [NNTP] takes 107 precedence over this one. 109 It is also recommended that this specification be read in conjunc- 110 tion with the SASL base specification [SASL]. 112 1.1. Conventions Used in this Document 114 The notational conventions used in this document are the same as 115 those in [NNTP] and any term not defined in this document has the 116 same meaning as in that one. 118 The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD 119 NOT", "MAY", and "OPTIONAL" in this document are to be interpreted 120 as described in "Key words for use in RFCs to Indicate Requirement 121 Levels" [KEYWORDS]. 123 Terms related to authentication are defined in "On Internet Authen- 124 tication" [AUTH]. 126 In the examples, commands from the client are indicated with [C], 127 and responses from the server are indicated with [S]. 129 2. The AUTHINFO Extension 131 A server MAY provide this extension, independently of any other 132 extension defined elsewhere. If the server provides the extension, 133 it MUST include the AUTHINFO extension label in the response to 134 LIST EXTENSIONS. If it does not provide it, it MUST NOT include 135 the extension label. The remainder of this specification is written 136 as if the extension is provided. 138 This extension provides three new commands: AUTHINFO USER, AUTHINFO 139 PASS, and AUTHINFO SASL. At least one of the AUTHINFO USER or 140 AUTHINFO SASL commands MUST be implemented in order to advertise 141 the AUTHINFO extension label. The AUTHINFO extension label con- 142 tains an argument list detailing which authentication commands are 143 available. 145 The "USER" argument indicates that AUTHINFO USER/PASS is supported 146 as defined by Section 2.1 of this document. The "USER" argument 147 MUST NOT be advertised, and the AUTHINFO USER/PASS commands SHOULD 148 NOT be provided, unless a strong encryption layer (e.g. TLS [NNTP- 149 TLS]) is in use or backward compatibility dictates otherwise. 151 The "SASL:" argument indicates that AUTHINFO SASL is supported as 152 defined by Section 2.2 of this document. The "SASL:" argument is 153 followed immediately (no intervening whitespace) by a comma-sepa- 154 rated list of available SASL mechanism names, and the colon (":") 155 is always included even if no mechanisms are available. 157 The server may list the AUTHINFO capability with no arguments, 158 which indicates that it complies with this draft and does not per- 159 mit any authentication commands in its current state. In this 160 case, the client MUST NOT attempt to utilize any AUTHINFO commands, 161 even if it contains logic to do so (e.g. for backward compatibility 162 with servers that are not compliant with this specification). 164 Future extensions may add additional arguments to this capability. 165 Unrecognized arguments SHOULD be ignored or brought to the atten- 166 tion of the user. 168 Example: 169 [C] LIST EXTENSIONS 170 [S] 202 Extensions supported: 171 [S] STARTTLS 172 [S] AUTHINFO SASL:CRAM-MD5,DIGEST-MD5,GSSAPI 173 [S] . 174 [C] STARTTLS 175 [S] 382 Continue with TLS negotiation 176 [TLS negotiation proceeds, further commands protected by TLS layer] 177 [C] LIST EXTENSIONS 178 [S] 202 Extensions supported: 179 [S] AUTHINFO USER SASL:CRAM-MD5,DIGEST-MD5,GSSAPI,PLAIN,EXTERNAL 180 [S] . 182 The AUTHINFO extension is used to authenticate a user. Note that 183 authorization is a matter of site policy, not network protocol, and 184 is therefore not discussed in this document. The server determines 185 authorization in whatever manner is defined by its implementation 186 as configured by the site administrator. 188 When an NNTP server responds to a client command with a 480 189 response, this indicates the client MUST authenticate using the 190 AUTHINFO command in order to use that command or access the indi- 191 cated resource. A client intending to use AUTHINFO may issue the 192 LIST EXTENSIONS command to obtain the available authentication 193 commands and mechanisms before attempting authentication. 195 A client MAY attempt the first step of authentication at any time 196 during a session to acquire additional privileges without having 197 received a 480 response. The client MUST NOT under any circum- 198 stances continue with any steps of authentication beyond the first, 199 unless the response code from the server indicates that the authen- 200 tication exchange is welcomed. In particular, anything other than 201 a 38x response code indicates that the client MUST NOT continue the 202 authentication exchange. 204 Servers are not required to accept unsolicited authentication 205 information from the client, therefore clients MUST accommodate 206 servers that reject such authentication information. Additionally, 207 servers may accept authentication information and yet still deny 208 access to some or all resources; the permanent 502 response indi- 209 cates a resource is unavailable even though authentication has been 210 performed (this is in contrast to the temporary 480 error indicat- 211 ing that a resource is unavailable now but may become available 212 after authentication). 214 After a successful authentication, the client may retry the origi- 215 nal command (if any) to which the server replied with the 480 216 response, or continue with some other command (for example, the 217 client may wish to re-fetch the list of newsgroups). 219 After an AUTHINFO command has been successfully completed, no more 220 AUTHINFO commands may be issued in the same session. After a suc- 221 cessful AUTHINFO command completes, a server MUST reject any fur- 222 ther AUTHINFO commands with a 502 response. 224 A server MUST NOT under any circumstances reply to an AUTHINFO com- 225 mand with a 480 response. 227 Note that a successful AUTHINFO command may cause the output of the 228 LIST EXTENSIONS command to change. Any successful authentication 229 MAY result in the server listing different arguments (perhaps list- 230 ing zero arguments) for AUTHINFO, but MUST NOT result in the 231 AUTHINFO capability being removed entirely from LIST EXTENSIONS (as 232 this might falsely indicate to clients that they were dealing with 233 a non-compliant server). Additionally, after a successful AUTHINFO 234 SASL, the SASL: capability MUST continue to be advertised as 235 described in section 2.2.2. 237 2.1. AUTHINFO USER/PASS 239 This section supersedes the definition of the AUTHINFO USER and 240 AUTHINFO PASS commands as documented in Section 3.1.1 of [NNTP- 241 COMMON]. 243 These commands MUST NOT be pipelined. 245 2.1.1. Usage 247 Syntax 248 AUTHINFO USER username 249 AUTHINFO PASS password 251 Responses 252 281 Authentication accepted 253 381 Password required [1] 254 481 Authentication failed/rejected 255 482 Authentication commands issued out of sequence 257 [1] Only valid for AUTHINFO USER. Note that unlike traditional 3xx 258 codes which indicate that the client may continue the current com- 259 mand, the legacy 381 code means that the AUTHINFO PASS command must 260 be used to complete the authentication exchange. 262 Parameters 263 username = UTF-8 string identifying the user/client 264 password = UTF-8 string representing the user's password 266 2.1.2. Description 268 The AUTHINFO USER and AUTHINFO PASS commands are used to present 269 clear text credentials to the server. These credentials consist of 270 a username or a username plus a password (the distinction is that a 271 password is expected to be kept secret while a username is not; 272 this does not directly affect the protocol but may have an impact 273 on user interfaces). The username is supplied through the AUTHINFO 274 USER command and the password through the AUTHINFO PASS command. 276 If the server requires only a username, it MUST NOT give a 381 277 response to AUTHINFO USER and MUST give a 482 response to AUTHINFO 278 PASS. 280 If the server requires both username and password, the former MUST 281 be sent before the latter. The server will need to cache the user- 282 name until the password is received; it MAY require the password to 283 be sent in the immediately next command (in other words, only 284 caching the username until the next command is sent). The server: 286 - MUST return a 381 response to AUTHINFO USER; 287 - MUST return a 482 response to AUTHINFO PASS if there is no cached 288 username; 290 - MUST use the argument of the most recent AUTHINFO USER for 291 authentication; 292 - MUST NOT return a 381 response to AUTHINFO PASS. 294 The server MAY determine whether or not a password is needed based 295 on the username. Thus the same server can respond with both 381 and 296 other response codes to AUTHINFO USER. 298 The AUTHINFO PASS command permits the client to use a clear-text 299 password to authenticate. A compliant implementation MUST NOT 300 implement this mechanism without also implementing support for TLS 301 [NNTP-TLS]. Use of this mechanism without an active strong encryp- 302 tion layer is deprecated as it exposes the user's password to all 303 parties on the network between the client and the server. Any 304 implementation of this mechanism SHOULD be configurable to disable 305 it unless a strong encryption layer such as that provided by [NNTP- 306 TLS] is active, and this configuration SHOULD be the default. The 307 server will use the 483 response code to indicate that the 308 datastream is insufficiently secure for the command being 309 attempted. 311 Usernames and passwords MUST use the UTF-8 [UTF-8] character set 312 and client MUST convert any user input to UTF-8 if necessary. 314 Note that usernames and passwords containing whitespace are 315 allowed, but may not work correctly with servers which blindly 316 split command arguments at whitespace. A client may wish to scan 317 the username and password for whitespace, and if detected, warn the 318 user of the likelihood of problems. The SASL PLAIN [PLAIN] mecha- 319 nism is recommended as an alternative, as it is more robust with 320 regard to character set. 322 2.1.3. Examples 324 Example of successful AUTHINFO USER: 326 [C] AUTHINFO USER wilma 327 [S] 281 Authentication accepted 329 Example of successful AUTHINFO USER/PASS: 331 [C] AUTHINFO USER fred 332 [S] 381 Enter passphrase 333 [C] AUTHINFO PASS flintstone 334 [S] 281 Authentication accepted 336 Example of AUTHINFO USER/PASS requiring a security layer: 338 [C] AUTHINFO USER fred@stonecanyon.example 339 [S] 483 Encryption or stronger authentication required 341 Example of failed AUTHINFO USER/PASS: 343 [C] AUTHINFO USER barney 344 [S] 381 Enter passphrase 345 [C] AUTHINFO PASS flintstone 346 [S] 481 Authentication failed 348 Example of AUTHINFO PASS before AUTHINFO USER: 350 [C] AUTHINFO PASS flintstone 351 [S] 482 Authentication commands issued out of sequence 353 2.2. AUTHINFO SASL 355 2.2.1. Usage 357 This command MUST NOT be pipelined. 359 Syntax 360 AUTHINFO SASL mechanism [initial-response] 362 Responses 363 281 Authentication accepted 364 283 challenge Authentication accepted (with success data) [1] 365 383 challenge Continue with SASL exchange [1] 366 481 Authentication failed/rejected 367 482 SASL protocol error 369 [1] These responses MAY exceed 512 octets. The maximum length of 370 these responses is increased to that which can accommodate the 371 largest encoded challenge possible for any of the SASL mechanisms 372 supported by the implementation. 374 Parameters 375 mechanism = String identifying a [SASL] authentication 376 mechanism. 377 initial-response = Optional initial client response. If present, 378 the response MUST be encoded as specified in 379 Section 3 of [BASE64]. 380 challenge = Server challenge. The challenge MUST be 381 encoded as specified in Section 3 of [BASE64]. 383 2.2.2. Description 384 This section deprecates the definition of the AUTHINFO GENERIC com- 385 mand as documented in Section 3.1.3 of [NNTP-COMMON]. (An imple- 386 mentation MAY support AUTHINFO GENERIC for backward compatibility 387 and still be compliant with this specification. However, this doc- 388 ument does not provide a formal specification of AUTHINFO GENERIC, 389 and does not permit it to be reported in LIST EXTENSIONS.) 391 The AUTHINFO SASL command initiates a [SASL] authentication 392 exchange between the client and the server. The client identifies 393 the SASL mechanism to use with the first parameter of the AUTHINFO 394 SASL command. If the server supports the requested authentication 395 mechanism, it performs the SASL exchange to authenticate the user. 396 Optionally, it also negotiates a security layer for subsequent pro- 397 tocol interactions during this session. If the requested authenti- 398 cation mechanism is invalid (e.g. is not supported), the server 399 rejects the AUTHINFO SASL command with a 501 reply. If the 400 requested authentication mechanism requires an encryption layer, 401 the server rejects the AUTHINFO SASL command with a 483 reply. 403 The SASL authentication exchange consists of a series of server 404 challenges and client responses that are specific to the chosen 405 [SASL] mechanism. 407 A server challenge is sent as a 383 reply with a single argument 408 containing the [BASE64] encoded string supplied by the SASL mecha- 409 nism. If the server challenge has zero length, it MUST instead be 410 sent as a single equals sign ("="), to indicate its presence and 411 separate it from any trailing text. 413 A client response consists of a line containing a [BASE64] encoded 414 string. If the client response has zero length, it MUST instead be 415 sent as a single equals sign ("="). If the client wishes to cancel 416 the authentication exchange, it issues a line with a single "*". 417 If the server receives such a response, it MUST reject the AUTHINFO 418 SASL command by sending a 481 reply. 420 Note that these [BASE64] strings can be much longer than normal 421 NNTP responses. Clients and servers MUST be able to handle the 422 maximum encoded size of challenges and responses generated by their 423 supported authentication mechanisms. This requirement is indepen- 424 dent of any line length limitations the client or server may have 425 in other parts of its protocol implementation. 427 The optional initial response argument to the AUTHINFO SASL command 428 is used to save a round trip when using authentication mechanisms 429 that support an initial client response. If the initial response 430 argument is omitted and the chosen mechanism requires an initial 431 client response, the server MUST proceed as defined in section 5.1 432 of [SASL]. In NNTP, a server challenge that contains no data is 433 defined to be the same as a zero-length challenge as described 434 above. 436 Note that the AUTHINFO SASL command is still subject to the line 437 length limitations defined in [NNTP]. If use of the initial 438 response argument would cause the AUTHINFO SASL command to exceed 439 this length, the client MUST NOT use the initial response parameter 440 (and instead proceed as defined in section 5.1 of [SASL]). 442 If the client is transmitting an initial response of zero length, 443 it MUST instead transmit the response as a single equals sign 444 ("="). This indicates that the response is present, but contains 445 no data. 447 If the client uses an initial-response argument to the AUTHINFO 448 SASL command with a SASL mechanism that does not support an initial 449 client send, the server MUST reject the AUTHINFO SASL command with 450 a 482 reply. 452 If the server cannot [BASE64] decode any client response, it MUST 453 reject the AUTHINFO SASL command with a 504 reply. If the client 454 cannot BASE64 decode any of the server's challenges, it MUST cancel 455 the authentication using the "*" response. In particular, servers 456 and clients MUST reject (and not ignore) any character not explic- 457 itly allowed by the BASE64 alphabet, and MUST reject any sequence 458 of BASE64 characters that contains the pad character ('=') anywhere 459 other than the end of the string (e.g. "=AAA" and "AAA=BBB" are not 460 allowed). 462 The authorization identity generated by this [SASL] exchange is a 463 simple username, and both client and server MUST use the [SASLprep] 464 profile of the [StringPrep] algorithm to prepare these names for 465 transmission or comparison. If preparation of the authorization 466 identity fails or results in an empty string (unless it was trans- 467 mitted as the empty string), the server MUST fail the authentica- 468 tion with a 481 reply. 470 Should the client successfully complete the exchange, the server 471 issues either a 283 or 281 reply. If the server is unable to 472 authenticate the client, it MUST reject the AUTHINFO SASL command 473 with a 481 reply. If an AUTHINFO command fails, the client MAY 474 proceed without authentication. Alternatively, the client MAY try 475 another authentication mechanism or present different credentials 476 by issuing another AUTHINFO command. 478 If the SASL mechanism returns additional data on success (e.g. 479 server authentication), the NNTP server issues a 283 reply with a 480 single argument containing the [BASE64] encoded string supplied by 481 the SASL mechanism. If no additional data is returned on success, 482 the server issues a 281 reply. 484 If a security layer is negotiated during the SASL exchange, it 485 takes effect for the client on the octet immediately following the 486 CRLF that concludes the last response generated by the client. For 487 the server, it takes effect immediately following the CRLF of its 488 success reply. 490 When a security layer takes effect, the server MUST discard any 491 knowledge obtained from the client that was not obtained from the 492 SASL negotiation itself. Likewise, the client MUST discard any 493 knowledge obtained from the server, such as the list of NNTP exten- 494 sions, that was not obtained from the SASL negotiation itself. 495 (Note that a client MAY compare the advertised SASL mechanisms 496 before and after authentication in order to detect an active down- 497 negotiation attack.) 499 After a security layer is established, the server MUST continue to 500 advertise the AUTHINFO capability and "SASL:" argument (with the 501 same mechanism list as before authentication) and SHOULD NOT adver- 502 tise the STARTTLS [NNTP-TLS] capability (as STARTTLS is not allowed 503 after authentication). 505 When both TLS [NNTP-TLS] and SASL security layers are in effect, 506 the TLS encoding MUST be applied after the SASL encoding. 508 To ensure interoperability, client and server implementations of 509 this extension MUST implement the [DIGEST-MD5] SASL mechanism. 511 If AUTHINFO USER/PASS and AUTHINFO SASL are both implemented, the 512 SASL [PLAIN] mechanism SHOULD also be implemented, as the function- 513 ality of DIGEST-MD5 is insufficient for some environments (e.g. the 514 server may need to pass the raw password off to an external authen- 515 tication service). The SASL PLAIN mechanism is preferred over 516 AUTHINFO USER, even if there is not a strong encryption layer 517 active, because it eliminates limitations that AUTHINFO USER/PASS 518 has on the character set used for usernames and passwords. 520 The service name specified by this protocol's profile of SASL is 521 "nntp". 523 2.2.3. Examples 525 Example of the [PLAIN] SASL mechanism under a TLS layer, using an 526 initial client response: 528 [C] LIST EXTENSIONS 529 [S] 202 Extensions supported: 530 [S] STARTTLS 531 [S] AUTHINFO SASL:CRAM-MD5,DIGEST-MD5,GSSAPI 532 [S] . 533 [C] STARTTLS 534 [S] 382 Continue with TLS negotiation 535 [TLS negotiation proceeds, further commands protected by TLS layer] 536 [C] LIST EXTENSIONS 537 [S] 202 Extensions supported: 538 [S] AUTHINFO USER SASL:CRAM-MD5,DIGEST-MD5,GSSAPI,PLAIN,EXTERNAL 539 [S] . 540 [C] AUTHINFO SASL PLAIN AHRlc3QAMTIzNA== 541 [S] 281 Authentication accepted 543 Example of the EXTERNAL SASL mechanism under a TLS layer, using the 544 derived authorization ID, and thus a zero-length initial client 545 response (commands prior to AUTHINFO SASL are the same as the pre- 546 vious example and have been omitted): 548 [C] AUTHINFO SASL EXTERNAL = 549 [S] 281 Authentication accepted 551 Example of the [DIGEST-MD5] SASL mechanism, which includes a server 552 challenge and server success data (whitespace has been inserted for 553 clarity; base64-encoded data is sent as a single line with no 554 embedded whitespace): 556 [C] AUTHINFO SASL DIGEST-MD5 557 [S] 383 bm9uY2U9IlBKUE9GczJKa05VYWhraDNjRmVUN2dZZjFKY0VJakVCSHRK 558 NzFycmNDMTg9IixyZWFsbT0iZWFnbGUub2NlYW5hLmNvbSIscW9wPSJhdXRo 559 IixtYXhidWY9NDA5NixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vz 560 cw== 561 [C] dXNlcm5hbWU9InRlc3QiLHJlYWxtPSJlYWdsZS5vY2VhbmEuY29tIixub25j 562 ZT0iUEpQT0ZzMkprTlVhaGtoM2NGZVQ3Z1lmMUpjRUlqRUJIdEo3MXJyY0Mx 563 OD0iLGNub25jZT0iUmVkV2VqM3JNdFY5U09XSE5BNUVtZFNmVWRFajNCMlpL 564 YTNIeFlHbzJCWT0iLG5jPTAwMDAwMDAxLHFvcD1hdXRoLG1heGJ1Zj0xMDI0 565 LGRpZ2VzdC11cmk9Im5ld3MvbG9jYWxob3N0IixyZXNwb25zZT0zOTg2NWIy 566 NTk0Nzk4ZjY4ZmY5ZWEwNDg1NGE2NGQ1ZQ== 567 [S] 283 cnNwYXV0aD0xYzc0NjdmMTY0OTQ3NmM4ZDJjNzM5ZTY4MjgwMzE2OA== 569 Example of a failed authentication due to bad [GSSAPI] credentials. 570 Note that while the mechanism can utilize the initial response, the 571 client does not send it because of the limitation on command 572 lengths, resulting in a zero-length server challenge (here whites- 573 pace has been inserted for clarity; base64-encoded data is sent as 574 a single line with no embedded whitespace): 576 [C] AUTHINFO SASL GSSAPI 577 [S] 383 = 578 [C] YIICOAYJKoZIhvcSAQICAQBuggInMIICI6ADAgEFoQMCAQ6iBwMFACAAAACj 579 ggE/YYIBOzCCATegAwIBBaEYGxZURVNULk5FVC5JU0MuVVBFTk4uRURVoiQw 580 IqADAgEDoRswGRsEbmV3cxsRbmV0bmV3cy51cGVubi5lZHWjge8wgeygAwIB 581 EKEDAgECooHfBIHcSQfLKC8vm2i17EXmomwk6hHvjBY/BnKnvvDTrbno3198 582 vlX2RSUt+CjuAKhcDcj4DW0gvZEqH7t5v9yWedzztlpaThebBat6hQNr9NJP 583 ozh1/+74HUwhGWb50KtjuftO/ftQ8q0nTuYKgIq6PM4tp2ddo1IfpjfdNR9E 584 95GFi3y1uBT7lQOwtQbRJUjPSO3ijdue9V7cNNVmYsBsqNsaHhvlBJEXf4WJ 585 djH8yG+Dw/gX8fUTtC5fDpB5zLt01mkSXh6Wc4UhqQtwZBI2t/+TpX1okbg6 586 Hr1ZZupeH6SByjCBx6ADAgEQooG/BIG8GnCmcXWtqhXh48dGTLHQgJ04K5Fj 587 RMMq2qPSbiha9lq0osqR2KAnQA6LioWYxU+6yPKpBDSC5WOT441fUfkM8iAL 588 kW3uNc+luFCGcnDsacrmoVU7Y6Akcp9m7Fm7orRc+TWSWPpBg3OR2oG3ATW0 589 0NAz8TT06VOLVxIMUTINKdYVI/Ja7f3sy+/N4LGkJqScCQOwlo5tfDWn/UQF 590 iTWo5Zw435rH8pjy2smQCnqC14v3NMAWTu4j+dzHUNw= 591 [S] 481 Authentication error 593 Example of a client aborting in the midst of an exchange: 595 [C] AUTHINFO SASL GSSAPI 596 [S] 383 = 597 [C] * 598 [S] 481 Authentication aborted as requested 600 Example of attempting to use a mechanism that is not supported by 601 the server: 603 [C] AUTHINFO SASL EXAMPLE 604 [S] 501 Mechanism not recognized 606 Example of attempting to use a mechanism that requires a security 607 layer: 609 [C] AUTHINFO SASL PLAIN 610 [S] 483 Encryption or stronger authentication required 612 Example of using an initial response with a mechanism that doesn't 613 support it (server must start the exchange): 615 [C] AUTHINFO SASL CRAM-MD5 AHRlc3QAMTIzNA== 616 [S] 482 SASL protocol error 618 3. Augmented BNF Syntax for the AUTHINFO Extension 620 This section describes the syntax of the AUTHINFO extension. It 621 extends the syntax in [NNTP], and non-terminals not defined in this 622 document are defined there. 624 3.1. Commands 626 This syntax extends the non-terminal "command", which represents an 627 NNTP command. 629 command /= authinfo-user-command / 630 authinfo-pass-command / 631 authinfo-sasl-command 633 authinfo-user-command = "AUTHINFO" WS "USER" WS username 634 authinfo-pass-command = "AUTHINFO" WS "PASS" WS password 635 authinfo-sasl-command = "AUTHINFO" WS "SASL" WS mechanism 636 [WS initial-response] 638 username = 1*(P-CHAR / SP / TAB) 639 password = 1*(P-CHAR / SP / TAB) 640 initial-response = base64-opt 642 3.2. Command Continuation 644 This syntax extends the non-terminal "command-continuation", which 645 represents the further material sent by the client in the case of 646 multi-stage commands. 648 command-continuation /= authinfo-sasl-continuation 649 authinfo-sasl-continuation = ("*" / base64-opt) CRLF 650 ; client must send a continuation following each 651 ; "383" response from the server 653 3.3. Responses 655 This syntax extends the non-terminal "simple-response-content" for 656 the various commands in this specification. 658 simple-response-content /= response-sasl-content 659 response-sasl-content = "283" SP base64 / "383" SP base64-opt 661 3.4. LIST EXTENSIONS responses 663 This syntax defines the specific LIST EXTENSIONS responses for the 664 AUTHINFO extension. 666 extension-descriptor /= authinfo-extension 667 authinfo-extension = %x41.55.54.48.49.4E.46.4F ; "AUTHINFO" 668 *(SPA authinfo-extension-arg) 669 authinfo-extension-arg = "USER" / 670 "SASL:" [mechanism *("," mechanism)] 672 3.5. General non-terminals 674 mechanism = 1*20mech-char 675 mech-char = UPPER / DIGIT / "-" / "_" 676 ; mechanism names restricted to uppercase letters, 677 ; digits, "-" and "_" 679 base64-opt = "=" / base64 681 4. Summary of Response Codes 683 This section contains a list of every new response code defined in 684 this document, whether it is multi-line, which commands can gener- 685 ate it, what arguments it has, and what its meaning is. 687 Response code 281 688 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL 689 Meaning: authentication accepted 691 Response code 283 692 Generated by: AUTHINFO SASL 693 1 argument: challenge 694 Meaning: authentication accepted (with success data) 696 Response code 381 697 Generated by: AUTHINFO USER 698 Meaning: password required via AUTHINFO PASS command. Note that this 699 code is used for backwards compatibility and does not conform to the 700 traditional use of 3xx codes. 702 Response code 383 703 Generated by: AUTHINFO SASL 704 1 argument: challenge 705 Meaning: continue with SASL exchange 707 Response code 481 708 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL 709 Meaning: authentication failed/rejected 711 Response code 482 712 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL 713 Meaning: authentication commands issued out of sequence or 714 SASL protocol error 716 5. Authentication Tracking/Logging 718 This section contains implementation suggestions and notes of best 719 current practice, and does not specify further network protocol 720 requirements. 722 Once authenticated, the authorization identity presented in the 723 AUTHINFO exchange (username when using USER/PASS) SHOULD be 724 included in an audit trail associating the identity with any arti- 725 cles supplied during a POST operation, and this configuration 726 SHOULD be the default. This may be accomplished, for example, by 727 inserting headers in the posted articles, or by a server logging 728 mechanism. The server MAY provide a facility for disabling the 729 procedure described above, as some users or administrators may con- 730 sider it a violation of privacy. 732 6. Security Considerations 734 Security issues are discussed throughout this memo. 736 Before the [SASL] negotiation has begun, any protocol interactions 737 may have been performed in the clear and may have been modified by 738 an active attacker. For this reason, clients and servers MUST dis- 739 card any knowledge obtained prior to the start of the SASL negotia- 740 tion upon the establishment of a security layer. 742 Servers MAY implement a policy whereby the connection is dropped 743 after a number of failed authentication attempts. If they do so, 744 they SHOULD NOT drop the connection until at least 3 attempts at 745 authentication have failed. 747 Implementations MUST support a configuration where authentication 748 mechanisms that are vulnerable to passive eavesdropping attacks 749 (such as AUTHINFO USER/PASS and SASL [PLAIN]) are not advertised or 750 used without the presence of an external security layer such as TLS 751 [NNTP-TLS]. 753 When multiple authentication mechanisms are permitted by both 754 client and server, an active attacker can cause a down-negotiation 755 to the weakest mechanism. For this reason, both clients and 756 servers SHOULD be configurable to forbid use of weak mechanisms. 758 7. IANA Considerations 760 7.1. IANA Considerations for SASL/GSSAPI services 762 Please register the SASL/GSSAPI service name "nntp". This service 763 name refers to authenticated use of Usenet news service when pro- 764 vided via the [NNTP] protocol. 766 o Published Specification: This document. 768 o Author, Change Controller, and Contact for Further Information: 769 Author of this document. 771 7.2. IANA Considerations for NNTP extensions 773 Below is a formal definition of the AUTHINFO extension as required 774 by Section 8 of [NNTP] for the IANA registry. 776 o This extension provides an extensible mechanism for NNTP authen- 777 tication via a variety of methods. 779 o The extension-label is "AUTHINFO". 781 o The extension-label has two possible optional arguments "USER" 782 and "SASL:" (as defined in Section 2) indicating which variants 783 of the AUTHINFO command are supported. 785 o The extension defines three new commands, AUTHINFO USER, 786 AUTHINFO PASS, and AUTHINFO SASL, whose behavior, arguments, and 787 responses are defined in Section 2. 789 o The extension does not associate any new responses with pre- 790 existing NNTP commands. 792 o The extension may affect the overall behavior of both server and 793 client, in that the AUTHINFO SASL command requires that subse- 794 quent communication to be transmitted via an intermediary secu- 795 rity layer. 797 o The extension does not affect the maximum length of commands or 798 of initial response lines of pre-existing responses. 800 o The extension defines two new responses, 283 and 383, whose 801 lengths may exceed 512 octets. The maximum length of these 802 responses is increased to that which can accommodate the largest 803 encoded challenge possible for any of the SASL mechanisms sup- 804 ported by the implementation. 806 o The extension does not alter pipelining, but AUTHINFO commands 807 cannot be pipelined. 809 o Use of this extension may alter the output from LIST EXTENSIONS. 810 Once any AUTHINFO command has been used successfully, the server 811 may alter the list of arguments for the AUTHINFO capability 812 (although the capability itself must still be listed, even with 813 zero arguments). However, if a SASL security layer has been 814 negotiated, the server SHOULD continue to advertise the "SASL:" 815 argument with the same list of mechanisms, because the client 816 may wish to compare the pre- and post-authentication list of 817 SASL mechanisms in order to detect active down-negotiation 818 attacks. 820 o The extension does not cause any pre-existing command to produce 821 a 401, 480, or 483 response. 823 o The AUTHINFO commands can be used before or after the MODE 824 READER command, with the same semantics. 826 o Published Specification: This document. 828 o Author, Change Controller, and Contact for Further Information: 829 Author of this document. 831 8. References 833 8.1. Normative References 835 [ABNF] Crocker, D., Overell, P., "Augmented BNF for Syntax 836 Specifications: ABNF", RFC 2234, November 1997. 838 [AUTH] Haller, N., Atkinson, R., "On Internet Authentication", RFC 1704, 839 Bell Communications Research, October 1994. 841 [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data 842 Encodings", RFC 3548, July 2003. 844 [DIGEST-MD5] Leach, P., Newman, C., "Using Digest Authentication as a 845 SASL Mechanism", RFC 2831, May 2000. 847 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 848 Requirement Levels", RFC 2119, Harvard University, March 1997. 850 [NNTP] Feather, C., "Network News Transport Protocol", 851 draft-ietf-nntpext-base-*.txt, Work in Progress. 853 [NNTP-TLS] Vinocur, J., "Using TLS with NNTP", 854 draft-ietf-nntpext-tls-nntp-*.txt, Work in Progress. 856 [SASL] Melnikov, A., "Simple Authentication and Security Layer 857 (SASL)", draft-ietf-sasl-rfc2222bis-*.txt, Work in Progress. 859 [SASLprep] Zeilega, K., "SASLprep: Stringprep profile for user names 860 and passwords", draft-ietf-sasl-saslprep-*.txt, Work in Progress. 862 [StringPrep] Hoffman, P. and Blanchet, M., "Preparation of 863 Internationalized Strings ("stringprep")", 864 draft-hoffman-rfc3454bis-*.txt, Work in Progress. 866 8.2. Informative References 868 [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", draft- 869 ietf-sasl-crammd5-*.txt, Work in Progress. 871 [GSSAPI] Melnikov, A., "SASL GSSAPI Mechanisms", draft-ietf-sasl- 872 gssapi-*.txt, Work in Progress. 874 [NNTP-COMMON] Barber, S., "Common NNTP Extensions", RFC 2980, Aca- 875 dem Consulting Services, October 2000. 877 [PLAIN] Zeilenga, K., "The Plain SASL Mechanism", draft-ietf-sasl- 878 plain-*.txt, Work in Progress. 880 [SMTP] Klensin, J., "Simple Mail Transport Protocol", RFC 2821, 881 AT&T Laboratories, April 2001. 883 [UTF-8] Yergeau, F. "UTF-8, a transformation format of ISO 10646", 884 RFC 3629, Alis Technologies, Novermber 2003. 886 9. Authors' Addresses 888 Jeffrey M. Vinocur 889 Department of Computer Science 890 Upson Hall 891 Cornell University 892 Ithaca, NY 14853 USA 894 Email: vinocur@cs.cornell.edu 896 Chris Newman 897 Sun Microsystems 898 1050 Lakes Drive, Suite 250 899 West Covina, CA 91790 USA 901 Email: cnewman@iplanet.com 903 Kenneth Murchison 904 Oceana Matrix Ltd. 905 21 Princeton Place 906 Orchard Park, NY 14127 USA 908 Email: ken@oceana.com 910 10. Acknowledgments 912 A significant amount of the authentication text was originally from 913 the NNTP revision or common authentication specs written by Stan 914 Barber. A significant amount of the SASL text was lifted from the 915 revisions to RFC 1734 and RFC 2554 by Rob Siemborski. 917 Special acknowledgment also goes to Russ Allbery, Clive Feather, 918 and others who commented privately on intermediate revisions of 919 this document, as well as the members of the IETF NNTP Working 920 Group for continual (yet sporadic) insight in discussion. 922 11. Intellectual Property Rights 924 The IETF takes no position regarding the validity or scope of any 925 intellectual property or other rights that might be claimed to per- 926 tain to the implementation or use of the technology described in 927 this document or the extent to which any license under such rights 928 might or might not be available; neither does it represent that it 929 has made any effort to identify any such rights. Information on 930 the IETF's procedures with respect to rights in standards-track and 931 standards-related documentation can be found in BCP-11. Copies of 932 claims of rights made available for publication and any assurances 933 of licenses to be made available, or the result of an attempt made 934 to obtain a general license or permission for the use of such pro- 935 prietary rights by implementers or users of this specification can 936 be obtained from the IETF Secretariat. 938 The IETF invites any interested party to bring to its attention any 939 copyrights, patents or patent applications, or other proprietary 940 rights which may cover technology that may be required to practice 941 this standard. Please address the information to the IETF Execu- 942 tive Director. 944 12. Copyright 946 Copyright (C) The Internet Society (2004). This document is sub- 947 ject to the rights, licenses and restrictions contained in BCP 78, 948 and except as set forth therein, the authors retain all their 949 rights." 951 This document and the information contained herein are provided on 952 an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REP- 953 RESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE 954 INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR 955 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 956 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 957 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.