rfc2222.txt
上传用户:horngjaan
上传日期:2009-12-12
资源大小:2882k
文件大小:35k
源码类别:

Email服务器

开发平台:

C#

  1. Network Working Group                                           J. Myers
  2. Request for Comments: 2222                       Netscape Communications
  3. Category: Standards Track                                   October 1997
  4.             Simple Authentication and Security Layer (SASL)
  5. Status of this Memo
  6.    This document specifies an Internet standards track protocol for the
  7.    Internet community, and requests discussion and suggestions for
  8.    improvements.  Please refer to the current edition of the "Internet
  9.    Official Protocol Standards" (STD 1) for the standardization state
  10.    and status of this protocol.  Distribution of this memo is unlimited.
  11. Copyright Notice
  12.    Copyright (C) The Internet Society (1997).  All Rights Reserved.
  13. Table of Contents
  14.    1.    Abstract ..............................................    2
  15.    2.    Organization of this Document .........................    2
  16.    2.1.  How to Read This Document .............................    2
  17.    2.2.  Conventions Used in this Document .....................    2
  18.    2.3.  Examples ..............................................    3
  19.    3.    Introduction and Overview .............................    3
  20.    4.    Profiling requirements ................................    4
  21.    5.    Specific issues .......................................    5
  22.    5.1.  Client sends data first ...............................    5
  23.    5.2.  Server returns success with additional data ...........    5
  24.    5.3.  Multiple authentications ..............................    5
  25.    6.    Registration procedures ...............................    6
  26.    6.1.  Comments on SASL mechanism registrations ..............    6
  27.    6.2.  Location of Registered SASL Mechanism List ............    6
  28.    6.3.  Change Control ........................................    7
  29.    6.4.  Registration Template .................................    7
  30.    7.    Mechanism definitions .................................    8
  31.    7.1.  Kerberos version 4 mechanism ..........................    8
  32.    7.2.  GSSAPI mechanism ......................................    9
  33.    7.2.1 Client side of authentication protocol exchange .......    9
  34.    7.2.2 Server side of authentication protocol exchange .......   10
  35.    7.2.3 Security layer ........................................   11
  36.    7.3.  S/Key mechanism .......................................   11
  37.    7.4.  External mechanism ....................................   12
  38.    8.    References ............................................   13
  39.    9.    Security Considerations ...............................   13
  40.    10.   Author's Address ......................................   14
  41. Myers                       Standards Track                     [Page 1]
  42. RFC 2222                          SASL                      October 1997
  43.    Appendix A. Relation of SASL to Transport Security ..........   15
  44.    Full Copyright Statement ....................................   16
  45. 1.    Abstract
  46.    This document describes a method for adding authentication support to
  47.    connection-based protocols.  To use this specification, a protocol
  48.    includes a command for identifying and authenticating a user to a
  49.    server and for optionally negotiating protection of subsequent
  50.    protocol interactions.  If its use is negotiated, a security layer is
  51.    inserted between the protocol and the connection.  This document
  52.    describes how a protocol specifies such a command, defines several
  53.    mechanisms for use by the command, and defines the protocol used for
  54.    carrying a negotiated security layer over the connection.
  55. 2.    Organization of this Document
  56. 2.1.  How to Read This Document
  57.    This document is written to serve two different audiences, protocol
  58.    designers using this specification to support authentication in their
  59.    protocol, and implementors of clients or servers for those protocols
  60.    using this specification.
  61.    The sections "Introduction and Overview", "Profiling requirements",
  62.    and "Security Considerations" cover issues that protocol designers
  63.    need to understand and address in profiling this specification for
  64.    use in a specific protocol.
  65.    Implementors of a protocol using this specification need the
  66.    protocol-specific profiling information in addition to the
  67.    information in this document.
  68. 2.2.  Conventions Used in this Document
  69.    In examples, "C:" and "S:" indicate lines sent by the client and
  70.    server respectively.
  71.    The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
  72.    in this document are to be interpreted as defined in "Key words for
  73.    use in RFCs to Indicate Requirement Levels" [RFC 2119].
  74. Myers                       Standards Track                     [Page 2]
  75. RFC 2222                          SASL                      October 1997
  76. 2.3.  Examples
  77.    Examples in this document are for the IMAP profile [RFC 2060] of this
  78.    specification.  The base64 encoding of challenges and responses, as
  79.    well as the "+ " preceding the responses are part of the IMAP4
  80.    profile, not part of the SASL specification itself.
  81. 3.    Introduction and Overview
  82.    The Simple Authentication and Security Layer (SASL) is a method for
  83.    adding authentication support to connection-based protocols.  To use
  84.    this specification, a protocol includes a command for identifying and
  85.    authenticating a user to a server and for optionally negotiating a
  86.    security layer for subsequent protocol interactions.
  87.    The command has a required argument identifying a SASL mechanism.
  88.    SASL mechanisms are named by strings, from 1 to 20 characters in
  89.    length, consisting of upper-case letters, digits, hyphens, and/or
  90.    underscores.  SASL mechanism names must be registered with the IANA.
  91.    Procedures for registering new SASL mechanisms are given in the
  92.    section "Registration procedures"
  93.    If a server supports the requested mechanism, it initiates an
  94.    authentication protocol exchange.  This consists of a series of
  95.    server challenges and client responses that are specific to the
  96.    requested mechanism.  The challenges and responses are defined by the
  97.    mechanisms as binary tokens of arbitrary length.  The protocol's
  98.    profile then specifies how these binary tokens are then encoded for
  99.    transfer over the connection.
  100.    After receiving the authentication command or any client response, a
  101.    server may issue a challenge, indicate failure, or indicate
  102.    completion.  The protocol's profile specifies how the server
  103.    indicates which of the above it is doing.
  104.    After receiving a challenge, a client may issue a response or abort
  105.    the exchange.  The protocol's profile specifies how the client
  106.    indicates which of the above it is doing.
  107.    During the authentication protocol exchange, the mechanism performs
  108.    authentication, transmits an authorization identity (frequently known
  109.    as a userid) from the client to server, and negotiates the use of a
  110.    mechanism-specific security layer.  If the use of a security layer is
  111.    agreed upon, then the mechanism must also define or negotiate the
  112.    maximum cipher-text buffer size that each side is able to receive.
  113. Myers                       Standards Track                     [Page 3]
  114. RFC 2222                          SASL                      October 1997
  115.    The transmitted authorization identity may be different than the
  116.    identity in the client's authentication credentials.  This permits
  117.    agents such as proxy servers to authenticate using their own
  118.    credentials, yet request the access privileges of the identity for
  119.    which they are proxying.  With any mechanism, transmitting an
  120.    authorization identity of the empty string directs the server to
  121.    derive an authorization identity from the client's authentication
  122.    credentials.
  123.    If use of a security layer is negotiated, it is applied to all
  124.    subsequent data sent over the connection.  The security layer takes
  125.    effect immediately following the last response of the authentication
  126.    exchange for data sent by the client and the completion indication
  127.    for data sent by the server.  Once the security layer is in effect,
  128.    the protocol stream is processed by the security layer into buffers
  129.    of cipher-text.  Each buffer is transferred over the connection as a
  130.    stream of octets prepended with a four octet field in network byte
  131.    order that represents the length of the following buffer.  The length
  132.    of the cipher-text buffer must be no larger than the maximum size
  133.    that was defined or negotiated by the other side.
  134. 4.    Profiling requirements
  135.    In order to use this specification, a protocol definition must supply
  136.    the following information:
  137.    1. A service name, to be selected from the IANA registry of "service"
  138.       elements for the GSSAPI host-based service name form [RFC 2078].
  139.    2. A definition of the command to initiate the authentication
  140.       protocol exchange.  This command must have as a parameter the
  141.       mechanism name being selected by the client.
  142.       The command SHOULD have an optional parameter giving an initial
  143.       response.  This optional parameter allows the client to avoid a
  144.       round trip when using a mechanism which is defined to have the
  145.       client send data first.  When this initial response is sent by the
  146.       client and the selected mechanism is defined to have the server
  147.       start with an initial challenge, the command fails.  See section
  148.       5.1 of this document for further information.
  149.    3. A definition of the method by which the authentication protocol
  150.       exchange is carried out, including how the challenges and
  151.       responses are encoded, how the server indicates completion or
  152.       failure of the exchange, how the client aborts an exchange, and
  153.       how the exchange method interacts with any line length limits in
  154.       the protocol.
  155. Myers                       Standards Track                     [Page 4]
  156. RFC 2222                          SASL                      October 1997
  157.    4. Identification of the octet where any negotiated security layer
  158.       starts to take effect, in both directions.
  159.    5. A specification of how the authorization identity passed from the
  160.       client to the server is to be interpreted.
  161. 5.    Specific issues
  162. 5.1.  Client sends data first
  163.    Some mechanisms specify that the first data sent in the
  164.    authentication protocol exchange is from the client to the server.
  165.    If a protocol's profile permits the command which initiates an
  166.    authentication protocol exchange to contain an initial client
  167.    response, this parameter SHOULD be used with such mechanisms.
  168.    If the initial client response parameter is not given, or if a
  169.    protocol's profile does not permit the command which initiates an
  170.    authentication protocol exchange to contain an initial client
  171.    response, then the server issues a challenge with no data.  The
  172.    client's response to this challenge is then used as the initial
  173.    client response.  (The server then proceeds to send the next
  174.    challenge, indicates completion, or indicates failure.)
  175. 5.2.  Server returns success with additional data
  176.    Some mechanisms may specify that server challenge data be sent to the
  177.    client along with an indication of successful completion of the
  178.    exchange.  This data would, for example, authenticate the server to
  179.    the client.
  180.    If a protocol's profile does not permit this server challenge to be
  181.    returned with a success indication, then the server issues the server
  182.    challenge without an indication of successful completion.  The client
  183.    then responds with no data.  After receiving this empty response, the
  184.    server then indicates successful completion.
  185. 5.3.  Multiple authentications
  186.    Unless otherwise stated by the protocol's profile, only one
  187.    successful SASL negotiation may occur in a protocol session.  In this
  188.    case, once an authentication protocol exchange has successfully
  189.    completed, further attempts to initiate an authentication protocol
  190.    exchange fail.
  191. Myers                       Standards Track                     [Page 5]
  192. RFC 2222                          SASL                      October 1997
  193.    In the case that a profile explicitly permits multiple successful
  194.    SASL negotiations to occur, then in no case may multiple security
  195.    layers be simultaneously in effect.  If a security layer is in effect
  196.    and a subsequent SASL negotiation selects no security layer, the
  197.    original security layer remains in effect.  If a security layer is in
  198.    effect and a subsequent SASL negotiation selects a second security
  199.    layer, then the second security layer replaces the first.
  200. 6.    Registration procedures
  201.    Registration of a SASL mechanism is done by filling in the template
  202.    in section 6.4 and sending it in to iana@isi.edu.  IANA has the right
  203.    to reject obviously bogus registrations, but will perform no review
  204.    of clams made in the registration form.
  205.    There is no naming convention for SASL mechanisms; any name that
  206.    conforms to the syntax of a SASL mechanism name can be registered.
  207.    While the registration procedures do not require it, authors of SASL
  208.    mechanisms are encouraged to seek community review and comment
  209.    whenever that is feasible.  Authors may seek community review by
  210.    posting a specification of their proposed mechanism as an internet-
  211.    draft.  SASL mechanisms intended for widespread use should be
  212.    standardized through the normal IETF process, when appropriate.
  213. 6.1.  Comments on SASL mechanism registrations
  214.    Comments on registered SASL mechanisms should first be sent to the
  215.    "owner" of the mechanism.  Submitters of comments may, after a
  216.    reasonable attempt to contact the owner, request IANA to attach their
  217.    comment to the SASL mechanism registration itself.  If IANA approves
  218.    of this the comment will be made accessible in conjunction with the
  219.    SASL mechanism registration itself.
  220. 6.2.  Location of Registered SASL Mechanism List
  221.    SASL mechanism registrations will be posted in the anonymous FTP
  222.    directory "ftp://ftp.isi.edu/in-notes/iana/assignments/sasl-
  223.    mechanisms/" and all registered SASL mechanisms will be listed in the
  224.    periodically issued "Assigned Numbers" RFC [currently STD 2, RFC
  225.    1700].  The SASL mechanism description and other supporting material
  226.    may also be published as an Informational RFC by sending it to "rfc-
  227.    editor@isi.edu" (please follow the instructions to RFC authors [RFC
  228.    2223]).
  229. Myers                       Standards Track                     [Page 6]
  230. RFC 2222                          SASL                      October 1997
  231. 6.3.  Change Control
  232.    Once a SASL mechanism registration has been published by IANA, the
  233.    author may request a change to its definition.  The change request
  234.    follows the same procedure as the registration request.
  235.    The owner of a SASL mechanism may pass responsibility for the SASL
  236.    mechanism to another person or agency by informing IANA; this can be
  237.    done without discussion or review.
  238.    The IESG may reassign responsibility for a SASL mechanism. The most
  239.    common case of this will be to enable changes to be made to
  240.    mechanisms where the author of the registration has died, moved out
  241.    of contact or is otherwise unable to make changes that are important
  242.    to the community.
  243.    SASL mechanism registrations may not be deleted; mechanisms which are
  244.    no longer believed appropriate for use can be declared OBSOLETE by a
  245.    change to their "intended use" field; such SASL mechanisms will be
  246.    clearly marked in the lists published by IANA.
  247.    The IESG is considered to be the owner of all SASL mechanisms which
  248.    are on the IETF standards track.
  249. 6.4.  Registration Template
  250.    To: iana@iana.org
  251.    Subject: Registration of SASL mechanism X
  252.    SASL mechanism name:
  253.    Security considerations:
  254.    Published specification (optional, recommended):
  255.    Person & email address to contact for further information:
  256.    Intended usage:
  257.    (One of COMMON, LIMITED USE or OBSOLETE)
  258.    Author/Change controller:
  259.    (Any other information that the author deems interesting may be
  260.    added below this line.)
  261. Myers                       Standards Track                     [Page 7]
  262. RFC 2222                          SASL                      October 1997
  263. 7.    Mechanism definitions
  264.    The following mechanisms are hereby defined.
  265. 7.1.  Kerberos version 4 mechanism
  266.    The mechanism name associated with Kerberos version 4 is
  267.    "KERBEROS_V4".
  268.    The first challenge consists of a random 32-bit number in network
  269.    byte order.  The client responds with a Kerberos ticket and an
  270.    authenticator for the principal "service.hostname@realm", where
  271.    "service" is the service name specified in the protocol's profile,
  272.    "hostname" is the first component of the host name of the server with
  273.    all letters in lower case, and where "realm" is the Kerberos realm of
  274.    the server.  The encrypted checksum field included within the
  275.    Kerberos authenticator contains the server provided challenge in
  276.    network byte order.
  277.    Upon decrypting and verifying the ticket and authenticator, the
  278.    server verifies that the contained checksum field equals the original
  279.    server provided random 32-bit number.  Should the verification be
  280.    successful, the server must add one to the checksum and construct 8
  281.    octets of data, with the first four octets containing the incremented
  282.    checksum in network byte order, the fifth octet containing a bit-mask
  283.    specifying the security layers supported by the server, and the sixth
  284.    through eighth octets containing, in network byte order, the maximum
  285.    cipher-text buffer size the server is able to receive.  The server
  286.    must encrypt using DES ECB mode the 8 octets of data in the session
  287.    key and issue that encrypted data in a second challenge.  The client
  288.    considers the server authenticated if the first four octets of the
  289.    un-encrypted data is equal to one plus the checksum it previously
  290.    sent.
  291.    The client must construct data with the first four octets containing
  292.    the original server-issued checksum in network byte order, the fifth
  293.    octet containing the bit-mask specifying the selected security layer,
  294.    the sixth through eighth octets containing in network byte order the
  295.    maximum cipher-text buffer size the client is able to receive, and
  296.    the following octets containing the authorization identity.  The
  297.    client must then append from one to eight zero-valued octets so that
  298.    the length of the data is a multiple of eight octets. The client must
  299.    then encrypt using DES PCBC mode the data with the session key and
  300.    respond with the encrypted data.  The server decrypts the data and
  301.    verifies the contained checksum.  The server must verify that the
  302.    principal identified in the Kerberos ticket is authorized to connect
  303.    as that authorization identity.  After this verification, the
  304.    authentication process is complete.
  305. Myers                       Standards Track                     [Page 8]
  306. RFC 2222                          SASL                      October 1997
  307.    The security layers and their corresponding bit-masks are as follows:
  308.       1 No security layer
  309.       2 Integrity (krb_mk_safe) protection
  310.       4 Privacy (krb_mk_priv) protection
  311.    Other bit-masks may be defined in the future; bits which are not
  312.    understood must be negotiated off.
  313.    EXAMPLE: The following are two Kerberos version 4 login scenarios to
  314.    the IMAP4 protocol (note that the line breaks in the sample
  315.    authenticators are for editorial clarity and are not in real
  316.    authenticators)
  317.      S: * OK IMAP4 Server
  318.      C: A001 AUTHENTICATE KERBEROS_V4
  319.      S: + AmFYig==
  320.      C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
  321.         +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
  322.         WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
  323.      S: + or//EoAADZI=
  324.      C: DiAF5A4gA+oOIALuBkAAmw==
  325.      S: A001 OK Kerberos V4 authentication successful
  326.      S: * OK IMAP4 Server
  327.      C: A001 AUTHENTICATE KERBEROS_V4
  328.      S: + gcfgCA==
  329.      C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
  330.         +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
  331.         WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
  332.      S: A001 NO Kerberos V4 authentication failed
  333. 7.2.  GSSAPI mechanism
  334.    The mechanism name associated with all mechanisms employing the
  335.    GSSAPI [RFC 2078] is "GSSAPI".
  336. 7.2.1 Client side of authentication protocol exchange
  337.    The client calls GSS_Init_sec_context, passing in 0 for
  338.    input_context_handle (initially) and a targ_name equal to output_name
  339.    from GSS_Import_Name called with input_name_type of
  340.    GSS_C_NT_HOSTBASED_SERVICE and input_name_string of
  341.    "service@hostname" where "service" is the service name specified in
  342.    the protocol's profile, and "hostname" is the fully qualified host
  343.    name of the server.  The client then responds with the resulting
  344.    output_token.  If GSS_Init_sec_context returns GSS_S_CONTINUE_NEEDED,
  345. Myers                       Standards Track                     [Page 9]
  346. RFC 2222                          SASL                      October 1997
  347.    then the client should expect the server to issue a token in a
  348.    subsequent challenge.  The client must pass the token to another call
  349.    to GSS_Init_sec_context, repeating the actions in this paragraph.
  350.    When GSS_Init_sec_context returns GSS_S_COMPLETE, the client takes
  351.    the following actions: If the last call to GSS_Init_sec_context
  352.    returned an output_token, then the client responds with the
  353.    output_token, otherwise the client responds with no data.  The client
  354.    should then expect the server to issue a token in a subsequent
  355.    challenge.  The client passes this token to GSS_Unwrap and interprets
  356.    the first octet of resulting cleartext as a bit-mask specifying the
  357.    security layers supported by the server and the second through fourth
  358.    octets as the maximum size output_message to send to the server.  The
  359.    client then constructs data, with the first octet containing the
  360.    bit-mask specifying the selected security layer, the second through
  361.    fourth octets containing in network byte order the maximum size
  362.    output_message the client is able to receive, and the remaining
  363.    octets containing the authorization identity.  The client passes the
  364.    data to GSS_Wrap with conf_flag set to FALSE, and responds with the
  365.    generated output_message.  The client can then consider the server
  366.    authenticated.
  367. 7.2.2 Server side of authentication protocol exchange
  368.    The server passes the initial client response to
  369.    GSS_Accept_sec_context as input_token, setting input_context_handle
  370.    to 0 (initially).  If GSS_Accept_sec_context returns
  371.    GSS_S_CONTINUE_NEEDED, the server returns the generated output_token
  372.    to the client in challenge and passes the resulting response to
  373.    another call to GSS_Accept_sec_context, repeating the actions in this
  374.    paragraph.
  375.    When GSS_Accept_sec_context returns GSS_S_COMPLETE, the client takes
  376.    the following actions: If the last call to GSS_Accept_sec_context
  377.    returned an output_token, the server returns it to the client in a
  378.    challenge and expects a reply from the client with no data.  Whether
  379.    or not an output_token was returned (and after receipt of any
  380.    response from the client to such an output_token), the server then
  381.    constructs 4 octets of data, with the first octet containing a bit-
  382.    mask specifying the security layers supported by the server and the
  383.    second through fourth octets containing in network byte order the
  384.    maximum size output_token the server is able to receive.  The server
  385.    must then pass the plaintext to GSS_Wrap with conf_flag set to FALSE
  386.    and issue the generated output_message to the client in a challenge.
  387.    The server must then pass the resulting response to GSS_Unwrap and
  388.    interpret the first octet of resulting cleartext as the bit-mask for
  389.    the selected security layer, the second through fourth octets as the
  390.    maximum size output_message to send to the client, and the remaining
  391. Myers                       Standards Track                    [Page 10]
  392. RFC 2222                          SASL                      October 1997
  393.    octets as the authorization identity.  The server must verify that
  394.    the src_name is authorized to authenticate as the authorization
  395.    identity.  After these verifications, the authentication process is
  396.    complete.
  397. 7.2.3 Security layer
  398.    The security layers and their corresponding bit-masks are as follows:
  399.      1 No security layer
  400.      2 Integrity protection.
  401.        Sender calls GSS_Wrap with conf_flag set to FALSE
  402.      4 Privacy protection.
  403.        Sender calls GSS_Wrap with conf_flag set to TRUE
  404.    Other bit-masks may be defined in the future; bits which are not
  405.    understood must be negotiated off.
  406. 7.3.  S/Key mechanism
  407.    The mechanism name associated with S/Key [RFC 1760] using the MD4
  408.    digest algorithm is "SKEY".
  409.    The client sends an initial response with the authorization identity.
  410.    The server then issues a challenge which contains the decimal
  411.    sequence number followed by a single space and the seed string for
  412.    the indicated authorization identity.  The client responds with the
  413.    one-time-password, as either a 64-bit value in network byte order or
  414.    encoded in the "six English words" format.
  415.    The server must verify the one-time-password.  After this
  416.    verification, the authentication process is complete.
  417.    S/Key authentication does not provide for any security layers.
  418.    EXAMPLE: The following are two S/Key login scenarios in the IMAP4
  419.    protocol.
  420.      S: * OK IMAP4 Server
  421.      C: A001 AUTHENTICATE SKEY
  422.      S: +
  423.      C: bW9yZ2Fu
  424.      S: + OTUgUWE1ODMwOA==
  425.      C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA==
  426.      S: A001 OK S/Key authentication successful
  427. Myers                       Standards Track                    [Page 11]
  428. RFC 2222                          SASL                      October 1997
  429.      S: * OK IMAP4 Server
  430.      C: A001 AUTHENTICATE SKEY
  431.      S: +
  432.      C: c21pdGg=
  433.      S: + OTUgUWE1ODMwOA==
  434.      C: BsAY3g4gBNo=
  435.      S: A001 NO S/Key authentication failed
  436.    The following is an S/Key login scenario in an IMAP4-like protocol
  437.    which has an optional "initial response" argument to the AUTHENTICATE
  438.    command.
  439.      S: * OK IMAP4-Like Server
  440.      C: A001 AUTHENTICATE SKEY bW9yZ2Fu
  441.      S: + OTUgUWE1ODMwOA==
  442.      C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA==
  443.      S: A001 OK S/Key authentication successful
  444. 7.4.  External mechanism
  445.    The mechanism name associated with external authentication is
  446.    "EXTERNAL".
  447.    The client sends an initial response with the authorization identity.
  448.    The server uses information, external to SASL, to determine whether
  449.    the client is authorized to authenticate as the authorization
  450.    identity.  If the client is so authorized, the server indicates
  451.    successful completion of the authentication exchange; otherwise the
  452.    server indicates failure.
  453.    The system providing this external information may be, for example,
  454.    IPsec or TLS.
  455.    If the client sends the empty string as the authorization identity
  456.    (thus requesting the authorization identity be derived from the
  457.    client's authentication credentials), the authorization identity is
  458.    to be derived from authentication credentials which exist in the
  459.    system which is providing the external authentication.
  460. Myers                       Standards Track                    [Page 12]
  461. RFC 2222                          SASL                      October 1997
  462. 8.    References
  463.    [RFC 2060] Crispin, M., "Internet Message Access Protocol - Version
  464.               4rev1", RFC 2060, December 1996.
  465.    [RFC 2078] Linn, J., "Generic Security Service Application Program
  466.               Interface, Version 2", RFC 2078, January 1997.
  467.    [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
  468.               Requirement Levels", RFC 2119, March 1997.
  469.    [RFC 2223] Postel, J., and J. Reynolds, "Instructions to RFC
  470.               Authors", RFC 2223, October 1997.
  471.    [RFC 1760] Haller, N., "The S/Key One-Time Password System", RFC
  472.               1760, February 1995.
  473.    [RFC 1700] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
  474.               RFC 1700, October 1994.
  475. 9.    Security Considerations
  476.    Security issues are discussed throughout this memo.
  477.    The mechanisms that support integrity protection are designed such
  478.    that the negotiation of the security layer and authorization identity
  479.    is integrity protected.  When the client selects a security layer
  480.    with at least integrity protection, this protects against an active
  481.    attacker hijacking the connection and modifying the authentication
  482.    exchange to negotiate a plaintext connection.
  483.    When a server or client supports multiple authentication mechanisms,
  484.    each of which has a different security strength, it is possible for
  485.    an active attacker to cause a party to use the least secure mechanism
  486.    supported.  To protect against this sort of attack, a client or
  487.    server which supports mechanisms of different strengths should have a
  488.    configurable minimum strength that it will use.  It is not sufficient
  489.    for this minimum strength check to only be on the server, since an
  490.    active attacker can change which mechanisms the client sees as being
  491.    supported, causing the client to send authentication credentials for
  492.    its weakest supported mechanism.
  493. Myers                       Standards Track                    [Page 13]
  494. RFC 2222                          SASL                      October 1997
  495.    The client's selection of a SASL mechanism is done in the clear and
  496.    may be modified by an active attacker.  It is important for any new
  497.    SASL mechanisms to be designed such that an active attacker cannot
  498.    obtain an authentication with weaker security properties by modifying
  499.    the SASL mechanism name and/or the challenges and responses.
  500.    Any protocol interactions prior to authentication are performed in
  501.    the clear and may be modified by an active attacker.  In the case
  502.    where a client selects integrity protection, it is important that any
  503.    security-sensitive protocol negotiations be performed after
  504.    authentication is complete.  Protocols should be designed such that
  505.    negotiations performed prior to authentication should be either
  506.    ignored or revalidated once authentication is complete.
  507. 10.   Author's Address
  508.    John G. Myers
  509.    Netscape Communications
  510.    501 E. Middlefield Road
  511.    Mail Stop MV-029
  512.    Mountain View, CA 94043-4042
  513.    EMail: jgmyers@netscape.com
  514. Myers                       Standards Track                    [Page 14]
  515. RFC 2222                          SASL                      October 1997
  516. Appendix A. Relation of SASL to Transport Security
  517.    Questions have been raised about the relationship between SASL and
  518.    various services (such as IPsec and TLS) which provide a secured
  519.    connection.
  520.    Two of the key features of SASL are:
  521.    1. The separation of the authorization identity from the identity in
  522.       the client's credentials.  This permits agents such as proxy
  523.       servers to authenticate using their own credentials, yet request
  524.       the access privileges of the identity for which they are proxying.
  525.    2. Upon successful completion of an authentication exchange, the
  526.       server knows the authorization identity the client wishes to use.
  527.       This allows servers to move to a "user is authenticated" state in
  528.       the protocol.
  529.    These features are extremely important to some application protocols,
  530.    yet Transport Security services do not always provide them.  To
  531.    define SASL mechanisms based on these services would be a very messy
  532.    task, as the framing of these services would be redundant with the
  533.    framing of SASL and some method of providing these important SASL
  534.    features would have to be devised.
  535.    Sometimes it is desired to enable within an existing connection the
  536.    use of a security service which does not fit the SASL model.  (TLS is
  537.    an example of such a service.)  This can be done by adding a command,
  538.    for example "STARTTLS", to the protocol.  Such a command is outside
  539.    the scope of SASL, and should be different from the command which
  540.    starts a SASL authentication protocol exchange.
  541.    In certain situations, it is reasonable to use SASL underneath one of
  542.    these Transport Security services.  The transport service would
  543.    secure the connection, either service would authenticate the client,
  544.    and SASL would negotiate the authorization identity.  The SASL
  545.    negotiation would be what moves the protocol from "unauthenticated"
  546.    to "authenticated" state.  The "EXTERNAL" SASL mechanism is
  547.    explicitly intended to handle the case where the transport service
  548.    secures the connection and authenticates the client and SASL
  549.    negotiates the authorization identity.
  550.    When using SASL underneath a sufficiently strong Transport Security
  551.    service, a SASL security layer would most likely be redundant.  The
  552.    client and server would thus probably want to negotiate off the use
  553.    of a SASL security layer.
  554. Myers                       Standards Track                    [Page 15]
  555. RFC 2222                          SASL                      October 1997
  556. Full Copyright Statement
  557.    Copyright (C) The Internet Society (1997).  All Rights Reserved.
  558.    This document and translations of it may be copied and furnished to
  559.    others, and derivative works that comment on or otherwise explain it
  560.    or assist in its implmentation may be prepared, copied, published
  561.    andand distributed, in whole or in part, without restriction of any
  562.    kind, provided that the above copyright notice and this paragraph are
  563.    included on all such copies and derivative works.  However, this
  564.    document itself may not be modified in any way, such as by removing
  565.    the copyright notice or references to the Internet Society or other
  566.    Internet organizations, except as needed for the purpose of
  567.    developing Internet standards in which case the procedures for
  568.    copyrights defined in the Internet Standards process must be
  569.    followed, or as required to translate it into languages other than
  570.    English.
  571.    The limited permissions granted above are perpetual and will not be
  572.    revoked by the Internet Society or its successors or assigns.
  573.    This document and the information contained herein is provided on an
  574.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  575.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  576.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  577.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  578.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  579. Myers                       Standards Track                    [Page 16]