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

  1. Network Working Group                                    T. Ts'o, Editor
  2. Internet-Draft                     Massachusetts Institute of Technology
  3. draft-tso-telnet-krb5-02.txt                                 August 1999
  4.  
  5.  
  6.                Telnet Authentication: Kerberos Version 5
  7.  
  8. Status of this Memo
  9.  
  10.    This document is an Internet-Draft and is in full conformance with
  11.    all provisions of Section 10 of RFC2026.  Internet-Drafts are working
  12.    documents of the Internet Engineering Task Force (IETF), its areas,
  13.    and its working groups.  Note that other groups may also distribute
  14.    working documents as Internet-Drafts.
  15.  
  16.    Internet-Drafts are draft documents valid for a maximum of six months
  17.    and may be updated, replaced, or obsoleted by other documents at any
  18.    time.  It is inappropriate to use Internet-Drafts as reference mate-
  19.    rial or to cite them other than as "work in progress."
  20.  
  21.    The list of current Internet-Drafts can be accessed at
  22.    http://www.ietf.org/ietf/1id-abstracts.txt
  23.  
  24.    The list of Internet-Draft Shadow Directories can be accessed at
  25.    http://www.ietf.org/shadow.html.
  26.  
  27.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  28.    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  29.    document are to be interpreted as described in RFC 2119.
  30.  
  31. 1. Command Names and Codes
  32.  
  33.    Authentication Types
  34.  
  35.       KERBEROS_V5    2
  36.  
  37.    Sub-option Commands
  38.  
  39.       AUTH               0
  40.       REJECT             1
  41.       ACCEPT             2
  42.       RESPONSE           3
  43.       FORWARD            4
  44.       FORWARD_ACCEPT     5
  45.       FORWARD_REJECT     6
  46.  
  47. 2.  Command Meanings
  48.  
  49.  
  50.  
  51.                          Expires February 19100                 [Page 1]
  52.  
  53. Internet-Draft        Kerberos Version 5 for Telnet          August 1999
  54.  
  55.  
  56.    IAC SB AUTHENTICATION IS <authentication-type-pair> AUTH <Kerberos V5
  57.    KRB_AP_REQ message> IAC SE
  58.  
  59.       This is used to pass the Kerberos V5 [1] KRB_AP_REQ message to the
  60.       remote side of the connection.  The first octet of the <authenti-
  61.       cation-type-pair> value is KERBEROS_V5, to indicate that Version 5
  62.       of Kerberos is being used.  The Kerberos V5 authenticator in the
  63.       KRB_AP_REQ message     must contain a Kerberos V5 checksum of the
  64.       two-byte authentication type pair.  This checksum must be verified
  65.       by the server to assure that the authentication type pair was cor-
  66.       rectly negotiated.  The Kerberos V5 authenticator must also in-
  67.       clude the optional subkey field, which shall be filled in with a
  68.       randomly chosen key.  This key shall be used for encryption pur-
  69.       poses if encryption is negotiated, and shall be used as the nego-
  70.       tiated session key (i.e., used as keyid 0) for the purposes of the
  71.       telnet encryption option; if the subkey is not filled in, then the
  72.       ticket session key will be used instead.
  73.  
  74.       If the AUTHENTICATION option takes place after the TELNET_OVER_TLS
  75.       option is successfully negotiated, the Kerberos V5 checksum shall
  76.       consist of the following ASN.1 structure encoded using the Distin-
  77.       guished Encoding Rules:
  78.  
  79.          TLS_CHECKSUM_DATA ::= SEQUENCE {
  80.            authentication-type-pair OCTET_STRING,  -- 2 bytes
  81.            SSLversion              INTEGER,        -- SSL version number
  82.            Cipher                  OCTET_STRING,   -- the 3 byte cipher ID
  83.            Session_ID              OCTET_STRING,   -- the Session ID
  84.            Master_key              OCTET_STRING,   -- the master key
  85.          }
  86.  
  87.       This allows the TELNET_OVER_TLS to use an anonymous Diffie-Helman
  88.       exchange to establish an encryption key, and then to securely ver-
  89.       ify the key negotiated by the anonymous Diffie-Helman exchange to
  90.       prevent any man-in-the-middle attacks.
  91.  
  92.  
  93.    IAC SB AUTHENTICATION REPLY <authentication-type-pair> ACCEPT IAC SE
  94.  
  95.       This command indicates that the authentication was successful.
  96.  
  97.       If the AUTH_HOW_MUTUAL bit is set in the second octet of the au-
  98.       thentication-type-pair, the RESPONSE command must be sent before
  99.       the ACCEPT command is sent.
  100.  
  101.    IAC SB AUTHENTICATION REPLY <authentication-type-pair> REJECT <op-
  102.    tional reason for rejection> IAC SE
  103.  
  104.       This command indicates that the authentication was not successful,
  105.       and if there is any more data in the sub-option, it is an ASCII
  106.  
  107.  
  108.  
  109.                          Expires February 19100                 [Page 2]
  110.  
  111. Internet-Draft        Kerberos Version 5 for Telnet          August 1999
  112.  
  113.  
  114.       text message of the reason for the rejection.
  115.  
  116.    IAC SB AUTHENTICATION REPLY <authentication-type-pair> RESPONSE
  117.    <KRB_AP_REP message> IAC SE
  118.  
  119.       This command is used to perform mutual authentication.  It is only
  120.       used when the AUTH_HOW_MUTUAL bit is set in the second octet of
  121.       the authentication-type-pair.  After an AUTH command is verified,
  122.       a RESPONSE command is sent which contains a Kerberos V5 KRB_AP_REP
  123.       message to perform the mutual authentication.
  124.  
  125.    IAC SB AUTHENTICATION <authentication-type-pair> FORWARD <KRB_CRED
  126.    message> IAC SE
  127.  
  128.       This command is used to forward kerberos credentials for use by
  129.       the remote session.  The credentials are passed as a Kerberos V5
  130.       KRB_CRED message which includes, among other things, the forwarded
  131.       Kerberos ticket and a session key associated with the ticket. Part
  132.       of the KRB_CRED message is encrypted in the key previously ex-
  133.       changed for the telnet session by the AUTH suboption.
  134.  
  135.    IAC SB AUTHENTICATION <authentication-type-pair> FORWARD_ACCEPT IAC
  136.    SE
  137.  
  138.       This command indicates that the credential forwarding was success-
  139.       ful.
  140.  
  141.    IAC SB AUTHENTICATION <authentication-type-pair> FORWARD_REJECT <op-
  142.    tional reason for rejection> IAC SE
  143.  
  144.       This command indicates that the credential forwarding was not suc-
  145.       cessful, and if there is any more data in the sub-option, it is an
  146.       ASCII text message of the reason for the rejection.
  147.  
  148.  
  149. 3.  Implementation Rules
  150.  
  151.    If the second octet of the authentication-type-pair has the AUTH_WHO
  152.    bit set to AUTH_CLIENT_TO_SERVER, then the client sends the initial
  153.    AUTH command, and the server responds with either ACCEPT or REJECT.
  154.    In addition, if the AUTH_HOW bit is set to AUTH_HOW_MUTUAL, the serv-
  155.    er will send a RESPONSE before it sends the ACCEPT.
  156.  
  157.    If the second octet of the authentication-type-pair has the AUTH_WHO
  158.    bit set to AUTH_SERVER_TO_CLIENT, then the server sends the initial
  159.    AUTH command, and the client responds with either ACCEPT or REJECT.
  160.    In addition, if the AUTH_HOW bit is set to AUTH_HOW_MUTUAL, the
  161.    client will send a RESPONSE before it sends the ACCEPT.
  162.  
  163.    The Kerberos principal used by the server will generally be of the
  164.  
  165.  
  166.  
  167.                          Expires February 19100                 [Page 3]
  168.  
  169. Internet-Draft        Kerberos Version 5 for Telnet          August 1999
  170.  
  171.  
  172.    form "host/<hostname>@realm".  That is, the first component of the
  173.    Kerberos principal is "host"; the second component is the fully qual-
  174.    ified lower-case hostname of the server; and the realm is the Ker-
  175.    beros realm to which the server belongs.
  176.  
  177.    Any Telnet IAC characters that occur in the KRB_AP_REQ or KRB_AP_REP
  178.    messages, the KRB_CRED structure, or the optional rejection text
  179.    string must be doubled as specified in [2].  Otherwise the following
  180.    byte might be mis-interpreted as a Telnet command.
  181.  
  182. 4.  Examples
  183.  
  184.    User "joe" may wish to log in as user "pete" on machine "foo".  If
  185.    "pete" has set things up on "foo" to allow "joe" access to his ac-
  186.    count, then the client would send IAC SB AUTHENTICATION NAME "pete"
  187.    IAC SE IAC SB AUTHENTICATION IS KERBEROS_V5 AUTH <KRB_AP_REQ_MESSAGE>
  188.    IAC SE
  189.  
  190.    The server would then authenticate the user as "joe" from the
  191.    KRB_AP_REQ_MESSAGE, and if the KRB_AP_REQ_MESSAGE was accepted by
  192.    Kerberos, and if "pete" has allowed "joe" to use his account, the
  193.    server would then continue the authentication sequence by sending a
  194.    RESPONSE (to do mutual authentication, if it was requested) followed
  195.    by the ACCEPT.
  196.  
  197.    If forwarding has been requested, the client then sends IAC SB AU-
  198.    THENTICATION IS KERBEROS_V5 CLIENT|MUTUAL FORWARD <KRB_CRED structure
  199.    with credentials to be forwarded> IAC SE.  If the server succeeds in
  200.    reading the forwarded credentials, the server sends FORWARD_ACCEPT
  201.    else, a FORWARD_REJECT is sent back.
  202.  
  203.        Client                           Server
  204.                                         IAC DO AUTHENTICATION
  205.        IAC WILL AUTHENTICATION
  206.  
  207.        [ The server is now free to request authentication information.
  208.          ]
  209.  
  210.                                         IAC SB AUTHENTICATION SEND
  211.                                         KERBEROS_V5 CLIENT|MUTUAL
  212.                                         KERBEROS_V5 CLIENT|ONE_WAY IAC
  213.                                         SE
  214.  
  215.        [ The server has requested mutual Version 5 Kerberos
  216.          authentication.  If mutual authentication is not supported,
  217.          then the server is willing to do one-way authentication.
  218.  
  219.          The client will now respond with the name of the user that it
  220.          wants to log in as, and the Kerberos ticket.  ]
  221.  
  222.  
  223.  
  224.  
  225.                          Expires February 19100                 [Page 4]
  226.  
  227. Internet-Draft        Kerberos Version 5 for Telnet          August 1999
  228.  
  229.  
  230.        IAC SB AUTHENTICATION NAME
  231.        "pete" IAC SE
  232.        IAC SB AUTHENTICATION IS
  233.        KERBEROS_V5 CLIENT|MUTUAL AUTH
  234.        <KRB_AP_REQ message> IAC SE
  235.  
  236.        [ Since mutual authentication is desired, the server sends across
  237.          a RESPONSE to prove that it really is the right server.  ]
  238.  
  239.                                         IAC SB AUTHENTICATION REPLY
  240.                                         KERBEROS_V5 CLIENT|MUTUAL
  241.                                         RESPONSE <KRB_AP_REP message>
  242.                                         IAC SE
  243.  
  244.        [ The server responds with an ACCEPT command to state that the
  245.          authentication was successful.  ]
  246.  
  247.                                         IAC SB AUTHENTICATION REPLY KER-
  248.                                         BEROS_V5 CLIENT|MUTUAL ACCEPT
  249.                                         IAC SE
  250.  
  251.        [ If so requested, the client now sends the FORWARD command to
  252.          forward credentials to the remote site.  ]
  253.  
  254.        IAC SB AUTHENTICATION IS KER-
  255.        BEROS_V5 CLIENT|MUTUAL
  256.        FORWARD <KRB_CRED message> IAC
  257.        SE
  258.  
  259.        [ The server responds with a FORWARD_ACCEPT command to state that
  260.          the credential forwarding was successful.  ]
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.                          Expires February 19100                 [Page 5]
  284.  
  285. Internet-Draft        Kerberos Version 5 for Telnet          August 1999
  286.  
  287.  
  288.                                         IAC SB AUTHENTICATION REPLY KER-
  289.                                         BEROS_V5 CLIENT|MUTUAL FOR-
  290.                                         WARD_ACCEPT IAC SE
  291.  
  292. 5. Security Considerations
  293.  
  294.    The selection of the random session key in the Kerberos V5 authenti-
  295.    cator is critical, since this key will be used for encrypting the
  296.    telnet data stream if encryption is enabled.  It is strongly advised
  297.    that the random key selection be done using cryptographic techniques
  298.    that involve the Kerberos ticket's session key.  For example, using
  299.    the current time, encrypting it with the ticket session key, and then
  300.    correcting for key parity is a strong way to generate a subsession
  301.    key, since the ticket session key is assumed to be never disclosed to
  302.    an attacker.
  303.  
  304.    Care should be taken before forwarding a user's Kerberos credentials
  305.    to the remote server.  If the remote server is not trustworthy, this
  306.    could result in the user's credentials being compromised.  Hence, the
  307.    user interface should not forward credentials by default; it would be
  308.    far safer to either require the user to explicitly request creden-
  309.    tials forwarding for each connection, or to have a trusted list of
  310.    hosts for which credentials forwarding is enabled, but to not enable
  311.    credentials forwarding by default for all machines.
  312.  
  313. 6. Acknowledgments
  314.  
  315.    This document was originally written by Dave Borman of Cray Research,
  316.    Inc.  Theodore Ts'o of MIT revised it to reflect the latest implemen-
  317.    tation experience.  Cliff Neuman and Prasad Upasani of USC's Informa-
  318.    tion Sciences Institute developed the credential forwarding support.
  319.  
  320.    In addition, the contributions of the Telnet Working Group are also
  321.    gratefully acknowledged.
  322.  
  323. 7. References
  324.  
  325.    [1] Kohl, J. and B. Neuman, "The Kerberos Network Authentication Sys-
  326.        tem (V5)", RFC 1510, USC/Information Sciences Institute, Septem-
  327.        ber 1993.
  328.  
  329.    [2] Postel, J.B. and J. Reynolds, "Telnet Option Specifications", RFC
  330.        855, STD 8, USC/Information Sciences Institute, May 1983.
  331.  
  332.  
  333. Editor's Address
  334.  
  335.    Theodore Ts'o
  336.    Massachusetts Institute of Technology
  337.    MIT Room E40-343
  338.  
  339.  
  340.  
  341.                          Expires February 19100                 [Page 6]
  342.  
  343. Internet-Draft        Kerberos Version 5 for Telnet          August 1999
  344.  
  345.  
  346.    77 Massachusetts Avenue
  347.    Cambridge, MA 02139
  348.  
  349.    Phone: (617) 253-8091
  350.    EMail: tytso@mit.edu
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.                          Expires February 19100                 [Page 7]
  400.  
  401.