7 NNTP Extensions Working Group J. Vinocur
8 Internet Draft Cornell University
9 Updates: 2970 (if approved) K. Murchison
10 Expires: July 2005 Oceana Matrix Ltd.
16 NNTP Extension for Authentication
17 draft-ietf-nntpext-authinfo-06
22 By submitting this Internet-Draft, I certify that any applicable
23 patent or other IPR claims of which I am aware have been disclosed,
24 and any of which I become aware will be disclosed, in accordance
27 Internet-Drafts are working documents of the Internet Engineering
28 Task Force (IETF), its areas, and its working groups. Note that
29 other groups may also distribute working documents as
32 Internet-Drafts are draft documents valid for a maximum of six
33 months and may be updated, replaced, or obsoleted by other
34 documents at any time. It is inappropriate to use Internet-Drafts
35 as reference material or to cite them other than as "work in
38 The list of current Internet-Drafts can be accessed at
39 http://www.ietf.org/ietf/1id-abstracts.txt.
41 The list of Internet-Draft Shadow Directories can be accessed at
42 http://www.ietf.org/shadow.html.
46 Copyright (C) The Internet Society (2005).
50 This document defines an extension the Network News Transport
51 Protocol [NNTP] which allows a client to indicate an authentication
52 mechanism to the server, perform an authentication protocol
53 exchange, and optionally negotiate a security layer for subsequent
54 protocol interactions during the remainder of an NNTP session.
58 Vinocur, et. al. Expires July 2005 [Page 1]
60 Internet Draft NNTP Authentication January 2005
63 Section 3.1 of [NNTP-COMMON] summarizes some ad-hoc authentication
64 methods currently used in the NNTP protocol. This document updates
65 and formalizes the AUTHINFO USER/PASS authentication method and
66 deprecates the AUTHINFO SIMPLE and AUTHINFO GENERIC authentication
67 methods. Additionally, this document defines a profile of the
68 Simple Authentication and Security Layer [SASL] for NNTP.
72 0. Changes from Previous Version ............................ 2
73 1. Introduction ............................................. 3
74 1.1. Conventions Used in this Document ................... 4
75 2. The AUTHINFO Extension ................................... 4
76 2.1. Advertising the AUTHINFO Extension .................. 4
77 2.2. Authenticating with the AUTHINFO Extension .......... 6
78 2.3. AUTHINFO USER/PASS Command .......................... 7
79 2.3.1. Usage .......................................... 7
80 2.3.2. Description .................................... 7
81 2.3.3. Examples ....................................... 9
82 2.4. AUTHINFO SASL Command ............................... 9
83 2.4.1. Usage .......................................... 10
84 2.4.2. Description .................................... 10
85 2.4.3. Examples ....................................... 14
86 3. Augmented BNF Syntax for the AUTHINFO Extension .......... 16
87 3.1. Commands ............................................ 16
88 3.2. Command Continuation ................................ 17
89 3.3. Responses ........................................... 17
90 3.4. Capability entries .................................. 17
91 3.5. General non-terminals ............................... 17
92 4. Summary of Response Codes ................................ 17
93 5. Authentication Tracking/Logging .......................... 18
94 6. Security Considerations .................................. 18
95 7. IANA Considerations ...................................... 19
96 7.1. IANA Considerations for SASL/GSSAPI services ........ 19
97 7.2. IANA Considerations for NNTP extensions ............. 19
98 8. References ............................................... 21
99 8.1. Normative References ................................ 21
100 8.2. Informative References .............................. 21
101 9. Authors' Addresses ....................................... 22
102 10. Acknowledgments ......................................... 22
103 11. Intellectual Property Rights ............................ 22
104 12. Copyright ............................................... 23
106 0. Changes from Previous Version
109 o Reintroduced the "SASL" capability to list available SASL mechs.
110 o Noted that MODE READER must not be used nor advertised after
114 Vinocur, et. al. Expires July 2005 [Page 2]
116 Internet Draft NNTP Authentication January 2005
120 o Extended the length of the AUTHINFO SASL command to accommodate
121 large initial responses.
124 o CAPABILITIES replaces LIST EXTENSIONS.
125 o Use of an unknown SASL mechanism results in 503 not 501.
126 o Use common language between this draft and STARTTLS regarding
127 unsolicited use of the extension and resetting of server state and
128 caching of info obtained prior to a security layer.
129 o Capabilities are now case-insensitive.
130 o Changed reference to IANA requirements in [NNTP] from Section 8 to
134 o Rewrote the CAPABILITIES after security layer text yet again.
135 o Neither the first WSP character following "USER"/"PASS" nor the
136 CRLF are part of the username/password.
137 o The MODE READER state change does not get discarded after a SASL
138 security layer is negotiated.
141 o Make sure we correctly reference the text in [NNTP] regarding MODE
142 READER use after authentication.
146 Although NNTP [NNTP] has traditionally been used to provide public
147 access to newsgroups, authentication is often useful, for example
148 to control resource consumption, to allow abusers of the POST
149 command to be identified, and to restrict access to "local"
152 The ad-hoc AUTHINFO USER and AUTHINFO PASS commands, documented in
153 [NNTP-COMMON], provide a very weak authentication mechanism in
154 widespread use by the installed base. Due to their ubiquity they
155 are formalized in this specification but, because of their
156 insecurity, only for use in combination with appropriate security
159 The ad-hoc AUTHINFO GENERIC command, also documented in [NNTP-
160 COMMON] but much less ubiquitous, provided an NNTP-specific
161 equivalent of the generic SASL [SASL] facility. This document
162 deprecates AUTHINFO GENERIC in favor of an AUTHINFO SASL
163 replacement so that NNTP can benefit from authentication mechanisms
164 developed for other SASL-enabled application protocols including
165 SMTP, POP, IMAP, LDAP, and BEEP.
170 Vinocur, et. al. Expires July 2005 [Page 3]
172 Internet Draft NNTP Authentication January 2005
175 This specification is to be read in conjunction with the NNTP base
176 specification [NNTP]. Except where specifically stated otherwise,
177 in the case of a conflict between these two documents [NNTP] takes
178 precedence over this one.
180 It is also recommended that this specification be read in
181 conjunction with the SASL base specification [SASL].
183 1.1. Conventions Used in this Document
185 The notational conventions used in this document are the same as
186 those in [NNTP] and any term not defined in this document has the
187 same meaning as in that one.
189 The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD
190 NOT", "MAY", and "OPTIONAL" in this document are to be interpreted
191 as described in "Key words for use in RFCs to Indicate Requirement
194 Terms related to authentication are defined in "On Internet
195 Authentication" [AUTH].
197 In the examples, commands from the client are indicated with [C],
198 and responses from the server are indicated with [S].
200 2. The AUTHINFO Extension
202 The AUTHINFO extension is used to authenticate a user. Note that
203 authorization is a matter of site policy, not network protocol, and
204 is therefore not discussed in this document. The server determines
205 authorization in whatever manner is defined by its implementation
206 as configured by the site administrator.
208 This extension provides three new commands: AUTHINFO USER, AUTHINFO
209 PASS, and AUTHINFO SASL. The capability label for this extension
212 2.1. Advertising the AUTHINFO Extension
214 A server MUST implement at least one of the AUTHINFO USER or
215 AUTHINFO SASL commands in order to advertise the AUTHINFO
216 capability in the response to the CAPABILITIES command. However,
217 this capability is not advertised after successful authentication
218 (see section 2.2). This capability MAY be advertised both before
219 and after any use of MODE READER, with the same semantics.
221 The AUTHINFO capability label contains an argument list detailing
222 which authentication commands are available.
226 Vinocur, et. al. Expires July 2005 [Page 4]
228 Internet Draft NNTP Authentication January 2005
231 The "USER" argument indicates that AUTHINFO USER/PASS is supported
232 as defined by Section 2.3 of this document. The "USER" argument
233 MUST NOT be advertised, and the AUTHINFO USER/PASS commands SHOULD
234 NOT be provided, unless a strong encryption layer (e.g. TLS [NNTP-
235 TLS]) is in use or backward compatibility dictates otherwise.
237 The "SASL" argument indicates that AUTHINFO SASL is supported as
238 defined by Section 2.4 of this document. If the server advertises
239 the "SASL" argument, then it MUST also advertise the "SASL"
240 capability in response to the CAPABILITIES command. The SASL
241 capability is followed by a whitespace-separated list of available
242 SASL mechanism names.
244 The server may list the AUTHINFO capability with no arguments,
245 which indicates that it complies with this specification and does
246 not permit any authentication commands in its current state. In
247 this case, the client MUST NOT attempt to utilize any AUTHINFO
248 commands, even if it contains logic to do so (e.g. for backward
249 compatibility with servers that are not compliant with this
252 Future extensions may add additional arguments to this capability.
253 Unrecognized arguments SHOULD be ignored or brought to the
254 attention of the user.
256 As the AUTHINFO command is related to security, cached results of
257 CAPABILITIES from a previous session MUST NOT be relied on, as per
258 section 11.6 of [NNTP].
260 Example (here, the STARTTLS extension [NNTP-TLS] is also in use):
262 [S] 101 Capability list:
268 [S] SASL CRAM-MD5 DIGEST-MD5 GSSAPI
269 [S] LIST ACTIVE NEWSGROUPS
272 [S] 382 Continue with TLS negotiation
273 [TLS negotiation proceeds, further commands protected by TLS layer]
275 [S] 101 Capability list:
282 Vinocur, et. al. Expires July 2005 [Page 5]
284 Internet Draft NNTP Authentication January 2005
287 [S] AUTHINFO USER SASL
288 [S] SASL CRAM-MD5 DIGEST-MD5 GSSAPI PLAIN EXTERNAL
289 [S] LIST ACTIVE NEWSGROUPS
292 2.2. Authenticating with the AUTHINFO Extension
294 An NNTP server responds to a client command with a 480 response to
295 indicate that the client MUST authenticate and/or authorize in
296 order to use that command or access the indicated resource. Use of
297 the AUTHINFO command as described below is one such way that a
298 client can authenticate/authorize to the server. The client MAY
299 therefore use an AUTHINFO command after receiving a 480 response.
300 A client intending to use an AUTHINFO command SHOULD issue the
301 CAPABILITIES command to obtain the available authentication
302 commands and mechanisms before attempting authentication.
304 If a server advertises the AUTHINFO capability, a client MAY
305 attempt the first step of authentication at any time during a
306 session to acquire additional privileges without having received a
307 480 response. Servers SHOULD accept such unsolicited
308 authentication requests. A server MUST NOT under any circumstances
309 reply to an AUTHINFO command with a 480 response.
311 A client MUST NOT under any circumstances continue with any steps
312 of authentication beyond the first, unless the response code from
313 the server indicates that the authentication exchange is welcomed.
314 In particular, anything other than a 38x response code indicates
315 that the client MUST NOT continue the authentication exchange.
317 After a successful authentication, the client MUST NOT issue
318 another AUTHINFO command in the same session. A server MUST NOT
319 return the AUTHINFO capability in response to a CAPABILITIES
320 command and a server MUST reject any subsequent AUTHINFO commands
321 with a 502 response. Additionally, per section 3.4.2 of [NNTP],
322 the client MUST NOT issue a MODE READER command after
323 authentication and a server MUST NOT advertise the MODE-READER
326 In agreement with [SASL], the server MUST continue to advertise the
327 SASL capability in response to a CAPABILITIES command with the same
328 list of SASL mechanisms as before authentication (thereby enabling
329 the client to detect a possible active down-negotiation attack).
330 Other capabilities returned in response to a CAPABILITIES command
331 received after authentication MAY be different than those returned
332 before authentication. For example, an NNTP server may not want to
333 advertise support for a specific extension unless a client has been
338 Vinocur, et. al. Expires July 2005 [Page 6]
340 Internet Draft NNTP Authentication January 2005
343 It should be noted that a server may perform a successful
344 authentication exchange with a client and yet still deny access to
345 some or all resources; the permanent 502 response indicates a
346 resource is unavailable even though authentication has been
347 performed (this is in contrast to the temporary 480 error
348 indicating that a resource is unavailable now but may become
349 available after authentication).
351 2.3. AUTHINFO USER/PASS Command
353 This section supersedes the definition of the AUTHINFO USER and
354 AUTHINFO PASS commands as documented in Section 3.1.1 of [NNTP-
359 These commands MUST NOT be pipelined.
362 AUTHINFO USER username
363 AUTHINFO PASS password
366 281 Authentication accepted
367 381 Password required [1]
368 481 Authentication failed/rejected
369 482 Authentication commands issued out of sequence
370 502 Command unavailable [2]
372 [1] Only valid for AUTHINFO USER. Note that unlike traditional 3xx
373 codes which indicate that the client may continue the current
374 command, the legacy 381 code means that the AUTHINFO PASS command
375 must be used to complete the authentication exchange.
377 [2] If authentication has already occurred, AUTHINFO USER/PASS are
378 not valid commands (see section 2.2).
380 NOTE: Notwithstanding section 3.2.1 of [NNTP], the server MUST NOT
381 return 480 in response to AUTHINFO USER/PASS.
384 username = UTF-8 string identifying the user/client
385 password = UTF-8 string representing the user's password
389 The AUTHINFO USER and AUTHINFO PASS commands are used to present
390 clear text credentials to the server. These credentials consist of
394 Vinocur, et. al. Expires July 2005 [Page 7]
396 Internet Draft NNTP Authentication January 2005
399 a username or a username plus a password (the distinction is that a
400 password is expected to be kept secret while a username is not;
401 this does not directly affect the protocol but may have an impact
402 on user interfaces). The username is supplied through the AUTHINFO
403 USER command, and the password through the AUTHINFO PASS command.
405 If the server requires only a username, it MUST NOT give a 381
406 response to AUTHINFO USER and MUST give a 482 response to AUTHINFO
409 If the server requires both username and password, the former MUST
410 be sent before the latter. The server will need to cache the
411 username until the password is received; it MAY require the
412 password to be sent in the immediately next command (in other
413 words, only caching the username until the next command is sent).
416 - MUST return a 381 response to AUTHINFO USER;
417 - MUST return a 482 response to AUTHINFO PASS if there is no
419 - MUST use the argument of the most recent AUTHINFO USER for
421 - MUST NOT return a 381 response to AUTHINFO PASS.
423 The server MAY determine whether or not a password is needed based
424 on the username. Thus the same server can respond with both 381
425 and other response codes to AUTHINFO USER.
427 The AUTHINFO PASS command permits the client to use a clear-text
428 password to authenticate. A compliant implementation MUST NOT
429 implement this command without also implementing support for TLS
430 [NNTP-TLS]. Use of this command without an active strong
431 encryption layer is deprecated, as it exposes the user's password
432 to all parties on the network between the client and the server.
433 Any implementation of this command SHOULD be configurable to
434 disable it whenever a strong encryption layer such as that provided
435 by [NNTP-TLS] is not active, and this configuration SHOULD be the
436 default. The server will use the 483 response code to indicate
437 that the datastream is insufficiently secure for the command being
440 Usernames and passwords MUST use the UTF-8 [UTF-8] character set
441 and a client MUST convert any user input to UTF-8 if necessary.
443 Note that a server MAY, but is not required to, allow white space
444 characters in usernames and passwords. A server implementation MAY
445 blindly split command arguments at white space and therefore not
446 preserve the exact sequence of white space characters in the
450 Vinocur, et. al. Expires July 2005 [Page 8]
452 Internet Draft NNTP Authentication January 2005
455 username or password. Therefore a client SHOULD scan the username
456 and password for whitespace, and if detected, warn the user of the
457 likelihood of problems. The SASL PLAIN [PLAIN] mechanism is
458 recommended as an alternative, as it does not suffer from these
463 Example of successful AUTHINFO USER:
465 [C] AUTHINFO USER wilma
466 [S] 281 Authentication accepted
468 Example of successful AUTHINFO USER/PASS:
470 [C] AUTHINFO USER fred
471 [S] 381 Enter passphrase
472 [C] AUTHINFO PASS flintstone
473 [S] 281 Authentication accepted
475 Example of AUTHINFO USER/PASS requiring a security layer:
477 [C] AUTHINFO USER fred@stonecanyon.example
478 [S] 483 Encryption or stronger authentication required
480 Example of failed AUTHINFO USER/PASS:
482 [C] AUTHINFO USER barney
483 [S] 381 Enter passphrase
484 [C] AUTHINFO PASS flintstone
485 [S] 481 Authentication failed
487 Example of AUTHINFO PASS before AUTHINFO USER:
489 [C] AUTHINFO PASS flintstone
490 [S] 482 Authentication commands issued out of sequence
492 2.4. AUTHINFO SASL Command
494 This section defines a formal profile of the Simple Authentication
495 and Security Layer [SASL]. The use of the AUTHINFO GENERIC command
496 as documented in Section 3.1.3 of [NNTP-COMMON] as a way to perform
497 SASL authentication is deprecated in favor of the AUTHINFO SASL
498 command. A server SHOULD NOT advertise AUTHINFO GENERIC in the
499 list of capabilities returned by CAPABILITIES.
506 Vinocur, et. al. Expires July 2005 [Page 9]
508 Internet Draft NNTP Authentication January 2005
513 This command MUST NOT be pipelined.
516 AUTHINFO SASL mechanism [initial-response]
518 This command MAY exceed 512 octets. The maximum length of this
519 command is increased to that which can accommodate the largest
520 encoded initial response possible for any of the SASL mechanisms
521 supported by the implementation.
524 281 Authentication accepted
525 283 challenge Authentication accepted (with success data) [1]
526 383 challenge Continue with SASL exchange [1]
527 481 Authentication failed/rejected
528 482 SASL protocol error
529 502 Command unavailable [2]
531 [1] These responses MAY exceed 512 octets. The maximum length of
532 these responses is increased to that which can accommodate the
533 largest encoded challenge possible for any of the SASL mechanisms
534 supported by the implementation.
536 [2] If authentication has already occurred, AUTHINFO SASL is not a
537 valid command (see section 2.2).
539 NOTE: Notwithstanding section 3.2.1 of [NNTP], the server MUST NOT
540 return 480 in response to AUTHINFO USER/PASS.
543 mechanism = String identifying a [SASL] authentication
545 initial-response = Optional initial client response. If present,
546 the response MUST be encoded as specified in
547 Section 3 of [BASE64]. [3]
548 challenge = Server challenge. The challenge MUST be
549 encoded as specified in Section 3 of [BASE64].
551 [3] This argument MAY exceed 497 octets. The maximum length of
552 this argument is increased to that which can accommodate the
553 largest encoded initial response possible for any of the SASL mech-
554 anisms supported by the implementation.
562 Vinocur, et. al. Expires July 2005 [Page 10]
564 Internet Draft NNTP Authentication January 2005
567 The AUTHINFO SASL command initiates a [SASL] authentication
568 exchange between the client and the server. The client identifies
569 the SASL mechanism to use with the first parameter of the AUTHINFO
570 SASL command. If the server supports the requested authentication
571 mechanism, it performs the SASL exchange to authenticate the user.
572 Optionally, it also negotiates a security layer for subsequent
573 protocol interactions during this session. If the requested
574 authentication mechanism is invalid (e.g. is not supported), the
575 server rejects the AUTHINFO SASL command with a 503 reply. If the
576 requested authentication mechanism requires an encryption layer,
577 the server rejects the AUTHINFO SASL command with a 483 reply.
579 The service name specified by this protocol's profile of SASL is
582 The SASL authentication exchange consists of a series of server
583 challenges and client responses that are specific to the chosen
586 A server challenge is sent as a 383 reply with a single argument
587 containing the [BASE64] encoded string supplied by the SASL
588 mechanism. A server challenge that has zero length MUST be sent as
589 a single equals sign ("=") and not omitted (in order to comply with
590 the [NNTP] requirement that responses always have the same number
593 A client response consists of a line containing a [BASE64] encoded
594 string. A client response that has zero length MUST be sent as a
595 single equals sign ("=") and not omitted (for consistency with the
596 server challenge format). If the client wishes to cancel the
597 authentication exchange, it issues a line with a single "*". If
598 the server receives such a response, it MUST reject the AUTHINFO
599 SASL command by sending a 481 reply.
601 Note that these [BASE64] strings can be much longer than normal
602 NNTP responses. Clients and servers MUST be able to handle the
603 maximum encoded size of challenges and responses generated by their
604 supported authentication mechanisms. This requirement is
605 independent of any line length limitations the client or server may
606 have in other parts of its protocol implementation.
608 The optional initial response argument to the AUTHINFO SASL command
609 is used to save a round trip when using authentication mechanisms
610 that support an initial client response. If the initial response
611 argument is omitted and the chosen mechanism requires an initial
612 client response, the server MUST proceed as defined in section 5.1
613 of [SASL]. In NNTP, a server challenge that contains no data is
614 equivalent to a zero length challenge and is encoded as a single
618 Vinocur, et. al. Expires July 2005 [Page 11]
620 Internet Draft NNTP Authentication January 2005
625 Note that the [BASE64] encoded initial response argument can exceed
626 497 octets and therefore the AUTHINFO SASL command can exceed 512
627 octets. Clients SHOULD, and servers MUST be able to handle the
628 maximum encoded size of initial responses possible for their
629 supported authentication mechanisms. This requirement is
630 independent of any command or argument length limitations the
631 client or server may have in other parts of its protocol
634 If use of the initial response argument would cause the AUTHINFO
635 SASL command to exceed 512 octets, the client MAY choose to omit
636 the initial response parameter (and instead proceed as defined in
637 section 5.1 of [SASL]).
639 If the client is transmitting an initial response of zero length,
640 it MUST instead transmit the response as a single equals sign
641 ("="). This indicates that the response is present, but contains
644 If the client uses an initial-response argument to the AUTHINFO
645 SASL command with a SASL mechanism that does not support an initial
646 client response, the server MUST reject the AUTHINFO SASL command
649 If the server cannot [BASE64] decode any client response, it MUST
650 reject the AUTHINFO SASL command with a 504 reply. If the client
651 cannot BASE64 decode any of the server's challenges, it MUST cancel
652 the authentication using the "*" response. In particular, servers
653 and clients MUST reject (and not ignore) any character not
654 explicitly allowed by the BASE64 alphabet, and MUST reject any
655 sequence of BASE64 characters that contains the pad character ('=')
656 anywhere other than the end of the string (e.g. "=AAA" and
657 "AAA=BBB" are not allowed).
659 The authorization identity generated by this [SASL] exchange is a
660 simple username, and both client and server MUST use the [SASLprep]
661 profile of the [StringPrep] algorithm to prepare these names for
662 transmission or comparison. If preparation of the authorization
663 identity fails or results in an empty string (unless it was
664 transmitted as the empty string), the server MUST fail the
665 authentication with a 481 reply.
667 Should the client successfully complete the exchange, the server
668 issues either a 281 or 283 reply. If the server is unable to
669 authenticate the client, it MUST reject the AUTHINFO SASL command
670 with a 481 reply. If an AUTHINFO command fails, the client MAY
674 Vinocur, et. al. Expires July 2005 [Page 12]
676 Internet Draft NNTP Authentication January 2005
679 proceed without authentication. Alternatively, the client MAY try
680 another authentication mechanism, or present different credentials
681 by issuing another AUTHINFO command.
683 If the SASL mechanism returns additional data on success (e.g.
684 server authentication), the NNTP server issues a 283 reply with a
685 single argument containing the [BASE64] encoded string supplied by
686 the SASL mechanism. If no additional data is returned on success,
687 the server issues a 281 reply.
689 If a security layer is negotiated during the SASL exchange, it
690 takes effect for the client on the octet immediately following the
691 CRLF that concludes the last response generated by the client. For
692 the server, it takes effect immediately following the CRLF of its
695 When a security layer takes effect, the NNTP protocol is reset to
696 the state immediately after the initial greeting response (see 5.1
697 of [NNTP]) has been sent, with the exception that if a MODE READER
698 command has been issued, the effects of it (if any) are not
699 reversed. The server MUST discard any knowledge obtained from the
700 client, such as the current newsgroup and article number, that was
701 not obtained from the SASL negotiation itself. Likewise, the
702 client SHOULD discard and MUST NOT rely on any knowledge obtained
703 from the server, such as the capability list, that was not obtained
704 from the SASL negotiation itself. (Note that a client MAY compare
705 the advertised SASL mechanisms before and after authentication in
706 order to detect an active down-negotiation attack.)
708 When both TLS [NNTP-TLS] and SASL security layers are in effect,
709 the TLS encoding MUST be applied after the SASL encoding (the
710 cleartext data is always SASL encoded first and then the resultant
711 data is TLS encoded).
713 To ensure interoperability, client and server implementations of
714 this extension MUST implement the [DIGEST-MD5] SASL mechanism.
716 If AUTHINFO USER/PASS and AUTHINFO SASL are both implemented, the
717 SASL [PLAIN] mechanism SHOULD also be implemented, as the
718 functionality of DIGEST-MD5 is insufficient for some environments
719 (e.g. the server may need to pass the plaintext password off to an
720 external authentication service). The SASL PLAIN mechanism is
721 preferred over AUTHINFO USER, even if there is not a strong
722 encryption layer active, because it eliminates limitations that
723 AUTHINFO USER/PASS has with regards to white space characters being
724 used in usernames and passwords.
730 Vinocur, et. al. Expires July 2005 [Page 13]
732 Internet Draft NNTP Authentication January 2005
737 Example of the [PLAIN] SASL mechanism under a TLS layer, using an
738 initial client response:
741 [S] 101 Capability list:
746 [S] SASL CRAM-MD5 DIGEST-MD5 GSSAPI
747 [S] LIST ACTIVE NEWSGROUPS
750 [S] 382 Continue with TLS negotiation
751 [TLS negotiation proceeds, further commands protected by TLS layer]
753 [S] 101 Capability list:
756 [S] AUTHINFO USER SASL
757 [S] SASL CRAM-MD5 DIGEST-MD5 GSSAPI PLAIN EXTERNAL
758 [S] LIST ACTIVE NEWSGROUPS
760 [C] AUTHINFO SASL PLAIN AHRlc3QAMTIzNA==
761 [S] 281 Authentication accepted
763 Example of the EXTERNAL SASL mechanism under a TLS layer, using the
764 authorization identity derived from the client TLS certificate, and
765 thus a zero-length initial client response (commands prior to
766 AUTHINFO SASL are the same as the previous example and have been
769 [C] AUTHINFO SASL EXTERNAL =
770 [S] 281 Authentication accepted
772 Example of the [DIGEST-MD5] SASL mechanism, which includes a server
773 challenge and server success data (whitespace has been inserted for
774 clarity; base64-encoded data is actually sent as a single line with
775 no embedded whitespace):
777 [C] AUTHINFO SASL DIGEST-MD5
778 [S] 383 bm9uY2U9InNheUFPaENFS0dJZFBNSEMwd3RsZUxxT0ljT0kyd1FZSWU0
779 enplQXR1aVE9IixyZWFsbT0iZWFnbGUub2NlYW5hLmNvbSIscW9wPSJhdXRo
780 LGF1dGgtaW50LGF1dGgtY29uZiIsY2lwaGVyPSJyYzQtNDAscmM0LTU2LHJj
781 NCxkZXMsM2RlcyIsbWF4YnVmPTQwOTYsY2hhcnNldD11dGYtOCxhbGdvcml0
786 Vinocur, et. al. Expires July 2005 [Page 14]
788 Internet Draft NNTP Authentication January 2005
791 [C] dXNlcm5hbWU9InRlc3QiLHJlYWxtPSJlYWdsZS5vY2VhbmEuY29tIixub25j
792 ZT0ic2F5QU9oQ0VLR0lkUE1IQzB3dGxlTHFPSWNPSTJ3UVlJZTR6emVBdHVp
793 UT0iLGNub25jZT0iMFkzSlFWMlRnOVNjRGlwK08xU1ZDMHJoVmcvLytkbk9J
794 aUd6LzdDZU5KOD0iLG5jPTAwMDAwMDAxLHFvcD1hdXRoLWNvbmYsY2lwaGVy
795 PXJjNCxtYXhidWY9MTAyNCxkaWdlc3QtdXJpPSJubnRwL2xvY2FsaG9zdCIs
796 cmVzcG9uc2U9ZDQzY2Y2NmNmZmE5MDNmOWViMDM1NmMwOGEzZGIwZjI=
797 [S] 283 cnNwYXV0aD1kZTJlMTI3ZTVhODFjZGE1M2Q5N2FjZGEzNWNkZTgzYQ==
799 Example of a failed authentication due to bad [GSSAPI] credentials.
800 Note that while the mechanism can utilize the initial response, the
801 client chooses not to use it because of its length, resulting in a
802 zero-length server challenge (here whitespace has been inserted for
803 clarity; base64-encoded data is actually sent as a single line with
804 no embedded whitespace):
806 [C] AUTHINFO SASL GSSAPI
808 [C] YIICOAYJKoZIhvcSAQICAQBuggInMIICI6ADAgEFoQMCAQ6iBwMFACAAAACj
809 ggE/YYIBOzCCATegAwIBBaEYGxZURVNULk5FVC5JU0MuVVBFTk4uRURVoiQw
810 IqADAgEDoRswGRsEbmV3cxsRbmV0bmV3cy51cGVubi5lZHWjge8wgeygAwIB
811 EKEDAgECooHfBIHcSQfLKC8vm2i17EXmomwk6hHvjBY/BnKnvvDTrbno3198
812 vlX2RSUt+CjuAKhcDcj4DW0gvZEqH7t5v9yWedzztlpaThebBat6hQNr9NJP
813 ozh1/+74HUwhGWb50KtjuftO/ftQ8q0nTuYKgIq6PM4tp2ddo1IfpjfdNR9E
814 95GFi3y1uBT7lQOwtQbRJUjPSO3ijdue9V7cNNVmYsBsqNsaHhvlBJEXf4WJ
815 djH8yG+Dw/gX8fUTtC5fDpB5zLt01mkSXh6Wc4UhqQtwZBI2t/+TpX1okbg6
816 Hr1ZZupeH6SByjCBx6ADAgEQooG/BIG8GnCmcXWtqhXh48dGTLHQgJ04K5Fj
817 RMMq2qPSbiha9lq0osqR2KAnQA6LioWYxU+6yPKpBDSC5WOT441fUfkM8iAL
818 kW3uNc+luFCGcnDsacrmoVU7Y6Akcp9m7Fm7orRc+TWSWPpBg3OR2oG3ATW0
819 0NAz8TT06VOLVxIMUTINKdYVI/Ja7f3sy+/N4LGkJqScCQOwlo5tfDWn/UQF
820 iTWo5Zw435rH8pjy2smQCnqC14v3NMAWTu4j+dzHUNw=
821 [S] 481 Authentication error
823 Example of a client aborting in the midst of an exchange:
825 [C] AUTHINFO SASL GSSAPI
828 [S] 481 Authentication aborted as requested
830 Example of attempting to use a mechanism that is not supported by
833 [C] AUTHINFO SASL EXAMPLE
834 [S] 503 Mechanism not recognized
836 Example of attempting to use a mechanism that requires a security
842 Vinocur, et. al. Expires July 2005 [Page 15]
844 Internet Draft NNTP Authentication January 2005
847 [C] AUTHINFO SASL PLAIN
848 [S] 483 Encryption or stronger authentication required
850 Example of using an initial response with a mechanism that doesn't
851 support it (server must start the exchange):
853 [C] AUTHINFO SASL CRAM-MD5 AHRlc3QAMTIzNA==
854 [S] 482 SASL protocol error
856 3. Augmented BNF Syntax for the AUTHINFO Extension
858 This section describes the syntax of the AUTHINFO extension. It
859 extends the syntax in [NNTP], and non-terminals not defined in this
860 document are defined there.
864 This syntax extends the non-terminal "command", which represents an
867 command =/ authinfo-sasl-command /
868 authinfo-user-command /
869 authinfo-pass-command
871 authinfo-sasl-command = "AUTHINFO" WS "SASL" WS mechanism
872 [WS initial-response]
873 authinfo-user-command = "AUTHINFO" WS "USER" WS username
874 authinfo-pass-command = "AUTHINFO" WS "PASS" WS password
876 initial-response = base64-opt
877 username = 1*user-pass-char
878 password = 1*user-pass-char
879 user-pass-char = P-CHAR
882 NOTE: A server implementation MAY parse AUTHINFO USER and AUTHINFO
883 PASS specially as to allow white space to be used within the
884 username or password. Such implementations accept the additional
885 syntax (making these two items inconsistent with "token" in section
888 user-pass-char =/ SP / TAB
890 In doing so, the grammar can become ambiguous if the username or
891 password begins or ends with white space. To solve this ambiguity,
892 such implementations typically treat everything after the first
893 white space character following "USER"/"PASS", up to, but not
894 including, the CRLF as the username/password.
898 Vinocur, et. al. Expires July 2005 [Page 16]
900 Internet Draft NNTP Authentication January 2005
903 3.2. Command Continuation
905 This syntax extends the non-terminal "command-continuation", which
906 represents the further material sent by the client in the case of
907 multi-stage commands.
909 command-continuation =/ authinfo-sasl-continuation
910 authinfo-sasl-continuation = ("*" / base64-opt) CRLF
911 ; client must send a continuation following each
912 ; "383" response from the server
916 This syntax extends the non-terminal "simple-response-content",
917 which represents an initial response line sent by the server.
919 simple-response-content =/ response-sasl-content
920 response-sasl-content = "283" SP base64 / "383" SP base64-opt
922 3.4. Capability entries
924 This syntax extends the non-terminal "capability-entry", which rep-
925 resents a capability that may be advertised by the server.
927 capability-entry =/ authinfo-capability /
930 authinfo-capability = "AUTHINFO" *(WS authinfo-variant)
931 authinfo-variant = "USER" / "SASL"
932 sasl-capability = "SASL" 1*(WS mechanism)
934 3.5. General non-terminals
936 base64-opt = "=" / base64
938 mechanism = 1*20mech-char
939 mech-char = UPPER / DIGIT / "-" / "_"
941 4. Summary of Response Codes
943 This section contains a list of every new response code defined in
944 this document, whether it is multi-line, which commands can
945 generate it, what arguments it has, and what its meaning is.
948 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL
949 Meaning: authentication accepted
954 Vinocur, et. al. Expires July 2005 [Page 17]
956 Internet Draft NNTP Authentication January 2005
960 Generated by: AUTHINFO SASL
961 1 argument: challenge
962 Meaning: authentication accepted (with success data)
965 Generated by: AUTHINFO USER
966 Meaning: password required via AUTHINFO PASS command. Note
967 that this code is used for backwards compatibility and does
968 not conform to the traditional use of 3xx codes.
971 Generated by: AUTHINFO SASL
972 1 argument: challenge
973 Meaning: continue with SASL exchange
976 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL
977 Meaning: authentication failed/rejected
980 Generated by: AUTHINFO USER, AUTHINFO PASS, AUTHINFO SASL
981 Meaning: authentication commands issued out of sequence or
984 5. Authentication Tracking/Logging
986 This section contains implementation suggestions and notes of best
987 current practice, and does not specify further network protocol
990 Once authenticated, the authorization identity presented in the
991 AUTHINFO exchange (username when using USER/PASS) SHOULD be
992 included in an audit trail associating the identity with any
993 articles supplied during a POST operation, and this configuration
994 SHOULD be the default. This may be accomplished, for example, by
995 inserting headers in the posted articles or by a server logging
996 mechanism. The server MAY provide a facility for disabling the
997 procedure described above, as some users or administrators may
998 consider it a violation of privacy.
1000 6. Security Considerations
1002 Security issues are discussed throughout this memo.
1004 Before the [SASL] negotiation has begun, any protocol interactions
1005 may have been performed in the clear and may have been modified by
1006 an active attacker. For this reason, clients and servers MUST
1010 Vinocur, et. al. Expires July 2005 [Page 18]
1012 Internet Draft NNTP Authentication January 2005
1015 discard any sensitive knowledge obtained prior to the start of the
1016 SASL negotiation upon the establishment of a security layer.
1018 Servers MAY implement a policy whereby the connection is dropped
1019 after a number of failed authentication attempts. If they do so,
1020 they SHOULD NOT drop the connection until at least 3 attempts at
1021 authentication have failed.
1023 Implementations MUST support a configuration where authentication
1024 mechanisms that are vulnerable to passive eavesdropping attacks
1025 (such as AUTHINFO USER/PASS and SASL [PLAIN]) are not advertised or
1026 used without the presence of an external security layer such as TLS
1029 When multiple authentication mechanisms are permitted by both
1030 client and server, an active attacker can cause a down-negotiation
1031 to the weakest mechanism. For this reason, both clients and
1032 servers SHOULD be configurable to forbid use of weak mechanisms.
1033 The minimum strength acceptable is a policy decision which is
1034 outside the scope of this specification.
1036 7. IANA Considerations
1038 7.1. IANA Considerations for SASL/GSSAPI services
1040 Please register the SASL/GSSAPI service name "nntp". This service
1041 name refers to authenticated use of Usenet news service when
1042 provided via the [NNTP] protocol.
1044 o Published Specification: This document.
1046 o Author, Change Controller, and Contact for Further Information:
1047 Author of this document.
1049 7.2. IANA Considerations for NNTP extensions
1051 Below is a formal definition of the AUTHINFO extension as required
1052 by Section 3.3.4 of [NNTP] for the IANA registry. may
1053 o This extension provides an extensible mechanism for NNTP
1054 authentication via a variety of methods.
1056 o The capability label for this extension is "AUTHINFO".
1058 o The "AUTHINFO" capability label has two possible optional
1059 arguments "USER" and "SASL" (as defined in Section 2.1)
1060 indicating which variants of the AUTHINFO command are supported.
1062 o This extension also provides the "SASL" capability label whose
1066 Vinocur, et. al. Expires July 2005 [Page 19]
1068 Internet Draft NNTP Authentication January 2005
1071 arguments list the available SASL mechanisms.
1073 o This extension defines three new commands, AUTHINFO USER,
1074 AUTHINFO PASS, and AUTHINFO SASL, whose behavior, arguments, and
1075 responses are defined in Sections 2.3 and 2.4.
1077 o This extension does not associate any new responses with pre-
1078 existing NNTP commands.
1080 o This extension may affect the overall behavior of both server
1081 and client, in that the AUTHINFO SASL command may require that
1082 subsequent communication be transmitted via an intermediary
1085 o The length of the AUTHINFO SASL command (as defined in this
1086 document) may exceed 512 octets. The maximum length of this
1087 command is increased to that which can accommodate the largest
1088 initial response possible for any of the SASL mechanisms
1089 supported by the implementation.
1091 o This extension defines two new responses, 283 and 383, whose
1092 lengths may exceed 512 octets. The maximum length of these
1093 responses is increased to that which can accommodate the largest
1094 challenge possible for any of the SASL mechanisms supported by
1097 o This extension does not alter pipelining, but AUTHINFO commands
1098 cannot be pipelined.
1100 o Use of this extension may alter the capabilities list; once the
1101 AUTHINFO command has been used successfully, the AUTHINFO
1102 capability can no longer be advertised by CAPABILITIES.
1103 Additionally, the MODE-READER capability MUST NOT be advertised
1104 after successful authentication (as discussed in Section 3.4.2
1107 o This extension does not cause any pre-existing command to
1108 produce a 401, 480, or 483 response.
1110 o This extension is unaffected by any use of the MODE READER
1111 command, however the MODE READER command MUST NOT be used in the
1112 same session following successful authentication (as discussed
1113 in Section 3.4.2 of [NNTP]).
1115 o Published Specification: This document.
1117 o Author, Change Controller, and Contact for Further Information:
1118 Author of this document.
1122 Vinocur, et. al. Expires July 2005 [Page 20]
1124 Internet Draft NNTP Authentication January 2005
1129 8.1. Normative References
1131 [ABNF] Crocker, D., Overell, P., "Augmented BNF for Syntax
1132 Specifications: ABNF", RFC 2234, November 1997.
1134 [AUTH] Haller, N., Atkinson, R., "On Internet Authentication",
1135 RFC 1704, Bell Communications Research, October 1994.
1137 [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data
1138 Encodings", RFC 3548, July 2003.
1140 [DIGEST-MD5] Leach, P., Newman, C., "Using Digest Authentication as
1141 a SASL Mechanism", RFC 2831, May 2000.
1143 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
1144 Requirement Levels", RFC 2119, Harvard University, March 1997.
1146 [NNTP] Feather, C., "Network News Transport Protocol",
1147 draft-ietf-nntpext-base-*.txt, Work in Progress.
1149 [NNTP-TLS] Vinocur, J., Murchison, K., Newman, C., "Using TLS with NNTP",
1150 draft-ietf-nntpext-tls-nntp-*.txt, Work in Progress.
1152 [SASL] Melnikov, A., "Simple Authentication and Security Layer
1153 (SASL)", draft-ietf-sasl-rfc2222bis-*.txt, Work in Progress.
1155 [SASLprep] Zeilega, K., "SASLprep: Stringprep profile for user names
1156 and passwords", draft-ietf-sasl-saslprep-*.txt, Work in Progress.
1158 [StringPrep] Hoffman, P. and Blanchet, M., "Preparation of
1159 Internationalized Strings ("stringprep")",
1160 draft-hoffman-rfc3454bis-*.txt, Work in Progress.
1162 8.2. Informative References
1164 [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism", draft-
1165 ietf-sasl-crammd5-*.txt, Work in Progress.
1167 [GSSAPI] Melnikov, A., "SASL GSSAPI Mechanisms", draft-ietf-sasl-
1168 gssapi-*.txt, Work in Progress.
1170 [NNTP-COMMON] Barber, S., "Common NNTP Extensions", RFC 2980,
1171 Academ Consulting Services, October 2000.
1173 [PLAIN] Zeilenga, K., "The Plain SASL Mechanism", draft-ietf-sasl-
1174 plain-*.txt, Work in Progress.
1178 Vinocur, et. al. Expires July 2005 [Page 21]
1180 Internet Draft NNTP Authentication January 2005
1183 [SMTP] Klensin, J., "Simple Mail Transport Protocol", RFC 2821,
1184 AT&T Laboratories, April 2001.
1186 [UTF-8] Yergeau, F. "UTF-8, a transformation format of ISO 10646",
1187 RFC 3629, Alis Technologies, November 2003.
1189 9. Authors' Addresses
1192 Department of Computer Science
1195 Ithaca, NY 14853 USA
1197 Email: vinocur@cs.cornell.edu
1203 Orchard Park, NY 14127 USA
1205 Email: ken@oceana.com
1210 1050 Lakes Drive, Suite 250
1211 West Covina, CA 91790 USA
1213 Email: cnewman@iplanet.com
1217 A significant amount of the authentication text was originally from
1218 the NNTP revision or common authentication specs written by Stan
1219 Barber. A significant amount of the SASL text was lifted from the
1220 revisions to RFC 1734 and RFC 2554 by Rob Siemborski.
1222 Special acknowledgment also goes to Russ Allbery, Clive Feather,
1223 and others who commented privately on intermediate revisions of
1224 this document, as well as the members of the IETF NNTP Working
1225 Group for continual (yet sporadic) insight in discussion.
1227 11. Intellectual Property Rights
1229 The IETF takes no position regarding the validity or scope of any
1230 intellectual property or other rights that might be claimed to
1234 Vinocur, et. al. Expires July 2005 [Page 22]
1236 Internet Draft NNTP Authentication January 2005
1239 pertain to the implementation or use of the technology described in
1240 this document or the extent to which any license under such rights
1241 might or might not be available; neither does it represent that it
1242 has made any effort to identify any such rights. Information on
1243 the IETF's procedures with respect to rights in standards-track and
1244 standards-related documentation can be found in BCP-11. Copies of
1245 claims of rights made available for publication and any assurances
1246 of licenses to be made available, or the result of an attempt made
1247 to obtain a general license or permission for the use of such
1248 proprietary rights by implementers or users of this specification
1249 can be obtained from the IETF Secretariat.
1251 The IETF invites any interested party to bring to its attention any
1252 copyrights, patents or patent applications, or other proprietary
1253 rights which may cover technology that may be required to practice
1254 this standard. Please address the information to the IETF
1259 Copyright (C) The Internet Society (2005). This document is
1260 subject to the rights, licenses and restrictions contained in BCP
1261 78, and except as set forth therein, the authors retain all their
1264 This document and the information contained herein are provided on
1265 an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
1266 REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND
1267 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES,
1268 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT
1269 THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR
1270 ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
1290 Vinocur, et. al. Expires July 2005 [Page 23]