draft-ietf-secsh-gsskeyex-08.txt   draft-ietf-secsh-gsskeyex-09.txt 
Network Working Group J. Hutzelman Secure Shell Working Group J. Hutzelman
Internet-Draft CMU Internet-Draft CMU
Expires: January 17, 2005 J. Salowey Expires: November 7, 2005 J. Salowey
Cisco Systems Cisco Systems
J. Galbraith J. Galbraith
Van Dyke Technologies, Inc. Van Dyke Technologies, Inc.
V. Welch V. Welch
U Chicago / ANL U Chicago / ANL
July 19, 2004 May 6, 2005
GSSAPI Authentication and Key Exchange for the Secure Shell Protocol GSSAPI Authentication and Key Exchange for the Secure Shell Protocol
draft-ietf-secsh-gsskeyex-08 draft-ietf-secsh-gsskeyex-09
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with By submitting this Internet-Draft, each author represents that any
all provisions of Section 10 of RFC2026. applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as other groups may also distribute working documents as Internet-
Internet-Drafts. Drafts.
Internet-Drafts are draft documents valid for a maximum of six Internet-Drafts are draft documents valid for a maximum of six months
months and may be updated, replaced, or obsoleted by other documents and may be updated, replaced, or obsoleted by other documents at any
at any time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on January 17, 2005. This Internet-Draft will expire on November 7, 2005.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved. Copyright (C) The Internet Society (2005).
Abstract Abstract
The Secure Shell protocol (SSH) is a protocol for secure remote The Secure Shell protocol (SSH) is a protocol for secure remote login
login and other secure network services over an insecure network. and other secure network services over an insecure network.
The Generic Security Service Application Program Interface (GSS-API) The Generic Security Service Application Program Interface (GSS-API)
[GSSAPI] provides security services to callers in a [GSSAPI] provides security services to callers in a mechanism-
mechanism-independent fashion. independent fashion.
This memo describes methods for using the GSS-API for authentication This memo describes methods for using the GSS-API for authentication
and key exchange in SSH. It defines an SSH user authentication and key exchange in SSH. It defines an SSH user authentication
method which uses a specified GSSAPI mechanism to authenticate a method which uses a specified GSSAPI mechanism to authenticate a
user, and a family of SSH key exchange methods which use GSSAPI to user, and a family of SSH key exchange methods which use GSSAPI to
authenticate the Diffie-Hellman exchange described in authenticate the Diffie-Hellman exchange described in [SSH-
[SSH-TRANSPORT]. TRANSPORT].
This memo also defines a new host public key algorithm which can be This memo also defines a new host public key algorithm which can be
used when no operations are needed using a host's public key, and a used when no operations are needed using a host's public key, and a
new user authentication method which allows an authorization name to new user authentication method which allows an authorization name to
be used in conjunction with any authentication which has already be used in conjunction with any authentication which has already
occurred as a side-effect of GSSAPI-based key exchange. occurred as a side-effect of GSSAPI-based key exchange.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [KEYWORDS]. document are to be interpreted as described in [KEYWORDS].
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 SSH terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1 SSH terminology . . . . . . . . . . . . . . . . . . . . . 4
2. GSSAPI Authenticated Diffie-Hellman Key Exchange . . . . . . . 5 2. GSSAPI Authenticated Diffie-Hellman Key Exchange . . . . . . 5
2.1 Generic GSSAPI Key Exchange . . . . . . . . . . . . . . . . . 5 2.1 Generic GSSAPI Key Exchange . . . . . . . . . . . . . . . 5
2.2 Group Exchange . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2 Group Exchange . . . . . . . . . . . . . . . . . . . . . . 11
2.3 gss-group1-sha1-* . . . . . . . . . . . . . . . . . . . . . . 12 2.3 gss-group1-sha1-* . . . . . . . . . . . . . . . . . . . . 13
2.4 gss-gex-sha1-* . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 gss-group14-sha1-* . . . . . . . . . . . . . . . . . . . . 13
2.5 Other GSSAPI key exchange methods . . . . . . . . . . . . . . 13 2.5 gss-gex-sha1-* . . . . . . . . . . . . . . . . . . . . . . 13
3. GSSAPI User Authentication . . . . . . . . . . . . . . . . . . 14 2.6 Other GSSAPI key exchange methods . . . . . . . . . . . . 13
3.1 GSSAPI Authentication Overview . . . . . . . . . . . . . . . . 14 3. GSSAPI User Authentication . . . . . . . . . . . . . . . . . 15
3.2 Initiating GSSAPI authentication . . . . . . . . . . . . . . . 14 3.1 GSSAPI Authentication Overview . . . . . . . . . . . . . . 15
3.3 Initial server response . . . . . . . . . . . . . . . . . . . 15 3.2 Initiating GSSAPI authentication . . . . . . . . . . . . . 15
3.4 GSSAPI session . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3 Initial server response . . . . . . . . . . . . . . . . . 16
3.5 Binding Encryption Keys . . . . . . . . . . . . . . . . . . . 16 3.4 GSSAPI session . . . . . . . . . . . . . . . . . . . . . . 16
3.6 Client acknowledgement . . . . . . . . . . . . . . . . . . . . 17 3.5 Binding Encryption Keys . . . . . . . . . . . . . . . . . 17
3.7 Completion . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.6 Client acknowledgement . . . . . . . . . . . . . . . . . . 18
3.8 Error Status . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.7 Completion . . . . . . . . . . . . . . . . . . . . . . . . 19
3.9 Error Token . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.8 Error Status . . . . . . . . . . . . . . . . . . . . . . . 19
4. Authentication using GSSAPI Key Exchange . . . . . . . . . . . 20 3.9 Error Token . . . . . . . . . . . . . . . . . . . . . . . 20
5. Null Host Key Algorithm . . . . . . . . . . . . . . . . . . . 22 4. Authentication using GSSAPI Key Exchange . . . . . . . . . . 21
6. Summary of Message Numbers . . . . . . . . . . . . . . . . . . 23 5. Null Host Key Algorithm . . . . . . . . . . . . . . . . . . 23
7. GSSAPI Considerations . . . . . . . . . . . . . . . . . . . . 24 6. Summary of Message Numbers . . . . . . . . . . . . . . . . . 24
7.1 Naming Conventions . . . . . . . . . . . . . . . . . . . . . . 24 7. GSSAPI Considerations . . . . . . . . . . . . . . . . . . . 25
7.2 Channel Bindings . . . . . . . . . . . . . . . . . . . . . . . 24 7.1 Naming Conventions . . . . . . . . . . . . . . . . . . . . 25
7.3 SPNEGO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.2 Channel Bindings . . . . . . . . . . . . . . . . . . . . . 25
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 7.3 SPNEGO . . . . . . . . . . . . . . . . . . . . . . . . . . 25
9. Security Considerations . . . . . . . . . . . . . . . . . . . 27 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . 27
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 28 9. Security Considerations . . . . . . . . . . . . . . . . . . 28
11. Changes the last version . . . . . . . . . . . . . . . . . . . 29 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 29
References . . . . . . . . . . . . . . . . . . . . . . . . . . 30 11. Changes the last version . . . . . . . . . . . . . . . . . . 30
References . . . . . . . . . . . . . . . . . . . . . . . . . . 32 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 31
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 32 12.1 Normative References . . . . . . . . . . . . . . . . . . 31
Full Copyright Statement . . . . . . . . . . . . . . . . . . . 34 12.2 Non-Normative References . . . . . . . . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 32
Intellectual Property and Copyright Statements . . . . . . . 34
1. Introduction 1. Introduction
This document describes the methods used to perform key exchange and This document describes the methods used to perform key exchange and
user authentication in the Secure Shell protocol using the GSSAPI. user authentication in the Secure Shell protocol using the GSSAPI.
To do this, it defines a family of key exchange methods, two user To do this, it defines a family of key exchange methods, two user
authentication methods, and a new host key algorithm. These authentication methods, and a new host key algorithm. These
definitions allow any GSSAPI mechanism to be used with the Secure definitions allow any GSSAPI mechanism to be used with the Secure
Shell protocol. Shell protocol.
This document should be read only after reading the documents This document should be read only after reading the documents
describing the SSH protocol architecture [SSH-ARCH], transport layer describing the SSH protocol architecture [SSH-ARCH], transport layer
protocol [SSH-TRANSPORT], and user authentication protocol protocol [SSH-TRANSPORT], and user authentication protocol [SSH-
[SSH-USERAUTH]. This document freely uses terminology and notation USERAUTH]. This document freely uses terminology and notation from
from the architecture document without reference or further the architecture document without reference or further explanation.
explanation.
1.1 SSH terminology 1.1 SSH terminology
The data types used in the packets are defined in the SSH The data types used in the packets are defined in the SSH
architecture document [SSH-ARCH]. It is particularly important to architecture document [SSH-ARCH]. It is particularly important to
note the definition of string allows binary content. note the definition of string allows binary content.
The SSH_MSG_USERAUTH_REQUEST packet refers to a service; this The SSH_MSG_USERAUTH_REQUEST packet refers to a service; this service
service name is an SSH service name, and has no relationship to name is an SSH service name, and has no relationship to GSSAPI
GSSAPI service names. Currently, the only defined service name is service names. Currently, the only defined service name is "ssh-
"ssh-connection", which refers to the SSH connection protocol connection", which refers to the SSH connection protocol [SSH-
[SSH-CONNECT]. CONNECT].
2. GSSAPI Authenticated Diffie-Hellman Key Exchange 2. GSSAPI Authenticated Diffie-Hellman Key Exchange
This section defines a class of key exchange methods which combine This section defines a class of key exchange methods which combine
the Diffie-Hellman key exchange from section 6 of [SSH-TRANSPORT] the Diffie-Hellman key exchange from section 8 of [SSH-TRANSPORT]
with mutual authentication using GSSAPI. with mutual authentication using GSSAPI.
Since the GSSAPI key exchange methods described in this section do Since the GSSAPI key exchange methods described in this section do
not require the use of public key signature or encryption not require the use of public key signature or encryption algorithms,
algorithms, they MAY be used with any host key algorithm, including they MAY be used with any host key algorithm, including the "null"
the "null" algorithm described in Section 5. algorithm described in Section 5.
2.1 Generic GSSAPI Key Exchange 2.1 Generic GSSAPI Key Exchange
The following symbols are used in this description: The following symbols are used in this description:
o C is the client, and S is the server o C is the client, and S is the server
o p is a large safe prime, g is a generator for a subgroup of o p is a large safe prime, g is a generator for a subgroup of GF(p),
GF(p), and q is the order of the subgroup and q is the order of the subgroup
o V_S is S's version string, and V_C is C's version string o V_S is S's version string, and V_C is C's version string
o I_C is C's KEXINIT message, and I_S is S's KEXINIT message o I_C is C's KEXINIT message, and I_S is S's KEXINIT message
1. C generates a random number x (1 < x < q) and computes e = g^x 1. C generates a random number x (1 < x < q) and computes e = g^x
mod p. mod p.
2. C calls GSS_Init_sec_context, using the most recent reply token 2. C calls GSS_Init_sec_context, using the most recent reply token
received from S during this exchange, if any. For this call, received from S during this exchange, if any. For this call, the
the client MUST set the mutual_req_flag to "true" to request client MUST set the mutual_req_flag to "true" to request that
that mutual authentication be performed. It also MUST set the mutual authentication be performed. It also MUST set the
integ_req_flag to "true" to request that per-message integrity integ_req_flag to "true" to request that per-message integrity
protection be supported for this context. In addition, the protection be supported for this context. In addition, the
deleg_req_flag MAY be set to "true" to request access deleg_req_flag MAY be set to "true" to request access delegation,
delegation, if requested by the user. Since the key exchange if requested by the user. Since the key exchange process
process authenticates only the host, the setting of the authenticates only the host, the setting of the anon_req_flag is
anon_req_flag is immaterial to this process. If the client does immaterial to this process. If the client does not support the
not support the "gssapi-keyex" user authentication method "gssapi-keyex" user authentication method described in Section 4,
described in Section 4, or does not intend to use that method in or does not intend to use that method in conjunction with the
conjunction with the GSSAPI context established during key GSSAPI context established during key exchange, then the
exchange, then the anon_req_flag SHOULD be set to "true". anon_req_flag SHOULD be set to "true". Otherwise, this flag MAY
Otherwise, this flag MAY be set to true if the client wishes to be set to true if the client wishes to hide its identity. Since
hide its identity. Since the key exchange process will involve the key exchange process will involve the exchange of only a
the exchange of only a single token once the context has been single token once the context has been established, it is not
established, it is not necessary that the GSSAPI context support necessary that the GSSAPI context support detection of replayed
detection of replayed or out-of-sequence tokens. Thus, the or out-of-sequence tokens. Thus, the setting of the
setting of the replay_det_req_flag and sequence_req_flag are not replay_det_req_flag and sequence_req_flag are not needed for this
needed for this process. These flags SHOULD be set to "false". process. These flags SHOULD be set to "false".
* If the resulting major_status code is GSS_S_COMPLETE and the * If the resulting major_status code is GSS_S_COMPLETE and the
mutual_state flag is not true, then mutual authentication has mutual_state flag is not true, then mutual authentication has
not been established, and the key exchange MUST fail. not been established, and the key exchange MUST fail.
* If the resulting major_status code is GSS_S_COMPLETE and the * If the resulting major_status code is GSS_S_COMPLETE and the
integ_avail flag is not true, then per-message integrity integ_avail flag is not true, then per-message integrity
protection is not available, and the key exchange MUST fail. protection is not available, and the key exchange MUST fail.
* If the resulting major_status code is GSS_S_COMPLETE and both * If the resulting major_status code is GSS_S_COMPLETE and both
the mutual_state and integ_avail flags are true, the the mutual_state and integ_avail flags are true, the resulting
resulting output token is sent to S. output token is sent to S.
* If the resulting major_status code is GSS_S_CONTINUE_NEEDED, * If the resulting major_status code is GSS_S_CONTINUE_NEEDED,
the the output_token is sent to S, which will reply with a the output_token is sent to S, which will reply with a new
new token to be provided to GSS_Init_sec_context. token to be provided to GSS_Init_sec_context.
* The client MUST also include "e" with the first message it * The client MUST also include "e" with the first message it
sends to the server during this process; if the server sends to the server during this process; if the server
receives more than one "e" or none at all, the key exchange receives more than one "e" or none at all, the key exchange
fails. fails.
* It is an error if the call does not produce a token of * It is an error if the call does not produce a token of non-
non-zero length to be sent to the server. In this case, the zero length to be sent to the server. In this case, the key
key exchange MUST fail. exchange MUST fail.
3. S calls GSS_Accept_sec_context, using the token received from C. 3. S calls GSS_Accept_sec_context, using the token received from C.
* If the resulting major_status code is GSS_S_COMPLETE and the * If the resulting major_status code is GSS_S_COMPLETE and the
mutual_state flag is not true, then mutual authentication has mutual_state flag is not true, then mutual authentication has
not been established, and the key exchange MUST fail. not been established, and the key exchange MUST fail.
* If the resulting major_status code is GSS_S_COMPLETE and the * If the resulting major_status code is GSS_S_COMPLETE and the
integ_avail flag is not true, then per-message integrity integ_avail flag is not true, then per-message integrity
protection is not available, and the key exchange MUST fail. protection is not available, and the key exchange MUST fail.
skipping to change at page 7, line 6 skipping to change at page 7, line 8
then the output token is sent to C, and processing continues then the output token is sent to C, and processing continues
with step 2. with step 2.
* If the resulting major_status code is GSS_S_COMPLETE, but a * If the resulting major_status code is GSS_S_COMPLETE, but a
non-zero-length reply token is returned, then that token is non-zero-length reply token is returned, then that token is
sent to the client. sent to the client.
4. S generates a random number y (0 < y < q) and computes f = g^y 4. S generates a random number y (0 < y < q) and computes f = g^y
mod p. It computes K = e ^ y mod p, and H = hash(V_C || V_S || mod p. It computes K = e ^ y mod p, and H = hash(V_C || V_S ||
I_C || I_S || K_S || e || f || K). It then calls GSS_GetMIC to I_C || I_S || K_S || e || f || K). It then calls GSS_GetMIC to
obtain a GSSAPI message integrity code for H. S then sends f obtain a GSSAPI message integrity code for H. S then sends f and
and the MIC to C. the MIC to C.
5. This step is performed only if the server's final call to 5. This step is performed only if the server's final call to
GSS_Accept_sec_context produced a non-zero-length final reply GSS_Accept_sec_context produced a non-zero-length final reply
token to be sent to the client _and_ no previous call by the token to be sent to the client _and_ no previous call by the
client to GSS_Init_sec_context has resulted in a major_status of client to GSS_Init_sec_context has resulted in a major_status of
GSS_S_COMPLETE. Under these conditions, the client makes an GSS_S_COMPLETE. Under these conditions, the client makes an
additional call to GSS_Init_sec_context to process the final additional call to GSS_Init_sec_context to process the final
reply token. This call is made exactly as described above. reply token. This call is made exactly as described above.
However, if the resulting major_status is anything other than However, if the resulting major_status is anything other than
GSS_S_COMPLETE, or a non-zero-length token is returned, it is an GSS_S_COMPLETE, or a non-zero-length token is returned, it is an
error and the key exchange MUST fail. error and the key exchange MUST fail.
6. C computes K = f^x mod p, and H = hash(V_C || V_S || I_C || I_S 6. C computes K = f^x mod p, and H = hash(V_C || V_S || I_C || I_S
|| K_S || e || f || K). It then calls GSS_VerifyMIC to verify || K_S || e || f || K). It then calls GSS_VerifyMIC to verify
that the MIC sent by S matches H. If the MIC is not that the MIC sent by S matches H. If the MIC is not successfully
successfully verified, the key exchange MUST fail. verified, the key exchange MUST fail.
Either side MUST NOT send or accept e or f values that are not in Either side MUST NOT send or accept e or f values that are not in the
the range [1, p-1]. If this condition is violated, the key exchange range [1, p-1]. If this condition is violated, the key exchange
fails. fails.
If any call to GSS_Init_sec_context or GSS_Accept_sec_context If any call to GSS_Init_sec_context or GSS_Accept_sec_context returns
returns a major_status other than GSS_S_COMPLETE or a major_status other than GSS_S_COMPLETE or GSS_S_CONTINUE_NEEDED, or
GSS_S_CONTINUE_NEEDED, or any other GSSAPI call returns a any other GSSAPI call returns a major_status other than
major_status other than GSS_S_COMPLETE, the key exchange fails. In GSS_S_COMPLETE, the key exchange fails. In this case, several
this case, several mechanisms are available for communicating error mechanisms are available for communicating error information to the
information to the peer before terminating the connection as peer before terminating the connection as required by [SSH-
required by [SSH-TRANSPORT]: TRANSPORT]:
o If the key exchange fails due to any GSSAPI error on the server o If the key exchange fails due to any GSSAPI error on the server
(including errors returned by GSS_Accept_sec_context), the server (including errors returned by GSS_Accept_sec_context), the server
MAY send a message informing the client of the details of the MAY send a message informing the client of the details of the
error. In this case, if an error token is also sent (see below), error. In this case, if an error token is also sent (see below),
then this message MUST be sent before the error token. then this message MUST be sent before the error token.
o If the key exchange fails due to a GSSAPI error returned from the o If the key exchange fails due to a GSSAPI error returned from the
server's call to GSS_Accept_sec_context, and an "error token" is server's call to GSS_Accept_sec_context, and an "error token" is
also returned, then the server SHOULD send the error token to the also returned, then the server SHOULD send the error token to the
client to allow completion of the GSS security exchange. client to allow completion of the GSS security exchange.
o If the key exchange fails due to a GSSAPI error returned from the o If the key exchange fails due to a GSSAPI error returned from the
client's call to GSS_Init_sec_context, and an "error token" is client's call to GSS_Init_sec_context, and an "error token" is
also returned, then the client SHOULD send the error token to the also returned, then the client SHOULD send the error token to the
server to allow completion of the GSS security exchange. server to allow completion of the GSS security exchange.
As noted in Section 9, it may be desirable under site security As noted in Section 9, it may be desirable under site security policy
policy to obscure information about the precise nature of the error; to obscure information about the precise nature of the error; thus,
thus, it is RECOMMENDED that implementations provide a method to it is RECOMMENDED that implementations provide a method to suppress
suppress these messages as a matter of policy. these messages as a matter of policy.
This is implemented with the following messages. The hash algorithm This is implemented with the following messages. The hash algorithm
for computing the exchange hash is defined by the method name, and for computing the exchange hash is defined by the method name, and is
is called HASH. The group used for Diffie-Hellman key exchange and called HASH. The group used for Diffie-Hellman key exchange and the
the underlying GSSAPI mechanism are also defined by the method name. underlying GSSAPI mechanism are also defined by the method name.
After the client's first call to GSS_Init_sec_context, it sends the After the client's first call to GSS_Init_sec_context, it sends the
following: following:
byte SSH_MSG_KEXGSS_INIT byte SSH_MSG_KEXGSS_INIT
string output_token (from GSS_Init_sec_context) string output_token (from GSS_Init_sec_context)
mpint e mpint e
Upon receiving the SSH_MSG_KEXGSS_INIT message, the server MAY send Upon receiving the SSH_MSG_KEXGSS_INIT message, the server MAY send
the following message, prior to any other messages, to inform the the following message, prior to any other messages, to inform the
client of its host key. client of its host key.
byte SSH_MSG_KEXGSS_HOSTKEY byte SSH_MSG_KEXGSS_HOSTKEY
string server public host key and certificates (K_S) string server public host key and certificates (K_S)
Since this key exchange method does not require the host key to be Since this key exchange method does not require the host key to be
used for any encryption operations, this message is OPTIONAL. If used for any encryption operations, this message is OPTIONAL. If the
the "null" host key algorithm described in Section 5 is used, this "null" host key algorithm described in Section 5 is used, this
message MUST NOT be sent. If this message is sent, the server message MUST NOT be sent. If this message is sent, the server public
public host key(s) and/or certificate(s) in this message are encoded host key(s) and/or certificate(s) in this message are encoded as a
as a single string, in the format specified by the public key type single string, in the format specified by the public key type in use
in use (see [SSH-TRANSPORT], section 4.6). (see [SSH-TRANSPORT], section 6.6).
In traditional SSH deployments, host keys are normally expected to
change infrequently, and there is often no mechanism for validating
host keys not already known to the client. As a result, the use of a
new host key by an already-known host is usually considered an
indication of a possible man-in-the-middle attack, and clients often
present strong warnings and/or abort the connection in such cases.
By contrast, when GSSAPI-based key exchange is used, host keys sent
via the SSH_MSG_KEXGSS_HOSTKEY message are authenticated as part of
the GSSAPI key exchange, even when previously unknown to the client.
Further, in environements in which GSSAPI-based key exchange is used
heavily, it is possible and even likely that host keys will change
much more frequently and/or without advance warning.
Therefore, when a new key for an already-known host is received via
the SSH_MSG_KEXGSS_HOSTKEY message, clients SHOULD NOT issue strong
warnings or abort the connection, provided the GSSAPI-based key
exchange succeeds.
In order to facilitate key re-exchange after the user's GSSAPI
credentials have expired, client implementations SHOULD store host
keys received via SSH_MSG_KEXGSS_HOSTKEY for the duration of the
session, even when such keys are not stored for long-term use.
Each time the server's call to GSS_Accept_sec_context returns a Each time the server's call to GSS_Accept_sec_context returns a
major_status code of GSS_S_CONTINUE_NEEDED, it sends the following major_status code of GSS_S_CONTINUE_NEEDED, it sends the following
reply to the client: reply to the client:
byte SSH_MSG_KEXGSS_CONTINUE byte SSH_MSG_KEXGSS_CONTINUE
string output_token (from GSS_Accept_sec_context) string output_token (from GSS_Accept_sec_context)
If the client receives this message after a call to If the client receives this message after a call to
GSS_Init_sec_context has returned a major_status code of GSS_Init_sec_context has returned a major_status code of
GSS_S_COMPLETE, a protocol error has occurred and the key exchange GSS_S_COMPLETE, a protocol error has occurred and the key exchange
MUST fail. MUST fail.
Each time the client receives the message described above, it makes Each time the client receives the message described above, it makes
another call to GSS_Init_sec_context. It then sends the following: another call to GSS_Init_sec_context. It then sends the following:
byte SSH_MSG_KEXGSS_CONTINUE byte SSH_MSG_KEXGSS_CONTINUE
string output_token (from GSS_Init_sec_context) string output_token (from GSS_Init_sec_context)
The server and client continue to trade these two messages as long
as the server's calls to GSS_Accept_sec_context result in The server and client continue to trade these two messages as long as
major_status codes of GSS_S_CONTINUE_NEEDED. When a call results in the server's calls to GSS_Accept_sec_context result in major_status
a major_status code of GSS_S_COMPLETE, it sends one of two final codes of GSS_S_CONTINUE_NEEDED. When a call results in a
major_status code of GSS_S_COMPLETE, it sends one of two final
messages. messages.
If the server's final call to GSS_Accept_sec_context (resulting in a If the server's final call to GSS_Accept_sec_context (resulting in a
major_status code of GSS_S_COMPLETE) returns a non-zero-length token major_status code of GSS_S_COMPLETE) returns a non-zero-length token
to be sent to the client, it sends the following: to be sent to the client, it sends the following:
byte SSH_MSG_KEXGSS_COMPLETE byte SSH_MSG_KEXGSS_COMPLETE
mpint f mpint f
string per_msg_token (MIC of H) string per_msg_token (MIC of H)
boolean TRUE boolean TRUE
skipping to change at page 10, line 5 skipping to change at page 10, line 34
byte SSH_MSG_KEXGSS_CONTINUE byte SSH_MSG_KEXGSS_CONTINUE
string error_token string error_token
If a server sends both this message and an SSH_MSG_KEXGSS_ERROR If a server sends both this message and an SSH_MSG_KEXGSS_ERROR
message, the SSH_MSG_KEXGSS_ERROR message MUST be sent first, to message, the SSH_MSG_KEXGSS_ERROR message MUST be sent first, to
allow clients to record and/or display the error information before allow clients to record and/or display the error information before
processing the error token. This is important because a client processing the error token. This is important because a client
processing an error token will likely disconnect without reading any processing an error token will likely disconnect without reading any
further messages. further messages.
In the event of a GSSAPI error on the server, the server MAY send In the event of a GSSAPI error on the server, the server MAY send the
the following message before terminating the connection: following message before terminating the connection:
byte SSH_MSG_KEXGSS_ERROR byte SSH_MSG_KEXGSS_ERROR
uint32 major_status uint32 major_status
uint32 minor_status uint32 minor_status
string message string message
string language tag string language tag
The message text MUST be encoded in the UTF-8 encoding described in The message text MUST be encoded in the UTF-8 encoding described in
[UTF8]. Language tags are those described in [LANGTAG]. Note that [UTF8]. Language tags are those described in [LANGTAG]. Note that
the message text may contain multiple lines separated by carriage the message text may contain multiple lines separated by carriage
return-line feed (CRLF) sequences. Application developers should return-line feed (CRLF) sequences. Application developers should
take this into account when displaying these messages. take this into account when displaying these messages.
The hash H is computed as the HASH hash of the concatenation of the The hash H is computed as the HASH hash of the concatenation of the
following: following:
string V_C, the client's version string (CR and NL excluded) string V_C, the client's version string (CR, NL excluded)
string V_S, the server's version string (CR and NL excluded) string V_S, the server's version string (CR, NL excluded)
string I_C, the payload of the client's SSH_MSG_KEXINIT string I_C, the payload of the client's SSH_MSG_KEXINIT
string I_S, the payload of the server's SSH_MSG_KEXINIT string I_S, the payload of the server's SSH_MSG_KEXINIT
string K_S, the host key string K_S, the host key
mpint e, exchange value sent by the client mpint e, exchange value sent by the client
mpint f, exchange value sent by the server mpint f, exchange value sent by the server
mpint K, the shared secret mpint K, the shared secret
This value is called the exchange hash, and it is used to This value is called the exchange hash, and it is used to
authenticate the key exchange. The exchange hash SHOULD be kept authenticate the key exchange. The exchange hash SHOULD be kept
secret. If no SSH_MSG_KEXGSS_HOSTKEY message has been sent by the secret. If no SSH_MSG_KEXGSS_HOSTKEY message has been sent by the
server or received by the client, then the empty string is used in server or received by the client, then the empty string is used in
place of K_S when computing the exchange hash. place of K_S when computing the exchange hash.
The GSS_GetMIC call MUST be applied over H, not the original data. The GSS_GetMIC call MUST be applied over H, not the original data.
2.2 Group Exchange 2.2 Group Exchange
This section describes a modification to the generic GSSAPI This section describes a modification to the generic GSSAPI
authenticated Diffie-Hellman key exchange to allow the negotiation authenticated Diffie-Hellman key exchange to allow the negotiation of
of the group to be used, using a method based on that described in the group to be used, using a method based on that described in
[GROUP-EXCHANGE]. [GROUP-EXCHANGE].
The server keeps a list of safe primes and corresponding generators The server keeps a list of safe primes and corresponding generators
that it can select from. These are chosen as described in section 5 that it can select from. These are chosen as described in section 5
of [GROUP-EXCHANGE]. The client requests a modulus from the server, of [GROUP-EXCHANGE]. The client requests a modulus from the server,
indicating the minimum, maximum, and preferred sizes; the server indicating the minimum, maximum, and preferred sizes; the server
responds with a suitable modulus and generator. The exchange then responds with a suitable modulus and generator. The exchange then
proceeds as described in Section 2.1 above. proceeds as described in Section 2.1 above.
This description uses the following symbols, in addition to those This description uses the following symbols, in addition to those
defined above: defined above:
o n is the size of the modulus p in bits that the client would like o n is the size of the modulus p in bits that the client would like
to receive from the server to receive from the server
o min and max are the minimal and maximal sizes of p in bits that o min and max are the minimal and maximal sizes of p in bits that
are acceptable to the client are acceptable to the client
1. C sends "min || n || max" to S, indicating the minimal 1. C sends "min || n || max" to S, indicating the minimal acceptable
acceptable group size, the preferred size of the group, and the group size, the preferred size of the group, and the maximal
maximal group size in bits the client will accept. group size in bits the client will accept.
2. S finds a group that best matches the client's request, and 2. S finds a group that best matches the client's request, and sends
sends "p || g" to C. "p || g" to C.
3. The exchange proceeds as described in Section 2.1 above, 3. The exchange proceeds as described in Section 2.1 above,
beginning with step 1, except that the exchange hash is computed beginning with step 1, except that the exchange hash is computed
as described below. as described below.
Servers and clients SHOULD support gorups with a modulus length of k Servers and clients SHOULD support gorups with a modulus length of k
bits, where 1024 <= k <= 8192. The recommended values for min and bits, where 1024 <= k <= 8192. The recommended values for min and
max are 1024 and 8192, respectively. max are 1024 and 8192, respectively.
This is implemented using the following messages, in addition to This is implemented using the following messages, in addition to
those described above: those described above:
First, the client sends: First, the client sends:
byte SSH_MSG_KEXGSS_GROUPREQ byte SSH_MSG_KEXGSS_GROUPREQ
uint32 min, minimal size in bits of an acceptable group uint32 min, minimal size in bits of an acceptable group
uint32 n, preferred size in bits of the group the server should send uint32 n, preferred size in bits of the group the server
should send
uint32 max, maximal size in bits of an acceptable group uint32 max, maximal size in bits of an acceptable group
The server responds with: The server responds with:
byte SSH_MSG_KEXGSS_GROUP byte SSH_MSG_KEXGSS_GROUP
mpint p, safe prime mpint p, safe prime
mpint g, generator for subgroup in GF(p) mpint g, generator for subgroup in GF(p)
This is followed by the message exchange described above in Section
2.1, except that the exchange hash H is computed as the HASH hash of
the concatenation of the following:
string V_C, the client's version string (CR and NL excluded) This is followed by the message exchange described above in
string V_S, the server's version string (CR and NL excluded) Section 2.1, except that the exchange hash H is computed as the HASH
hash of the concatenation of the following:
string V_C, the client's version string (CR, NL excluded)
string V_S, the server's version string (CR, NL excluded)
string I_C, the payload of the client's SSH_MSG_KEXINIT string I_C, the payload of the client's SSH_MSG_KEXINIT
string I_S, the payload of the server's SSH_MSG_KEXINIT string I_S, the payload of the server's SSH_MSG_KEXINIT
string K_S, the host key string K_S, the host key
uint32 min, minimal size in bits of an acceptable group uint32 min, minimal size in bits of an acceptable group
uint32 n, preferred size in bits of the group the server should send uint32 n, preferred size in bits of the group the server
should send
uint32 max, maximal size in bits of an acceptable group uint32 max, maximal size in bits of an acceptable group
mpint p, safe prime mpint p, safe prime
mpint g, generator for subgroup in GF(p) mpint g, generator for subgroup in GF(p)
mpint e, exchange value sent by the client mpint e, exchange value sent by the client
mpint f, exchange value sent by the server mpint f, exchange value sent by the server
mpint K, the shared secret mpint K, the shared secret
2.3 gss-group1-sha1-* 2.3 gss-group1-sha1-*
Each of these methods specifies GSSAPI authenticated Diffie-Hellman Each of these methods specifies GSSAPI authenticated Diffie-Hellman
key exchange as described in Section 2.1 with SHA-1 as HASH, and the key exchange as described in Section 2.1 with SHA-1 as HASH, and the
group defined in section 6.1 of [SSH-TRANSPORT]. The method name group defined in section 8.1 of [SSH-TRANSPORT]. The method name for
for each method is the concatenation of the string each method is the concatenation of the string "gss-group1-sha1-"
"gss-group1-sha1-" with the Base64 encoding of the MD5 hash [MD5] of with the Base64 encoding of the MD5 hash [MD5] of the ASN.1 DER
the ASN.1 DER encoding [ASN1] of the underlying GSSAPI mechanism's encoding [ASN1] of the underlying GSSAPI mechanism's OID. Base64
OID. Base64 encoding is described in section 6.8 of [MIME]. encoding is described in section 6.8 of [MIME].
Each and every such key exchange method is implicitly registered by Each and every such key exchange method is implicitly registered by
this specification. The IESG is considered to be the owner of all this specification. The IESG is considered to be the owner of all
such key exchange methods; this does NOT imply that the IESG is such key exchange methods; this does NOT imply that the IESG is
considered to be the owner of the underlying GSSAPI mechanism. considered to be the owner of the underlying GSSAPI mechanism.
2.4 gss-gex-sha1-* 2.4 gss-group14-sha1-*
Each of these methods specifies GSSAPI authenticated Diffie-Hellman
key exchange as described in Section 2.1 with SHA-1 as HASH, and the
group defined in section 8.2 of [SSH-TRANSPORT]. The method name for
each method is the concatenation of the string "gss-group14-sha1-"
with the Base64 encoding of the MD5 hash [MD5] of the ASN.1 DER
encoding [ASN1] of the underlying GSSAPI mechanism's OID. Base64
encoding is described in section 6.8 of [MIME].
Each and every such key exchange method is implicitly registered by
this specification. The IESG is considered to be the owner of all
such key exchange methods; this does NOT imply that the IESG is
considered to be the owner of the underlying GSSAPI mechanism.
2.5 gss-gex-sha1-*
Each of these methods specifies GSSAPI authenticated Diffie-Hellman Each of these methods specifies GSSAPI authenticated Diffie-Hellman
key exchange as described in Section 2.2 with SHA-1 as HASH. The key exchange as described in Section 2.2 with SHA-1 as HASH. The
method name for each method is the concatenation of the string method name for each method is the concatenation of the string "gss-
"gss-gex-sha1-" with the Base64 encoding of the MD5 hash [MD5] of gex-sha1-" with the Base64 encoding of the MD5 hash [MD5] of the
the ASN.1 DER encoding [ASN1] of the underlying GSSAPI mechanism's ASN.1 DER encoding [ASN1] of the underlying GSSAPI mechanism's OID.
OID. Base64 encoding is described in section 6.8 of [MIME]. Base64 encoding is described in section 6.8 of [MIME].
Each and every such key exchange method is implicitly registered by Each and every such key exchange method is implicitly registered by
this specification. The IESG is considered to be the owner of all this specification. The IESG is considered to be the owner of all
such key exchange methods; this does NOT imply that the IESG is such key exchange methods; this does NOT imply that the IESG is
considered to be the owner of the underlying GSSAPI mechanism. considered to be the owner of the underlying GSSAPI mechanism.
2.5 Other GSSAPI key exchange methods 2.6 Other GSSAPI key exchange methods
Key exchange method names starting with "gss-" are reserved for key Key exchange method names starting with "gss-" are reserved for key
exchange methods which conform to this document; in particular, for exchange methods which conform to this document; in particular, for
those methods which use the GSSAPI authenticated Diffie-Hellman key those methods which use the GSSAPI authenticated Diffie-Hellman key
exchange algorithm described in Section 2.1, including any future exchange algorithm described in Section 2.1, including any future
methods which use different groups and/or hash functions. The methods which use different groups and/or hash functions. The intent
intent is that the names for any such future methods methods be is that the names for any such future methods methods be defined in a
defined in a similar manner to that used in Section 2.3. similar manner to that used in Section 2.3.
3. GSSAPI User Authentication 3. GSSAPI User Authentication
This section describes a general-purpose user authentication method This section describes a general-purpose user authentication method
based on [GSSAPI]. It is intended to be run over the SSH user based on [GSSAPI]. It is intended to be run over the SSH user
authentication protocol [SSH-USERAUTH]. authentication protocol [SSH-USERAUTH].
The authentication method name for this protocol is The authentication method name for this protocol is "gssapi-with-
"gssapi-with-mic". mic".
3.1 GSSAPI Authentication Overview 3.1 GSSAPI Authentication Overview
GSSAPI authentication must maintain a context. Authentication GSSAPI authentication must maintain a context. Authentication begins
begins when the client sends a SSH_MSG_USERAUTH_REQUEST, which when the client sends a SSH_MSG_USERAUTH_REQUEST, which specifies the
specifies the mechanism OIDs the client supports. mechanism OIDs the client supports.
If the server supports any of the requested mechanism OIDs, the If the server supports any of the requested mechanism OIDs, the
server sends a SSH_MSG_USERAUTH_GSSAPI_RESPONSE message containing server sends a SSH_MSG_USERAUTH_GSSAPI_RESPONSE message containing
the mechanism OID. the mechanism OID.
After the client receives SSH_MSG_USERAUTH_GSSAPI_RESPONSE, the After the client receives SSH_MSG_USERAUTH_GSSAPI_RESPONSE, the
client and server exchange SSH_MSG_USERAUTH_GSSAPI_TOKEN packets client and server exchange SSH_MSG_USERAUTH_GSSAPI_TOKEN packets
until the authentication mechanism either succeeds or fails. until the authentication mechanism either succeeds or fails.
If at any time during the exchange, the client sends a new If at any time during the exchange, the client sends a new
SSH_MSG_USERAUTH_REQUEST packet, the GSSAPI context is completely SSH_MSG_USERAUTH_REQUEST packet, the GSSAPI context is completely
discarded and destroyed, and any further GSSAPI authentication MUST discarded and destroyed, and any further GSSAPI authentication MUST
restart from the beginning. restart from the beginning.
3.2 Initiating GSSAPI authentication 3.2 Initiating GSSAPI authentication
The GSSAPI authentication method is initiated when the client sends The GSSAPI authentication method is initiated when the client sends a
a SSH_MSG_USERAUTH_REQUEST: SSH_MSG_USERAUTH_REQUEST:
byte SSH_MSG_USERAUTH_REQUEST byte SSH_MSG_USERAUTH_REQUEST
string user name (in ISO-10646 UTF-8 encoding) string user name (in ISO-10646 UTF-8 encoding)
string service name (in US-ASCII) string service name (in US-ASCII)
string "gssapi-with-mic" (US-ASCII method name) string "gssapi-with-mic" (US-ASCII method name)
uint32 n, the number of mechanism OIDs client supports uint32 n, the number of mechanism OIDs client supports
string[n] mechanism OIDs string[n] mechanism OIDs
Mechanism OIDs are encoded according to the ASN.1 distinguished Mechanism OIDs are encoded according to the ASN.1 distinguished
encoding rules (DER), as described in [ASN1] and in section 3.1 of encoding rules (DER), as described in [ASN1] and in section 3.1 of
[GSSAPI]. The mechanism OIDs MUST be listed in order of preference, [GSSAPI]. The mechanism OIDs MUST be listed in order of preference,
and the server must choose the first mechanism OID on the list that and the server must choose the first mechanism OID on the list that
it supports. it supports.
The client SHOULD send GSSAPI mechanism OID's only for mechanisms The client SHOULD send GSSAPI mechanism OID's only for mechanisms
which are of the same priority, compared to non-GSSAPI which are of the same priority, compared to non-GSSAPI authentication
authentication methods. Otherwise, authentication methods may be methods. Otherwise, authentication methods may be executed out of
executed out of order. Thus, the client could first send a order. Thus, the client could first send a SSH_MSG_USERAUTH_REQUEST
SSH_MSG_USERAUTH_REQUEST for one GSSAPI mechanism, then try public for one GSSAPI mechanism, then try public key authentication, and
key authentication, and then try another GSSAPI mechanism. then try another GSSAPI mechanism.
If the server does not support any of the specified OIDs, the server If the server does not support any of the specified OIDs, the server
MUST fail the request by sending a SSH_MSG_USERAUTH_FAILURE packet. MUST fail the request by sending a SSH_MSG_USERAUTH_FAILURE packet.
The user name may be an empty string if it can be deduced from the The user name may be an empty string if it can be deduced from the
results of the GSSAPI authentication. If the user name is not results of the GSSAPI authentication. If the user name is not empty,
empty, and the requested user does not exist, the server MAY and the requested user does not exist, the server MAY disconnect, or
disconnect, or MAY send a bogus list of acceptable authentications MAY send a bogus list of acceptable authentications but never accept
but never accept any. This makes it possible for the server to any. This makes it possible for the server to avoid disclosing
avoid disclosing information about which accounts exist. In any information about which accounts exist. In any case, if the user
case, if the user does not exist, the authentication request MUST does not exist, the authentication request MUST NOT be accepted.
NOT be accepted.
The client MAY at any time continue with a new The client MAY at any time continue with a new
SSH_MSG_USERAUTH_REQUEST message, in which case the server MUST SSH_MSG_USERAUTH_REQUEST message, in which case the server MUST
abandon the previous authentication attempt and continue with the abandon the previous authentication attempt and continue with the new
new one. one.
3.3 Initial server response 3.3 Initial server response
The server responds to the SSH_MSG_USERAUTH_REQUEST with either a The server responds to the SSH_MSG_USERAUTH_REQUEST with either a
SSH_MSG_USERAUTH_FAILURE if none of the mechanisms are supported, or SSH_MSG_USERAUTH_FAILURE if none of the mechanisms are supported, or
with SSH_MSG_USERAUTH_GSSAPI_RESPONSE as follows: with SSH_MSG_USERAUTH_GSSAPI_RESPONSE as follows:
byte SSH_MSG_USERAUTH_GSSAPI_RESPONSE byte SSH_MSG_USERAUTH_GSSAPI_RESPONSE
string selected mechanism OID string selected mechanism OID
skipping to change at page 16, line 13 skipping to change at page 17, line 14
packet. If an error occurs on client side, the client can terminate packet. If an error occurs on client side, the client can terminate
the method by sending a new SSH_MSG_USERAUTH_REQUEST packet. the method by sending a new SSH_MSG_USERAUTH_REQUEST packet.
When calling GSS_Init_sec_context(), the client MUST set the the When calling GSS_Init_sec_context(), the client MUST set the the
integ_req_flag to "true" to request that per-message integrity integ_req_flag to "true" to request that per-message integrity
protection be supported for this context. In addition, the protection be supported for this context. In addition, the
deleg_req_flag MAY be set to "true" to request access delegation, if deleg_req_flag MAY be set to "true" to request access delegation, if
requested by the user. requested by the user.
Since the user authentication process by its nature authenticates Since the user authentication process by its nature authenticates
only the client, the setting of the mutual_req_flag is not needed only the client, the setting of the mutual_req_flag is not needed for
for this process. This flag SHOULD be set to "false". this process. This flag SHOULD be set to "false".
Since the user authentication process will involve the exchange of Since the user authentication process will involve the exchange of
only a single token once the context has been established, it is not only a single token once the context has been established, it is not
necessary that the context support detection of replayed or necessary that the context support detection of replayed or out-of-
out-of-sequence tokens. Thus, the setting of the sequence tokens. Thus, the setting of the replay_det_req_flag and
replay_det_req_flag and sequence_req_flag are not needed for this sequence_req_flag are not needed for this process. These flags
process. These flags SHOULD be set to "false". SHOULD be set to "false".
Additional SSH_MSG_USERAUTH_GSSAPI_TOKEN messages are sent if and Additional SSH_MSG_USERAUTH_GSSAPI_TOKEN messages are sent if and
only if the calls to the GSSAPI routines produce send tokens of only if the calls to the GSSAPI routines produce send tokens of non-
non-zero length. zero length.
Any major status code other than GSS_S_COMPLETE or Any major status code other than GSS_S_COMPLETE or
GSS_S_CONTINUE_NEEDED SHOULD be a failure. GSS_S_CONTINUE_NEEDED SHOULD be a failure.
3.5 Binding Encryption Keys 3.5 Binding Encryption Keys
In some cases, it is possible to obtain improved security by In some cases, it is possible to obtain improved security by allowing
allowing access only if the client sends a valid message integrity access only if the client sends a valid message integrity code (MIC)
code (MIC) binding the GSSAPI context to the keys used for binding the GSSAPI context to the keys used for encryption and
encryption and integrity protection of the SSH session. With this integrity protection of the SSH session. With this extra level of
extra level of protection, a "man-in-the-middle" attacker who has protection, a "man-in-the-middle" attacker who has convinced a client
convinced a client of his authenticity cannot then relay user of his authenticity cannot then relay user authentication messages
authentication messages between the real client and server, thus between the real client and server, thus gaining access to the real
gaining access to the real server. This additional protection is server. This additional protection is available when the negotiated
available when the negotiated GSSAPI context supports per-message GSSAPI context supports per-message integrity protection, as
integrity protection, as indicated by the setting of the integ_avail indicated by the setting of the integ_avail flag on successful return
flag on successful return from GSS_Init_sec_context() or from GSS_Init_sec_context() or GSS_Accept_sec_context().
GSS_Accept_sec_context().
When the client's call to GSS_Init_sec_context() returns When the client's call to GSS_Init_sec_context() returns
GSS_S_COMPLETE with the integ_avail flag set, the client MUST GSS_S_COMPLETE with the integ_avail flag set, the client MUST
conclude the user authentication exchange by sending the following conclude the user authentication exchange by sending the following
message: message:
byte SSH_MSG_USERAUTH_GSSAPI_MIC byte SSH_MSG_USERAUTH_GSSAPI_MIC
string MIC string MIC
This message MUST be sent only if GSS_Init_sec_context() returned This message MUST be sent only if GSS_Init_sec_context() returned
GSS_S_COMPLETE. If a token is also returned then the GSS_S_COMPLETE. If a token is also returned then the
SSH_MSG_USERAUTH_GSSAPI_TOKEN message MUST be sent before this one. SSH_MSG_USERAUTH_GSSAPI_TOKEN message MUST be sent before this one.
The contents of the MIC field are obtained by calling GSS_GetMIC The contents of the MIC field are obtained by calling GSS_GetMIC over
over the following, using the GSSAPI context which was just the following, using the GSSAPI context which was just established:
established:
string session identifier string session identifier
byte SSH_MSG_USERAUTH_REQUEST byte SSH_MSG_USERAUTH_REQUEST
string user name string user name
string service string service
string "gssapi-with-mic" string "gssapi-with-mic"
If this message is received by the server before the GSSAPI context If this message is received by the server before the GSSAPI context
is fully established, the server MUST fail the authentication. is fully established, the server MUST fail the authentication.
If this message is received by the server when the negotiated GSSAPI If this message is received by the server when the negotiated GSSAPI
context does not support per-message integrity protection, the context does not support per-message integrity protection, the server
server MUST fail the authentication. MUST fail the authentication.
3.6 Client acknowledgement 3.6 Client acknowledgement
Some servers may wish to permit user authentication to proceed even Some servers may wish to permit user authentication to proceed even
when the negotitated GSSAPI context does not support per-message when the negotitated GSSAPI context does not support per-message
integrity protection. In such cases, it is possible for the server integrity protection. In such cases, it is possible for the server
to successfully complete the GSSAPI method, while the client's last to successfully complete the GSSAPI method, while the client's last
call to GSS_Init_sec_context fails. If the server simply assumed call to GSS_Init_sec_context fails. If the server simply assumed
success on the part of the client and completed the authentication success on the part of the client and completed the authentication
service, it is possible that the client would fail to complete the service, it is possible that the client would fail to complete the
authentication method, but not be able to retry other methods authentication method, but not be able to retry other methods because
because the server had already moved on. To protect against this, a the server had already moved on. To protect against this, a final
final message is sent by the client to indicate it has completed message is sent by the client to indicate it has completed
authentication. authentication.
When the client's call to GSS_Init_sec_context() returns When the client's call to GSS_Init_sec_context() returns
GSS_S_COMPLETE with the integ_avail flag not set, the client MUST GSS_S_COMPLETE with the integ_avail flag not set, the client MUST
conclude the user authentication exchange by sending the following conclude the user authentication exchange by sending the following
message: message:
byte SSH_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE byte SSH_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE
This message MUST be sent only if GSS_Init_sec_context() returned This message MUST be sent only if GSS_Init_sec_context() returned
GSS_S_COMPLETE. If a token is also returned then the GSS_S_COMPLETE. If a token is also returned then the
SSH_MSG_USERAUTH_GSSAPI_TOKEN message MUST be sent before this one. SSH_MSG_USERAUTH_GSSAPI_TOKEN message MUST be sent before this one.
If this message is received by the server before the GSSAPI context If this message is received by the server before the GSSAPI context
is fully established, the server MUST fail the authentication. is fully established, the server MUST fail the authentication.
If this message is received by the server when the negotiated GSSAPI If this message is received by the server when the negotiated GSSAPI
context supports per-message integrity protection, the server MUST context supports per-message integrity protection, the server MUST
fail the authentication. fail the authentication.
It is a site policy descision for the server whether or not to It is a site policy descision for the server whether or not to permit
permit authentication using GSSAPI mechanisms and/or contexts which authentication using GSSAPI mechanisms and/or contexts which do not
do not support per-message integrity protection. The server MAY support per-message integrity protection. The server MAY fail the
fail the otherwise valid gssapi-with-mic authentication if otherwise valid gssapi-with-mic authentication if per-message
per-message integrity protection is not supported. integrity protection is not supported.
3.7 Completion 3.7 Completion
As with all SSH authentication methods, successful completion is As with all SSH authentication methods, successful completion is
indicated by a SSH_MSG_USERAUTH_SUCCESS if no other authentication indicated by a SSH_MSG_USERAUTH_SUCCESS if no other authentication is
is required, or a SSH_MSG_USERAUTH_FAILURE with the partial success required, or a SSH_MSG_USERAUTH_FAILURE with the partial success flag
flag set if the server requires further authentication. This packet set if the server requires further authentication. This packet
should be sent immediately following receipt of the the should be sent immediately following receipt of the the
SSH_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE packet. SSH_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE packet.
3.8 Error Status 3.8 Error Status
In the event a GSSAPI error occurs on the server during context In the event a GSSAPI error occurs on the server during context
establishment, the server MAY send the following message to inform establishment, the server MAY send the following message to inform
the client of the details of the error before sending a the client of the details of the error before sending a
SSH_MSG_USERAUTH_FAILURE message: SSH_MSG_USERAUTH_FAILURE message:
skipping to change at page 18, line 44 skipping to change at page 19, line 44
string message string message
string language tag string language tag
The message text MUST be encoded in the UTF-8 encoding described in The message text MUST be encoded in the UTF-8 encoding described in
[UTF8]. Language tags are those described in [LANGTAG]. Note that [UTF8]. Language tags are those described in [LANGTAG]. Note that
the message text may contain multiple lines separated by carriage the message text may contain multiple lines separated by carriage
return-line feed (CRLF) sequences. Application developers should return-line feed (CRLF) sequences. Application developers should
take this into account when displaying these messages. take this into account when displaying these messages.
Clients receiving this message MAY log the error details and/or Clients receiving this message MAY log the error details and/or
report them to the user. Any server sending this message MUST report them to the user. Any server sending this message MUST ignore
ignore any SSH_MSG_UNIMPLEMENTED sent by the client in response. any SSH_MSG_UNIMPLEMENTED sent by the client in response.
3.9 Error Token 3.9 Error Token
In the event that, during context establishment, a client's call to In the event that, during context establishment, a client's call to
GSS_Init_sec_context or a server's call to GSS_Accept_sec_context GSS_Init_sec_context or a server's call to GSS_Accept_sec_context
returns a token along with an error status, the resulting "error returns a token along with an error status, the resulting "error
token" SHOULD be sent to the peer using the following message: token" SHOULD be sent to the peer using the following message:
byte SSH_MSG_USERAUTH_GSSAPI_ERRTOK byte SSH_MSG_USERAUTH_GSSAPI_ERRTOK
string error token string error token
This message implies that the authentication is about to fail, and This message implies that the authentication is about to fail, and is
is defined to allow the error token to be communicated without defined to allow the error token to be communicated without losing
losing synchronization. synchronization.
When a server sends this message, it MUST be followed by a When a server sends this message, it MUST be followed by a
SSH_MSG_USERAUTH_FAILURE message, which is to be interpreted as SSH_MSG_USERAUTH_FAILURE message, which is to be interpreted as
applying to the same authentication request. A client receiving applying to the same authentication request. A client receiving this
this message SHOULD wait for the following SSH_MSG_USERAUTH_FAILURE message SHOULD wait for the following SSH_MSG_USERAUTH_FAILURE
message before beginning another authentication attempt. message before beginning another authentication attempt.
When a client sends this message, it MUST be followed by a new When a client sends this message, it MUST be followed by a new
authentication request or by terminating the connection. A server authentication request or by terminating the connection. A server
receiving this message MUST NOT send a SSH_MSG_USERAUTH_FAILURE in receiving this message MUST NOT send a SSH_MSG_USERAUTH_FAILURE in
reply, since such a message might otherwise be interpreted by a reply, since such a message might otherwise be interpreted by a
client as a response to the following authentication sequence. client as a response to the following authentication sequence.
Any server sending this message MUST ignore any Any server sending this message MUST ignore any SSH_MSG_UNIMPLEMENTED
SSH_MSG_UNIMPLEMENTED sent by the client in response. If a server sent by the client in response. If a server sends both this message
sends both this message and an SSH_MSG_USERAUTH_GSSAPI_ERROR and an SSH_MSG_USERAUTH_GSSAPI_ERROR message, the
message, the SSH_MSG_USERAUTH_GSSAPI_ERROR message MUST be sent SSH_MSG_USERAUTH_GSSAPI_ERROR message MUST be sent first, to allow
first, to allow the client to store and/or display the error status the client to store and/or display the error status before processing
before processing the error token. the error token.
4. Authentication using GSSAPI Key Exchange 4. Authentication using GSSAPI Key Exchange
This section describes a user authentication method building on the This section describes a user authentication method building on the
framework described in [SSH-USERAUTH]. This method performs user framework described in [SSH-USERAUTH]. This method performs user
authentication by making use of an existing GSSAPI context authentication by making use of an existing GSSAPI context
established during key exchange. established during key exchange.
The authentication method name for this protocol is "gssapi-keyex". The authentication method name for this protocol is "gssapi-keyex".
This method may be used only if the initial key exchange was This method may be used only if the initial key exchange was
performed using a GSSAPI-based key exchange method defined in performed using a GSSAPI-based key exchange method defined in
accordance with Section 2. The GSSAPI context used with this method accordance with Section 2. The GSSAPI context used with this method
is always that established during an initial GSSAPI-based key is always that established during an initial GSSAPI-based key
exchange. Any context established during key exchange for the exchange. Any context established during key exchange for the
purpose of rekeying MUST NOT be used with this method. purpose of rekeying MUST NOT be used with this method.
The server SHOULD include this user authentication method in the The server SHOULD include this user authentication method in the list
list of methods that can continue (in a SSH_MSG_USERAUTH_FAILURE) if of methods that can continue (in a SSH_MSG_USERAUTH_FAILURE) if the
the initial key exchange was performed using a GSSAPI-based key initial key exchange was performed using a GSSAPI-based key exchange
exchange method and provides information about the user's identity method and provides information about the user's identity which is
which is useful to the server. It MUST NOT include this method if useful to the server. It MUST NOT include this method if the initial
the initial key exchange was not performed using a GSSAPI-based key key exchange was not performed using a GSSAPI-based key exchange
exchange method defined in accordance with Section 2. method defined in accordance with Section 2.
The client SHOULD attempt to use this method if it is advertised by The client SHOULD attempt to use this method if it is advertised by
the server, initial key exchange was performed using a GSSAPI-based the server, initial key exchange was performed using a GSSAPI-based
key exchange method, and this method has already been tried. The key exchange method, and this method has already been tried. The
client SHOULD NOT try this method more than once per session. It client SHOULD NOT try this method more than once per session. It
MUST NOT try this method if initial key exchange was not performed MUST NOT try this method if initial key exchange was not performed
using a GSSAPI-based key exchange method defined in accordance with using a GSSAPI-based key exchange method defined in accordance with
Section 2. Section 2.
If a server receives a request for this method when initial key If a server receives a request for this method when initial key
skipping to change at page 21, line 4 skipping to change at page 22, line 4
defined in accordance with Section 2, it MUST return defined in accordance with Section 2, it MUST return
SSH_MSG_USERAUTH_FAILURE. SSH_MSG_USERAUTH_FAILURE.
This method is defined as a single message: This method is defined as a single message:
byte SSH_MSG_USERAUTH_REQUEST byte SSH_MSG_USERAUTH_REQUEST
string user name string user name
string service string service
string "gssapi-keyex" string "gssapi-keyex"
string MIC string MIC
The contents of the MIC field are obtained by calling GSS_GetMIC The contents of the MIC field are obtained by calling GSS_GetMIC over
over the following, using the GSSAPI context which was established the following, using the GSSAPI context which was established during
during initial key exchange: initial key exchange:
string session identifier string session identifier
byte SSH_MSG_USERAUTH_REQUEST byte SSH_MSG_USERAUTH_REQUEST
string user name string user name
string service string service
string "gssapi-keyex" string "gssapi-keyex"
Upon receiving this message when initial key exchange was performed Upon receiving this message when initial key exchange was performed
using a GSSAPI-based key exchange method, the server uses using a GSSAPI-based key exchange method, the server uses
GSS_VerifyMIC() to verify that the MIC received is valid. If the GSS_VerifyMIC() to verify that the MIC received is valid. If the MIC
MIC is not valid, the user authentication fails, and the server MUST is not valid, the user authentication fails, and the server MUST
return SSH_MSG_USERAUTH_FAILURE. return SSH_MSG_USERAUTH_FAILURE.
If the MIC is valid and the server is satisfied as to the user's If the MIC is valid and the server is satisfied as to the user's
credentials, it MAY return either SSH_MSG_USERAUTH_SUCCESS, or credentials, it MAY return either SSH_MSG_USERAUTH_SUCCESS, or
SSH_MSG_USERAUTH_FAILURE with the partial success flag set, SSH_MSG_USERAUTH_FAILURE with the partial success flag set, depending
depending on whether additional authentications are needed. on whether additional authentications are needed.
5. Null Host Key Algorithm 5. Null Host Key Algorithm
The "null" host key algorithm has no associated host key material, The "null" host key algorithm has no associated host key material,
and provides neither signature nor encryption algorithms. Thus, it and provides neither signature nor encryption algorithms. Thus, it
can be used only with key exchange methods that do not require any can be used only with key exchange methods that do not require any
public-key operations and do not require the use of host public key public-key operations and do not require the use of host public key
material. The key exchange methods described in section 1 of this material. The key exchange methods described in section 1 of this
document are examples of such methods. document are examples of such methods.
skipping to change at page 22, line 31 skipping to change at page 23, line 31
configuration, the server implementation supports the "ssh-dss" key configuration, the server implementation supports the "ssh-dss" key
algorithm (as required by [SSH-TRANSPORT]), but could be prohibited algorithm (as required by [SSH-TRANSPORT]), but could be prohibited
by configuration from using it. In this situation, the server needs by configuration from using it. In this situation, the server needs
some key exchange algorithm to advertise; the "null" algorithm fills some key exchange algorithm to advertise; the "null" algorithm fills
this purpose. this purpose.
Note that the use of the "null" algorithm in this way means that the Note that the use of the "null" algorithm in this way means that the
server will not be able to interoperate with clients which do not server will not be able to interoperate with clients which do not
support this algorithm. This is not a significant problem, since in support this algorithm. This is not a significant problem, since in
the configuration described, it will also be unable to interoperate the configuration described, it will also be unable to interoperate
with implementations that do not support the GSSAPI-authenticated with implementations that do not support the GSSAPI-authenticated key
key exchange and Kerberos. exchange and Kerberos.
Any implementation supporting at least one key exchange method which Any implementation supporting at least one key exchange method which
conforms to section 1 of this document MUST also support the "null" conforms to section 1 of this document MUST also support the "null"
host key algorithm. Servers MUST NOT advertise the "null" host key host key algorithm. Servers MUST NOT advertise the "null" host key
algorithm unless it is the only algorithm advertised. algorithm unless it is the only algorithm advertised.
6. Summary of Message Numbers 6. Summary of Message Numbers
The following message numbers have been defined for use with The following message numbers have been defined for use with GSSAPI-
GSSAPI-based key exchange methods: based key exchange methods:
#define SSH_MSG_KEXGSS_INIT 30 #define SSH_MSG_KEXGSS_INIT 30
#define SSH_MSG_KEXGSS_CONTINUE 31 #define SSH_MSG_KEXGSS_CONTINUE 31
#define SSH_MSG_KEXGSS_COMPLETE 32 #define SSH_MSG_KEXGSS_COMPLETE 32
#define SSH_MSG_KEXGSS_HOSTKEY 33 #define SSH_MSG_KEXGSS_HOSTKEY 33
#define SSH_MSG_KEXGSS_ERROR 34 #define SSH_MSG_KEXGSS_ERROR 34
#define SSH_MSG_KEXGSS_GROUPREQ 40 #define SSH_MSG_KEXGSS_GROUPREQ 40
#define SSH_MSG_KEXGSS_GROUP 41 #define SSH_MSG_KEXGSS_GROUP 41
The numbers 30-49 are specific to key exchange and may be redefined The numbers 30-49 are specific to key exchange and may be redefined
skipping to change at page 24, line 9 skipping to change at page 25, line 9
#define SSH_MSG_USERAUTH_GSSAPI_MIC 66 #define SSH_MSG_USERAUTH_GSSAPI_MIC 66
The numbers 60-79 are specific to user authentication and may be The numbers 60-79 are specific to user authentication and may be
redefined by other user auth methods. Note that in the method redefined by other user auth methods. Note that in the method
described in this document, message number 62 is unused. described in this document, message number 62 is unused.
7. GSSAPI Considerations 7. GSSAPI Considerations
7.1 Naming Conventions 7.1 Naming Conventions
In order to establish a GSSAPI security context, the SSH client In order to establish a GSSAPI security context, the SSH client needs
needs to determine the appropriate targ_name to use in identifying to determine the appropriate targ_name to use in identifying the
the server when calling GSS_Init_sec_context. For this purpose, the server when calling GSS_Init_sec_context. For this purpose, the
GSSAPI mechanism-independent name form for host-based services is GSSAPI mechanism-independent name form for host-based services is
used, as described in section 4.1 of [GSSAPI]. used, as described in section 4.1 of [GSSAPI].
In particular, the targ_name to pass to GSS_Init_sec_context is In particular, the targ_name to pass to GSS_Init_sec_context is
obtained by calling GSS_Import_name with an input_name_type of obtained by calling GSS_Import_name with an input_name_type of
GSS_C_NT_HOSTBASED_SERVICE, and an input_name_string consisting of GSS_C_NT_HOSTBASED_SERVICE, and an input_name_string consisting of
the string "host@" concatenated with the hostname of the SSH server. the string "host@" concatenated with the hostname of the SSH server.
7.2 Channel Bindings 7.2 Channel Bindings
This document recommends that channel bindings SHOULD NOT be This document recommends that channel bindings SHOULD NOT be
specified in the calls during context establishment. This document specified in the calls during context establishment. This document
does not specify any standard data to be used as channel bindings does not specify any standard data to be used as channel bindings and
and the use of network addresses as channel bindings may break SSH the use of network addresses as channel bindings may break SSH in
in environments where it is most useful. environments where it is most useful.
7.3 SPNEGO 7.3 SPNEGO
The use of the Simple and Protected GSS-API Negotiation Mechanism The use of the Simple and Protected GSS-API Negotiation Mechanism
[SPNEGO] in conjunction with the authentication and key exchange [SPNEGO] in conjunction with the authentication and key exchange
methods described in this document is both unnecessary and methods described in this document is both unnecessary and
undesirable. As a result, mechanisms conforming to this document undesirable. As a result, mechanisms conforming to this document
MUST NOT use SPNEGO as the underlying GSSAPI mechanism. MUST NOT use SPNEGO as the underlying GSSAPI mechanism.
Since SSH performs its own negotiation of authentication and key Since SSH performs its own negotiation of authentication and key
exchange methods, the negotiation capability of SPNEGO alone does exchange methods, the negotiation capability of SPNEGO alone does not
not provide any added benefit. In fact, as described below, it has provide any added benefit. In fact, as described below, it has the
the potential to result in the use of a weaker method than desired. potential to result in the use of a weaker method than desired.
Normally, SPNEGO provides the added benefit of protecting the GSSAPI Normally, SPNEGO provides the added benefit of protecting the GSSAPI
mechanism negotiation. It does this by having the server compute a mechanism negotiation. It does this by having the server compute a
MIC of the list of mechanisms proposed by the client, and then MIC of the list of mechanisms proposed by the client, and then
checking that value at the client. In the case of key exchange, checking that value at the client. In the case of key exchange, this
this protection is not needed because the key exchange methods protection is not needed because the key exchange methods described
described here already perform an equivalent operation; namely, they here already perform an equivalent operation; namely, they generate a
generate a MIC of the SSH exchange hash, which is a hash of several MIC of the SSH exchange hash, which is a hash of several items
items including the lists of key exchange mechanisms supported by including the lists of key exchange mechanisms supported by both
both sides. In the case of user authentication, the protection is sides. In the case of user authentication, the protection is not
not needed because the negotiation occurs over a secure channel, and needed because the negotiation occurs over a secure channel, and the
the host's identity has already been proved to the user. host's identity has already been proved to the user.
The use of SPNEGO combined with GSSAPI mechanisms used without The use of SPNEGO combined with GSSAPI mechanisms used without SPNEGO
SPNEGO can lead to interoperability problems. For example, a client can lead to interoperability problems. For example, a client which
which supports key exchange using the Kerberos V5 GSSAPI mechanism supports key exchange using the Kerberos V5 GSSAPI mechanism [KRB5-
[KRB5-GSS] only underneath SPNEGO will not interoperate with a GSS] only underneath SPNEGO will not interoperate with a server which
server which supports key exchange only using the Kerberos V5 GSSAPI supports key exchange only using the Kerberos V5 GSSAPI mechanism
mechanism directly. As a result, allowing GSSAPI mechanisms to be directly. As a result, allowing GSSAPI mechanisms to be used both
used both with and without SPNEGO is undesirable. with and without SPNEGO is undesirable.
If a client's policy is to first prefer GSSAPI-based key exchange If a client's policy is to first prefer GSSAPI-based key exchange
method X, then non-GSSAPI method Y, then GSSAPI-based method Z, and method X, then non-GSSAPI method Y, then GSSAPI-based method Z, and
if a server supports mechanisms Y and Z but not X, then an attempt if a server supports mechanisms Y and Z but not X, then an attempt to
to use SPNEGO to negotiate a GSSAPI mechanism might result in the use SPNEGO to negotiate a GSSAPI mechanism might result in the use of
use of method Z when method Y would have been preferable. As a method Z when method Y would have been preferable. As a result, the
result, the use of SPNEGO could result in the subversion of the use of SPNEGO could result in the subversion of the negotiation
negotiation algorithm for key exchange methods as described in algorithm for key exchange methods as described in section 7.1 of
section 5.1 of [SSH-TRANSPORT] and/or the negotiation algorithm for [SSH-TRANSPORT] and/or the negotiation algorithm for user
user authentication methods as described in [SSH-USERAUTH]. authentication methods as described in [SSH-USERAUTH].
8. IANA Considerations 8. IANA Considerations
Consistent with section 7 of [SSH-ARCH], this document makes the Consistent with section 8 of [SSH-ARCH] and section 4.6 of [SSH-
following registrations: NUMBERS], this document makes the following registrations:
The family of SSH key exchange method names beginning with The family of SSH key exchange method names beginning with "gss-
"gss-group1-sha1-" and not containing the at-sign ('@'), to name group1-sha1-" and not containing the at-sign ('@'), to name the
the key exchange methods defined in Section 2.3. key exchange methods defined in Section 2.3.
The family of SSH key exchange method names beginning with The family of SSH key exchange method names beginning with "gss-
"gss-gex-sha1-" and not containing the at-sign ('@'), to name the gex-sha1-" and not containing the at-sign ('@'), to name the key
key exchange methods defined in Section 2.4. exchange methods defined in Section 2.5.
All other SSH key exchange method names beginning with "gss-" and All other SSH key exchange method names beginning with "gss-" and
not containing the at-sign ('@'), to be reserved for future key not containing the at-sign ('@'), to be reserved for future key
exchange methods defined in conformance with this document, as exchange methods defined in conformance with this document, as
noted in Section 2.5. noted in Section 2.6.
The SSH host public key algorithm name "null", to name the NULL The SSH host public key algorithm name "null", to name the NULL
host key algorithm defined in Section 5. host key algorithm defined in Section 5.
The SSH user authentication method name "gssapi-with-mic", to The SSH user authentication method name "gssapi-with-mic", to name
name the GSSAPI user authentication method defined in Section 3. the GSSAPI user authentication method defined in Section 3.
The SSH user authentication method name "gssapi-keyex", to name The SSH user authentication method name "gssapi-keyex", to name
the GSSAPI user authentication method defined in Section 4. the GSSAPI user authentication method defined in Section 4.
The SSH user authentication method name "gssapi" is to be The SSH user authentication method name "gssapi" is to be
reserved, in order to avoid conflicts with implementations reserved, in order to avoid conflicts with implementations
supporting an earlier version of this specification. supporting an earlier version of this specification.
The SSH user authentication method name "external-keyx" is to be The SSH user authentication method name "external-keyx" is to be
reserved, in order to avoid conflicts with implementations reserved, in order to avoid conflicts with implementations
skipping to change at page 27, line 12 skipping to change at page 28, line 12
This document creates no new registries. This document creates no new registries.
9. Security Considerations 9. Security Considerations
This document describes authentication and key-exchange protocols. This document describes authentication and key-exchange protocols.
As such, security considerations are discussed throughout. As such, security considerations are discussed throughout.
This protocol depends on the SSH protocol itself, the GSSAPI, any This protocol depends on the SSH protocol itself, the GSSAPI, any
underlying GSSAPI mechanisms which are used, and any protocols on underlying GSSAPI mechanisms which are used, and any protocols on
which such mechanisms might depend. Each of these components plays which such mechanisms might depend. Each of these components plays a
a part in the security of the resulting connection, and each will part in the security of the resulting connection, and each will have
have its own security considerations. its own security considerations.
The key exchange method described in section 1 of this document The key exchange method described in section 1 of this document
depends on the underlying GSSAPI mechanism to provide both mutual depends on the underlying GSSAPI mechanism to provide both mutual
authentication and per-message integrity services. If either of authentication and per-message integrity services. If either of
these features is not supported by a particular GSSAPI mechanism, or these features is not supported by a particular GSSAPI mechanism, or
by a particular implementation of a GSSAPI mechanism, then the key by a particular implementation of a GSSAPI mechanism, then the key
exchange is not secure and MUST fail. exchange is not secure and MUST fail.
In order for the "external-keyx" user authentication method to be In order for the "external-keyx" user authentication method to be
used, it MUST have access to user authentication information used, it MUST have access to user authentication information obtained
obtained as a side-effect of the key exchange. If this information as a side-effect of the key exchange. If this information is
is unavailable, the authentication MUST fail. unavailable, the authentication MUST fail.
Revealing information about the reason for an authentication failure Revealing information about the reason for an authentication failure
may be considered by some sites to be an unacceptable security risk may be considered by some sites to be an unacceptable security risk
for a production environment. However, having that information for a production environment. However, having that information
available can be invaluable for debugging purposes. Thus, it is available can be invaluable for debugging purposes. Thus, it is
RECOMMENDED that implementations provide a means for controlling, as RECOMMENDED that implementations provide a means for controlling, as
a matter of policy, whether to send SSH_MSG_USERAUTH_GSSAPI_ERROR, a matter of policy, whether to send SSH_MSG_USERAUTH_GSSAPI_ERROR,
SSH_MSG_USERAUTH_GSSAPI_ERRTOK, and SSH_MSG_KEXGSS_ERROR messages, SSH_MSG_USERAUTH_GSSAPI_ERRTOK, and SSH_MSG_KEXGSS_ERROR messages,
and SSH_MSG_KEXGEE_CONTINUE messages containing a GSSAPI error token. and SSH_MSG_KEXGEE_CONTINUE messages containing a GSSAPI error token.
skipping to change at page 29, line 11 skipping to change at page 30, line 11
Much of the text describing DH group exchnage was borrowed from Much of the text describing DH group exchnage was borrowed from
[GROUP-EXCHANGE], by Markus Friedl, Niels Provos, and William A. [GROUP-EXCHANGE], by Markus Friedl, Niels Provos, and William A.
Simpson. Simpson.
11. Changes the last version 11. Changes the last version
This section lists important changes since the previous version of This section lists important changes since the previous version of
this internet-draft. This section should be removed at the time of this internet-draft. This section should be removed at the time of
publication of this document as an RFC. publication of this document as an RFC.
o Added the description of the generic GSSAPI key exchange with o Added text about not giving loud warnings when getting a new host
group exchange, and the definition of the gss-gex-sha1-* methods. key from an already-known host via GSSAPI.
o Added gss-group14-sha1-*
o Updated references to the ssh core documents. o Updated references to the ssh core documents.
o Converted from numbered to symbolic references. o Converted to RFC3978 boilerplate.
Normative References 12. References
[ASN1] ISO/IEC, "ASN.1 Encoding Rules: Specification of 12.1 Normative References
Basic Encoding Rules (BER), Canonical Encoding
Rules (CER) and Distinguished Encoding Rules
(DER)", ITU-T Recommendation X.690 (1997), ISO/IEC
8825-1:1998, November 1998.
[GROUP-EXCHANGE] Friedl, M., Provos, N. and W. A. Simpson, [ASN1] ISO/IEC, "ASN.1 Encoding Rules: Specification of Basic
"Diffie-Hellman Group Exchange for the SSH Encoding Rules (BER), Canonical Encoding Rules (CER) and
Transport Layer Protocol", Distinguished Encoding Rules (DER)", ITU-T
Recommendation X.690 (1997), ISO/IEC 8825-1:1998,
November 1998.
[GROUP-EXCHANGE]
Friedl, M., Provos, N., and W. Simpson, "Diffie-Hellman
Group Exchange for the SSH Transport Layer Protocol",
draft-ietf-secsh-dh-group-exchange-04.txt (work in draft-ietf-secsh-dh-group-exchange-04.txt (work in
progress), July 2003. progress), July 2003.
[GSSAPI] Linn, J., "Generic Security Service Application [GSSAPI] Linn, J., "Generic Security Service Application Program
Program Interface Version 2, Update 1", RFC 2743, Interface Version 2, Update 1", RFC 2743, January 2000.
January 2000.
[KEYWORDS] Bradner, S., "Key words for use in RFCs to [KEYWORDS]
Indicate Requirement Levels", RFC 2119, BCP 14, Bradner, S., "Key words for use in RFCs to Indicate
March 1997. Requirement Levels", RFC 2119, BCP 14, March 1997.
[LANGTAG] Alvestrand, H., "Tags for the Identification of [LANGTAG] Alvestrand, H., "Tags for the Identification of
Languages", RFC 1766, March 1995. Languages", RFC 3066, BCP 47, January 2001.
[MD5] Rivest, R., "The MD5 Message-Digest Algorithm", [MD5] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
RFC 1321, April 1992. April 1992.
[MIME] Freed, N. and N. Borenstein, "Multipurpose [MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Internet Mail Extensions (MIME) Part One: Format Extensions (MIME) Part One: Format of Internet Message
of Internet Message Bodies", RFC 2045, November Bodies", RFC 2045, November 1996.
1996.
[SSH-ARCH] Ylonen, T. and D. Moffat, "SSH Protocol [SSH-ARCH]
Architecture", Ylonen, T. and C. Lonvick, "SSH Protocol Architecture",
draft-ietf-secsh-architecture-15.txt (work in draft-ietf-secsh-architecture-22.txt (work in progress),
progress), October 2003. March 2005.
[SSH-CONNECT] Ylonen, T. and D. Moffat, "SSH Connection [SSH-CONNECT]
Protocol", draft-ietf-secsh-connect-18.txt (work Ylonen, T. and C. Lonvick, "SSH Connection Protocol",
in progress), October 2003. draft-ietf-secsh-connect-25.txt (work in progress),
March 2005.
[SSH-TRANSPORT] Ylonen, T. and D. Moffat, "SSH Transport Layer [SSH-NUMBERS]
Protocol", draft-ietf-secsh-transport-17.txt (work Lehtinen, S. and C. Lonvick, "SSH Connection Protocol",
in progress), October 2003. draft-ietf-secsh-assignednumbers-12.txt (work in
progress), March 2005.
[SSH-USERAUTH] Ylonen, T. and D. Moffat, "SSH Authentication [SSH-TRANSPORT]
Protocol", draft-ietf-secsh-userauth-18.txt (work Ylonen, T. and C. Lonvick, "SSH Transport Layer Protocol",
in progress), October 2003. draft-ietf-secsh-transport-24.txt (work in progress),
March 2005.
[UTF8] Yergeau, F., "UTF-8, a transformation format of [SSH-USERAUTH]
ISO 10646", RFC 2279, January 1998. Ylonen, T. and C. Lonvick, "SSH Authentication Protocol",
draft-ietf-secsh-userauth-27.txt (work in progress),
March 2005.
Non-Normative References [UTF8] Yergeau, F., "UTF-8, a transformation format of ISO
10646", RFC 3629, STD 63, November 2003.
12.2 Non-Normative References
[KRB5] Kohl, J. and C. Neuman, "The Kerberos Network [KRB5] Kohl, J. and C. Neuman, "The Kerberos Network
Authentication Service (V5)", RFC 1510, September 1993. Authentication Service (V5)", RFC 1510, September 1993.
[KRB5-GSS] Linn, J., "The Kerberos Version 5 GSS-API Mechanism", [KRB5-GSS]
Linn, J., "The Kerberos Version 5 GSS-API Mechanism",
RFC 1964, June 1996. RFC 1964, June 1996.
[SPNEGO] Baize, E. and D. Pinkas, "The Simple and Protected [SPNEGO] Baize, E. and D. Pinkas, "The Simple and Protected GSS-API
GSS-API Negotiation Mechanism", RFC 2478, December 1998. Negotiation Mechanism", RFC 2478, December 1998.
Authors' Addresses Authors' Addresses
Jeffrey Hutzelman Jeffrey Hutzelman
Carnegie Mellon University Carnegie Mellon University
5000 Forbes Ave 5000 Forbes Ave
Pittsburgh, PA 15213 Pittsburgh, PA 15213
US US
Phone: +1 412 268 7225 Phone: +1 412 268 7225
EMail: jhutz+@cmu.edu Email: jhutz+@cmu.edu
URI: http://www.cs.cmu.edu/~jhutz/ URI: http://www.cs.cmu.edu/~jhutz/
Joseph Salowey Joseph Salowey
Cisco Systems Cisco Systems
2901 Third Avenue 2901 Third Avenue
Seattle, WA 98121 Seattle, WA 98121
US US
Phone: +1 206 256 3380 Phone: +1 206 256 3380
EMail: jsalowey@cisco.com Email: jsalowey@cisco.com
Joseph Galbraith Joseph Galbraith
Van Dyke Technologies, Inc. Van Dyke Technologies, Inc.
4848 Tramway Ridge Dr. NE 4848 Tramway Ridge Dr. NE
Suite 101 Suite 101
Albuquerque, NM 87111 Albuquerque, NM 87111
US US
EMail: galb@vandyke.com Email: galb@vandyke.com
Von Welch Von Welch
University of Chicago & Argonne National Laboratory University of Chicago & Argonne National Laboratory
Distributed Systems Laboratory Distributed Systems Laboratory
701 E. Washington 701 E. Washington
Urbana, IL 61801 Urbana, IL 61801
US US
EMail: welch@mcs.anl.gov Email: welch@mcs.anl.gov
Full Copyright Statement Intellectual Property Statement
Copyright (C) The Internet Society (2004). All Rights Reserved. The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
This document and translations of it may be copied and furnished to Copies of IPR disclosures made to the IETF Secretariat and any
others, and derivative works that comment on or otherwise explain it assurances of licenses to be made available, or the result of an
or assist in its implementation may be prepared, copied, published attempt made to obtain a general license or permission for the use of
and distributed, in whole or in part, without restriction of any such proprietary rights by implementers or users of this
kind, provided that the above copyright notice and this paragraph specification can be obtained from the IETF on-line IPR repository at
are included on all such copies and derivative works. However, this http://www.ietf.org/ipr.
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be The IETF invites any interested party to bring to its attention any
revoked by the Internet Society or its successors or assigns. copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
This document and the information contained herein is provided on an Disclaimer of Validity
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Funding for the RFC editor function is currently provided by the Copyright Statement
Copyright (C) The Internet Society (2005). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights.
Acknowledgment
Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/