Network Working Group                    Internet Engineering Task Force
Internet-Draft                                      Telnet Working Group
                                                       D. Borman, Editor
                                                     Cray Research, Inc.
                                                           February 1991
Page 1

Telnet Authentication Option

Status of this Memo

This draft document will be submitted to the RFC editor as a protocol specification. Distribution of this memo is unlimited. Please send comments to the telnet-ietf@cray.com mailing list.

1. Command Names and Codes

AUTHENTICATION TBA

       IS               0
       SEND             1
       REPLY            2

Authentication Types

       NULL             0
       KERBEROS_V4      1
       KERBEROS_V5      2
       SPX              3
       MINK             4

Modifiers

       AUTH_WHO_CLIENT      0
       AUTH_WHO_SERVER      1
       AUTH_WHO_MASK        1

       AUTH_HOW_ONE_WAY     0
       AUTH_HOW_MUTUAL      2
       AUTH_HOW_MASK        2

2. Command Meanings

This document makes reference to a "server" and a "client". For the purposes of this document, the "server" is the side of the connection that did the passive TCP open, and the "client" is the side of the connection that did the active open.

IAC WILL AUTHENTICATION


Page 2

The client side of the connection sends this command to indicate that it is willing to send and receive authentication information.

IAC DO AUTHENTICATION

The servers side of the connection sends this command to indicate that it is willing to send and receive authentication information.

IAC WONT AUTHENTICATION
The client side of the connection sends this command to indicate that it refuses to send or receive authentication information; the server side sends this command if it receives a DO AUTHENTICATION command.

IAC DONT AUTHENTICATION

The server side of the connection sends this command to indicate that it refuses to send or receive authentication information; the client side sends this command if it receives a WILL AUTHENTICATION command.

IAC SB AUTHENTICATION SEND authentication-type-list IAC SE

The sender of this command (the server) requests that the remote side send authentication information for one of the authentication types listed in "authentication-type-list". The "authentication- type-list" is an ordered list of "authentication-type" pairs. Only the server side (DO AUTHENTICATION) is allowed to send this.

IAC SB AUTHENTICATION IS authentication-type-pair ... IAC SE

The sender of this command (the client) is sending the authentication information for authentication type "authentication-type- pair". Only the client side (WILL AUTHENTICATION) is allowed to send this.

IAC SB AUTHENTICATION REPLY authentication-type-pair ... IAC SE

The sender of this command (the server) is sending a reply to the the authentication information received in a previous IS command. Only the server side (DO AUTHENTICATION) is allowed to send this.

The "authentication-type-pair" has two values, the first is the authentication type, and the second is a modifier to the type. There are currently two one bit fields defined in the modifier, the AUTH_WHO_MASK bit and the AUTH_HOW_MASK bit, so there are four possible combinations:

AUTH_WHO_SERVER


Page 3

AUTH_HOW_ONE_WAY
The server is authenticating the client.

AUTH_WHO_CLIENT
AUTH_HOW_ONE_WAY
The client is authenticating the server.

AUTH_WHO_SERVER
AUTH_HOW_MUTUAL
The client and server are authenticating each other, and the client will begin the negotiation.

AUTH_WHO_CLIENT
AUTH_HOW_MUTUAL
The client and server are authenticating each other, and the server will begin the negotiation.

3. Default Specification

The default specification for this option is

WONT AUTHENTICATION
DONT AUTHENTICATION

meaning there will not be any exchange of authentication information.

4. Motivation

One of the deficiences of the Telnet protocol is that in order to log into remote systems, users have to type their passwords, which are passed in clear text through the network. If the connections goes through untrusted networks, there is the possibility that passwords will be compromised by someone watching the packets as they go by.

The purpose of the AUTHENTICATION option is to provide a framework for the passing of authentication information through the TELNET session. This means that: 1) the users password will not be sent in clear text across the network, and 2) if the front end telnet process has the appropriate authentication information, it can automatically send the information, and the user will not have to type any password.

It is intended that the AUTHENTICATION option be general enough that it can be used to pass information for any authentication system.

5. Implementation Rules

WILL and DO are used only at the beginning of the connection to obtain and grant permission for future negotiations.


Page 4

The authentication is only negotiated in one directions; the server must send the "DO", and the client must send the "WILL". This is due to the nature of authentication; there are three possible cases; server authenticates client, client authenticates server, and server and client authenticate each other. By only negotiating the option in one direction, and then determining which of the three cases is being used via the suboption, potential ambiguity is removed. If the server receives a "DO", it must respond with a "WONT". If the client receives a "WILL", it must respond with a "DONT".

Once the two hosts have exchanged a DO and a WILL, the server is free to request authentication information. In the request, a list of supported authentication types is sent. Only the server may send requests ("IAC SB AUTHENTICATION SEND authentication-type-list IAC SE"). Only the client may transmit authentication information via the "IAC SB AUTHENTICATION IS authentication-type ... IAC SE" command. Only the server may send replys ("IAC SB AUTHENTICATION REPLY authentication-type ... IAC SE"). As many IS and REPLY suboptions may be exchanged as are needed for the particular authentication scheme chosen.

If the client does not support any of the authentication types listed in the authentication-type-list, a type of NULL should be used to indicate this in the IS reply. Note that in this case, the server may choose to close the connection.

The order of the authentication types MUST be ordered to indicate a preference for different authentication types, the first type being the most preferred, and the last type the least preferred.

The following is an example of use of the option:

       _C_l_i_e_n_t                           _S_e_r_v_e_r
                                        IAC DO AUTHENTICATION
       IAC WILL AUTHENTICATION
       [ The server is now free to request authentication information.
         ]
                                        IAC SB AUTHENTICATION SEND
                                        KERBEROS_V4 SERVER|ONE_WAY IAC
                                        SE
       [ The server has requested one-way Kerberos authentication.  The
         client will now respond with the name of the user that it wants
         to log in as, and the Kerberos ticket.  A new key is also sent,
         for possible later user by the ENCRYPT option.  ]
       IAC SB AUTHENTICATION IS
       KERBEROS_V4 SERVER|ONE_WAY NAME
       "joe" IAC SE
       IAC SB AUTHENTICATION IS KRB4
       SERVER|ONE_WAY AUTH 4 7 1 67 82
       65 89 46 67 7 9 77 0 48 24 49


Page 5

244 109 240 50 208 43 35 25 116
104 44 167 21 201 224 229 145 20
2 244 213 220 33 134 148 4 251
249 233 229 152 77 2 109 130 231
33 146 190 248 1 9 31 95 94 15
120 224 0 225 76 205 70 136 245
190 199 147 155 13 IAC SE
IAC SB AUTHENTICATION IS
KERBEROS_V4 SERVER|ONE_WAY NEW-
KEY 170 243 56 226 94 230 157 10
IAC SE
[ The server responds with an ACCEPT command to state that the authentication was successful. ]
IAC SB AUTHENTICATION REPLY KERBEROS_V4 SERVER|ONE_WAY ACCEPT "dab"

It is expected that any implementation that supports the Telnet AUTHENTICATION option will support all of this specification.

6. Kerberos Version 4 and 5 Definitions

Command Names and Codes

       AUTH     0
       REJECT   1
       ACCEPT   2
       NEWKEY   3
       NAME     4

All of these commands take the form IAC SB AUTHENTICATION KERBEROS_V4 SERVER|ONE_WAY <sub-subcommand> IAC SE. The following describes the format for <sub-subcommand>.

Command Meanings

NAME <principal to authorize as>

This is the Kerberos principal that you wish to be authorized as.

AUTH <kerberos ticket>

This is used to pass the Kerberos ticket to the remote side of the connection.

NEWKEY <eight octet encrypted DES key>

This command is used by the client to pass a new DES key to the server. The client generates a random eight octet DES key,


Page 6

(called the encrypt key), uses DES to encrypt it with the session key, and uses the NEWKEY command to send it to the server. The server decrypts it using the session key. This is not used in the authentication, but it provides a unique key that may later be used with the KRBDES type of encryption, as specified by the telnet ENCRYPT option.

ACCEPT <authenticated principal>

This command indicates that the authentication was successful, and optionally the principal that the client has been authenticated as.

REJECT <optional reason for rejection>

This command indicates that the authentication was not successful, and if there is any more data in the sub-option, it is an ASCII text message of the reason for the rejection.

User "joe" may wish to log in as user "pete" on machine "foo". If "pete" has set things up on "foo" to allow "joe" access to his account, then the client would send NAME "pete" AUTH <joe's kerberos ticket> The server would then authenticate the user as "joe" from the ticket information, since "pete" is allowing "joe" to use his account, the server would send back ACCEPT "joe".

The commands for Kerberos Version 5 are the same as the commands for Kerberos Version 4.

7. References

[1] Reynolds, Joyce, and Postel, Jon, "Assigned Numbers", RFC 1060, ISI, March 1990

Author's Address

David A. Borman, Editor
Cray Research, Inc.
655F Lone Oak Drive
Eagan, MN 55123

Phone: (612) 452-6650

Mailing List: telnet-ietf@CRAY.COM
EMail: dab@CRAY.COM