gsasl-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS gsasl/doc/specification


From: gsasl-commit
Subject: CVS gsasl/doc/specification
Date: Fri, 21 Jan 2005 23:14:57 +0100

Update of /home/cvs/gsasl/doc/specification
In directory dopio:/tmp/cvs-serv6555

Added Files:
        draft-ietf-sasl-plain-06.txt 
Log Message:
Add.


--- /home/cvs/gsasl/doc/specification/draft-ietf-sasl-plain-06.txt      
2005/01/21 22:14:57     NONE
+++ /home/cvs/gsasl/doc/specification/draft-ietf-sasl-plain-06.txt      
2005/01/21 22:14:57     1.1





INTERNET-DRAFT                           Editor: Kurt D. Zeilenga
Intended Category: Standards Track            OpenLDAP Foundation
Expires July 2005                                 18 January 2005
Updates: RFC 2595



                         The Plain SASL Mechanism
                      <draft-ietf-sasl-plain-06.txt>



Status of Memo

  This document is intended to be, after appropriate review and
  revision, submitted to the RFC Editor as a Standards Track document.
  Distribution of this memo is unlimited.  Technical discussion of this
  document will take place on the IETF SASL mailing list
  <address@hidden>.  Please send editorial comments directly to the
  document editor <address@hidden>.

  By submitting this Internet-Draft, I accept the provisions of Section
  4 of RFC 3667.  By submitting this Internet-Draft, I certify that any
  applicable patent or other IPR claims of which I am aware have been
  disclosed, or will be disclosed, and any of which I become aware will
  be disclosed, in accordance with RFC 3668.

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

  Internet-Drafts are draft documents valid for a maximum of six months
  and may be updated, replaced, or obsoleted by other documents at any
  time. It is inappropriate to use Internet-Drafts as reference material
  or to cite them other than as "work in 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>.

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

  Please see the Full Copyright section near the end of this document
  for more information.






Zeilenga                  Plain SASL Mechanism                  [Page 1]

INTERNET-DRAFT        draft-ietf-sasl-plain-06.txt       18 January 2005


Abstract

  This document defines a simple clear-text user/password Simple
  Authentication and Security Layer (SASL) mechanism called the PLAIN
  mechanism.  The PLAIN mechanism is intended to be used, in combination
  with data confidentiality services provided by a lower layer, in
  protocols which lack a simple password authentication command.


Conventions

  The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  document are to be interpreted as described in [Keywords].


1. Background and Intended Usage

  Clear-text passwords are simple, interoperate with almost all existing
  operating system authentication databases, and are useful for a smooth
  transition to a more secure password-based authentication mechanism.
  The drawback is that they are unacceptable for use over an unencrypted
  network connection.

  This document defines the PLAIN Simple Authentication and Security
  Layer ([SASL]) mechanism for use in protocols with no clear-text login
  command (e.g., [ACAP] or [SMTP-AUTH]).

  The name associated with this mechanism is "PLAIN".

  The PLAIN SASL mechanism does not provide a security layer.  This
  mechanism MUST NOT be used without adequate security protection as the
  mechanism affords no integrity nor confidentiality protection itself.
  The PLAIN SASL mechanism MUST NOT be advertised unless a strong
  encryption layer, such as provided by Transport Layer Security
  ([TLS]), is active or backwards compatibility dictates otherwise.

  This document updates RFC 2595, replacing Section 6.  Changes since
  RFC 2595 are detailed in Appendix A.


2. PLAIN SASL mechanism

  The mechanism consists of a single message, a string of [UTF-8]
  encoded [Unicode] characters, from the client to the server.  The
  client presents the authorization identity (identity to act as),
  followed by a NULL (U+0000) character, followed by the authentication
  identity (identity whose password will be used), followed by a NULL



Zeilenga                  Plain SASL Mechanism                  [Page 2]

INTERNET-DRAFT        draft-ietf-sasl-plain-06.txt       18 January 2005


  (U+0000) character, followed by the clear-text password.  As with
  other SASL mechanisms, the client leaves the authorization identity
  empty when it wishes the server to derive an identity from the
  credentials and use that as the authorization identity.

  The formal grammar for the client message using Augmented BNF [ABNF]
  follows.

      message   = [authzid] UTF8NULL authcid UTF8NULL passwd
      authcid   = 1*SAFE ; MUST accept up to 255 octets
      authzid   = 1*SAFE ; MUST accept up to 255 octets
      passwd    = 1*SAFE ; MUST accept up to 255 octets
      UTF8NULL  = %x00 ; UTF-8 encoded NULL character

      SAFE      = UTF1 / UTF2 / UTF3 / UTF4
                  ;; any UTF-8 encoded Unicode character except NULL

      UTF1      = %x01-7F ;; except NULL
      UTF2      = %xC2-DF UTF0
      UTF3      = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) /
                  %xED %x80-9F UTF0 / %xEE-EF 2(UTF0)
      UTF4      = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) /
                  %xF4 %x80-8F 2(UTF0)
      UTF0      = %x80-BF

  The authorization identity (authzid), authentication identity
  (authcid), password (passwd), and NULL character deliminators SHALL be
  transferred as [UTF-8] encoded strings of [Unicode] characters.  As
  the NULL (U+0000) character is used as a deliminator, the NULL
  (U+0000) character MUST NOT appear in authzid, authcid, or passwd
  productions.

  The form of the authzid production is specific to the
  application-level protocol's SASL profile [SASL].  The authcid and
  passwd productions are form-free.  Use of non-visible characters or
  characters which a user may be unable to enter on some keyboards is
  discouraged.

  Servers MUST be capable of accepting authzid, authcid, and passwd
  productions up to and including 255 octets.  It is noted that the
  UTF-8 encoding of a Unicode character may be as long as 4 octets.

  Upon receipt of the message, the server will verify the presented (in
  the message) authentication identity (authcid) and password (passwd)
  with the system authentication database, and verify the authentication
  credentials permit the client to act as the (presented or derived)
  authorization identity.  If both steps succeed, the user is
  authenticated.



Zeilenga                  Plain SASL Mechanism                  [Page 3]

INTERNET-DRAFT        draft-ietf-sasl-plain-06.txt       18 January 2005


  In this verification process, the presented authentication identity
  and password strings, as well as the database authentication identity
  and password strings, are to be prepared before being used in any
  comparison.  The server SHOULD prepare each string using the
  [SASLPrep] profile of the [StringPrep] algorithm.  The SASLprep
  preparation is recommended to improve the likelihood that comparisons
  behave in an expected manner.  It is not mandatory to allow the server
  to employ other preparation algorithms (including none) as necessary
  to interoperate with external systems.

  When preparing the presented strings using [SASLPrep], the presented
  strings are to be treated as "query" strings [Section 7, Stringprep]
  and hence unassigned code points are allowed appear in their prepared
  output.  When preparing the database strings using [SASLprep], the
  database strings are to be treated as "stored" strings [Section 7,
  Stringprep] and hence unassigned code points are prohibited from
  appearing in their prepared output.

  Regardless of the preparation algorithm used, if the output of a non-
  invertible function (e.g., hash) of the expected string is stored, the
  string MUST be prepared before input to that function.

  Regardless of the preparation algorithm used, if preparation fails or
  results in an empty string, verification SHALL fail.

  When an empty authorization identity is provided, the server SHALL
  derive the authorization identity from the prepared representation of
  the provided authentication identity string.  This ensures that the
  derivation of different representations of the authentication identity
  produce the same authorization identity.

  The server MAY use the credentials to initialize any new
  authentication database, such as one suitable for [CRAM-MD5] or
  [DIGEST-MD5].


    4. Pseudo-Code

  The verification function (using hashed password) can be written (in
  pseudo-code):

      boolean Verify(string authzid, string authcid, string passwd) {
        string pAuthcid = SASLprep(authcid, true); # prepare authcid
        string pPasswd = SASLprep(passwd, true);   # prepare passwd
        if (pAuthcid == NULL || pPasswd == NULL) {
          return false;     # preparation failed
        }
        if (pAuthcid == "" || pPasswd == "") {



Zeilenga                  Plain SASL Mechanism                  [Page 4]

INTERNET-DRAFT        draft-ietf-sasl-plain-06.txt       18 January 2005


          return false;     # empty prepared string
        }

        storedHash = FetchPasswordHash(pAuthcid);
        if (storedHash == NULL || storedHash == "") {
          return false;     # error or unknown authcid
        }

        if (!Compare(storedHash, Hash(pPasswd))) {
          return false;     # incorrect password
        }

        if (authzid == NULL) {
          authzid = DeriveAuthzid(pAuthcid);
          if (authzid == NULL || authzid == "") {
              return false; # could not derive authzid
          }
        }

        if (!Authorize(pAuthcid, authzid)) {
          return false;     # not authorized
        }

        return true;
      }

  The second parameter of the SASLprep function, when true, indicates
  that unassigned code points are allowed in the input.  When the
  SASLprep function is called to prepared the password prior to
  computing the stored hash, the second parameter would be false.

  The second parameter provided to the Authorize function is not
  prepared by this code.  The application-level SASL profile should be
  consulted to determine what, if any, preparation is necessary.


5. Examples

  This section provides examples of PLAIN authentication exchanges.  The
  examples are intended to help the readers understand the above text.
  The examples are not definitive.

  "C:" and "S:" indicate lines sent by the client and server
  respectively.  "<NULL>" represents a single NULL (U+0000) character.
  The Application Configuration Access Protocol ([ACAP]) is used in the
  examples.

  The first example shows how the PLAIN mechanism might be used for user



Zeilenga                  Plain SASL Mechanism                  [Page 5]

INTERNET-DRAFT        draft-ietf-sasl-plain-06.txt       18 January 2005


  authentication.

      S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
      C: a001 STARTTLS
      S: a001 OK "Begin TLS negotiation now"
      <TLS negotiation, further commands are under TLS layer>
      S: * ACAP (SASL "CRAM-MD5" "PLAIN")
      C: a002 AUTHENTICATE "PLAIN"
      S: + ""
      C: {21}
      C: <NULL>tim<NULL>tanstaaftanstaaf
      S: a002 OK "Authenticated"

  The second example shows how the PLAIN mechanism might be used to
  assume the identity of another user.  In this example, the server
  rejects the request.  Also, this example makes use of the protocol
  optional initial response capability to eliminate a round-trip.

      S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
      C: a001 STARTTLS
      S: a001 OK "Begin TLS negotiation now"
      <TLS negotiation, further commands are under TLS layer>
      S: * ACAP (SASL "CRAM-MD5" "PLAIN")
      C: a002 AUTHENTICATE "PLAIN" {20+}
      C: Ursel<NULL>Kurt<NULL>xipj3plmq
      S: a002 NO "Not authorized to assume asserted identity"


6. Security Considerations

  The PLAIN mechanism relies on the TLS encryption layer for security.
  When used without TLS, it is vulnerable to a common network
  eavesdropping attack.  Therefore PLAIN MUST NOT be advertised or used
  unless a suitable TLS encryption layer is active or backwards
  compatibility dictates otherwise.

  When the PLAIN mechanism is used, the server gains the ability to
  impersonate the user to all services with the same password regardless
  of any encryption provided by TLS or other network privacy mechanisms.
  While many other authentication mechanisms have similar weaknesses,
  stronger SASL mechanisms address this issue.  Clients are encouraged
  to have an operational mode where all mechanisms which are likely to
  reveal the user's password to the server are disabled.

  General SASL security considerations apply to this mechanism.
  "stringprep" and Unicode [StringPrep] security considerations also
  apply, as do [UTF-8] security considerations.




Zeilenga                  Plain SASL Mechanism                  [Page 6]

INTERNET-DRAFT        draft-ietf-sasl-plain-06.txt       18 January 2005


7. IANA Considerations

  It is requested that the SASL Mechanism registry [IANA-SASL] entry for
  the PLAIN mechanism be updated to reflect that this document now
  provides its technical specification.

      To: address@hidden
      Subject: Updated Registration of SASL mechanism PLAIN

      SASL mechanism name: PLAIN
      Security considerations: See RFC XXXX.
      Published specification (optional, recommended): RFC XXXX
      Person & email address to contact for further information:
           Kurt Zeilenga <address@hidden>
           IETF SASL WG <address@hidden>
      Intended usage: COMMON
      Author/Change controller: IESG <address@hidden>
      Note: Updates existing entry for PLAIN


8. Acknowledgment

  This document is a revision of RFC 2595 by Chris Newman.  Portions of
  the grammar defined in Section 2 were borrowed from [UTF-8] by
  Francois Yergeau.

  This document is a product of the IETF SASL WG.


9. Normative References

  [ABNF]        Crocker, D. and P. Overell, "Augmented BNF for Syntax
                Specifications: ABNF", RFC 2234, November 1997.

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

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

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

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



Zeilenga                  Plain SASL Mechanism                  [Page 7]

INTERNET-DRAFT        draft-ietf-sasl-plain-06.txt       18 January 2005


  [Unicode]     The Unicode Consortium, "The Unicode Standard, Version
                3.2.0" is defined by "The Unicode Standard, Version 3.0"
                (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),

[164 lines skipped]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]