home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / e / id-rfc2941bis.txt < prev    next >
Text File  |  2020-01-01  |  34KB  |  741 lines

  1.  
  2. Network Working Group                                     T. Ts'o, Editor
  3. Internet-Draft: draft-altman-rfc2941bis-02               
  4. Obsoletes: 2941                                                 J. Altman
  5.                                                       Columbia University
  6.                                                                April 2002
  7.  
  8.  
  9.                       Telnet Authentication Option
  10.  
  11. Status of this Memo
  12.  
  13.    This document is an Internet-Draft and is in full conformance with
  14.    all provisions of Section 10 of RFC2026.  Internet-Drafts are working
  15.    documents of the Internet Engineering Task Force (IETF), its areas,
  16.    and its working groups.  Note that other groups may also distribute
  17.    working documents as Internet-Drafts.
  18.  
  19.    Internet-Drafts are draft documents valid for a maximum of six months
  20.    and may be updated, replaced, or obsoleted by other documents at any
  21.    time.  It is inappropriate to use Internet-Drafts as reference
  22.    material or to cite them other than as "work in progress."
  23.  
  24.    The list of current Internet-Drafts can be accessed at
  25.    http://www.ietf.org/ietf/1id-abstracts.txt
  26.  
  27.    The list of Internet-Draft Shadow Directories can be accessed at
  28.    http://www.ietf.org/shadow.html.
  29.  
  30.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  31.    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  32.    document are to be interpreted as described in RFC 2119.
  33.  
  34. Abstract
  35.  
  36.    This document describes the authentication option to the telnet [1]
  37.    protocol as a generic method for negotiating an authentication type
  38.    and mode including whether encryption should be used and if
  39.    credentials should be forwarded.  While this document summarizes
  40.    currently utilized commands and types it does not define a specific
  41.    authentication type.  Separate documents are to be published defining
  42.    each authentication type.
  43.  
  44.    This document updates a previous specification of the telnet
  45.    authentication option, RFC 2941 [2], to allow the AUTHENTICATION 
  46.    option to be used in conjunction with the START_TLS option [5].
  47.  
  48. 0. Changes since RFC 2941
  49.  
  50.    . Consolidates and expands the security considerations section
  51.  
  52.    . Describes integration with START_TLS 
  53.  
  54. 1.  Command Names and Codes
  55.  
  56.       AUTHENTICATION          37
  57.  
  58.           Authentication Commands
  59.           IS                       0
  60.           SEND                     1
  61.           REPLY                    2
  62.           NAME                     3
  63.  
  64.           Authentication Types
  65.           NULL                     0
  66.           KERBEROS_V4              1
  67.           KERBEROS_V5              2
  68.           SPX*                     3
  69.           MINK*                    4
  70.           SRP                      5
  71.           RSA*[also used by SRA*]  6
  72.           SSL*                     7
  73.           [unassigned]             8
  74.           [unassigned]             9
  75.           LOKI*                   10
  76.           SSA*                    11
  77.           KEA_SJ                  12
  78.           KEA_SJ_INTEG            13
  79.           DSS                     14
  80.           NTLM*                   15
  81.  
  82.        Authentication types followed by (*) were never submitted to the
  83.        IETF for consideration as an Internet standard.
  84.  
  85.        Following historical practice, future authentication type numbers
  86.        and authentication modifiers will be assigned by the IANA under a
  87.        First Come First Served policy as outlined by RFC 2434 [4].
  88.        Despite the fact that authentication type numbers are allocated
  89.        out of an 8-bit number space (as are most values in the telnet
  90.        specification) it is not anticipated that the number space is or
  91.        will become in danger of being exhausted.  However, if this
  92.        should become an issue, when over 50% of the number space becomes
  93.        allocated, the IANA shall refer allocation requests to either the
  94.        IESG or a designated expert for approval.  IANA is instructed not
  95.        to issue new suboption values without submission of documentation
  96.        of their use.
  97.  
  98.           Modifiers
  99.           AUTH_WHO_MASK        1
  100.           AUTH_CLIENT_TO_SERVER    0
  101.           AUTH_SERVER_TO_CLIENT    1
  102.  
  103.           AUTH_HOW_MASK        2
  104.           AUTH_HOW_ONE_WAY         0
  105.           AUTH_HOW_MUTUAL          2
  106.  
  107.           ENCRYPT_MASK        20
  108.           ENCRYPT_OFF              0
  109.           ENCRYPT_USING_TELOPT     4
  110.           ENCRYPT_AFTER_EXCHANGE  16
  111.           ENCRYPT_START_TLS       20
  112.  
  113.           INI_CRED_FWD_MASK    8
  114.           INI_CRED_FWD_OFF         0
  115.           INI_CRED_FWD_ON          8
  116.  
  117. 2.  Command Meanings
  118.  
  119.    This document makes reference to a "server" and a "client".  For the
  120.    purposes of this document, the "server" is the side of the connection
  121.    that performed the passive TCP open (TCP LISTEN state), and the "client" is
  122.    the side of the connection that did the active open.
  123.  
  124.    IAC WILL AUTHENTICATION
  125.  
  126.       The client side of the connection sends this command to indicate
  127.       that it is willing to send and receive authentication information.
  128.  
  129.    IAC DO AUTHENTICATION
  130.  
  131.       The servers side of the connection sends this command to indicate
  132.       that it is willing to send and receive authentication information.
  133.  
  134.    IAC WONT AUTHENTICATION
  135.  
  136.       The client side of the connection sends this command to indicate
  137.       that it refuses to send or receive authentication information; the
  138.       server side must send this command if it receives a DO
  139.       AUTHENTICATION command.
  140.  
  141.    IAC DONT AUTHENTICATION
  142.  
  143.       The server side of the connection sends this command to indicate
  144.       that it refuses to send or receive authentication information; the
  145.       client side must send this command if it receives a WILL
  146.       AUTHENTICATION command.
  147.  
  148.    IAC SB AUTHENTICATION SEND authentication-type-pair-list IAC SE
  149.  
  150.       The sender of this command (the server) requests that the remote
  151.       side send authentication information for one of the authentication
  152.       types listed in "authentication-type-pair-list".  The
  153.       "authentication-type-pair-list" is an ordered list of
  154.       "authentication-type" pairs.  Only the server side (DO
  155.       AUTHENTICATION) is allowed to send this.
  156.  
  157.    IAC SB AUTHENTICATION IS authentication-type-pair <auth data> IAC SE
  158.  
  159.       The sender of this command (the client) is sending the
  160.       authentication information for authentication type
  161.       "authentication-type-pair".  Only the client side (WILL
  162.       AUTHENTICATION) is allowed to send this.
  163.  
  164.    IAC SB AUTHENTICATION REPLY authentication-type-pair <auth data> IAC
  165.    SE
  166.  
  167.       The sender of this command (the server) is sending a reply to the
  168.       the authentication information received in a previous IS command.
  169.       Only the server side (DO AUTHENTICATION) is allowed to send this.
  170.  
  171.    IAC SB AUTHENTICATION NAME remote-user IAC SE
  172.  
  173.       This optional command is sent to specify the account name on the
  174.       remote host that the user wishes to be authorized to use.  Note
  175.       that authentication may succeed, and the authorization to use a
  176.       particular account may still fail.  Some authentication mechanisms
  177.       may ignore this command.  (See Security Considerations.)
  178.  
  179.    The "authentication-type-pair" is two octets, the first is the
  180.    authentication type, and the second is a modifier to the type.  The
  181.    authentication type may or may not include built-in encryption.  For
  182.    instance, when the Kerberos 5 authentication type is negotiated
  183.    encryption must be negotiated with either the Telnet START_TLS or 
  184.    ENCRYPT options. However, the SSL and KEA_SJ authentication types
  185.    provide an encrypted channel as part of a successful Telnet AUTH
  186.    option negotiation.
  187.  
  188.    There are currently five one bit fields defined in the modifier.  The
  189.    first two of these bits are processed as a pair, the AUTH_WHO_MASK
  190.    bit and the AUTH_HOW_MASK bit.  There are four possible combinations
  191.    of these two bits:
  192.  
  193.       AUTH_CLIENT_TO_SERVER
  194.       AUTH_HOW_ONE_WAY
  195.  
  196.          The client will send authentication information about the local
  197.          user to the server.  If the negotiation is successful, the
  198.          server will have authenticated the user on the client side of
  199.          the connection.
  200.  
  201.       AUTH_SERVER_TO_CLIENT
  202.       AUTH_HOW_ONE_WAY
  203.  
  204.          The server will authenticate itself to the client.  If the
  205.          negotiation is successful, the client will know that it is
  206.          connected to the server that it wants to be connected to.
  207.  
  208.       AUTH_CLIENT_TO_SERVER
  209.       AUTH_HOW_MUTUAL
  210.  
  211.          The client will send authentication information about the local
  212.          user to the server, and then the server will authenticate
  213.          itself to the client.  If the negotiation is successful, the
  214.          server will have authenticated the user on the client side of
  215.          the connection, and the client will know that it is connected
  216.          to the server that it wants to be connected to.
  217.  
  218.       AUTH_SERVER_TO_CLIENT
  219.       AUTH_HOW_MUTUAL
  220.  
  221.          The server will authenticate itself to the client, and then the
  222.          client will authenticate itself to the server.  If the
  223.          negotiation is successful, the client will know that it is
  224.          connected to the server that it wants to be connected to, and
  225.          the server will know that the client is who it claims to be.
  226.  
  227.       The third and fifth bits in the modifier are the ENCRYPT_MASK
  228.       bits.  These bits are used to determine if and how encryption
  229.       should be enabled.  Of the four possible combinations only three
  230.       are currently defined:
  231.  
  232.          ENCRYPT_OFF
  233.  
  234.             Encryption will not be used for this session.  TELOPT
  235.             ENCRYPT SHOULD NOT be negotiated.  This mode MUST be used
  236.             with all AUTH types that do not provide a shared secret to
  237.             be used as a session key.
  238.  
  239.          ENCRYPT_USING_TELOPT
  240.  
  241.             Encryption will be negotiated via the use of TELOPT ENCRYPT.
  242.             Immediately after authentication has completed TELOPT
  243.             ENCRYPT MUST be negotiated in both directions.  This is
  244.             required to occur before credentials forwarding; other
  245.             telnet options are negotiated; or any user data is
  246.             transmitted.  A failure to successfully negotiate TELOPT
  247.             ENCRYPT in either direction MUST result in immediate session
  248.             termination.
  249.  
  250.          ENCRYPT_AFTER_EXCHANGE
  251.  
  252.             Encryption will be activated in both directions immediately
  253.             after the successful exchange of the shared secret to be
  254.             used as the session key.  The encryption algorithm to be
  255.             used MUST be implied by the AUTH type.
  256.  
  257.          ENCRYPT_START_TLS
  258.  
  259.             Encryption is provided by TLS which MUST have been negotiated
  260.             prior to use of this flag.  If TLS has not been previous 
  261.             negotiated, authentication-type-pairs including this flag
  262.             MUST NOT be offered by the server, not accepted by the client.
  263.             Authentication methods that support this option MUST verify 
  264.             the client's and server's TLS Finished Messages as part of the
  265.             authentication exchange.
  266.  
  267.       The fourth bit field in the modifier is the INI_CRED_FWD_MASK bit.
  268.       This bit is either set to INI_CRED_FWD_ON or INI_CRED_FWD_OFF.
  269.       This bit is set by the client to advise the server to expect
  270.       forwarded credentials from the client.
  271.  
  272.          INI_CRED_FWD_OFF
  273.  
  274.             The client will not be forwarding credentials to the server.
  275.             This mode must be used if the selected authentication method
  276.             does not support credentials forwarding.
  277.  
  278.          INI_CRED_FWD_ON
  279.  
  280.             Once authentication, and perhaps encryption, completes, the
  281.             client will immediately forward authentication credentials
  282.             to the server.
  283.  
  284.       The motivation for this advisory bit is that the server may wish
  285.       to wait until the forwarded credentials have been sent before
  286.       starting any operating system specific login procedures which may
  287.       depend on these credentials.  Note that credentials forwarding may
  288.       not be supported by all authentication mechanisms.  It is a
  289.       protocol error to set this bit if the underlying authentication
  290.       mechanism does not support credentials forwarding.
  291.  
  292.       Credentials forwarding MUST NOT be performed if
  293.       AUTH_CLIENT_TO_SERVER|AUTH_HOW_ONE_WAY was used since the identity
  294.       of the server can not be assured.  Credentials SHOULD NOT be
  295.       forwarded if the telnet connection is not protected using some
  296.       encryption or integrity protection services.
  297.  
  298.       Note that older implementations of the telnet authentication
  299.       option will not understand the ENCRYPT_MASK and INI_CRED_FWD_MASK
  300.       bits.  Hence any implementation wishing to offer these bits will 
  301.       have to offer authentication type pairs with these bits both set
  302.       and not set if backwards compatibility is required. (See Security
  303.       Considerations.)
  304.  
  305. 3.  Default Specification
  306.  
  307.    The default specification for this option is
  308.  
  309.       WONT AUTHENTICATION DONT AUTHENTICATION
  310.  
  311.    meaning there will not be any exchange of authentication information.
  312.  
  313. 4.  Motivation
  314.  
  315.    One of the deficiencies of the Telnet protocol is that in order to
  316.    log into remote systems, users have to type their passwords, which
  317.    are passed in clear text through the network.  If the connection
  318.    go through untrusted networks, there is the possibility that
  319.    passwords will be compromised by someone watching the packets while
  320.    in transit.
  321.  
  322.    The purpose of the AUTHENTICATION option is to provide a framework
  323.    for the passing of authentication information through the TELNET
  324.    session, and a mechanism to enable encryption of the data stream as a
  325.    side effect of successful authentication or via subsequent use of the
  326.    telnet ENCRYPT option.  This means that: 1) the users password will
  327.    not be sent in clear text across the network, 2) if the front end
  328.    telnet process has the appropriate authentication information, it can
  329.    automatically send the information, and the user will not have to
  330.    type any password.  3) once authentication has succeeded, the data
  331.    stream can be encrypted to provide protection against active attacks.
  332.  
  333.    It is intended that the AUTHENTICATION option be general enough that
  334.    it can be used to pass information for any authentication and
  335.    encryption system.
  336.  
  337. 5.  Implementation Rules
  338.  
  339.    WILL and DO are used only at the beginning of the connection to
  340.    obtain and grant permission for future negotiations.
  341.  
  342.    The authentication is only negotiated in one direction; the server
  343.    must send the "DO", and the client must send the "WILL".  This
  344.    restriction is due to the nature of authentication; there are three
  345.    possible cases; server authenticates client, client authenticates
  346.    server, and server and client authenticate each other.  By only
  347.    negotiating the option in one direction, and then determining which
  348.    of the three cases is being used via the suboption, potential
  349.    ambiguity is removed.  If the server receives a "DO", it must respond
  350.    with a "WONT".  If the client receives a "WILL", it must respond with
  351.    a "DONT".
  352.  
  353.    Once the two hosts have exchanged a DO and a WILL, the server is free
  354.    to request authentication information.  In the request, a list of
  355.    supported authentication types is sent.  Only the server may send
  356.    requests ("IAC SB AUTHENTICATION SEND authentication-type-pair-list
  357.    IAC SE").  Only the client may transmit authentication information
  358.    via the "IAC SB AUTHENTICATION IS authentication-type ... IAC SE"
  359.    command.  Only the server may send replies ("IAC SB AUTHENTICATION
  360.    REPLY authentication-type ... IAC SE").  As many IS and REPLY
  361.    suboptions may be exchanged as are needed for the particular
  362.    authentication scheme chosen.
  363.  
  364.    If the client does not support any of the authentication types listed
  365.    in the authentication-type-pair-list, a type of NULL should be used
  366.    to indicate this in the IS reply.  Note that if the client responds
  367.    with a type of NULL, the server may choose to close the connection.
  368.  
  369.    When the server has concluded that authentication cannot be
  370.    negotiated with the client it should send IAC DONT AUTH to the
  371.    client.
  372.  
  373.    The order of the authentication types MUST be ordered to indicate a
  374.    preference for different authentication types, the first type being
  375.    the most preferred, and the last type the least preferred.
  376.  
  377.    As long as the server is WILL AUTH it may request authentication
  378.    information at any time.  This is done by sending a new list of
  379.    supported authentication types.  Requesting authentication
  380.    information may be done as a way of verifying the validity of the
  381.    client's credentials after an extended period of time or to negotiate
  382.    a new session key for use during encryption.
  383.  
  384. 7. Integration with TELNET START_TLS option
  385.  
  386.    The Telnet START_TLS option [5] enables the Telnet client and server
  387.    to negotiate the use of the TLS protocol to secure the connection.
  388.    TLS is most frequently used with X.509 server-side certificates.  When
  389.    properly verified by the client the TLS session provides strong 
  390.    encryption and protects against a wide range of passive and active
  391.    man in the middle attacks.  When certificates are not used or not
  392.    verified by the client, the session (although encrypted) is susceptible
  393.    to man in the middle attacks.  These attacks can be detected by verifying
  394.    the TLS Client and Server Finished Messages during the Telnet 
  395.    AUTHENTICATION protocol exchange.  The method for performing this 
  396.    verification is authentication type specific.
  397.  
  398. 8.  User Interface
  399.  
  400.    Normally protocol specifications do not address user interface
  401.    specifications.  However, due to the fact that the user will probably
  402.    want to be able to configure the authentication and
  403.    encryption and know whether or not the negotiations succeeded, some
  404.    guidance needs to be given to implementors to provide some minimum
  405.    level of user control.
  406.  
  407.    The user of the client MUST be able to specify whether or not 
  408.    authentication is to be used, and whether or not encryption is to used
  409.    if the authentication succeeds.  There SHOULD be at least four settings,
  410.    REQUIRE, PROMPT, WARN and DISABLE.  Setting the authentication switch
  411.    to REQUIRE means that if the authentication fails, then an
  412.    appropriate error message must be displayed and the TELNET connection
  413.    must be terminated.  Setting the authentication switch to PROMPT
  414.    means that if the authentication fails, then an appropriate error
  415.    message must be displayed and the user must be prompted for
  416.    confirmation before continuing the TELNET session.  Setting the
  417.    authentication switch to WARN means that if the authentication fails,
  418.    then an appropriate error message must be displayed before continuing
  419.    the TELNET session.  Setting the authentication switch to DISABLE
  420.    means that authentication will not be attempted.  The encryption
  421.    switch SHOULD have the same settings as the authentication switch;
  422.    however its settings are only used when authentication succeeds.  The
  423.    default setting for both switches should be WARN.  Both of these
  424.    switches may be implemented as a single switch, though having them
  425.    separate gives more control to the user.
  426.  
  427.    The server must provide the system administrator the ability to 
  428.    specify whether or not authentication is required and which 
  429.    authentication type pairs should be offered to the client and 
  430.    in what order of preference.  
  431.  
  432. 9.  Security Considerations
  433.  
  434.    This memo describes a general framework for adding authentication and
  435.    encryption to the telnet protocol.  The actual authentication
  436.    mechanism is described in the authentication suboption
  437.    specifications, and the security of the authentication option is
  438.    dependent on the strengths and weaknesses of the authentication
  439.    suboption.
  440.  
  441.    The ability to negotiate a common authentication mechanism between
  442.    client and server is a feature of the authentication option that
  443.    should be used with caution.  When the negotiation is performed, no
  444.    authentication has yet occurred.  Therefore each system has no way of
  445.    knowing whether or not it is talking to the system it intends.  An
  446.    intruder could attempt to negotiate the use of an authentication
  447.    system which is either weak, or already compromised by the intruder.
  448.  
  449.    It should be noted that the negotiation of the authentication
  450.    type pair is not protected, thus allowing an attacker to force the
  451.    result of the authentication to the weakest mutually acceptable
  452.    method.  (For example, even if both sides of the negotiation can
  453.    accept a "strong" mechanism and a "40-bit" mechanism, an attacker
  454.    could force selection of the "40-bit" mechanism.)  An implementation
  455.    should therefore only accept an authentication mechanism to be
  456.    negotiated if it is willing to trust the resulting channel as being
  457.    secure.
  458.  
  459.    If the START_TLS option has not been negotiated and the authentication
  460.    type requires that encryption be enabled as a separate optional negotiation
  461.    there will be a window of vulnerability from the completion of the 
  462.    AUTH option until the successful negotiation to activiate bidirectional
  463.    encryption.  During this window an active attack may be successfully
  464.    implemented.  An active attack is one where the underlying TCP stream
  465.    can be modified or taken over by the active attacker.  
  466.  
  467.    The active attack can be prevented if the server only offers 
  468.    authentication type pairs that include the ENCRYPT_USING_TELOPT or
  469.    ENCRYPT_START_TLS bits set in the ENCRYPT_MASK field, since both parties
  470.    will agree that an encryption capability must be successfully negotiated.
  471.    When the ENCRYPT_USING_TELOPT bit is negotiated, the ENCRYPT option MUST
  472.    be negotiated immediately following the successful completion of the 
  473.    AUTH option.
  474.  
  475.    Authentication types that link the enabling of encryption as a side
  476.    effect of successful authentication are not vulnerable to this active
  477.    attack.  The ENCRYPT_AFTER_EXCHANGE bit allows these authentication types
  478.    to optionally negotiate the activation of encryption.
  479.  
  480.    Another opportunity for active attacks is presented when encryption
  481.    may be turned on and off without re-authentication.  Once encryption
  482.    is disabled, an attacker may hijack the telnet stream, and interfere
  483.    with attempts to restart encryption.  Therefore, a client SHOULD NOT
  484.    support the ability to turn off encryption.  Once encryption is
  485.    disabled, if an attempt to re-enable encryption fails, the client
  486.    MUST terminate the telnet connection.
  487.  
  488.    It is important that in all cases the authentication type pair be
  489.    integrity protected at the end of the authentication exchange.  This
  490.    must be specified for each authentication type to ensure that the
  491.    result of the telnet authentication option negotiation is agreed to
  492.    by both the client and the server.  To prevent downgrade attacks
  493.    authentication type suboptions SHOULD (if possible) include either
  494.    the entire auth-type pair list; or all of the telnet authentication
  495.    negotiation exchanges in the integrity checksum.
  496.  
  497.    Each side MUST verify the consistency of the auth-type-pairs in each
  498.    message received.  Any variation in the auth-type-pair MUST be
  499.    treated as a fatal protocol error.
  500.  
  501.    It should also be noted that the transmission of the username in
  502.    the IAC SB AUTHENTICATION NAME name IAC SE message is not protected.
  503.    Implementations should verify the value by a secure method before 
  504.    using this untrusted value when there is a possibility of a man in
  505.    the middle attack.  One method of verifying this value is for the
  506.    server to request the USER using the NEW ENVIRONMENT option [6].
  507.  
  508. 9.  Example
  509.  
  510.    The following is an example of use of the option:
  511.  
  512.    Client                           Server
  513.                                     IAC DO AUTHENTICATION
  514.    IAC WILL AUTHENTICATION
  515.    [ The server is now free to request authentication information.  ]
  516.                                     IAC SB AUTHENTICATION SEND
  517.                                     KERBEROS_V5 CLIENT|MUTUAL
  518.                                     KERBEROS_V5 CLIENT|ONE_WAY IAC
  519.                                     SE
  520.    [ The server has requested mutual Kerberos authentication, but is
  521.      willing to do just one-way Kerberos authentication.  The client
  522.      will now respond with the name of the user that it wants to log
  523.      in as, and the Kerberos ticket.  ]
  524.    IAC SB AUTHENTICATION NAME "joe"
  525.    IAC SE
  526.    IAC SB AUTHENTICATION IS
  527.    KERBEROS_V5 CLIENT|MUTUAL AUTH 4
  528.    7 1 67 82 65 89 46 67 7 9 77 0
  529.    48 24 49 244 109 240 50 208 43
  530.    35 25 116 104 44 167 21 201 224
  531.    229 145 20 2 244 213 220 33 134
  532.    148 4 251 249 233 229 152 77 2
  533.    109 130 231 33 146 190 248 1 9
  534.    31 95 94 15 120 224 0 225 76 205
  535.    70 136 245 190 199 147 155 13
  536.    IAC SE
  537.    [ The server responds with an ACCEPT command to state that the
  538.      authentication was successful.  ]
  539.                                     IAC SB AUTHENTICATION REPLY
  540.                                     KERBEROS_V5 CLIENT|MUTUAL ACCEPT
  541.                                     IAC SE
  542.    [ Next, the client sends across a CHALLENGE to verify that it is
  543.      really talking to the right server.  ]
  544.    IAC SB AUTHENTICATION IS
  545.    KERBEROS_V5 CLIENT|MUTUAL
  546.    CHALLENGE xx xx xx xx xx xx xx
  547.    xx IAC SE
  548.    [ Lastly, the server sends across a RESPONSE to prove that it
  549.      really is the right server. ]
  550.  
  551.                                       IAC SB AUTHENTICATION REPLY
  552.                                       KERBEROS_V5 CLIENT|MUTUAL
  553.                                       RESPONSE yy yy yy yy yy yy yy yy
  554.                                       IAC SE
  555.  
  556.    The following is an example of use of the option with encryption
  557.    negotiated via telnet ENCRYPT:
  558.  
  559.    Client                           Server
  560.                                     IAC DO AUTHENTICATION
  561.    IAC WILL AUTHENTICATION
  562.    [ The server is now free to request authentication information.  ]
  563.                                     IAC SB AUTHENTICATION SEND
  564.                                     KERBEROS_V5
  565.                                     CLIENT|MUTUAL|ENCRYPT_USING_TELOPT
  566.                                     KERBEROS_V5 CLIENT|ONE_WAY IAC
  567.                                     SE
  568.    [ The server has requested mutual Kerberos authentication, but is
  569.      willing to do just one-way Kerberos authentication.  In both
  570.      cases it is willing to encrypt the data stream.  The client
  571.      will now respond with the name of the user that it wants to log
  572.      in as, and the Kerberos ticket.  ]
  573.    IAC SB AUTHENTICATION NAME "joe"
  574.    IAC SE
  575.    IAC SB AUTHENTICATION IS
  576.    KERBEROS_V5
  577.    CLIENT|MUTUAL|ENCRYPT_USING_TELOPT
  578.    AUTH 4 7 1 67 82 65 89 46 67 7 9
  579.    77 0 48 24 49 244 109 240 50 208
  580.    43 35 25 116 104 44 167 21 201
  581.    224 229 145 20 2 244 213 220 33
  582.    134 148 4 251 249 233 229 152 77
  583.    2 109 130 231 33 146 190 248 1 9
  584.    31 95 94 15 120 224 0 225 76 205
  585.    70 136 245 190 199 147 155 13
  586.    IAC SE
  587.    [ The server responds with an ACCEPT command to state that the
  588.      authentication was successful.  ]
  589.                                     IAC SB AUTHENTICATION REPLY
  590.                                     KERBEROS_V5
  591.                                     CLIENT|MUTUAL|ENCRYPT_USING_TELOPT
  592.                                     ACCEPT IAC SE
  593.    [ Next, the client sends across a CHALLENGE to verify that it is
  594.      really talking to the right server.  ]
  595.    IAC SB AUTHENTICATION IS
  596.    KERBEROS_V5
  597.    CLIENT|MUTUAL|ENCRYPT_USING_TELOPT
  598.    CHALLENGE xx xx xx xx xx xx xx
  599.    xx IAC SE
  600.    [ The server sends across a RESPONSE to prove that it really is
  601.      the right server.  ]
  602.                                     IAC SB AUTHENTICATION REPLY
  603.                                     KERBEROS_V5
  604.                                     CLIENT|MUTUAL|ENCRYPT_USING_TELOPT
  605.                                     RESPONSE yy yy yy yy yy yy yy yy
  606.                                     IAC SE
  607.    [ At this point, the client and server begin to negotiate the
  608.      telnet ENCRYPT option in each direction for a secure channel.
  609.      If the option fails in either direction for any reason the
  610.      connection must be immediately terminated.  ]
  611.  
  612.    The following is an example of use of the option with integrated
  613.    encryption:
  614.  
  615.    Client                           Server
  616.                                     IAC DO AUTHENTICATION
  617.    IAC WILL AUTHENTICATION
  618.    [ The server is now free to request authentication information. ]
  619.                                     IAC SB AUTHENTICATION SEND
  620.                                     KEA_SJ
  621.                                     CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE
  622.                                     IAC SE
  623.    [ The server has requested mutual KEA authentication with
  624.      SKIPJACK encryption.  The client will now respond with the name
  625.      of the user that it wants to log in as and the KEA cert.  ]
  626.    IAC SB AUTHENTICATION NAME "joe"
  627.    IAC SE IAC SB AUTHENTICATION IS
  628.    KEA_SJ
  629.    CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE
  630.    '1' CertA||Ra IAC SE
  631.    [ The server responds with its KEA Cert.  ]
  632.                                     IAC SB AUTHENTICATION REPLY
  633.                                     KEA_SJ
  634.                                     CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE
  635.                                     '2'
  636.                                     CertB||Rb||IVb||Encrypt(NonceB)
  637.                                     IAC SE
  638.    [ Next, the client sends across a CHALLENGE to verify that it is
  639.      really talking to the right server.  ]
  640.    IAC SB AUTHENTICATION IS KEA_SJ
  641.    CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE
  642.    '3' IVa||Encrypt( NonceB xor
  643.    0x0C18 || NonceA ) IAC SE
  644.  
  645.    [ At this point, the client begins to encrypt the outgoing data
  646.      stream, and the server, after receiving this command, begins to
  647.      decrypt the incoming data stream.  Lastly, the server sends
  648.      across a RESPONSE to prove that it really is the right server.  ]
  649.                                     IAC SB AUTHENTICATION REPLY
  650.                                     KEA_SJ
  651.                                     CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE
  652.                                     '4' Encrypt( NonceA xor 0x0C18 )
  653.                                     IAC SE
  654.    [ At this point, the server begins to encrypt its outgoing data
  655.      stream, and the client, after receiving this command, begins to
  656.      decrypt its incoming data stream.  ]
  657.  
  658.    It is expected that any implementation that supports the Telnet
  659.    AUTHENTICATION option will support all of this specification.
  660.  
  661. 10.  Acknowledgements
  662.  
  663.    Many people have worked on this document over the span of many years.
  664.    Dave Borman was a document editor and author of much of the original
  665.    text.  Other folks who have contributed ideas and suggestions to this
  666.    text include: David Carrel, Jeff Schiller, and Richard Basch.
  667.  
  668. 11.  References
  669.  
  670.    [1] Postel, J. and J. Reynolds, "Telnet Protocol Specification", STD
  671.        8, RFC 854, May 1983.
  672.  
  673.    [2] T'so, T. and Altman, J., "Telnet Authentication Option", RFC 2941, 
  674.        September 2000.
  675.  
  676.    [3] Ts'o, T., "Telnet Data Encryption Option", RFC 2946, September
  677.        2000.
  678.  
  679.    [4] Alvestrand, H. and T. Narten, "Guidelines for Writing an IANA
  680.        Considerations Section in RFCs", BCP 26, RFC 2434, October 1998.
  681.  
  682.    [5] Altman, J. and Boe, M., "TLS-based Telnet Security", 
  683.        draft-ietf-tn3270e-telnet-tls-??.txt.
  684.  
  685.    [6] Alexander, S., "Telnet Environment Option", RFC 1572, January 1994
  686.  
  687. 12.  Authors' Addresses
  688.  
  689.    Theodore Ts'o, Editor
  690.    43 Pleasant St.
  691.    Medford, MA 02155
  692.  
  693.    Phone: (781) 391-3464
  694.    EMail: tytso@mit.edu
  695.  
  696.  
  697.    Jeffrey Altman
  698.    Columbia University
  699.    Watson Hall Room 716
  700.    612 West 115th Street
  701.    New York NY 10025
  702.  
  703.    Phone: +1 (212) 854-1344
  704.    EMail: jaltman@columbia.edu
  705.  
  706.    Mailing List: telnet-wg@BSDI.COM
  707.  
  708. 13.  Full Copyright Statement
  709.  
  710.    Copyright (C) The Internet Society (2002).  All Rights Reserved.
  711.  
  712.    This document and translations of it may be copied and furnished to
  713.    others, and derivative works that comment on or otherwise explain it
  714.    or assist in its implementation may be prepared, copied, published
  715.    and distributed, in whole or in part, without restriction of any
  716.    kind, provided that the above copyright notice and this paragraph are
  717.    included on all such copies and derivative works.  However, this
  718.    document itself may not be modified in any way, such as by removing
  719.    the copyright notice or references to the Internet Society or other
  720.    Internet organizations, except as needed for the purpose of
  721.    developing Internet standards in which case the procedures for
  722.    copyrights defined in the Internet Standards process must be
  723.    followed, or as required to translate it into languages other than
  724.    English.
  725.  
  726.    The limited permissions granted above are perpetual and will not be
  727.    revoked by the Internet Society or its successors or assigns.
  728.  
  729.    This document and the information contained herein is provided on an
  730.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  731.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  732.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  733.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  734.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  735.  
  736. Acknowledgement
  737.  
  738.    Funding for the RFC Editor function is currently provided by the
  739.    Internet Society.
  740.  
  741.