draft-siemborski-rfc1734bis-03.txt  -->   draft-siemborski-rfc1734bis-04.txt

view Side-By-Side changes


Network Working Group				       Robert Siemborski
INTERNET-DRAFT				      Carnegie Mellon University						    Google, Inc.
Intended Category: Proposed Standard			     April, 2004			  February, 2005
Obsoletes: RFC 1734 Updates: RFC 2449


		   POP3 SASL Authentication Mechanism

		  <draft-siemborski-rfc1734bis-03.txt>

		  <draft-siemborski-rfc1734bis-04.txt>


Status of this Memo
    This document is an Internet-Draft

    By submitting this Internet-Draft, I certify that any applicable
    patent or other IPR claims of which I am aware have been disclosed,
    and is any of which I become aware will be disclosed, in full conformance accordance
    with
    all provisions of Section 10 of RFC2026.

    Internet-Drafts RFC 3668.

    Internet Drafts are working documents of the Internet Engineering
    Task Force (IETF), its areas, Areas, and its working groups. Working Groups.  Note that
    other groups may also distribute working documents as Internet-Drafts.

    Internet-Drafts Internet
    Drafts. Internet Drafts are draft documents valid for a maximum of
    six
    months and months.	 Internet Drafts may be updated, replaced, or obsoleted
    by other documents at any time.  It is inappropriate not appropriate to use
    Internet Drafts as reference material or to cite them other than as "work
    ``work in progress." progress''.

    The list of current Internet-Drafts can be accessed at
    http://www.ietf.org/ietf/1id-abstracts.txt

    The list of Internet-Draft Shadow Directories can be accessed at
    http://www.ietf.org/shadow.html.

    A revised version of this draft document will be submitted to the
    RFC editor as a Standards Track RFC for the Internet Community.
    Discussion and suggestions for improvement are requested.
    Distribution of this memo draft is unlimited.

    When published as an RFC this document will obsolete RFC 1734 and
    update RFC 2449.











Siemborski		  Expires August, 2005		        [Page 1]





POP3 SASL Authentication Mechanism			  February, 2005


Abstract

    This document defines a profile of the Simple Authentication and
    Security Layer (SASL) for the Post Office Protocol (POP3).	This
    extension allows a POP3 client to indicate an authentication
    mechanism to the server, perform an authentication protocol
    exchange, and optionally negotiate a security layer for subsequent
    protocol interactions during this session.

    In order

    This document seeks to consolidate all of the authentication related information for related to POP3
    AUTH into a single document, document.  To this end, this document obsoletes
    RFC 1734 and RFC 3206, 1734, replacing them it as a Proposed Standard. It
    also Standard and updates
    information contained in Section 6.3 and Section 8 of RFC 2449.






































Siemborski		  Expires October, 2004 August, 2005		        [Page 1] 2]





POP3 SASL Authentication Mechanism			     April, 2004			  February, 2005


Table of Contents


1. How to Read This Document

    The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD
    NOT", "RECOMMENDED", and "MAY" in this document are to be
    interpreted as defined in "Key words for use in RFCs to Indicate
    Requirement Levels" [KEYWORDS]

    In examples, "C:" and "S:" indicate lines sent by the client and
    server respectively. . . . . . . . . . . . . . . . . . . . .   4
2. Introduction	 . . . . . . . . . . . . . . . . . . . . . . . . . .   4
3. The [POP3] AUTH command [POP3-AUTH] in has suffered several problems
    in its specification.  The first is that it was very similar to a
    [SASL] framework, but pre-dated the initial SASL specification.  It
    was therefore missing some key components, such as a way to list the
    available authentication mechanisms.

    Later, [POP3-EXT] attempted to remedy this situation by adding the
    CAPA command and allowing an initial client response to the AUTH
    command, however problems in the clarity of the specification of how
    the initial client response was to be handled remained.

    Additionally, there is yet another document, [POP3-CODES], that
    provides additional response codes that are useful during
    authentication.  Together, this means creating a full POP3 AUTH
    implementaiton requires an understanding of material in atleast six
    different documents.

    This document attempts to combine all of the POP3 SASL
    authentication related details into a single document, in addition
    to clarifying and updating the older specifications where
    appropriate.

3.  The SASL Capability

    This section supercedes the definition of the SASL Capability in
    section 6.3 of [POP3-EXT].

    CAPA tag:
	SASL

    Arguments:
	Supported SASL Mechanisms

    Standard Commands Affected
	None




Siemborski		  Expires October, 2004		        [Page 3]





POP3 SASL Authentication Mechanism			     April, 2004


    Announced states / possible differences:
	both / no

    Commands valid in states:
	AUTHORIZATION

    Specification Reference:
	This Document, [SASL]

    Discussion
	The SASL capability permits the use of the AUTH command (as
	defined in section . . . . . . . . . . . . . . . . . . . . . . .   4 of this document) to begin a [SASL]
	negotiation.
4. The arguments to the SASL capability is a space-
	separated list of SASL mechanisms which are supported.

	If a server either does not support the CAPA command or does not
	advertise the SASL capability, clients SHOULD NOT attempt the AUTH command.  If a client does attempt the AUTH command in such
	a situation, it MUST NOT supply the client initial response
	parameter (for backwards compatibility with [POP3-AUTH]).

	Note that the list of available mechanisms MAY change after a
	successful STLS command [POP3-TLS].  Additionally,
	implementations MAY choose to omit the SASL capability after a
	successful AUTH command has been completed.

    Example

	S: +OK pop.example.com BlurdyBlurp POP3 server ready
	C: CAPA
	S: +OK List of capabilities follows
	S: SASL KERBEROS_V4 GSSAPI ANONYMOUS
	S: STLS
	S: IMPLEMENTATION BlurdyBlurp POP3 server
	S: .


4.  The AUTH Command

    AUTH mechanism [initial-response]

      Arguments:
	  mechanism: A string identifying a [SASL] authentication
	  mechanism.

	  initial-response: An optional initial client response.  If
	  present, this response MUST be encoded as specified in Section
	  3 of [BASE64].



Siemborski		  Expires October, 2004		        [Page 4]





POP3 SASL Authentication Mechanism			     April, 2004


      Restrictions:
	  After an AUTH command has been successfully completed, no more
	  AUTH commands may be issued in the same session.  After a
	  successful AUTH command completes, a server MUST reject any
	  further AUTH commands with a -ERR reply.

	  The AUTH command may only be given during the AUTHORIZATION
	  state.

      Discussion:
	  The AUTH command initiates a [SASL] authentication exchange
	  between the client and the server.  The client identifies the
	  SASL mechanism to use with the first parameter of the AUTH
	  command.  If the server supports the requested authentication
	  mechanism, it performs the SASL exchange to authenticate the
	  user.	 Optionally, it also negotiates a security layer for
	  subsequent protocol interactions during this session.	 If the
	  requested authentication mechanism is not supported, the
	  server rejects the AUTH command with a -ERR reply.

	  The authentication protocol exchange consists of a series of
	  server challenges and client responses that are specific to
	  the chosen [SASL] mechanism.

	  A server challenge is sent as a line consisting of a "+"
	  character followed by a single space and a string encoded as
	  specified in Section 3 of [BASE64].  This challenge MUST NOT
	  contain any text other than the BASE64 encoded challenge.

	  A client response consists of a line containing a string
	  encoded as defined in Section 3 of [BASE64].	If the client
	  wishes to cancel the authentication exchange, it issues a line
	  with a single "*".  If the server receives such a response, it
	  MUST reject the AUTH command by sending a -ERR reply.

	  The optional initial response argument to the AUTH command is
	  used to save a round trip when using authentication mechanisms
	  that support an initial client response.  If the initial
	  response argument is omitted and the chosen mechanism requires
	  an initial client response, the server MUST proceed as defined
	  in section 5.1 of [SASL].  In POP3, a server challenge with no
	  data is defined as line with only a "+" followed by a single
	  space.  It MUST NOT contain any other data.

	  For the purposes of the initial client response, the line
	  length limitation defined in [POP3-EXT] still applies.  If a
	  client initial send would cause the AUTH command to exceed
	  this length, the client MUST NOT use the initial response



Siemborski		  Expires October, 2004		        [Page 5]





POP3 SASL Authentication Mechanism			     April, 2004


	  parameter (and instead proceed as defined in section 5.1 of
	  [SASL]).

	  If the client needs to send a zero-length initial response,
	  the client MUST transmit the response as a single equals sign
	  ("=").  This indicates that the response is present, but
	  contains no data.

	  If the client uses an initial-response argument to the AUTH
	  command with a SASL mechanism that does not support an initial
	  client send, the server MUST reject the AUTH command with a
	  -ERR reply.

	  If the server cannot [BASE64] decode any client response, it
	  MUST reject the AUTH command with a -ERR reply.  If the client
	  cannot BASE64 decode any of the server's challenges, it MUST
	  cancel the authentication using the "*" response.  In
	  particular, servers and clients MUST reject (and not ignore)
	  any character not explicitly allowed by the BASE64 alphabet,
	  and MUST reject any sequence of BASE64 characters that
	  contains the pad character ('=') anywhere other than the end
	  of the string (e.g. "=AAA" and "AAA=BBB" are not allowed).

	  Note that these [BASE64] strings (excepting the initial client
	  response) may be of arbitrarily length.  Clients and servers
	  MUST be able to handle the maximum encoded size of challenges
	  and responses generated by their supported authentication
	  mechanisms.  This requirement is independent of any line
	  length limitations the client or server may have in other
	  parts of its protocol implementation.

	  If the server is unable to authenticate the client, it MUST
	  reject the AUTH command with a -ERR reply.  Should the client
	  successfully complete the exchange, the server issues a +OK
	  reply.  Additionally, upon success, the POP3 session enters
	  the TRANSACTION state.

	  The authorization identity generated by this [SASL] exchange
	  is a simple username, and MUST use the [SASLprep] profile of
	  the [StringPrep] algorithm to prepare these names for
	  matching.  If preparation of the authorization identity fails
	  or results in an empty string (unless it was transmitted as
	  the empty string), the server MUST fail the authentication.

	  If a security layer is negotiated during the SASL exchange, it
	  takes effect for the client on the octet immediately following
	  the CRLF that concludes the last response generated by the
	  client.  For the server, it takes effect immediately following



Siemborski		  Expires October, 2004		        [Page 6]





POP3 SASL Authentication Mechanism			     April, 2004


	  the CRLF of its success reply.

	  When a security layer takes effect, the server MUST discard
	  any knowledge previously obtained from the client, which was
	  not obtained from the SASL negotiation itself.  Likewise, the
	  client MUST discard any knowledge obtained from the server,
	  such as the list of available POP3 service extensions.  After
	  a security layer is established, the server SHOULD NOT
	  advertise either the SASL or the STLS extension.

	  When both [TLS] and SASL security layers are in effect, the
	  TLS encoding MUST be applied after the SASL encoding,
	  regardless of the order in which the layers were negotiated.

	  The service name specified by this protocol's profile of SASL
	  is "pop".

	  If an AUTH command fails, the client may try another
	  authentication mechanism or present different credentials by
	  issuing another AUTH command (or by using one of the other
	  [POP3] authentication mechanisms).  Likewise, the server MUST
	  behave as if the client had not issued the AUTH command.

	  To ensure interoperability, client and server implementations
	  of this extension MUST implement the [DIGEST-MD5] SASL
	  mechanism.


4.1.	Formal Syntax

    The following syntax specification uses the Augmented Backus-Naur
    Form notation as specified in [ABNF].

    Except as noted otherwise, all alphabetic characters are case-
    insensitive.  The use of upper or lower case characters to define
    token strings is for editorial clarity only.  Implementations MUST
    accept these strings in a case-insensitive fashion.


	UPALPHA		= %x41-5A	     ;; Uppercase: A-Z

	LOALPHA		= %x61-7A	     ;; Lowercase: a-z

	ALPHA		= UPALPHA / LOALPHA  ;; case insensitive

	DIGIT		= %x30-39	     ;; Digits 0-9

	AUTH_CHAR	= ALPHA / DIGIT / "-" / "_"



Siemborski		  Expires October, 2004		        [Page 7]





POP3 SASL Authentication Mechanism			     April, 2004


	auth_type	= 1*20AUTH_CHAR

	auth_command	= "AUTH" SPACE auth_type [SPACE (base64 / "=")]
			  *(CRLF [base64]) CRLF

	base64		= base64_terminal /
			  ( 1*(4base64_CHAR) [base64_terminal] )

	base64_char	= UPALPHA / LOALPHA / DIGIT / "+" / "/"
			  ;; Case-sensitive

	base64_terminal = (2base64_char "==") / (3base64_char "=")

	continue_req	= "+" SPACE [base64] CRLF

	CR		= %x0C		 ;; ASCII CR, carriage return

	CRLF		= CR LF

	LF		= %x0A		 ;; ASCII LF, line feed

	SPACE		= %x20		 ;; ASCII SP, space Command  . . . . . . . . . . . . . . . . . . . . . . . .   5
4.1. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . .   8
4.2. Examples

    Here is an example of a client attempting AUTH PLAIN under TLS and
    making use of the initial client response:

     S: +OK pop.example.com BlurdyBlurp POP3 server ready
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL KERBEROS_V4 GSSAPI ANONYMOUS
     S: STLS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S:  .
     C: STLS
     S: +OK Begin TLS negotiation now
       ... TLS negotiation proceeds, further commands protected by TLS layer ...
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL PLAIN KERBEROS_V4 GSSAPI ANONYMOUS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S: .
     C: AUTH PLAIN dGVzdAB0ZXN0AHRlc3Q=
     S: +OK Maildrop locked and ready

    Here is another client that is attempting AUTH PLAIN under a TLS



Siemborski		  Expires October, 2004		        [Page 8]





POP3 SASL Authentication Mechanism			     April, 2004


    layer, this time without the initial response.  Parts of the
    negotiation before the TLS layer was established have been omitted:

       ... TLS negotiation proceeds, further commands protected by TLS layer ...
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL PLAIN KERBEROS_V4 GSSAPI ANONYMOUS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S: .
     C: AUTH PLAIN
       (note that there is a space following the '+' on the following line)
     S: +
     C: dGVzdAB0ZXN0AHRlc3Q=
     S: +OK Maildrop locked and ready

    Here is an example using a mechanism which does not support an
    initial client send, and includes server challenges:

     S: +OK pop.example.com BlurdyBlurp POP3 server ready
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL KERBEROS_V4 GSSAPI ANONYMOUS
     S: STLS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S: .
     C: AUTH KERBEROS_V4
     S: + ezLUFA==
	(the following lines are broken for editorial clarity only)
     C: BAYFQU5EUkVXLkNNVS5FRFUAOCCXeMiVyFe9K6Nwne7+sPLgIoF9YQ5ePfxUsMlJAf
	C7aoNySU8nrqS9m8JAddsUeuyc5HFXXovaKLrZNo2bTLH0Lyolwy0W9ryJDojbKmHy
	zSMqFsGD4EL0
     S: + Z74fTwDw7KQ=
     C: vSAF7ha6qotK2UHUgKlsEA==
     S: +OK Maildrop locked and ready
	... at this point a security layer has been established and additional
	    commands and responses proceed within it ...


5.  Extended POP3 Response Codes

    This section defines four POP3 response codes which can be used to
    determine the reason for a failed login (provided that the server
    advertises the RESP-CODES capability [POP3-EXT]).  These definitions
    supercede those in [POP3-EXT] and [POP3-CODES].

    It is RECOMMENDED that server applications use these codes when
    possible to allow clients a straightforward, interoperable way to
    determine the cause of an authentication failure (as opposed to . . . . . . . . . . . . . . . . . . . . . . .   9
5. Protocol Actions  . . . . . . . . . . . . . . . . . . . . . . . .  11
6. Intellectual Property Rights	 . . . . . . . . . . . . . . . . . .  11
7. Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . .  12
8. References  . . . . . . . . . . . . . . . . . . . . . . . . . . .  12
9. Changes From RFC 1734, RFC 2449.  . . . . . . . . . . . . . . . .  14
10. Author's Address . . . . . . . . . . . . . . . . . . . . . . . .  14
11. Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . .  14



































Siemborski		  Expires October, 2004 August, 2005		        [Page 9] 3]





POP3 SASL Authentication Mechanism			     April, 2004


    parsing error text).

5.1.	The LOGIN-DELAY Response Code

    This occurs on an -ERR response			  February, 2005


1.  How to an AUTH, USER (see note), PASS or
    APOP command Read This Document

    The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD
    NOT", "RECOMMENDED", and indicates that the user has logged "MAY" in recently and
    will not be allowed to login again until the login delay period has
    expired.

    Please see the Security Considerations section of this document for
    an important note about returning this code in response to the USER
    command.

5.2.	The IN-USE Response Code

    This occurs on an -ERR response are to an AUTH, APOP, or PASS command.
    It indicates the authentication was successful, but the user's
    maildrop is currently be
    interpreted as defined in "Key words for use (probably in RFCs to Indicate
    Requirement Levels" [KEYWORDS]

    In examples, "C:" and "S:" indicate lines sent by another POP3 client).

5.3. the client and
    server respectively.

2.  Introduction

    The [POP3] AUTH Response Code command [POP3-AUTH] has suffered several problems in
    its specification.	The AUTH response code informs the client that there first is that it was very similar to a problem
    with
    [SASL] framework, but pre-dated the user's credentials.  This might be an incorrect password,
    an unknown user name, an expired account, an attempt to authenticate
    in violation of policy (such as from an invalid location or during
    an unauthorized time), or initial SASL specification.  It
    was therefore missing some other problem.

    The AUTH response code is valid with an -ERR response key components, such as a way to any
    authentication command including AUTH, USER (see the note in the
    Security Considerations section of this document), PASS, or APOP.

    Servers which include list the AUTH response code with any
    available authentication
    failure SHOULD support mechanisms.

    Later, [POP3-EXT] attempted to remedy this situation by adding the
    CAPA command [POP3-EXT] and SHOULD
    include allowing an initial client response to the AUTH-RESP-CODE capability (defined AUTH
    command, however problems in the next section)
    in clarity of the CAPA response.  AUTH-RESP-CODE assures specification of how
    the initial client response was to be handled remained.

    Additionally, there is yet another document, [POP3-CODES], that
    provides additional response codes that only
    errors with the AUTH code are caused by credential problems.

5.3.1. useful during
    authentication.  Together, this means creating a full POP3 AUTH
    implementaiton requires an understanding of material in at least
    five (and probably six) different documents.

    This document attempts to combine the information in [POP3-AUTH] and
    [POP3-EXT] to simplify this situation.  Additionally, it aims to
    clarify and update the older specifications where appropriate.

3.  The AUTH-RESP-CODE SASL Capability

    This section supercedes the definition of the SASL Capability in
    section 6.3 of [POP3-EXT].

    CAPA tag:
	AUTH-RESP-CODE
	SASL

    Arguments:
	none
	Supported SASL Mechanisms

    Added commands:
	none
	AUTH

    Standard Commands Affected



Siemborski		  Expires October, 2004 August, 2005		        [Page 10] 4]





POP3 SASL Authentication Mechanism			     April, 2004


    Standard commands affected:
	none			  February, 2005


	None

    Announced states / possible differences:
	both / no

    Commands valid in states:
	n/a
	AUTHORIZATION

    Specification reference:
	this document

    Discussion: Reference:
	This Document, [SASL]

    Discussion
	The AUTH-RESP-CODE SASL capability indicates that the server includes
	the AUTH response code with any authentication error caused by a
	problem with the user's credentials.

5.4.	The SYS Response Code

    The SYS response code announces that a failure is due to a system
    error, as opposed to permits the user's credentials or an external
    condition.	It is hierarchical, with two possible second-level
    codes: TEMP and PERM.  (Case is not significant at any level use of the
    hierarchy.)

    SYS/TEMP indicates a problem which is likely to be temporary AUTH command (as
	defined in
    nature, and therefore there is no need section 4 of this document) to alarm the user, unless the
    failure persists.  Examples might include begin a central resource which
    is currently locked or otherwise temporarily unavailable,
    insufficient free disk or memory, etc.

    SYS/PERM [SASL]
	negotiation.  The argument to the SASL capability is used for problems a space-
	separated list of SASL mechanisms which are unlikely to be resolved
    without intervention.  It is appropriate to alert the user and
    suggest that the organization's supported.

	If a server either does not support the CAPA command or assistance personnel be
    contacted.	Examples include corrupted mailboxes, system
    configuration errors, etc.

    The SYS response code is valid with an -ERR response to any does not
	advertise the SASL capability, clients SHOULD NOT attempt the
	AUTH command.

6.  Security Considerations

    Security issues are discussed throughout this memo.

    Before  If a client does attempt the [SASL] negotiation has begun, any protocol interactions
    are performed AUTH command in such
	a situation, it MUST NOT supply the clear and may be modified client initial response
	parameter (for backwards compatibility with [POP3-AUTH]).

	Note that the list of available mechanisms MAY change after a
	successful STLS command [POP3-TLS].  However, as required by an active
    attacker.  For this reason, clients and servers
	[POP3-EXT] implementations MUST discard any
    knowledge obtained prior continue to the start of include the SASL negotiation upon
    the establishment
	capability even after a successful AUTH command has been
	completed (even though no further AUTH commands may be issued).

    Example

	S: +OK pop.example.com BlurdyBlurp POP3 server ready
	C: CAPA
	S: +OK List of capabilities follows
	S: SASL KERBEROS_V4 GSSAPI ANONYMOUS
	S: STLS
	S: IMPLEMENTATION BlurdyBlurp POP3 server
	S: .


4.  The AUTH Command

    AUTH mechanism [initial-response]

      Arguments:
	  mechanism: A string identifying a security layer. [SASL] authentication
	  mechanism.




Siemborski		  Expires October, 2004 August, 2005		        [Page 11] 5]





POP3 SASL Authentication Mechanism			     April, 2004


    Servers MAY implement			  February, 2005


	  initial-response: An optional initial client response.  If
	  present, this response MUST be encoded as specified in Section
	  3 of [BASE64].

      Restrictions:
	  After an AUTH command has been successfully completed, no more
	  AUTH commands may be issued in the same session.  After a policy whereby
	  successful AUTH command completes, a server MUST reject any
	  further AUTH commands with an -ERR reply.

	  The AUTH command may only be given during the connection is dropped
    after AUTHORIZATION
	  state.

      Discussion:
	  The AUTH command initiates a number of failed [SASL] authentication attempts.  If they do so,
    they SHOULD NOT drop exchange
	  between the connection until atleast 3 attempts to
    authenticate have failed.

    Implementations MUST support a configuration where [SASL] mechanisms
    that are vulnerable client and the server.  The client identifies the
	  SASL mechanism to passive eavesdropping attacks (such as
    [PLAIN]) are not advertised or used without use with the presence first parameter of an
    external security layer such as [TLS].

    Returning the LOGIN-DELAY or AUTH response codes to
	  command.  If the USER command
    avoids server supports the work of authenticating requested authentication
	  mechanism, it performs the user but is likely to reveal
    information SASL exchange to authenticate the client about the existence of the account in
    question.  Unless
	  user.	 Optionally, it also negotiates a security layer for
	  subsequent protocol interactions during this session.	 If the server
	  requested authentication mechanism is operating in an environment where
    user names are not secret (for example, many popular email clients
    advertise supported, the POP server and user name in an outgoing mail header),
    or where
	  server access is restricted, or rejects the AUTH command with an -ERR reply.

	  The authentication protocol exchange consists of a series of
	  server can verify challenges and client responses that
    the connection is to the same user, the the server SHOULD NOT issue
    this response code are specific to
	  the USER command.  The chosen [SASL] mechanism.

	  A server still saves the
    cost challenge is sent as a line consisting of opening the maildrop, which a "+"
	  character followed by a single space and a string encoded as
	  specified in some environments is the most
    expensive step.

7.  IANA Considerations

    This document requests that the IANA update the entry for the "pop"
    SASL protocol name to point at this document. Section 3 of [BASE64].  This document requests that the IANA update the entry for line MUST NOT
	  contain any text other than the SASL
    POP3 capability to be BASE64 encoded challenge.

	  A client response consists of a line containing a string
	  encoded as defined in Section 3 of this document.

    This document requests that [BASE64].	If the IANA update client
	  wishes to cancel the entry for authentication exchange, it issues a line
	  with a single "*".  If the LOGIN-
    DELAY, IN-USE, AUTH, SYS/TEMP, and SYS/PERM POP3 server receives such a response, it
	  MUST reject the AUTH command by sending an -ERR reply.

	  The optional initial response codes argument to
    this document.

    This document requests the AUTH command is
	  used to save a round trip when using authentication mechanisms
	  that support an initial client response.  If the IANA update initial
	  response argument is omitted and the entry for chosen mechanism requires
	  an initial client response, the AUTH-
    RESP-CODE capability to be server MUST proceed as defined
	  in Section 5.3.1 of this
    document.

8.  Protocol Actions

    [RFC Editor: Remove this section before publication]

    This document obsoletes RFC 1734 and replaces it as a Proposed
    Standard.  By moving RFC 1734 to Historic, RFC 1731 can also be
    moved to Historic (as RFC 1734 was the last document to have 5.1 of [SASL].  In POP3, a
    normative reference).

    This document obsoletes RFC 3206 and replaces it server challenge with no
	  data is defined as line with only a Proposed "+" followed by a single
	  space.  It MUST NOT contain any other data.




Siemborski		  Expires October, 2004 August, 2005		        [Page 12] 6]





POP3 SASL Authentication Mechanism			     April, 2004


    Standard.

    It also updates information contained in Section 6.3 and Section 8
    of RFC 2449.

9.  Intellectual Property Rights

    The IETF takes no position regarding			  February, 2005


	  For the validity or scope purposes of any
    intellectual property or other rights that might be claimed to
    pertain the initial client response, the line
	  length limitation defined in [POP3-EXT] still applies.  If a
	  client initial send would cause the AUTH command to exceed
	  this length, the implementation or client MUST NOT use of the technology described initial response
	  parameter (and instead proceed as defined in
    this document or section 5.1 of
	  [SASL]).

	  If the extent client needs to which any license under such rights
    might or might not be available; neither does it represent send a zero-length initial response,
	  the client MUST transmit the response as a single equals sign
	  ("=").  This indicates that it
    has made any effort the response is present, but
	  contains no data.

	  If the client uses an initial-response argument to identify any such rights.  Information on the
    IETF's procedures AUTH
	  command with respect to rights in standards-track and
    standards-related documentation can be found in BCP-11.  Copies of
    claims of rights made available for publication and any assurances
    of licenses to be made available, or a SASL mechanism that does not support an initial
	  client send, the result of server MUST reject the AUTH command with an attempt made
    to obtain
	  -ERR reply.

	  If the server cannot [BASE64] decode a general license or permission for client response, it
	  MUST reject the use of such
    proprietary rights by implementors or users of this specification
    can be obtained from AUTH command with an -ERR reply.  If the IETF Secretariat.

    The IETF invites
	  client cannot BASE64 decode a server challenge, it MUST cancel
	  the authentication using the "*" response.  In particular,
	  servers and clients MUST reject (and not ignore) any interested party to bring to its attention character
	  not explicitly allowed by the BASE64 alphabet, and MUST reject
	  any
    copyrights, patents or patent applications, or other proprietary
    rights which may cover technology that may be required to practice
    this standard.  Please address sequence of BASE64 characters that contains the information to pad
	  character ('=') anywhere other than the IETF Executive
    Director.

10.  Copyright

    Copyright (C) The Internet Society (2003). All Rights Reserved.

    This document and translations end of it may be copied and furnished to
    others, the string
	  (e.g. "=AAA" and derivative works "AAA=BBB" are not allowed).

	  Note that comment on or otherwise explain it
    or assist in its implementation these [BASE64] strings (excepting the initial client
	  response) may be prepared, copied, published of arbitrarily length.  Clients and distributed, in whole or in part, without restriction servers
	  MUST be able to handle the maximum encoded size of challenges
	  and responses generated by their supported authentication
	  mechanisms.  This requirement is independent of any
    kind, provided that line
	  length limitations the above copyright notice and this paragraph
    are included on all such copies and derivative works.  However, this
    document itself client or server may not be modified have in any way, such as by removing other
	  parts of its protocol implementation.

	  If the copyright notice or references server is unable to authenticate the Internet Society or other
    Internet organizations, except as needed for client, it MUST
	  reject the AUTH command with an -ERR reply.  Should the client
	  successfully complete the exchange, the server issues a +OK
	  reply.  Additionally, upon success, the POP3 session enters
	  the TRANSACTION state.

	  The authorization identity generated by the [SASL] exchange is
	  a simple username, and MUST use the  purpose [SASLprep] profile of
    developing Internet standards in which case the procedures
	  [StringPrep] algorithm to prepare these names for
    copyrights defined in matching.
	  If preparation of the Internet Standards process must be
    followed, authorization identity fails or as required to translate results
	  in an empty string (unless it into languages other than
    English.

    This document and was transmitted as the information contained herein is provided on an
    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING empty
	  string), the server MUST fail the authentication.




Siemborski		  Expires October, 2004 August, 2005		        [Page 13] 7]





POP3 SASL Authentication Mechanism			     April, 2004


    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
















































Siemborski		  Expires October, 2004	               [Page 14]





POP3			  February, 2005


	  If a security layer is negotiated during the SASL Authentication Mechanism			     April, 2004


11.  References

     The exchange, it
	  takes effect for the client on the octet immediately following documents contain normative definitions or
specifications
	  the CRLF that are necessary for correct understanding concludes the last response generated by the
	  client.  For the server, it takes effect immediately following
	  the CRLF of this
protocol:

[BASE64]    Josefsson, S., "The Base16, Base32, and Base64 Data
	    Encodings", RFC 3548, July 2003.

[DIGEST-MD5]
	    Leach, P., Melnikov, A., and Newman C., "Using Digest
	    Authentication as its success reply.

	  When a security layer takes effect, the server MUST discard
	  any knowledge previously obtained from the client, which was
	  not obtained from the SASL Mechanism", draft-ietf-sasl-
	    rfc2831bis-*.txt, a work in progress.

[KEYWORDS]  Bradner, S., "Key words for use in RFCs to Indicate
	    Requirement Levels", BCP 14, RFC 2119, March 1997

[POP3]	    Myers, J. and Rose, M., "Post Office Protocol - Version 3",
	    STD 53, RFC 1939, May 1996.

[POP3-EXT]  Gellens, R., Newman, C., and Lundblade, L., "POP3 Extension
	    Mechanism", RFC 2449, November 1998.

[POP3-TLS]  Newman, C., "Using TLS with IMAP, POP3, and ACAP", RFC 2595,
	    June 1999.

[SASL]	    Melnikov, A., "Simple Authentication and Security Layer
	    (SASL)", draft-ietf-sasl-rfc2222bis-*.txt, a work in
	    progress.

[SASLprep]  Zeilega, K., "SASLprep: Stringprep profile for user names negotiation itself.  Likewise, the
	  client MUST discard any knowledge obtained from the server,
	  such as the list of available POP3 service extensions.

	  When both [TLS] and passwords", draft-ietf-sasl-saslprep-*.txt, a work SASL security layers are in
	    progress

[StringPrep]
	    Hoffman, P. and Blanchet, M., "Preparation effect, the
	  TLS encoding MUST be applied after the SASL encoding,
	  regardless of
	    Internationalized Strings ("stringprep")", draft-hoffman-
	    rfc3454bis-*.txt, a work the order in progress which the layers were negotiated.

	  The following references are for informational purposes only:

[PLAIN]	    Zeilenga, K., "The Plain SASL Mechanism", draft-ietf-sasl-
	    plain-*.txt, a work in progress.

[POP3-AUTH] Myers, J., "POP3 AUTHentication Command", RFC 1734, January
	    1994.

[POP3-CODES]



Siemborski		  Expires October, 2004	               [Page 15]





POP3 service name specified by this protocol's profile of SASL Authentication Mechanism			     April, 2004


	    Gellens, R., "The SYS and
	  is "pop".

	  If an AUTH POP Response Codes", RFC
	    3206, February 2002.

[TLS]	    Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC
	    2246, January 1999.

12.  Changes From RFC 1734, RFC 2449, and RFC 3206

	    1.	 The SASL-based semantics defined in RFC 2449 are now
		 normative for command fails, the client may try another
	  authentication mechanism or present different credentials by
	  issuing another AUTH extension.

	    2.	 Clarifications and examples command (or by using one of the proper behavior of
		 initial other
	  [POP3] authentication mechanisms).  Likewise, the server MUST
	  behave as if the client had not issued the AUTH command.

	  To ensure interoperability, client response handling.

	    3.	 Minimum requirement of support for DIGEST-MD5.

	    4.	 Clarify ordering of TLS and SASL security layers.

	    5.	 Update references to newer versions server implementations
	  of various
		 specifications.

	    6.	 Clarify that this extension MUST implement the mechanism list can change.

	    7.	 Add [DIGEST-MD5] SASL
	  mechanism.


4.1.	Formal Syntax

    The following syntax specification uses the Augmented Backus-Naur
    Form notation as specified in [ABNF].

    Except as noted otherwise, all alphabetic characters are case-
    insensitive.  The use of the SASLprep profile upper or lower case characters to define
    token strings is for preparing
		 authorization identities.

	    8.	 General other editorial clarifications.

	    9.	 Consolidation of all applicable information into clarity only.  Implementations MUST
    accept these strings in a
		 single document.

13.  Author's	 Address:

    Robert Siemborski
    Carnegie Mellon, Andrew Systems Group
    Cyert Hall 207
    5000 Forbes Avenue
    Pittsburgh, PA  15213
    +1 412 268 7456
    rjs3+@andrew.cmu.edu

14.  Acknowledgments:

    The author would like to acknowledge the contributions of John
    Myers, Randall Gellens, Chris Newman, Laurence Lundblade,  and other
    contributors to RFC 1734, RFC 2554, and RFC 3206, on which this
    document draws heavily. case-insensitive fashion.


	UPALPHA		= %x41-5A	     ;; Uppercase: A-Z

	LOALPHA		= %x61-7A	     ;; Lowercase: a-z

	ALPHA		= UPALPHA / LOALPHA  ;; case insensitive

	DIGIT		= %x30-39	     ;; Digits 0-9



Siemborski		  Expires October, 2004 August, 2005		        [Page 16] 8]





POP3 SASL Authentication Mechanism			     April, 2004


    The author would also like to thank Ken Murchison, Alexey Melnikov,
    and Mark Crispin for			  February, 2005


	AUTH_CHAR	= ALPHA / DIGIT / "-" / "_"

	auth_type	= 1*20AUTH_CHAR

	auth_command	= "AUTH" SPACE auth_type [SPACE (base64 / "=")]
			  *(CRLF [base64]) CRLF

	auth_resp	= ("*" / base64) CRLF

	base64		= base64_terminal /
			  ( 1*(4base64_CHAR) [base64_terminal] )

	base64_char	= UPALPHA / LOALPHA / DIGIT / "+" / "/"
			  ;; Case-sensitive

	base64_terminal = (2base64_char "==") / (3base64_char "=")

	continue_req	= "+" SPACE [base64] CRLF

	CR		= %x0C		 ;; ASCII CR, carriage return

	CRLF		= CR LF

	LF		= %x0A		 ;; ASCII LF, line feed

	SPACE		= %x20		 ;; ASCII SP, space


    Additionally, the time they devoted to reviewing early drafts ABNF specified in [POP3-EXT] is updated as
    follows:


	response     =	greeting / single-line / capa-resp / multi-line /
			continue_req



4.2.	Examples

    Here is an example of a client attempting AUTH PLAIN under TLS and
    making use of this document. the initial client response:










Siemborski		  Expires October, 2004 August, 2005		        [Page 17] 9]





POP3 SASL Authentication Mechanism			     April, 2004


Table of Contents


1. How to Read This Document . . . . . . . . . . . . . . . . . . . .   3
2. Introduction	 . . . . . . . . . . . . . . . . . . . . . . . . . .   3
3. The SASL Capability . . . . . . . . . . . . . . . . . . . . . . .   3
4. The AUTH Command  . . . . . . . . . . . . . . . . . . . . . . . .   4
4.1. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . .   7
4.2. Examples  . . . . . . . . . . . . . . . . . . . . . . . . . . .   8
5. Extended			  February, 2005


     S: +OK pop.example.com BlurdyBlurp POP3 Response Codes	 . . . . . . . . . . . . . . . . . .   9
5.1. The LOGIN-DELAY Response Code . . . . . . . . . . . . . . . . .  10
5.2. The IN-USE Response Code  . . . . . . . . . . . . . . . . . server ready
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL KERBEROS_V4 GSSAPI ANONYMOUS
     S: STLS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S: .
     C: STLS
     S: +OK Begin TLS negotiation now
       ... TLS negotiation proceeds, further commands protected by TLS layer ...
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL PLAIN KERBEROS_V4 GSSAPI ANONYMOUS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S: .  10
5.3. The
     C: AUTH Response Code  . . . . . . . . . . . . . . . . . . . .  10
5.3.1. The AUTH-RESP-CODE Capability . . . . . . . . . . . . . . . .  10
5.4. The SYS Response Code . . . . . . . . . . . . . . . . . . . PLAIN dGVzdAB0ZXN0AHRlc3Q=
     S: +OK Maildrop locked and ready

    Here is another client that is attempting AUTH PLAIN under a TLS
    layer, this time without the initial response.  Parts of the
    negotiation before the TLS layer was established have been omitted:

       ... TLS negotiation proceeds, further commands protected by TLS layer ...
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL PLAIN KERBEROS_V4 GSSAPI ANONYMOUS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S: .
     C: AUTH PLAIN
       (note that there is a space following the '+' on the following line)
     S: +
     C: dGVzdAB0ZXN0AHRlc3Q=
     S: +OK Maildrop locked and ready

    Here is an example using a mechanism which does not support an
    initial client send, and includes server challenges:















Siemborski		  Expires August, 2005	               [Page 10]





POP3 SASL Authentication Mechanism			  February, 2005


     S: +OK pop.example.com BlurdyBlurp POP3 server ready
     C: CAPA
     S: +OK List of capabilities follows
     S: SASL KERBEROS_V4 GSSAPI ANONYMOUS
     S: STLS
     S: IMPLEMENTATION BlurdyBlurp POP3 server
     S: .  11
     C: AUTH KERBEROS_V4
     S: + ezLUFA==
	(the following lines are broken for editorial clarity only)
     C: BAYFQU5EUkVXLkNNVS5FRFUAOCCXeMiVyFe9K6Nwne7+sPLgIoF9YQ5ePfxUsMlJAf
	C7aoNySU8nrqS9m8JAddsUeuyc5HFXXovaKLrZNo2bTLH0Lyolwy0W9ryJDojbKmHy
	zSMqFsGD4EL0
     S: + Z74fTwDw7KQ=
     C: vSAF7ha6qotK2UHUgKlsEA==
     S: +OK Maildrop locked and ready
	... at this point a security layer has been established and additional
	    commands and responses proceed within it ...


5.  Protocol Actions

    [RFC Editor: Remove this section before publication]

    This document obsoletes RFC 1734 and replaces it as a Proposed
    Standard.  By moving RFC 1734 to Historic, RFC 1731 can also be
    moved to Historic (as RFC 1734 was the last document to have a
    normative reference).

    It also updates information contained in Section 6.3 of RFC 2449.

6. Security Considerations . . . . . . . . . . . . . . . . . . . . .  11  Intellectual Property Rights

    The IETF takes no position regarding the validity or scope of any
    intellectual property or other rights that might be claimed to
    pertain to the implementation or use of the technology described in
    this document or the extent to which any license under such rights
    might or might not be available; neither does it represent that it
    has made any effort to identify any such rights.  Information on the
    IETF's procedures with respect to rights in standards-track and
    standards-related documentation can be found in BCP-11.  Copies of
    claims of rights made available for publication and any assurances
    of licenses to be made available, or the result of an attempt made
    to obtain a general license or permission for the use of such
    proprietary rights by implementors or users of this specification
    can be obtained from the IETF Secretariat.

    The IETF invites any interested party to bring to its attention any



Siemborski		  Expires August, 2005	               [Page 11]





POP3 SASL Authentication Mechanism			  February, 2005


    copyrights, patents or patent applications, or other proprietary
    rights which may cover technology that may be required to practice
    this standard.  Please address the information to the IETF Executive
    Director.

7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . .  12
8. Protocol Actions  . . . . . . . . . . . . . . . . . . . . . . . .  12
9. Intellectual Property Rights	 . . . . . . . . . . . . . . . . . .  13
10.  Copyright  . . . . . . . . . . . . . . . . . . . . . . . . . . .  13
11.

    Copyright (C) The Internet Society (2005). This document is subject
    to the rights, licenses and restrictions contained in BCP 78, and
    except as set forth therein, the authors retain all their rights."

    "This document and the information contained herein are provided on
    an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
    REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE
    INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
    THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

































Siemborski		  Expires August, 2005	               [Page 12]





POP3 SASL Authentication Mechanism			  February, 2005


8.  References . . . . . . . . . . . . . . . . . . . . . . . . . . .  14
12.

     The following documents contain normative definitions or
specifications that are necessary for correct understanding of this
protocol:

[BASE64]    Josefsson, S., "The Base16, Base32, and Base64 Data
	    Encodings", RFC 3548, July 2003.

[DIGEST-MD5]
	    Leach, P., Melnikov, A., and Newman C., "Using Digest
	    Authentication as a SASL Mechanism", draft-ietf-sasl-
	    rfc2831bis-*.txt, a work in progress.

[KEYWORDS]  Bradner, S., "Key words for use in RFCs to Indicate
	    Requirement Levels", BCP 14, RFC 2119, March 1997

[POP3]	    Myers, J. and Rose, M., "Post Office Protocol - Version 3",
	    STD 53, RFC 1939, May 1996.

[POP3-EXT]  Gellens, R., Newman, C., and Lundblade, L., "POP3 Extension
	    Mechanism", RFC 2449, November 1998.

[POP3-TLS]  Newman, C., "Using TLS with IMAP, POP3, and ACAP", RFC 2595,
	    June 1999.

[SASL]	    Melnikov, A., "Simple Authentication and Security Layer
	    (SASL)", draft-ietf-sasl-rfc2222bis-*.txt, a work in
	    progress.

[SASLprep]  Zeilega, K., "SASLprep: Stringprep profile for user names
	    and passwords", draft-ietf-sasl-saslprep-*.txt, a work in
	    progress

[StringPrep]
	    Hoffman, P. and Blanchet, M., "Preparation of
	    Internationalized Strings ("stringprep")", draft-hoffman-
	    rfc3454bis-*.txt, a work in progress

The following references are for informational purposes only:

[PLAIN]	    Zeilenga, K., "The Plain SASL Mechanism", draft-ietf-sasl-
	    plain-*.txt, a work in progress.

[POP3-AUTH] Myers, J., "POP3 AUTHentication Command", RFC 1734, January
	    1994.

[POP3-CODES]



Siemborski		  Expires August, 2005	               [Page 13]





POP3 SASL Authentication Mechanism			  February, 2005


	    Gellens, R., "The SYS and AUTH POP Response Codes", RFC
	    3206, February 2002.

[TLS]	    Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC
	    2246, January 1999.

9.  Changes From RFC 1734, RFC 2449, and 2449.

	    1.	 The SASL-based semantics defined in RFC 3206  . . . . . . . . .  16
13. 2449 are now
		 normative for the AUTH extension.

	    2.	 Clarifications and examples of the proper behavior of
		 initial client response handling.

	    3.	 Minimum requirement of support for DIGEST-MD5.

	    4.	 Clarify ordering of TLS and SASL security layers.

	    5.	 Update references to newer versions of various
		 specifications.

	    6.	 Clarify that the mechanism list can change.

	    7.	 Add the use of the SASLprep profile for preparing
		 authorization identities.

	    8.	 General other editorial clarifications.

	    9.	 Consolidation of much applicable information into a
		 single document.

10.  Author's Address . . . . . . . . . . . . . . . . . . . . . . . .  16
14. Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . .  16	 Address:

    Robert Siemborski
    Google, Inc.
    1600 Ampitheatre Parkway
    Mountain View, CA 94043
    +1 650 623 6925
    robsiemb@google.com

11.  Acknowledgments:

    The author would like to acknowledge the contributions of John
    Myers, Randall Gellens, Chris Newman, Laurence Lundblade,  and other
    contributors to RFC 1734 and RFC 2554, on which this document draws
    heavily.

    The author would also like to thank Ken Murchison, Randall Gellens,



Siemborski		  Expires October, 2004 August, 2005	               [Page 1] 14]





POP3 SASL Authentication Mechanism			  February, 2005


    Alexey Melnikov, and Mark Crispin for the time they devoted to
    reviewing early drafts of this document.

















































Siemborski		  Expires August, 2005	               [Page 15]

----