Update gnulib files.
[shishi.git] / doc / specifications / draft-josefsson-kerberos5-starttls-00.txt
blobcbe1c5b473e21252729aa304ea32ccc1c3c96fd2
1 Network Working Group                                       S. Josefsson
2 Internet-Draft                                         November 13, 2004
3 Expires: May 14, 2005
7           Using Transport Layer Security (TLS) with Kerberos 5
8                  draft-josefsson-kerberos5-starttls-00
11 Status of this Memo
14    This document is an Internet-Draft and is subject to all provisions
15    of section 3 of RFC 3667.  By submitting this Internet-Draft, each
16    author represents that any applicable patent or other IPR claims of
17    which he or she is aware have been or will be disclosed, and any of
18    which he or she become aware will be disclosed, in accordance with
19    RFC 3668.
22    Internet-Drafts are working documents of the Internet Engineering
23    Task Force (IETF), its areas, and its working groups.  Note that
24    other groups may also distribute working documents as
25    Internet-Drafts.
28    Internet-Drafts are draft documents valid for a maximum of six months
29    and may be updated, replaced, or obsoleted by other documents at any
30    time.  It is inappropriate to use Internet-Drafts as reference
31    material or to cite them other than as "work in progress."
34    The list of current Internet-Drafts can be accessed at
35    http://www.ietf.org/ietf/1id-abstracts.txt.
38    The list of Internet-Draft Shadow Directories can be accessed at
39    http://www.ietf.org/shadow.html.
42    This Internet-Draft will expire on May 14, 2005.
45 Copyright Notice
48    Copyright (C) The Internet Society (2004).
51 Abstract
54    This document specify how the Transport Layer Security (TLS) protocol
55    is used in conjunction with the Kerberos 5 protocol.
66 Josefsson                 Expires May 14, 2005                  [Page 1]
67 Internet-Draft         Using TLS with Kerberos 5           November 2004
71 Table of Contents
74    1.  Introduction and Background  . . . . . . . . . . . . . . . . .  3
75    2.  Extension Mechanism for TCP/IP transport . . . . . . . . . . .  4
76    3.  Kerberos 5 STARTTLS Extension  . . . . . . . . . . . . . . . .  4
77      3.1   STARTTLS requested by client (extension 1) . . . . . . . .  4
78      3.2   STARTTLS request accepted by server (extension 2)  . . . .  5
79      3.3   Proceeding after successful TLS negotiation  . . . . . . .  5
80      3.4   Proceeding after failed TLS negotiation  . . . . . . . . .  5
81      3.5   STARTTLS aware KDC Discovery . . . . . . . . . . . . . . .  5
82      3.6   Initial Authentication via TLS . . . . . . . . . . . . . .  5
83    4.  Security Considerations  . . . . . . . . . . . . . . . . . . .  6
84    5.  References . . . . . . . . . . . . . . . . . . . . . . . . . .  6
85    5.1   Normative References . . . . . . . . . . . . . . . . . . . .  6
86    5.2   Informative References . . . . . . . . . . . . . . . . . . .  6
87        Author's Address . . . . . . . . . . . . . . . . . . . . . . .  7
88        Intellectual Property and Copyright Statements . . . . . . . .  8
124 Josefsson                 Expires May 14, 2005                  [Page 2]
125 Internet-Draft         Using TLS with Kerberos 5           November 2004
129 1.  Introduction and Background
132    This document describe how Shishi, a Kerberos 5 [1] implementation,
133    upgrade communication between clients and Key Distribution Centers
134    (KDCs) to use the Transport Layer Security (TLS) [2] protocol.
137    The TLS protocol offer integrity and privacy protected exchanges that
138    can be authentication using X.509 certificates, OpenPGP keys [6], and
139    user name and passwords via SRP [5].
142    An inconclusive list of the motivation for using TLS with Kerberos 5
143    is given below.
146    o  Explicit server authentication of the KDC to the client.  In
147       traditional Kerberos 5, authentication of the KDC is proved as a
148       side effect that the KDC knows your encryption key (i.e., your
149       password).
152    o  Flexible authentication against KDC.  Kerberos 5 assume the user
153       knows a key (usually in the form of a password).  Sometimes
154       external factors make this hard to fulfill.  In some situations,
155       users are equipped with smart cards with a RSA authentication key.
156       In others, users have a OpenPGP client on their desktop, with a
157       public OpenPGP key known to the server.  In some situations, the
158       policy may be that password authentication may only be done
159       through SRP.
162    o  Kerberos exchanges are privacy protected.  Part of many Kerberos
163       packets are transfered without privacy protection (i.e.,
164       encryption).  That part contains information, such as the client
165       principal name, the server principal name, the encryption types
166       supported by the client, the lifetime of tickets, etc.  Revealing
167       such information is, in some threat models, considered a problem.
170    o  Prevents downgrade attacks affecting encryption types.  The
171       encryption type of the ticket in KDC-REQ are sent in the clear in
172       Kerberos 5.  This allows an attacker to replace the encryption
173       type with a compromised mechanisms, e.g.  56-bit DES.  Since
174       clients in general cannot know the encryption types other servers
175       support, it is difficult for the client to detect if there was a
176       man-in-the-middle or if the remote server simply did not support a
177       stronger mechanism.  Clients could chose to refuse 56-bit DES
178       altogether, but in some environments this leads to operational
179       difficulties.
182    o  The TLS protocol has been studied by many parties.  In some threat
183       models, the designer prefer to reduce the number of protocols that
184       can hurt the overall system security if they are compromised.
189 Josefsson                 Expires May 14, 2005                  [Page 3]
190 Internet-Draft         Using TLS with Kerberos 5           November 2004
194    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
195    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
196    document are to be interpreted as described in RFC 2119 [4].
199 2.  Extension Mechanism for TCP/IP transport
202    Kerberos 5 require Key Distribution Centers (KDCs) to accept requests
203    over TCP.  Each request and response is prefixed by 4 octets,
204    encoding an integer in network byte order, that indicate the length
205    of the packet.  The high bit of the 4 octet length field was reserved
206    for future expansion.  Servers that do not understand how to
207    interpret a set high bit are required to return a KRB-ERROR with the
208    KRB_ERR_FIELD_TOOLONG error code, and to close the TCP stream.
211    We will use the reserved bit to provide an extension mechanism.  When
212    the reserved high bit is set, the remaining 31 bits of the 4 octets
213    are treated as an extensible typed hole, and thus form a 31 bit
214    integer enumerating various extensions.  Each of the values indicate
215    a specific extended operation mode, two of which are used and defined
216    here, and the rest are left for others to use.
219    If the KDC do not understand a requested extension, it MUST return a
220    KRB-ERROR with a KRB_ERR_FIELD_TOOLONG value (prefixed by the 4 octet
221    length integer, with the high bit clear, as usual) and close the TCP
222    stream.
225    The following table specify the meaning of the 31 lower bits in the 4
226    octet field, when the high bit is set:
229    0               RESERVED.
230    1               STARTTLS requested by client.
231    2               STARTTLS request accepted by server.
232    3...2147483647  AVAILABLE for registration (via bug-shishi@josefsson.org).
233    2147483648      RESERVED.
237 3.  Kerberos 5 STARTTLS Extension
240 3.1  STARTTLS requested by client (extension 1)
243    When this message is sent by the client, the client is requesting the
244    server to start TLS negotiation on the TCP stream.  The client MUST
245    NOT start TLS negotiation immediately.  Instead, the client wait for
246    either a KRB-ERROR (sent normally, prefixed by a 4 octet length
247    integer) indicating the server do not understand the set high bit, or
248    4 octets which is to be interpreted as an integer in network byte
249    order, where the high bit is set and the remaining 31 bit are
250    interpreted as an integer specifying ``STARTTLS request accepted by
255 Josefsson                 Expires May 14, 2005                  [Page 4]
256 Internet-Draft         Using TLS with Kerberos 5           November 2004
260    server'' (extension 2).  In the first case, the client infer that the
261    server do not understand (or wish to support) STARTTLS, and can
262    re-try using normal TCP, if unprotected Kerberos 5 exchanges are
263    acceptable to the client policy.  In the latter case, it should
264    invoke TLS negotiation on the stream.  If any other data is received,
265    the client MUST close the TCP stream.
268 3.2  STARTTLS request accepted by server (extension 2)
271    This message should be sent by the server when it has received the
272    extension 1 message.  The message is an acknowledgment of the
273    client's request to initiate STARTTLS on the channel.  The server
274    MUST then invoke a TLS negotiation.
277 3.3  Proceeding after successful TLS negotiation
280    If the TLS negotiation ended successfully, possibly also considering
281    client or server policies, the exchange within the TLS protected
282    stream is performed like normal UDP Kerberos 5 exchanges, i.e., there
283    is no TCP 4 octet length field before each packet.  Instead each
284    Kerberos packet MUST be sent within one TLS record, so the
285    application can use the TLS record length as the Kerberos 5 packet
286    length.
289 3.4  Proceeding after failed TLS negotiation
292    If the TLS negotiation fails, possibly due to client or server policy
293    (e.g., inadequate support of encryption types in TLS, or lack of
294    client or server authentication) the entity that detect the failure
295    MUST disconnected the connection.  It is expected that any error
296    messages that explain the error condition is transfered by TLS.
299 3.5  STARTTLS aware KDC Discovery
302    Section 7.2.3 of Kerberos 5 [1] describe how Domain Name System (DNS)
303    SRV records [3] can be used to find the address of an KDC.  To locate
304    a KDC that support the STARTTLS extension, we use the "_tls" domain.
305    For example:
308    _kerberos._tls._tcp.EXAMPLE.COM.   IN      SRV     0 0 88 kdc1.example.com.
309    _kerberos._tls._tcp.EXAMPLE.COM.   IN      SRV     1 0 88 kdc2.example.com.
313 3.6  Initial Authentication via TLS
316    The server MAY consider the authentication performed by the TLS
317    exchange as sufficient to issue Kerberos 5 tickets to the client,
318    without requiring, e.g., pre-authentication.  However, it is not an
323 Josefsson                 Expires May 14, 2005                  [Page 5]
324 Internet-Draft         Using TLS with Kerberos 5           November 2004
328    error to require or use pre-authentication as well.
331    The client may also indicate that it wishes to use TLS both for
332    authentication and data protection by using the NULL encryption type
333    in its request.  The server can decide from its local policy whether
334    or not issuing tickets based solely on TLS authentication, and
335    whether NULL encryption within TLS, is acceptable or not.
338 4.  Security Considerations
341    Because the initial token is not protected, it is possible for an
342    active attacker to make it appear to the client that the server do
343    not support this extension.  It is up to client configuration to
344    disallow non-TLS connections, if that vulnerability is deemed
345    unacceptable.  For interoperability, we suggest the default behaviour
346    should be to allow automatic fall back to TCP or UDP.
349    The security considerations of both TLS and Kerberos 5 are inherited.
350    Using TLS for authentication and/or data protection together with
351    Kerberos alter the authentication logic fundamentally.  Thus, it may
352    be that even if the TLS and Kerberos 5 protocols and implementations
353    were secure, the combination of TLS and Kerberos 5 described here
354    could be insecure.
357    No channel bindings are provided in the Kerberos messages.  It is an
358    open question whether, and how, this could be solved.  One idea for
359    solving this may be to specify a new encryption algorithm in Kerberos
360    5 that is similar to the NULL encryption algorithm, but also include
361    the TLS session identifier.
364 5.  References
367 5.1  Normative References
370    [1]  Neuman, C., "The Kerberos Network Authentication Service (V5)",
371         draft-ietf-krb-wg-kerberos-clarifications-07 (work in progress),
372         September 2004.
375    [2]  Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", RFC
376         2246, January 1999.
379    [3]  Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for
380         specifying the location of services (DNS SRV)", RFC 2782,
381         February 2000.
384 5.2  Informative References
387    [4]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
392 Josefsson                 Expires May 14, 2005                  [Page 6]
393 Internet-Draft         Using TLS with Kerberos 5           November 2004
397         Levels", BCP 14, RFC 2119, March 1997.
400    [5]  Taylor, D., "Using SRP for TLS Authentication",
401         draft-ietf-tls-srp-08 (work in progress), August 2004.
404    [6]  Mavroyanopoulos, N., "Using OpenPGP keys for TLS
405         authentication", draft-ietf-tls-openpgp-keys-05 (work in
406         progress), April 2004.
410 Author's Address
413    Simon Josefsson
416    EMail: simon@josefsson.org
454 Josefsson                 Expires May 14, 2005                  [Page 7]
455 Internet-Draft         Using TLS with Kerberos 5           November 2004
459 Intellectual Property Statement
462    The IETF takes no position regarding the validity or scope of any
463    Intellectual Property Rights or other rights that might be claimed to
464    pertain to the implementation or use of the technology described in
465    this document or the extent to which any license under such rights
466    might or might not be available; nor does it represent that it has
467    made any independent effort to identify any such rights.  Information
468    on the procedures with respect to rights in RFC documents can be
469    found in BCP 78 and BCP 79.
472    Copies of IPR disclosures made to the IETF Secretariat and any
473    assurances of licenses to be made available, or the result of an
474    attempt made to obtain a general license or permission for the use of
475    such proprietary rights by implementers or users of this
476    specification can be obtained from the IETF on-line IPR repository at
477    http://www.ietf.org/ipr.
480    The IETF invites any interested party to bring to its attention any
481    copyrights, patents or patent applications, or other proprietary
482    rights that may cover technology that may be required to implement
483    this standard.  Please address the information to the IETF at
484    ietf-ipr@ietf.org.
488 Disclaimer of Validity
491    This document and the information contained herein are provided on an
492    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
493    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
494    ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
495    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
496    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
497    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
501 Copyright Statement
504    Copyright (C) The Internet Society (2004).  This document is subject
505    to the rights, licenses and restrictions contained in BCP 78, and
506    except as set forth therein, the authors retain all their rights.
510 Acknowledgment
513    Funding for the RFC Editor function is currently provided by the
514    Internet Society.
519 Josefsson                 Expires May 14, 2005                  [Page 8]