1
2
3
4Kerberos Working Group                                        S. Hartman
5Internet-Draft                                         Painless Security
6Updates: 4120 (if approved)                                       L. Zhu
7Intended status: Standards Track                   Microsoft Corporation
8Expires: December 6, 2009                                   June 4, 2009
9
10
11        A Generalized Framework for Kerberos Pre-Authentication
12                 draft-ietf-krb-wg-preauth-framework-12
13
14Status of this Memo
15
16   This Internet-Draft is submitted to IETF in full conformance with the
17   provisions of BCP 78 and BCP 79.
18
19   Internet-Drafts are working documents of the Internet Engineering
20   Task Force (IETF), its areas, and its working groups.  Note that
21   other groups may also distribute working documents as Internet-
22   Drafts.
23
24   Internet-Drafts are draft documents valid for a maximum of six months
25   and may be updated, replaced, or obsoleted by other documents at any
26   time.  It is inappropriate to use Internet-Drafts as reference
27   material or to cite them other than as "work in progress."
28
29   The list of current Internet-Drafts can be accessed at
30   http://www.ietf.org/ietf/1id-abstracts.txt.
31
32   The list of Internet-Draft Shadow Directories can be accessed at
33   http://www.ietf.org/shadow.html.
34
35   This Internet-Draft will expire on December 6, 2009.
36
37Copyright Notice
38
39   Copyright (c) 2009 IETF Trust and the persons identified as the
40   document authors.  All rights reserved.
41
42   This document is subject to BCP 78 and the IETF Trust's Legal
43   Provisions Relating to IETF Documents in effect on the date of
44   publication of this document (http://trustee.ietf.org/license-info).
45   Please review these documents carefully, as they describe your rights
46   and restrictions with respect to this document.
47
48Abstract
49
50   Kerberos is a protocol for verifying the identity of principals
51   (e.g., a workstation user or a network server) on an open network.
52
53
54
55Hartman & Zhu           Expires December 6, 2009                [Page 1]
56
57Internet-Draft         Kerberos Preauth Framework              June 2009
58
59
60   The Kerberos protocol provides a mechanism called pre-authentication
61   for proving the identity of a principal and for better protecting the
62   long-term secrets of the principal.
63
64   This document describes a model for Kerberos pre-authentication
65   mechanisms.  The model describes what state in the Kerberos request a
66   pre-authentication mechanism is likely to change.  It also describes
67   how multiple pre-authentication mechanisms used in the same request
68   will interact.
69
70   This document also provides common tools needed by multiple pre-
71   authentication mechanisms.  One of these tools is a secure channel
72   between the client and the KDC with a reply key delivery mechanism;
73   this secure channel can be used to protect the authentication
74   exchange thus eliminate offline dictionary attacks.  With these
75   tools, it is relatively straightforward to chain multiple
76   authentication mechanisms, utilize a different key management system,
77   or support a new key agreement algorithm.
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111Hartman & Zhu           Expires December 6, 2009                [Page 2]
112
113Internet-Draft         Kerberos Preauth Framework              June 2009
114
115
116Table of Contents
117
118   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  5
119   2.  Conventions and Terminology Used in This Document  . . . . . .  6
120   3.  Model for Pre-Authentication . . . . . . . . . . . . . . . . .  6
121     3.1.  Information Managed by the Pre-authentication Model  . . .  7
122     3.2.  Initial Pre-authentication Required Error  . . . . . . . .  9
123     3.3.  Client to KDC  . . . . . . . . . . . . . . . . . . . . . . 10
124     3.4.  KDC to Client  . . . . . . . . . . . . . . . . . . . . . . 11
125   4.  Pre-Authentication Facilities  . . . . . . . . . . . . . . . . 12
126     4.1.  Client-authentication Facility . . . . . . . . . . . . . . 13
127     4.2.  Strengthening-reply-key Facility . . . . . . . . . . . . . 14
128     4.3.  Replacing-reply-key Facility . . . . . . . . . . . . . . . 15
129     4.4.  KDC-authentication Facility  . . . . . . . . . . . . . . . 15
130   5.  Requirements for Pre-Authentication Mechanisms . . . . . . . . 15
131   6.  Tools for Use in Pre-Authentication Mechanisms . . . . . . . . 16
132     6.1.  Combining Keys . . . . . . . . . . . . . . . . . . . . . . 17
133     6.2.  Protecting Requests/Responses  . . . . . . . . . . . . . . 18
134     6.3.  Managing States for the KDC  . . . . . . . . . . . . . . . 19
135     6.4.  Pre-authentication Set . . . . . . . . . . . . . . . . . . 20
136     6.5.  Definition of Kerberos FAST Padata . . . . . . . . . . . . 23
137       6.5.1.  FAST Armors  . . . . . . . . . . . . . . . . . . . . . 24
138       6.5.2.  FAST Request . . . . . . . . . . . . . . . . . . . . . 26
139       6.5.3.  FAST Response  . . . . . . . . . . . . . . . . . . . . 30
140       6.5.4.  Authenticated Kerberos Error Messages using
141               Kerberos FAST  . . . . . . . . . . . . . . . . . . . . 33
142       6.5.5.  Outer and Inner Requests . . . . . . . . . . . . . . . 34
143       6.5.6.  The Encrypted Challenge FAST Factor  . . . . . . . . . 34
144     6.6.  Authentication Strength Indication . . . . . . . . . . . . 36
145   7.  Assigned Constants . . . . . . . . . . . . . . . . . . . . . . 37
146     7.1.  New Errors . . . . . . . . . . . . . . . . . . . . . . . . 37
147     7.2.  Key Usage Numbers  . . . . . . . . . . . . . . . . . . . . 37
148     7.3.  Authorization Data Elements  . . . . . . . . . . . . . . . 37
149     7.4.  New PA-DATA Types  . . . . . . . . . . . . . . . . . . . . 37
150   8.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 38
151     8.1.  Pre-authentication and Typed Data  . . . . . . . . . . . . 38
152     8.2.  Fast Armor Types . . . . . . . . . . . . . . . . . . . . . 40
153     8.3.  FAST Options . . . . . . . . . . . . . . . . . . . . . . . 40
154   9.  Security Considerations  . . . . . . . . . . . . . . . . . . . 40
155   10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 42
156   11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 42
157     11.1. Normative References . . . . . . . . . . . . . . . . . . . 42
158     11.2. Informative References . . . . . . . . . . . . . . . . . . 42
159   Appendix A.  Test Vectors for KRB-FX-CF2 . . . . . . . . . . . . . 43
160   Appendix B.  Change History  . . . . . . . . . . . . . . . . . . . 44
161     B.1.  Changes since 11 . . . . . . . . . . . . . . . . . . . . . 44
162     B.2.  Changes since 10 . . . . . . . . . . . . . . . . . . . . . 44
163     B.3.  Changes since 09 . . . . . . . . . . . . . . . . . . . . . 44
164
165
166
167Hartman & Zhu           Expires December 6, 2009                [Page 3]
168
169Internet-Draft         Kerberos Preauth Framework              June 2009
170
171
172     B.4.  Changes since 08 . . . . . . . . . . . . . . . . . . . . . 44
173     B.5.  Changes since 07 . . . . . . . . . . . . . . . . . . . . . 46
174     B.6.  Changes since 06 . . . . . . . . . . . . . . . . . . . . . 46
175   Appendix C.  ASN.1 module  . . . . . . . . . . . . . . . . . . . . 46
176   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 49
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223Hartman & Zhu           Expires December 6, 2009                [Page 4]
224
225Internet-Draft         Kerberos Preauth Framework              June 2009
226
227
2281.  Introduction
229
230   The core Kerberos specification [RFC4120] treats pre-authentication
231   data as an opaque typed hole in the messages to the KDC that may
232   influence the reply key used to encrypt the KDC reply.  This
233   generality has been useful: pre-authentication data is used for a
234   variety of extensions to the protocol, many outside the expectations
235   of the initial designers.  However, this generality makes designing
236   more common types of pre-authentication mechanisms difficult.  Each
237   mechanism needs to specify how it interacts with other mechanisms.
238   Also, problems like combining a key with the long-term secrets or
239   proving the identity of the user are common to multiple mechanisms.
240   Where there are generally well-accepted solutions to these problems,
241   it is desirable to standardize one of these solutions so mechanisms
242   can avoid duplication of work.  In other cases, a modular approach to
243   these problems is appropriate.  The modular approach will allow new
244   and better solutions to common pre-authentication problems to be used
245   by existing mechanisms as they are developed.
246
247   This document specifies a framework for Kerberos pre-authentication
248   mechanisms.  It defines the common set of functions that pre-
249   authentication mechanisms perform as well as how these functions
250   affect the state of the request and reply.  In addition several
251   common tools needed by pre-authentication mechanisms are provided.
252   Unlike [RFC3961], this framework is not complete--it does not
253   describe all the inputs and outputs for the pre-authentication
254   mechanisms.  Pre-Authentication mechanism designers should try to be
255   consistent with this framework because doing so will make their
256   mechanisms easier to implement.  Kerberos implementations are likely
257   to have plugin architectures for pre-authentication; such
258   architectures are likely to support mechanisms that follow this
259   framework plus commonly used extensions.  This framework also
260   facilitates combining multiple pre-authentication mechanisms, each of
261   which may represent an authentication factor, into a single multi-
262   factor pre-authentication mechanism.
263
264   One of these common tools is the flexible authentication secure
265   tunneling (FAST) padata type.  FAST provides a protected channel
266   between the client and the KDC, and it can optionally deliver a reply
267   key within the protected channel.  Based on FAST, pre-authentication
268   mechanisms can extend Kerberos with ease, to support, for example,
269   password authenticated key exchange (PAKE) protocols with zero
270   knowledge password proof (ZKPP) [EKE] [IEEE1363.2].  Any pre-
271   authentication mechanism can be encapsulated in the FAST messages as
272   defined in Section 6.5.  A pre-authentication type carried within
273   FAST is called a FAST factor.  Creating a FAST factor is the easiest
274   path to create a new pre-authentication mechanism.  FAST factors are
275   significantly easier to analyze from a security standpoint than other
276
277
278
279Hartman & Zhu           Expires December 6, 2009                [Page 5]
280
281Internet-Draft         Kerberos Preauth Framework              June 2009
282
283
284   pre-authentication mechanisms.
285
286   Mechanism designers should design FAST factors, instead of new pre-
287   authentication mechanisms outside of FAST.
288
289
2902.  Conventions and Terminology Used in This Document
291
292   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
293   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
294   document are to be interpreted as described in [RFC2119].
295
296   This document should be read only after reading the documents
297   describing the Kerberos cryptography framework [RFC3961] and the core
298   Kerberos protocol [RFC4120].  This document may freely use
299   terminology and notation from these documents without reference or
300   further explanation.
301
302   The word padata is used as a shorthand for pre-authentication data.
303
304   A conversation is the set of all authentication messages exchanged
305   between the client and the client's Authentication Service (AS) in
306   order to authenticate the client principal.  A conversation as
307   defined here consists of all messages that are necessary to complete
308   the authentication between the client and the client's AS.  In the
309   Ticket Exchange Service (TGS) exchange, a conversation consists of
310   the request message and the reply message.  The term conversation is
311   defined here for both AS and TGS for convenience of discussion.  See
312   Section 6.3 for specific rules on the extent of a conversation in the
313   AS-REQ case.  Prior to this framework, implementations needed to use
314   implementation-specific heuristics to determine the extent of a
315   conversation.
316
317   If the KDC reply in an AS exchange is verified, the KDC is
318   authenticated by the client.  In this document, verification of the
319   KDC reply is used as a synonym of authentication of the KDC.
320
321
3223.  Model for Pre-Authentication
323
324   When a Kerberos client wishes to obtain a ticket using the
325   authentication server, it sends an initial Authentication Service
326   (AS) request.  If pre-authentication is required but not being used,
327   then the KDC will respond with a KDC_ERR_PREAUTH_REQUIRED error.
328   Alternatively, if the client knows what pre-authentication to use, it
329   MAY optimize away a round-trip and send an initial request with
330   padata included in the initial request.  If the client includes the
331   padata computed using the wrong pre-authentication mechanism or
332
333
334
335Hartman & Zhu           Expires December 6, 2009                [Page 6]
336
337Internet-Draft         Kerberos Preauth Framework              June 2009
338
339
340   incorrect keys, the KDC MAY return KDC_ERR_PREAUTH_FAILED with no
341   indication of what padata should have been included.  In that case,
342   the client MUST retry with no padata and examine the error data of
343   the KDC_ERR_PREAUTH_REQUIRED error.  If the KDC includes pre-
344   authentication information in the accompanying error data of
345   KDC_ERR_PREAUTH_FAILED, the client SHOULD process the error data, and
346   then retry.
347
348   The conventional KDC maintains no state between two requests;
349   subsequent requests may even be processed by a different KDC.  On the
350   other hand, the client treats a series of exchanges with KDCs as a
351   single conversation.  Each exchange accumulates state and hopefully
352   brings the client closer to a successful authentication.
353
354   These models for state management are in apparent conflict.  For many
355   of the simpler pre-authentication scenarios, the client uses one
356   round trip to find out what mechanisms the KDC supports.  Then the
357   next request contains sufficient pre-authentication for the KDC to be
358   able to return a successful reply.  For these simple scenarios, the
359   client only sends one request with pre-authentication data and so the
360   conversation is trivial.  For more complex conversations, the KDC
361   needs to provide the client with a cookie to include in future
362   requests to capture the current state of the authentication session.
363   Handling of multiple round-trip mechanisms is discussed in
364   Section 6.3.
365
366   This framework specifies the behavior of Kerberos pre-authentication
367   mechanisms used to identify users or to modify the reply key used to
368   encrypt the KDC reply.  The PA-DATA typed hole may be used to carry
369   extensions to Kerberos that have nothing to do with proving the
370   identity of the user or establishing a reply key.  Such extensions
371   are outside the scope of this framework.  However mechanisms that do
372   accomplish these goals should follow this framework.
373
374   This framework specifies the minimum state that a Kerberos
375   implementation needs to maintain while handling a request in order to
376   process pre-authentication.  It also specifies how Kerberos
377   implementations process the padata at each step of the AS request
378   process.
379
3803.1.  Information Managed by the Pre-authentication Model
381
382   The following information is maintained by the client and KDC as each
383   request is being processed:
384
385   o  The reply key used to encrypt the KDC reply
386
387
388
389
390
391Hartman & Zhu           Expires December 6, 2009                [Page 7]
392
393Internet-Draft         Kerberos Preauth Framework              June 2009
394
395
396   o  How strongly the identity of the client has been authenticated
397
398   o  Whether the reply key has been used in this conversation
399
400   o  Whether the reply key has been replaced in this conversation
401
402   o  Whether the contents of the KDC reply can be verified by the
403      client principal
404
405
406   Conceptually, the reply key is initially the long-term key of the
407   principal.  However, principals can have multiple long-term keys
408   because of support for multiple encryption types, salts and
409   string2key parameters.  As described in Section 5.2.7.5 of the
410   Kerberos protocol [RFC4120], the KDC sends PA-ETYPE-INFO2 to notify
411   the client what types of keys are available.  Thus in full
412   generality, the reply key in the pre-authentication model is actually
413   a set of keys.  At the beginning of a request, it is initialized to
414   the set of long-term keys advertised in the PA-ETYPE-INFO2 element on
415   the KDC.  If multiple reply keys are available, the client chooses
416   which one to use.  Thus the client does not need to treat the reply
417   key as a set.  At the beginning of a request, the client picks a key
418   to use.
419
420   KDC implementations MAY choose to offer only one key in the PA-ETYPE-
421   INFO2 element.  Since the KDC already knows the client's list of
422   supported enctypes from the request, no interoperability problems are
423   created by choosing a single possible reply key.  This way, the KDC
424   implementation avoids the complexity of treating the reply key as a
425   set.
426
427   When the padata in the request is verified by the KDC, then the
428   client is known to have that key, therefore the KDC SHOULD pick the
429   same key as the reply key.
430
431   At the beginning of handling a message on both the client and the
432   KDC, the client's identity is not authenticated.  A mechanism may
433   indicate that it has successfully authenticated the client's
434   identity.  This information is useful to keep track of on the client
435   in order to know what pre-authentication mechanisms should be used.
436   The KDC needs to keep track of whether the client is authenticated
437   because the primary purpose of pre-authentication is to authenticate
438   the client identity before issuing a ticket.  The handling of
439   authentication strength using various authentication mechanisms is
440   discussed in Section 6.6.
441
442   Initially the reply key has not been used.  A pre-authentication
443   mechanism that uses the reply key to encrypt or checksum some data in
444
445
446
447Hartman & Zhu           Expires December 6, 2009                [Page 8]
448
449Internet-Draft         Kerberos Preauth Framework              June 2009
450
451
452   the generation of new keys MUST indicate that the reply key is used.
453   This state is maintained by the client and the KDC to enforce the
454   security requirement stated in Section 4.3 that the reply key SHOULD
455   NOT be replaced after it is used.
456
457   Initially the reply key has not been replaced.  If a mechanism
458   implements the Replace Reply Key facility discussed in Section 4.3,
459   then the state MUST be updated to indicate that the reply key has
460   been replaced.  Once the reply key has been replaced, knowledge of
461   the reply key is insufficient to authenticate the client.  The reply
462   key is marked replaced in exactly the same situations as the KDC
463   reply is marked as not being verified to the client principal.
464   However, while mechanisms can verify the KDC reply to the client,
465   once the reply key is replaced, then the reply key remains replaced
466   for the remainder of the conversation.
467
468   Without pre-authentication, the client knows that the KDC reply is
469   authentic and has not been modified because it is encrypted in a
470   long-term key of the client.  Only the KDC and the client know that
471   key.  So at the start of a conversation, the KDC reply is presumed to
472   be verified using the client principal's long-term key.  It should be
473   noted that in this document, verifying the KDC reply means
474   authenticating the KDC, and these phrases are used interchangeably.
475   Any pre-authentication mechanism that sets a new reply key not based
476   on the principal's long-term secret MUST either verify the KDC reply
477   some other way or indicate that the reply is not verified.  If a
478   mechanism indicates that the reply is not verified then the client
479   implementation MUST return an error unless a subsequent mechanism
480   verifies the reply.  The KDC needs to track this state so it can
481   avoid generating a reply that is not verified.
482
483   The typical Kerberos request does not provide a way for the client
484   machine to know that it is talking to the correct KDC.  Someone who
485   can inject packets into the network between the client machine and
486   the KDC and who knows the password that the user will give to the
487   client machine can generate a KDC reply that will decrypt properly.
488   So, if the client machine needs to authenticate that the user is in
489   fact the named principal, then the client machine needs to do a TGS
490   request for itself as a service.  Some pre-authentication mechanisms
491   may provide a way for the client machine to authenticate the KDC.
492   Examples of this include signing the reply that can be verified using
493   a well-known public key or providing a ticket for the client machine
494   as a service.
495
4963.2.  Initial Pre-authentication Required Error
497
498   Typically a client starts a conversation by sending an initial
499   request with no pre-authentication.  If the KDC requires pre-
500
501
502
503Hartman & Zhu           Expires December 6, 2009                [Page 9]
504
505Internet-Draft         Kerberos Preauth Framework              June 2009
506
507
508   authentication, then it returns a KDC_ERR_PREAUTH_REQUIRED message.
509   After the first reply with the KDC_ERR_PREAUTH_REQUIRED error code,
510   the KDC returns the error code KDC_ERR_MORE_PREAUTH_DATA_NEEDED
511   (defined in Section 6.3) for pre-authentication configurations that
512   use multi-round-trip mechanisms; see Section 3.4 for details of that
513   case.
514
515   The KDC needs to choose which mechanisms to offer the client.  The
516   client needs to be able to choose what mechanisms to use from the
517   first message.  For example consider the KDC that will accept
518   mechanism A followed by mechanism B or alternatively the single
519   mechanism C. A client that supports A and C needs to know that it
520   should not bother trying A.
521
522   Mechanisms can either be sufficient on their own or can be part of an
523   authentication set--a group of mechanisms that all need to
524   successfully complete in order to authenticate a client.  Some
525   mechanisms may only be useful in authentication sets; others may be
526   useful alone or in authentication sets.  For the second group of
527   mechanisms, KDC policy dictates whether the mechanism will be part of
528   an authentication set, offered alone, or both.  For each mechanism
529   that is offered alone (even if it is also offered in an
530   authentication set), the KDC includes the pre-authentication type ID
531   of the mechanism in the padata sequence returned in the
532   KDC_ERR_PREAUTH_REQUIRED error.  Mechanisms that are only offered as
533   part of an authentication set are not directly represented in the
534   padata sequence returned in the KDC_ERR_PREAUTH_REQUIRED error,
535   although they are represented in the PA-AUTHENTICATION-SET sequence.
536
537   The KDC SHOULD NOT send data that is encrypted in the long-term
538   password-based key of the principal.  Doing so has the same security
539   exposures as the Kerberos protocol without pre-authentication.  There
540   are few situations where the KDC needs to expose cipher text
541   encrypted in a weak key before the client has proven knowledge of
542   that key, and pre-authentication is desirable.
543
5443.3.  Client to KDC
545
546   This description assumes that a client has already received a
547   KDC_ERR_PREAUTH_REQUIRED from the KDC.  If the client performs
548   optimistic pre-authentication then the client needs to guess values
549   for the information it would normally receive from that error
550   response or use cached information obtained in prior interactions
551   with the KDC.
552
553   The client starts by initializing the pre-authentication state as
554   specified.  It then processes the padata in the
555   KDC_ERR_PREAUTH_REQUIRED.
556
557
558
559Hartman & Zhu           Expires December 6, 2009               [Page 10]
560
561Internet-Draft         Kerberos Preauth Framework              June 2009
562
563
564   When processing the response to the KDC_ERR_PREAUTH_REQUIRED, the
565   client MAY ignore any padata it chooses unless doing so violates a
566   specification to which the client conforms.  Clients conforming to
567   this specification MUST NOT ignore the padata defined in Section 6.3.
568   Clients SHOULD process padata unrelated to this framework or other
569   means of authenticating the user.  Clients SHOULD choose one
570   authentication set or mechanism that could lead to authenticating the
571   user and ignore the rest.  Since the list of mechanisms offered by
572   the KDC is in the decreasing preference order, clients typically
573   choose the first mechanism or authentication set that the client can
574   usefully perform.  If a client chooses to ignore a padata it MUST NOT
575   process the padata, allow the padata to affect the pre-authentication
576   state, nor respond to the padata.
577
578   For each padata the client chooses to process, the client processes
579   the padata and modifies the pre-authentication state as required by
580   that mechanism.  Padata are processed in the order received from the
581   KDC.
582
583   After processing the padata in the KDC error, the client generates a
584   new request.  It processes the pre-authentication mechanisms in the
585   order in which they will appear in the next request, updating the
586   state as appropriate.  The request is sent when it is complete.
587
5883.4.  KDC to Client
589
590   When a KDC receives an AS request from a client, it needs to
591   determine whether it will respond with an error or an AS reply.
592   There are many causes for an error to be generated that have nothing
593   to do with pre-authentication; they are discussed in the core
594   Kerberos specification.
595
596   From the standpoint of evaluating the pre-authentication, the KDC
597   first starts by initializing the pre-authentication state.  If a PA-
598   FX-COOKIE pre-authentication data item is present, it is processed
599   first; see Section 6.3 for a definition.  It then processes the
600   padata in the request.  As mentioned in Section 3.3, the KDC MAY
601   ignore padata that is inappropriate for the configuration and MUST
602   ignore padata of an unknown type.  The KDC MUST NOT ignore padata of
603   types used in previous messages.  For example, if a KDC issues a
604   KDC_ERR_PREAUTH_REQUIRED error including padata of type x, then the
605   KDC cannot ignore padata of type x received in an AS-REQ message from
606   the client.
607
608   At this point the KDC decides whether it will issue an error or a
609   reply.  Typically a KDC will issue a reply if the client's identity
610   has been authenticated to a sufficient degree.
611
612
613
614
615Hartman & Zhu           Expires December 6, 2009               [Page 11]
616
617Internet-Draft         Kerberos Preauth Framework              June 2009
618
619
620   In the case of a KDC_ERR_MORE_PREAUTH_DATA_NEEDED error, the KDC
621   first starts by initializing the pre-authentication state.  Then it
622   processes any padata in the client's request in the order provided by
623   the client.  Mechanisms that are not understood by the KDC are
624   ignored.  Next, it generates padata for the error response, modifying
625   the pre-authentication state appropriately as each mechanism is
626   processed.  The KDC chooses the order in which it will generate
627   padata (and thus the order of padata in the response), but it needs
628   to modify the pre-authentication state consistently with the choice
629   of order.  For example, if some mechanism establishes an
630   authenticated client identity, then the subsequent mechanisms in the
631   generated response receive this state as input.  After the padata is
632   generated, the error response is sent.  Typically the errors with the
633   code KDC_ERR_MORE_PREAUTH_DATA_NEEDED in a conversation will include
634   KDC state as discussed in Section 6.3.
635
636   To generate a final reply, the KDC generates the padata modifying the
637   pre-authentication state as necessary.  Then it generates the final
638   response, encrypting it in the current pre-authentication reply key.
639
640
6414.  Pre-Authentication Facilities
642
643   Pre-Authentication mechanisms can be thought of as providing various
644   conceptual facilities.  This serves two useful purposes.  First,
645   mechanism authors can choose only to solve one specific small
646   problem.  It is often useful for a mechanism designed to offer key
647   management not to directly provide client authentication but instead
648   to allow one or more other mechanisms to handle this need.  Secondly,
649   thinking about the abstract services that a mechanism provides yields
650   a minimum set of security requirements that all mechanisms providing
651   that facility must meet.  These security requirements are not
652   complete; mechanisms will have additional security requirements based
653   on the specific protocol they employ.
654
655   A mechanism is not constrained to only offering one of these
656   facilities.  While such mechanisms can be designed and are sometimes
657   useful, many pre-authentication mechanisms implement several
658   facilities.  By combining multiple facilities in a single mechanism,
659   it is often easier to construct a secure, simple solution than by
660   solving the problem in full generality.  Even when mechanisms provide
661   multiple facilities, they need to meet the security requirements for
662   all the facilities they provide.  If the FAST factor approach is
663   used, it is likely that one or a small number of facilities can be
664   provided by a single mechanism without complicating the security
665   analysis.
666
667   According to Kerberos extensibility rules (Section 1.5 of the
668
669
670
671Hartman & Zhu           Expires December 6, 2009               [Page 12]
672
673Internet-Draft         Kerberos Preauth Framework              June 2009
674
675
676   Kerberos specification [RFC4120]), an extension MUST NOT change the
677   semantics of a message unless a recipient is known to understand that
678   extension.  Because a client does not know that the KDC supports a
679   particular pre-authentication mechanism when it sends an initial
680   request, a pre-authentication mechanism MUST NOT change the semantics
681   of the request in a way that will break a KDC that does not
682   understand that mechanism.  Similarly, KDCs MUST NOT send messages to
683   clients that affect the core semantics unless the client has
684   indicated support for the message.
685
686   The only state in this model that would break the interpretation of a
687   message is changing the expected reply key.  If one mechanism changed
688   the reply key and a later mechanism used that reply key, then a KDC
689   that interpreted the second mechanism but not the first would fail to
690   interpret the request correctly.  In order to avoid this problem,
691   extensions that change core semantics are typically divided into two
692   parts.  The first part proposes a change to the core semantic--for
693   example proposes a new reply key.  The second part acknowledges that
694   the extension is understood and that the change takes effect.
695   Section 4.2 discusses how to design mechanisms that modify the reply
696   key to be split into a proposal and acceptance without requiring
697   additional round trips to use the new reply key in subsequent pre-
698   authentication.  Other changes in the state described in Section 3.1
699   can safely be ignored by a KDC that does not understand a mechanism.
700   Mechanisms that modify the behavior of the request outside the scope
701   of this framework need to carefully consider the Kerberos
702   extensibility rules to avoid similar problems.
703
7044.1.  Client-authentication Facility
705
706   The client authentication facility proves the identity of a user to
707   the KDC before a ticket is issued.  Examples of mechanisms
708   implementing this facility include the encrypted timestamp facility
709   defined in Section 5.2.7.2 of the Kerberos specification [RFC4120].
710   Mechanisms that provide this facility are expected to mark the client
711   as authenticated.
712
713   Mechanisms implementing this facility SHOULD require the client to
714   prove knowledge of the reply key before transmitting a successful KDC
715   reply.  Otherwise, an attacker can intercept the pre-authentication
716   exchange and get a reply to attack.  One way of proving the client
717   knows the reply key is to implement the Replace Reply Key facility
718   along with this facility.  The PKINIT mechanism [RFC4556] implements
719   Client Authentication alongside Replace Reply Key.
720
721   If the reply key has been replaced, then mechanisms such as
722   encrypted-timestamp that rely on knowledge of the reply key to
723   authenticate the client MUST NOT be used.
724
725
726
727Hartman & Zhu           Expires December 6, 2009               [Page 13]
728
729Internet-Draft         Kerberos Preauth Framework              June 2009
730
731
7324.2.  Strengthening-reply-key Facility
733
734   Particularly when dealing with keys based on passwords, it is
735   desirable to increase the strength of the key by adding additional
736   secrets to it.  Examples of sources of additional secrets include the
737   results of a Diffie-Hellman key exchange or key bits from the output
738   of a smart card [KRB-WG.SAM].  Typically these additional secrets can
739   be first combined with the existing reply key and then converted to a
740   protocol key using tools defined in Section 6.1.
741
742   Typically a mechanism implementing this facility will know that the
743   other side of the exchange supports the facility before the reply key
744   is changed.  For example, a mechanism might need to learn the
745   certificate for a KDC before encrypting a new key in the public key
746   belonging to that certificate.  However, if a mechanism implementing
747   this facility wishes to modify the reply key before knowing that the
748   other party in the exchange supports the mechanism, it proposes
749   modifying the reply key.  The other party then includes a message
750   indicating that the proposal is accepted if it is understood and
751   meets policy.  In many cases it is desirable to use the new reply key
752   for client authentication and for other facilities.  Waiting for the
753   other party to accept the proposal and actually modify the reply key
754   state would add an additional round trip to the exchange.  Instead,
755   mechanism designers are encouraged to include a typed hole for
756   additional padata in the message that proposes the reply key change.
757   The padata included in the typed hole are generated assuming the new
758   reply key.  If the other party accepts the proposal, then these
759   padata are considered as an inner level.  As with the outer level,
760   one authentication set or mechanism is typically chosen for client
761   authentication, along with auxiliary mechanisms such as KDC cookies,
762   and other mechanisms are ignored.  When mechanisms include such a
763   container, the hint provided for use in authentication sets (as
764   defined in Section 6.4) MUST contain a sequence of inner mechanisms
765   along with hints for those mechanisms.  The party generating the
766   proposal can determine whether the padata were processed based on
767   whether the proposal for the reply key is accepted.
768
769   The specific formats of the proposal message, including where padata
770   are included is a matter for the mechanism specification.  Similarly,
771   the format of the message accepting the proposal is mechanism-
772   specific.
773
774   Mechanisms implementing this facility and including a typed hole for
775   additional padata MUST checksum that padata using a keyed checksum or
776   encrypt the padata.  This requirement protects against modification
777   of the contents of the typed hole.  By modifying these contents an
778   attacker might be able to choose which mechanism is used to
779   authenticate the client, or to convince a party to provide text
780
781
782
783Hartman & Zhu           Expires December 6, 2009               [Page 14]
784
785Internet-Draft         Kerberos Preauth Framework              June 2009
786
787
788   encrypted in a key that the attacker had manipulated.  It is
789   important that mechanisms strengthen the reply key enough that using
790   it to checksum padata is appropriate.
791
7924.3.  Replacing-reply-key Facility
793
794   The Replace Reply Key facility replaces the key in which a successful
795   AS reply will be encrypted.  This facility can only be used in cases
796   where knowledge of the reply key is not used to authenticate the
797   client.  The new reply key MUST be communicated to the client and the
798   KDC in a secure manner.  This facility MUST NOT be used if there can
799   be a man-in-the-middle between the client and the KDC.  Mechanisms
800   implementing this facility MUST mark the reply key as replaced in the
801   pre-authentication state.  Mechanisms implementing this facility MUST
802   either provide a mechanism to verify the KDC reply to the client or
803   mark the reply as unverified in the pre-authentication state.
804   Mechanisms implementing this facility SHOULD NOT be used if a
805   previous mechanism has used the reply key.
806
807   As with the strengthening-reply-key facility, Kerberos extensibility
808   rules require that the reply key not be changed unless both sides of
809   the exchange understand the extension.  In the case of this facility
810   it will likely be the case for both sides to know that the facility
811   is available by the time that the new key is available to be used.
812   However, mechanism designers can use a container for padata in a
813   proposal message as discussed in Section 4.2 if appropriate.
814
8154.4.  KDC-authentication Facility
816
817   This facility verifies that the reply comes from the expected KDC.
818   In traditional Kerberos, the KDC and the client share a key, so if
819   the KDC reply can be decrypted then the client knows that a trusted
820   KDC responded.  Note that the client machine cannot trust the client
821   unless the machine is presented with a service ticket for it
822   (typically the machine can retrieve this ticket by itself).  However,
823   if the reply key is replaced, some mechanism is required to verify
824   the KDC.  Pre-authentication mechanisms providing this facility allow
825   a client to determine that the expected KDC has responded even after
826   the reply key is replaced.  They mark the pre-authentication state as
827   having been verified.
828
829
8305.  Requirements for Pre-Authentication Mechanisms
831
832   This section lists requirements for specifications of pre-
833   authentication mechanisms.
834
835   For each message in the pre-authentication mechanism, the
836
837
838
839Hartman & Zhu           Expires December 6, 2009               [Page 15]
840
841Internet-Draft         Kerberos Preauth Framework              June 2009
842
843
844   specification describes the pa-type value to be used and the contents
845   of the message.  The processing of the message by the sender and
846   recipient is also specified.  This specification needs to include all
847   modifications to the pre-authentication state.
848
849   Generally mechanisms have a message that can be sent in the error
850   data of the KDC_ERR_PREAUTH_REQUIRED error message or in an
851   authentication set.  If the client needs information such as trusted
852   certificate authorities in order to determine if it can use the
853   mechanism, then this information should be in that message.  In
854   addition, such mechanisms should also define a pa-hint to be included
855   in authentication sets.  Often, the same information included in the
856   padata-value is appropriate to include in the pa-hint (as defined in
857   Section 6.4).
858
859   In order to ease security analysis the mechanism specification should
860   describe what facilities from this document are offered by the
861   mechanism.  For each facility, the security consideration section of
862   the mechanism specification should show that the security
863   requirements of that facility are met.  This requirement is
864   applicable to any FAST factor that provides authentication
865   information.
866
867   Significant problems have resulted in the specification of Kerberos
868   protocols because much of the KDC exchange is not protected against
869   authentication.  The security considerations section should discuss
870   unauthenticated plaintext attacks.  It should either show that
871   plaintext is protected or discuss what harm an attacker could do by
872   modifying the plaintext.  It is generally acceptable for an attacker
873   to be able to cause the protocol negotiation to fail by modifying
874   plaintext.  More significant attacks should be evaluated carefully.
875
876   As discussed in Section 6.3, there is no guarantee that a client will
877   use the same KDCs for all messages in a conversation.  The mechanism
878   specification needs to show why the mechanism is secure in this
879   situation.  The hardest problem to deal with, especially for
880   challenge/response mechanisms is to make sure that the same response
881   cannot be replayed against two KDCs while allowing the client to talk
882   to any KDC.
883
884
8856.  Tools for Use in Pre-Authentication Mechanisms
886
887   This section describes common tools needed by multiple pre-
888   authentication mechanisms.  By using these tools mechanism designers
889   can use a modular approach to specify mechanism details and ease
890   security analysis.
891
892
893
894
895Hartman & Zhu           Expires December 6, 2009               [Page 16]
896
897Internet-Draft         Kerberos Preauth Framework              June 2009
898
899
9006.1.  Combining Keys
901
902   Frequently a weak key needs to be combined with a stronger key before
903   use.  For example, passwords are typically limited in size and
904   insufficiently random, therefore it is desirable to increase the
905   strength of the keys based on passwords by adding additional secrets.
906   Additional source of secrecy may come from hardware tokens.
907
908   This section provides standard ways to combine two keys into one.
909
910   KRB-FX-CF1() is defined to combine two pass-phrases.
911
912       KRB-FX-CF1(UTF-8 string, UTF-8 string) -> (UTF-8 string)
913       KRB-FX-CF1(x, y) -> x || y
914
915   Where || denotes concatenation.  The strength of the final key is
916   roughly the total strength of the individual keys being combined
917   assuming that the string_to_key() function [RFC3961] uses all its
918   input evenly.
919
920   An example usage of KRB-FX-CF1() is when a device provides random but
921   short passwords, the password is often combined with a personal
922   identification number (PIN).  The password and the PIN can be
923   combined using KRB-FX-CF1().
924
925   KRB-FX-CF2() combines two protocol keys based on the pseudo-random()
926   function defined in [RFC3961].
927
928   Given two input keys, K1 and K2, where K1 and K2 can be of two
929   different enctypes, the output key of KRB-FX-CF2(), K3, is derived as
930   follows:
931
932       KRB-FX-CF2(protocol key, protocol key, octet string,
933                 octet string)  ->  (protocol key)
934
935       PRF+(K1, pepper1) -> octet-string-1
936       PRF+(K2, pepper2) -> octet-string-2
937       KRB-FX-CF2(K1, K2, pepper1, pepper2) ->
938              random-to-key(octet-string-1 ^ octet-string-2)
939
940   Where ^ denotes the exclusive-OR operation.  PRF+() is defined as
941   follows:
942
943    PRF+(protocol key, octet string) -> (octet string)
944
945    PRF+(key, shared-info) -> pseudo-random( key,  1 || shared-info ) ||
946                  pseudo-random( key, 2 || shared-info ) ||
947                  pseudo-random( key, 3 || shared-info ) || ...
948
949
950
951Hartman & Zhu           Expires December 6, 2009               [Page 17]
952
953Internet-Draft         Kerberos Preauth Framework              June 2009
954
955
956   Here the counter value 1, 2, 3 and so on are encoded as a one-octet
957   integer.  The pseudo-random() operation is specified by the enctype
958   of the protocol key.  PRF+() uses the counter to generate enough bits
959   as needed by the random-to-key() [RFC3961] function for the
960   encryption type specified for the resulting key; unneeded bits are
961   removed from the tail.  Unless otherwise specified, the resulting
962   enctype of KRB-FX-CF2 is the enctype of k1.
963
964   Mechanism designers MUST specify the values for the input parameter
965   pepper1 and pepper2 when combining two keys using KRB-FX-CF2().  The
966   pepper1 and pepper2 MUST be distinct so that if the two keys being
967   combined are the same, the resulting key is not a trivial key.
968
9696.2.  Protecting Requests/Responses
970
971   Mechanism designers SHOULD protect clear text portions of pre-
972   authentication data.  Various denial of service attacks and downgrade
973   attacks against Kerberos are possible unless plaintexts are somehow
974   protected against modification.  An early design goal of Kerberos
975   Version 5 [RFC4120] was to avoid encrypting more of the
976   authentication exchange that was required.  (Version 4 doubly-
977   encrypted the encrypted part of a ticket in a KDC reply, for
978   example.)  This minimization of encryption reduces the load on the
979   KDC and busy servers.  Also, during the initial design of Version 5,
980   the existence of legal restrictions on the export of cryptography
981   made it desirable to minimize of the number of uses of encryption in
982   the protocol.  Unfortunately, performing this minimization created
983   numerous instances of unauthenticated security-relevant plaintext
984   fields.
985
986   If there is more than one round trip for an authentication exchange,
987   mechanism designers need to allow either the client or the KDC to
988   provide a checksum of all the messages exchanged on the wire in the
989   conversation, and the checksum is then verified by the receiver.
990
991   New mechanisms MUST NOT be hard-wired to use a specific algorithm.
992
993   Primitives defined in [RFC3961] are RECOMMENDED for integrity
994   protection and confidentiality.  Mechanisms based on these primitives
995   are crypto-agile as the result of using [RFC3961] along with
996   [RFC4120].  The advantage afforded by crypto-agility is the ability
997   to incrementally deploy a fix specific to a particular algorithm thus
998   avoid a multi-year standardization and deployment cycle, when real
999   attacks do arise against that algorithm.
1000
1001   Note that data used by FAST factors (defined in Section 6.5) is
1002   encrypted in a protected channel, thus they do not share the un-
1003   authenticated-text issues with mechanisms designed as full-blown pre-
1004
1005
1006
1007Hartman & Zhu           Expires December 6, 2009               [Page 18]
1008
1009Internet-Draft         Kerberos Preauth Framework              June 2009
1010
1011
1012   authentication mechanisms.
1013
10146.3.  Managing States for the KDC
1015
1016   Kerberos KDCs are stateless in that there is no requirement that
1017   clients will choose the same KDC for the second request in a
1018   conversation.  Proxies or other intermediate nodes may also influence
1019   KDC selection.  So, each request from a client to a KDC must include
1020   sufficient information that the KDC can regenerate any needed state.
1021   This is accomplished by giving the client a potentially long opaque
1022   cookie in responses to include in future requests in the same
1023   conversation.  The KDC MAY respond that a conversation is too old and
1024   needs to restart by responding with a KDC_ERR_PREAUTH_EXPIRED error.
1025
1026       KDC_ERR_PREAUTH_EXPIRED            90
1027
1028   When a client receives this error, the client SHOULD abort the
1029   existing conversation, and restart a new one.
1030
1031   An example, where more than one message from the client is needed, is
1032   when the client is authenticated based on a challenge-response
1033   scheme.  In that case, the KDC needs to keep track of the challenge
1034   issued for a client authentication request.
1035
1036   The PA-FX-COOKIE padata type is defined in this section to facilitate
1037   state management in the AS exchange.  This padata is sent by the KDC
1038   when the KDC requires state for a future transaction.  The client
1039   includes this opaque token in the next message in the conversation.
1040   The token may be relatively large; clients MUST be prepared for
1041   tokens somewhat larger than the size of all messages in a
1042   conversation.
1043
1044       PA-FX-COOKIE                       133
1045           -- Stateless cookie that is not tied to a specific KDC.
1046
1047   The corresponding padata-value field [RFC4120] contains an opaque
1048   token that will be echoed by the client in its response to an error
1049   from the KDC.
1050
1051   The cookie token is generated by the KDC and transmitted in a PA-FX-
1052   COOKIE pre-authentication data item of a KRB-ERROR message.  The
1053   client MUST copy the exact cookie encapsulated in a PA-FX-COOKIE data
1054   element into the next message of the same conversation.  The content
1055   of the cookie field is a local matter of the KDC.  As a result, it is
1056   not generally possible to mix KDC implementations from different
1057   vendors in the same realm.  However the KDC MUST construct the cookie
1058   token in such a manner that a malicious client cannot subvert the
1059   authentication process by manipulating the token.  The KDC
1060
1061
1062
1063Hartman & Zhu           Expires December 6, 2009               [Page 19]
1064
1065Internet-Draft         Kerberos Preauth Framework              June 2009
1066
1067
1068   implementation needs to consider expiration of tokens, key rollover
1069   and other security issues in token design.  The content of the cookie
1070   field is likely specific to the pre-authentication mechanisms used to
1071   authenticate the client.  If a client authentication response can be
1072   replayed to multiple KDCs via the PA-FX-COOKIE mechanism, an
1073   expiration in the cookie is RECOMMENDED to prevent the response being
1074   presented indefinitely.
1075
1076   If at least one more message for a mechanism or a mechanism set is
1077   expected by the KDC, the KDC returns a
1078   KDC_ERR_MORE_PREAUTH_DATA_NEEDED error with a PA-FX-COOKIE to
1079   identify the conversation with the client according to Section 3.2.
1080   The cookie is not expected to stay constant for a conversation: the
1081   KDC is expected to generate a new cookie for each message.
1082
1083        KDC_ERR_MORE_PREAUTH_DATA_NEEDED   91
1084
1085   A client MAY throw away the state associated with a conversation and
1086   begin a new conversation by discarding its state and not including a
1087   cooking in the first message of a conversation.  KDCs that comply
1088   with this specification MUST include a cookie in a response when the
1089   client can continue the conversation.  In particular, a KDC MUST
1090   include a cookie in a KDC_ERR_PREAUTH_REQUIRED or
1091   KDC_ERR_MORE_PREAUTH_DATA_NEEDED.  KDCs SHOULD include a cookie in
1092   errors containing additional information allowing a client to retry.
1093   One reasonable strategy for meeting these requirements is to always
1094   include a cookie in KDC errors.
1095
1096   A KDC MAY indicate that it is terminating a conversation by not
1097   including a cookie in a response.  When FAST is used, clients can
1098   assume that the absence of a cookie means that the KDC is ending the
1099   conversation.  Clients also need to deal with KDCs prior to this
1100   specification that do not include cookies; if cookies nor FAST are
1101   used in a conversation, the absence of a cookie is not a strong
1102   indication that the KDC is terminating the conversation.
1103
11046.4.  Pre-authentication Set
1105
1106   If all mechanisms in a group need to successfully complete in order
1107   to authenticate a client, the client and the KDC SHOULD use the PA-
1108   AUTHENTICATION-SET padata element.
1109
1110        PA-AUTHENTICATION-SET              134
1111
1112   A PA-AUTHENTICATION-SET padata element contains the ASN.1 DER
1113   encoding of the PA-AUTHENTICATION-SET structure:
1114
1115
1116
1117
1118
1119Hartman & Zhu           Expires December 6, 2009               [Page 20]
1120
1121Internet-Draft         Kerberos Preauth Framework              June 2009
1122
1123
1124        PA-AUTHENTICATION-SET ::= SEQUENCE OF PA-AUTHENTICATION-SET-ELEM
1125
1126        PA-AUTHENTICATION-SET-ELEM ::= SEQUENCE {
1127            pa-type      [0] Int32,
1128                -- same as padata-type.
1129            pa-hint      [1] OCTET STRING OPTIONAL,
1130            pa-value     [2] OCTET STRING OPTIONAL,
1131            ...
1132        }
1133
1134   The pa-type field of the PA-AUTHENTICATION-SET-ELEM structure
1135   contains the corresponding value of padata-type in PA-DATA [RFC4120].
1136   Associated with the pa-type is a pa-hint, which is an octet-string
1137   specified by the pre-authentication mechanism.  This hint may provide
1138   information for the client which helps it determine whether the
1139   mechanism can be used.  For example a public-key mechanism might
1140   include the certificate authorities it trusts in the hint info.  Most
1141   mechanisms today do not specify hint info; if a mechanism does not
1142   specify hint info the KDC MUST NOT send a hint for that mechanism.
1143   To allow future revisions of mechanism specifications to add hint
1144   info, clients MUST ignore hint info received for mechanisms that the
1145   client believes do not support hint info.  The pa-value element of
1146   the PA-AUTHENTICATION-SET-ELEM sequence is included to carry the
1147   first padata-value from the KDC to the client.  If the client chooses
1148   this authentication set then the client MUST process this pa-value.
1149   The pa-value element MUST be absent for all but the first entry in
1150   the authentication set.  Clients MUST ignore pa-value for the second
1151   and following entries in the authentication set.
1152
1153   If the client chooses an authentication set, then its first AS-REQ
1154   message MUST contain a PA-AUTH-SET-SELECTED padata element.  This
1155   element contains the encoding of the PA-AUTHENTICATION-SET sequence
1156   received from the KDC corresponding to the authentication set that is
1157   chosen.  The client MUST use the same octet values received from the
1158   KDC; it cannot re-encode the sequence.  This allows KDCs to use bit-
1159   wise comparison to identify the selected authentication set.  The PA-
1160   AUTH-SET-SELECTED padata element MUST come before any padata elements
1161   from the authentication set in the padata sequence in the AS-REQ
1162   message.  The client MAY cache authentication sets from prior
1163   messages and use them to construct an optimistic initial AS-REQ.  If
1164   the KDC receives a PA-AUTH-SET-SELECTED padata element that does not
1165   correspond to an authentication set that it would offer, then the KDC
1166   returns the KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET error.  The e-data
1167   in this error contains a sequence of padata just as for the
1168   KDC_ERR_PREAUTH_REQUIRED error.
1169
1170
1171         PA-AUTH-SET-SELECTED                   135
1172
1173
1174
1175Hartman & Zhu           Expires December 6, 2009               [Page 21]
1176
1177Internet-Draft         Kerberos Preauth Framework              June 2009
1178
1179
1180         KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET 92
1181
1182   The PA-AUTHENTICATION-SET appears only in the first message from the
1183   KDC to the client.  In particular, the client MAY fail if the
1184   authentication mechanism sets change as the conversation progresses.
1185   Clients MAY assume that the hints provided in the authentication set
1186   contain enough information that the client knows what user interface
1187   elements need to be displayed during the entire authentication
1188   conversation.  Exceptional circumstances such as expired passwords or
1189   expired accounts may require that additional user interface be
1190   displayed.  Mechanism designers needs to carefully consider the
1191   design of their hints so that the client has this information.  This
1192   way, clients can construct necessary dialogue boxes or wizards based
1193   on the authentication set and can present a coherent user interface.
1194   Current standards for user interface do not provide an acceptable
1195   experience when the client has to ask additional questions later in
1196   the conversation.
1197
1198   When indicating which sets of pre-authentication mechanisms are
1199   supported, the KDC includes a PA-AUTHENTICATION-SET padata element
1200   for each pre-authentication mechanism set.
1201
1202   The client sends the padata-value for the first mechanism it picks in
1203   the pre-authentication set, when the first mechanism completes, the
1204   client and the KDC will proceed with the second mechanism, and so on
1205   until all mechanisms complete successfully.  The PA-FX-COOKIE as
1206   defined in Section 6.3 MUST be sent by the KDC.  One reason for this
1207   requirement is so that the conversation can continue if the
1208   conversation involves multiple KDCs.  KDCs MUST support clients that
1209   do not include a cookie because they optimistically choose an
1210   authentication set, although they MAY always return
1211   KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET and include a cookie in that
1212   message.  Clients that support PA-AUTHENTICATION-SET MUST support PA-
1213   FX-COOKIE.
1214
1215   Before the authentication succeeds and a ticket is returned, the
1216   message that the client sends is an AS_REQ and the message that the
1217   KDC sends is a KRB-ERROR message.  The error code in the KRB-ERROR
1218   message from the KDC is KDC_ERR_MORE_PREAUTH_DATA_NEEDED as defined
1219   in Section 6.3 and the accompanying e-data contains the DER encoding
1220   of ASN.1 type METHOD-DATA.  The KDC includes the padata elements in
1221   the METHOD-DATA.  If there is no padata, the e-data field is absent
1222   in the KRB-ERROR message.
1223
1224   If the client sends the last message for a given mechanism, then the
1225   KDC sends the first message for the next mechanism.  If the next
1226   mechanism does not start with a KDC-side challenge, then the KDC
1227   includes a padata item with the appropriate pa-type and an empty pa-
1228
1229
1230
1231Hartman & Zhu           Expires December 6, 2009               [Page 22]
1232
1233Internet-Draft         Kerberos Preauth Framework              June 2009
1234
1235
1236   data.
1237
1238   If the KDC sends the last message for a particular mechanism, the KDC
1239   also includes the first padata for the next mechanism.
1240
12416.5.  Definition of Kerberos FAST Padata
1242
1243   As described in [RFC4120], Kerberos is vulnerable to offline
1244   dictionary attacks.  An attacker can request an AS-REP and try
1245   various passwords to see if they can decrypt the resulting ticket.
1246   RFC 4120 provides the encrypted timestamp pre-authentication method
1247   that ameliorates the situation somewhat by requiring that an attacker
1248   observe a successful authentication.  However stronger security is
1249   desired in many environments.  The Kerberos FAST pre-authentication
1250   padata defined in this section provides a tool to significantly
1251   reduce vulnerability to offline dictionary attack.  When combined
1252   with encrypted challenge, FAST requires an attacker to mount a
1253   successful man-in-the-middle attack to observe ciphertext.  When
1254   combined with host keys, FAST can even protect against active
1255   attacks.  FAST also provides solutions to common problems for pre-
1256   authentication mechanisms such as binding of the request and the
1257   reply, freshness guarantee of the authentication.  FAST itself,
1258   however, does not authenticate the client or the KDC, instead, it
1259   provides a typed hole to allow pre-authentication data be tunneled.
1260   A pre-authentication data element used within FAST is called a FAST
1261   factor.  A FAST factor captures the minimal work required for
1262   extending Kerberos to support a new pre-authentication scheme.
1263
1264   A FAST factor MUST NOT be used outside of FAST unless its
1265   specification explicitly allows so.  The typed holes in FAST messages
1266   can also be used as generic holes for other padata that are not
1267   intended to prove the client's identity, or establish the reply key.
1268
1269   New pre-authentication mechanisms SHOULD be designed as FAST factors,
1270   instead of full-blown pre-authentication mechanisms.
1271
1272   FAST factors that are pre-authentication mechanisms MUST meet the
1273   requirements in Section 5.
1274
1275   FAST employs an armoring scheme.  The armor can be a Ticket Granting
1276   Ticket (TGT) obtained by the client's machine using the host keys to
1277   pre-authenticate with the KDC, or an anonymous TGT obtained based on
1278   anonymous PKINIT [KRB-ANON] [RFC4556].
1279
1280   The rest of this section describes the types of armors and the syntax
1281   of the messages used by FAST.  Conforming implementations MUST
1282   support Kerberos FAST padata.
1283
1284
1285
1286
1287Hartman & Zhu           Expires December 6, 2009               [Page 23]
1288
1289Internet-Draft         Kerberos Preauth Framework              June 2009
1290
1291
1292   Any FAST armor scheme MUST provide a fresh armor key for each
1293   conversation.  Clients and KDCs can assume that if a message is
1294   encrypted and integrity protected with a given armor key then it is
1295   part of the conversation using that armor key.
1296
1297   All KDCs in a realm MUST support FAST if FAST is offered by any KDC
1298   as a pre-authentication mechanism.
1299
13006.5.1.  FAST Armors
1301
1302   An armor key is used to encrypt pre-authentication data in the FAST
1303   request and the response.  The KrbFastArmor structure is defined to
1304   identify the armor key.  This structure contains the following two
1305   fields: the armor-type identifies the type of armors, and the armor-
1306   value is an OCTET STRING that contains the description of the armor
1307   scheme and the armor key.
1308
1309        KrbFastArmor ::= SEQUENCE {
1310            armor-type   [0] Int32,
1311                -- Type of the armor.
1312            armor-value  [1] OCTET STRING,
1313                -- Value of the armor.
1314            ...
1315        }
1316
1317   The value of the armor key is a matter of the armor type
1318   specification.  Only one armor type is defined in this document.
1319
1320        FX_FAST_ARMOR_AP_REQUEST           1
1321
1322   The FX_FAST_ARMOR_AP_REQUEST armor is based on Kerberos tickets.
1323
1324   Conforming implementations MUST implement the
1325   FX_FAST_ARMOR_AP_REQUEST armor type.
1326
1327   FAST implementations MUST maintain state about whether the armor
1328   mechanism authenticates the KDC.  If it does not, then a fast factor
1329   that authenticates the KDC MUST be used if the reply key is replaced.
1330
13316.5.1.1.  Ticket-based Armors
1332
1333   This is a ticket-based armoring scheme.  The armor-type is
1334   FX_FAST_ARMOR_AP_REQUEST, the armor-value contains an ASN.1 DER
1335   encoded AP-REQ.  The ticket in the AP-REQ is called an armor ticket
1336   or an armor TGT.  The subkey field in the AP-REQ MUST be present.
1337   The armor key is defined by the following function:
1338
1339       armor_key = KRB-FX-CF2( subkey, ticket_session_key,
1340
1341
1342
1343Hartman & Zhu           Expires December 6, 2009               [Page 24]
1344
1345Internet-Draft         Kerberos Preauth Framework              June 2009
1346
1347
1348                   "subkeyarmor", "ticketarmor" )
1349
1350   The `ticket_session_key' is the session key from the ticket in the
1351   ap-req.  The `subkey' is the ap-req subkey.  This construction
1352   guarantees that both the KDC (through the session key) and the client
1353   (through the subkey) contribute to the armor key.
1354
1355   The server name field of the armor ticket MUST identify the TGS of
1356   the target realm.  Here are three common ways in the decreasing
1357   preference order how an armor TGT SHOULD be obtained:
1358
1359   1.  If the client is authenticating from a host machine whose
1360       Kerberos realm has an authentication path to the client's realm,
1361       the host machine obtains a TGT by using the host keys.  If the
1362       client's realm is different than the realm of the local host, the
1363       machine then obtains a cross-realm TGT to the client's realm as
1364       the armor ticket.  Otherwise, the host's primary TGT is the armor
1365       ticket.
1366
1367   2.  If the client's host machine cannot obtain a host ticket strictly
1368       based on RFC4120, but the KDC has an asymmetric signing key whose
1369       binding with the expected KDC can be verified by the client, the
1370       client can use anonymous PKINIT [KRB-ANON] [RFC4556] to
1371       authenticate the KDC and obtain an anonymous TGT as the armor
1372       ticket.  The armor ticket can also be a cross-realm TGT obtained
1373       based on the initial primary TGT obtained using anonymous PKINIT
1374       with KDC authentication.
1375
1376   3.  Otherwise, the client uses anonymous PKINIT to get an anonymous
1377       TGT without KDC authentication and that TGT is the armor ticket.
1378       Note that this mode of operation is vulnerable to man-in-the-
1379       middle attacks at the time of obtaining the initial anonymous
1380       armor TGT.
1381
1382   If anonymous PKINIT is used to obtain the armor ticket, the KDC
1383   cannot know whether its signing key can be verified by the client,
1384   hence the KDC MUST be marked as unverified from the KDC's point of
1385   view while the client could be able to authenticate the KDC by
1386   verifying the KDC's signing key is bound with the expected KDC.  The
1387   client needs to carefully consider the risk and benefit tradeoffs
1388   associated with active attacks before exposing cipher text encrypted
1389   using the user's long-term secrets when the armor does not
1390   authenticate the KDC.
1391
1392   The TGS MUST reject a request if there is an AD-fx-fast-armor (TBD)
1393   element in the authenticator of the pa-tgs-req padata or if the
1394   ticket in the authenticator of a pa-tgs-req contains the AD-fx-fast-
1395   armor authorization data element.  These tickets and authenticators
1396
1397
1398
1399Hartman & Zhu           Expires December 6, 2009               [Page 25]
1400
1401Internet-Draft         Kerberos Preauth Framework              June 2009
1402
1403
1404   MAY be used as FAST armor tickets but not to obtain a ticket via the
1405   TGS.  This authorization data is used in a system where the
1406   encryption of the user's pre-authentication data is performed in an
1407   unprivileged user process.  A privileged process can provide to the
1408   user process a host ticket, an authenticator for use with that
1409   ticket, and the sub session key contained in the authenticator.  In
1410   order for the host process to ensure that the host ticket is not
1411   accidentally or intentionally misused, (i.e. the user process might
1412   use the host ticket to authenticate as the host), it MUST include a
1413   critical authorization data element of the type AD-fx-fast-armor when
1414   providing the authenticator or in the enc-authorization-data field of
1415   the TGS request used to obtain the TGT.  The corresponding ad-data
1416   field of the AD-fx-fast-armor element is empty.
1417
1418   As discussed previously, the server of an armor ticket MUST be the
1419   TGS of the realm from whom service is requested.  As a result, if
1420   this armor type is used when a ticket is being validated, proxied, or
1421   in other cases where a ticket other than a TGT is presented to the
1422   TGS, a TGT will be used as an armor ticket, while another ticket will
1423   be used in the pa-tgs-req authenticator.
1424
14256.5.2.  FAST Request
1426
1427   A padata type PA-FX-FAST is defined for the Kerberos FAST pre-
1428   authentication padata.  The corresponding padata-value field
1429   [RFC4120] contains the DER encoding of the ASN.1 type PA-FX-FAST-
1430   REQUEST.  As with all pre-authentication types, the KDC SHOULD
1431   advertise PA-FX-FAST in a PREAUTH_REQUIRED error.  KDCs MUST send the
1432   advertisement of pa-fx-fast with an empty pa-value.  Clients MUST
1433   ignore the pa-value of PA-FX-FAST in an initial PREAUTH_REQUIRED
1434   error.  FAST is not expected to be used in an authentication set:
1435   clients will typically use FAST padata if available and this decision
1436   should not depend on what other pre-authentication methods are
1437   available.  As such, no pa-hint is defined for FAST at this time.
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455Hartman & Zhu           Expires December 6, 2009               [Page 26]
1456
1457Internet-Draft         Kerberos Preauth Framework              June 2009
1458
1459
1460       PA-FX-FAST                         136
1461           -- Padata type for Kerberos FAST
1462
1463       PA-FX-FAST-REQUEST ::= CHOICE {
1464           armored-data [0] KrbFastArmoredReq,
1465           ...
1466       }
1467
1468       KrbFastArmoredReq ::= SEQUENCE {
1469           armor        [0] KrbFastArmor OPTIONAL,
1470               -- Contains the armor that identifies the armor key.
1471               -- MUST be present in AS-REQ.
1472           req-checksum [1] Checksum,
1473               -- For AS, contains the checksum performed over the type
1474               -- KDC-REQ-BODY for the req-body field of the KDC-REQ
1475               -- structure;
1476               -- For TGS, contains the checksum performed over the type
1477               -- AP-REQ in the PA-TGS-REQ padata.
1478               -- The checksum key is the armor key, the checksum
1479               -- type is the required checksum type for the enctype of
1480               -- the armor key, and the key usage number is
1481               -- KEY_USAGE_FAST_REQ_CHKSUM.
1482           enc-fast-req [2] EncryptedData, -- KrbFastReq --
1483               -- The encryption key is the armor key, and the key usage
1484               -- number is KEY_USAGE_FAST_ENC.
1485           ...
1486       }
1487
1488       KEY_USAGE_FAST_REQ_CHKSUM          50
1489       KEY_USAGE_FAST_ENC                 51
1490
1491   The PA-FX-FAST-REQUEST structure contains a KrbFastArmoredReq type.
1492   The KrbFastArmoredReq encapsulates the encrypted padata.
1493
1494   The enc-fast-req field contains an encrypted KrbFastReq structure.
1495   The armor key is used to encrypt the KrbFastReq structure, and the
1496   key usage number for that encryption is KEY_USAGE_FAST_ENC.
1497
1498   The armor key is selected as follows:
1499
1500   o  In an AS request, the armor field in the KrbFastArmoredReq
1501      structure MUST be present and the armor key is identified
1502      according to the specification of the armor type.
1503
1504   o  There are two possibilities for armor for a TGS request.  If the
1505      ticket presented in the PA-TGS-REQ authenticator is a TGT, then
1506      the client SHOULD not include the armor field in the Krbfastreq
1507      and a subkey MUST be included in the PA-TGS-REQ authenticator.  In
1508
1509
1510
1511Hartman & Zhu           Expires December 6, 2009               [Page 27]
1512
1513Internet-Draft         Kerberos Preauth Framework              June 2009
1514
1515
1516      this case, the armor key is the same armor key that would be
1517      computed if the TGS-REQ authenticator was used in a
1518      FX_FAST_ARMOR_AP_REQUEST armor.  If a ticket other than a TGT is
1519      being presented to the TGS, a client SHOULD use some form of FAST
1520      armor such as a ticket-based armor with a TGT as an armor ticket.
1521      Clients MAY present a non-TGT in the PA-TGS-REQ authenticator and
1522      omit the armor field, in which case the armor key is the same that
1523      would be computed if the authenticator were used in a
1524      FX_FAST_ARMOR_AP_REQUEST armor.  This is the only case where a
1525      ticket other than a TGT can be used to establish an armor key;
1526      even though the armor key is computed the same as a
1527      FX_FAST_ARMOR_AP_REQUEST, a non-TGT cannot be used as an armor
1528      ticket in FX_FAST_ARMOR_AP_REQUEST.
1529
1530   The req-checksum field contains a checksum computed differently for
1531   AS and TGS.  For an AS-REQ, it is performed over the type KDC-REQ-
1532   BODY for the req-body field of the KDC-REQ structure of the
1533   containing message; for an TGS-REQ, it is performed over the type AP-
1534   REQ in the PA-TGS-REQ padata of the TGS request.  The checksum key is
1535   the armor key, and the checksum type is the required checksum type
1536   for the enctype of the armor key per [RFC3961].  This checksum MUST
1537   be a keyed checksume and it is included in order to bind the FAST
1538   padata to the outer request.  A KDC that implements FAST will ignore
1539   the outer request, but including a checksum is relatively cheap and
1540   may prevent confusing behavior.
1541
1542   The KrbFastReq structure contains the following information:
1543
1544        KrbFastReq ::= SEQUENCE {
1545            fast-options [0] FastOptions,
1546                -- Additional options.
1547            padata       [1] SEQUENCE OF PA-DATA,
1548                -- padata typed holes.
1549            req-body     [2] KDC-REQ-BODY,
1550                -- Contains the KDC request body as defined in Section
1551                -- 5.4.1 of [RFC4120].
1552                -- This req-body field is preferred over the outer field
1553                -- in the KDC request.
1554             ...
1555        }
1556
1557   The fast-options field indicates various options that are to modify
1558   the behavior of the KDC.  The following options are defined:
1559
1560        FastOptions ::= KerberosFlags
1561            -- reserved(0),
1562            -- hide-client-names(1),
1563            -- kdc-follow-referrals(16)
1564
1565
1566
1567Hartman & Zhu           Expires December 6, 2009               [Page 28]
1568
1569Internet-Draft         Kerberos Preauth Framework              June 2009
1570
1571
1572     Bits    Name                    Description
1573    -----------------------------------------------------------------
1574     0     RESERVED              Reserved for future expansion of this
1575                                 field.
1576     1     hide-client-names     Requesting the KDC to hide client
1577                                 names in the KDC response, as
1578                                 described next in this section.
1579     16    kdc-follow-referrals  Requesting the KDC to follow referrals.
1580
1581   Bits 1 through 15 inclusive (with bit 1 and bit 15 included) are
1582   critical options.  If the KDC does not support a critical option, it
1583   MUST fail the request with KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTIONS, and
1584   there is no accompanying e-data defined in this document for this
1585   error code.  Bit 16 and onward (with bit 16 included) are non-
1586   critical options.  KDCs conforming to this specification ignore
1587   unknown non-critical options.
1588
1589        KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTIONS   93
1590
1591   The hide-client-names Option
1592
1593      The Kerberos response defined in [RFC4120] contains the client
1594      identity in clear text, This makes traffic analysis
1595      straightforward.  The hide-client-names option is designed to
1596      complicate traffic analysis.  If the hide-client-names option is
1597      set, the KDC implementing PA-FX-FAST MUST identify the client as
1598      the anonymous principal [KRB-ANON] in the KDC reply and the error
1599      response.  Hence this option is set by the client if it wishes to
1600      conceal the client identity in the KDC response.  A conforming KDC
1601      ignores the client principal name in the outer KDC-REQ-BODY field,
1602      and identifies the client using the cname and crealm fields in the
1603      req-body field of the KrbFastReq structure.
1604
1605   The kdc-follow-referrals Option
1606
1607      The Kerberos client described in [RFC4120] has to request referral
1608      TGTs along the authentication path in order to get a service
1609      ticket for the target service.  The Kerberos client described in
1610      the [REFERRALS] needs to contact the AS specified in the error
1611      response in order to complete client referrals.  The kdc-follow-
1612      referrals option is designed to minimize the number of messages
1613      that need to be processed by the client.  This option is useful
1614      when, for example, the client may contact the KDC via a satellite
1615      link that has high network latency, or the client has limited
1616      computational capabilities.  If the kdc-follow-referrals option is
1617      set, the KDC MAY act as the client to follow TGS referrals
1618      [REFERRALS], and return the service ticket to the named server
1619      principal in the client request using the reply key expected by
1620
1621
1622
1623Hartman & Zhu           Expires December 6, 2009               [Page 29]
1624
1625Internet-Draft         Kerberos Preauth Framework              June 2009
1626
1627
1628      the client.  That is, rather than returning a referral, the KDC
1629      follows that referral by contacting a remote KDC and processing
1630      the referral.  The kdc-referrals option can be implemented when
1631      the KDC knows the reply key.  The KDC can ignore kdc-referrals
1632      option when it does not understand it or it does not allow this
1633      option based on local policy.  The client SHOULD be capable of
1634      processing the KDC responses when this option is not honored by
1635      the KDC.  Clients SHOULD use TCP to contact a KDC if this option
1636      is going to be used to avoid problems when the client's UDP
1637      retransmit algorithm has timeouts insufficient to allow the KDC to
1638      interact with remote KDCs.
1639
1640   The padata field contains a list of PA-DATA structures as described
1641   in Section 5.2.7 of [RFC4120].  These PA-DATA structures can contain
1642   FAST factors.  They can also be used as generic typed-holes to
1643   contain data not intended for proving the client's identity or
1644   establishing a reply key, but for protocol extensibility.  If the KDC
1645   supports the PA-FX-FAST-REQUEST padata, unless otherwise specified,
1646   the client MUST place any padata that is otherwise in the outer KDC
1647   request body into this field.  In a TGS request, PA-TGS-REQ padata is
1648   not included in this field and it is present in the outer KDC request
1649   body.
1650
1651   The KDC-REQ-BODY in the FAST structure is used in preference to the
1652   KDC-REQ-BODY outside of the FAST pre-authentication.  The outer KDC-
1653   REQ-BODY structure SHOULD be filled in for backwards compatibility
1654   with KDCs that do not support FAST.  A conforming KDC ignores the
1655   outer KDC-REQ-BODY field in the KDC request.  Pre-authentication data
1656   methods such as [RFC4556] that include a checksum of the KDC-REQ-BODY
1657   should checksum the KDC-REQ-BODY.
1658
1659   In a TGS request, a client MAY include the AD-fx-fast-used authdata
1660   either in the pa-tgs-req authenticator or in the authorization data
1661   in the pa-tgs-req ticket.  If the KDC receives this authorization
1662   data but does not find a FAST padata then it MUST return
1663   KRB_APP_ERR_MODIFIED.
1664
16656.5.3.  FAST Response
1666
1667   The KDC that supports the PA-FX-FAST padata MUST include a PA-FX-FAST
1668   padata element in the KDC reply.  In the case of an error, the PA-FX-
1669   FAST padata is included in the KDC responses according to
1670   Section 6.5.4.
1671
1672   The corresponding padata-value field [RFC4120] for the PA-FX-FAST in
1673   the KDC response contains the DER encoding of the ASN.1 type PA-FX-
1674   FAST-REPLY.
1675
1676
1677
1678
1679Hartman & Zhu           Expires December 6, 2009               [Page 30]
1680
1681Internet-Draft         Kerberos Preauth Framework              June 2009
1682
1683
1684      PA-FX-FAST-REPLY ::= CHOICE {
1685          armored-data [0] KrbFastArmoredRep,
1686          ...
1687      }
1688
1689      KrbFastArmoredRep ::= SEQUENCE {
1690          enc-fast-rep      [0] EncryptedData, -- KrbFastResponse --
1691              -- The encryption key is the armor key in the request, and
1692              -- the key usage number is KEY_USAGE_FAST_REP.
1693          ...
1694      }
1695      KEY_USAGE_FAST_REP                 52
1696
1697   The PA-FX-FAST-REPLY structure contains a KrbFastArmoredRep
1698   structure.  The KrbFastArmoredRep structure encapsulates the padata
1699   in the KDC reply in the encrypted form.  The KrbFastResponse is
1700   encrypted with the armor key used in the corresponding request, and
1701   the key usage number is KEY_USAGE_FAST_REP.
1702
1703   The Kerberos client who does not receive a PA-FX-FAST-REPLY in the
1704   KDC response MUST support a local policy that rejects the response.
1705   Clients MAY also support policies that fall back to other mechanisms
1706   or that do not use pre-authentication when FAST is unavailable.  It
1707   is important to consider the potential downgrade attacks when
1708   deploying such a policy.
1709
1710   The KrbFastResponse structure contains the following information:
1711
1712       KrbFastResponse ::= SEQUENCE {
1713           padata         [0] SEQUENCE OF PA-DATA,
1714               -- padata typed holes.
1715           strengthen-key [1] EncryptionKey OPTIONAL,
1716               -- This, if present, strengthens the reply key for AS and
1717               -- TGS.
1718               -- MUST be absent in KRB-ERROR.
1719           finished       [2] KrbFastFinished OPTIONAL,
1720               -- Present in AS or TGS reply; absent otherwise.
1721           nonce          [3] UInt32,
1722               -- Nonce from the client request.
1723           ...
1724  }
1725
1726   The padata field in the KrbFastResponse structure contains a list of
1727   PA-DATA structures as described in Section 5.2.7 of [RFC4120].  These
1728   PA-DATA structures are used to carry data advancing the exchange
1729   specific for the FAST factors.  They can also be used as generic
1730   typed-holes for protocol extensibility.  Unless otherwise specified,
1731   the KDC MUST include any padata that is otherwise in the outer KDC-
1732
1733
1734
1735Hartman & Zhu           Expires December 6, 2009               [Page 31]
1736
1737Internet-Draft         Kerberos Preauth Framework              June 2009
1738
1739
1740   REP structure into this field.  The padata field in the KDC reply
1741   structure outside of the PA-FX-FAST-REPLY structure typically
1742   includes only the PA-FX- FAST-REPLY padata.
1743
1744   The strengthen-key field provides a mechanism for the KDC to
1745   strengthen the reply key.  If set, the reply key is strengthened
1746   after all padata items are processed.  Let padata-reply-key be the
1747   reply key after padata processing.
1748
1749   reply-key = KRB-FX-CF2(strengthen-key, padata-reply-key,
1750                         "strengthenkey", "replykey")
1751
1752   The strengthen-key field MAY be set in an AS or TGS reply; it must be
1753   absent in an error reply.
1754
1755   The finished field contains a KrbFastFinished structure.  It is
1756   filled by the KDC in the final message in the conversation.  This
1757   field is present in an AS-REP or a TGS-REP when a ticket is returned,
1758   and it is not present in an error reply.
1759
1760   The KrbFastFinished structure contains the following information:
1761
1762       KrbFastFinished ::= SEQUENCE {
1763           timestamp       [0] KerberosTime,
1764           usec            [1] Microseconds,
1765               -- timestamp and usec represent the time on the KDC when
1766               -- the reply was generated.
1767           crealm          [2] Realm,
1768           cname           [3] PrincipalName,
1769               -- Contains the client realm and the client name.
1770           ticket-checksum [4] Checksum,
1771               -- checksum of the ticket in the KDC-REP  using the armor
1772               -- and the key usage is KEY_USAGE_FAST_FINISH.
1773               -- The checksum type is the required checksum type
1774               -- of the armor key.
1775           ...
1776       }
1777       KEY_USAGE_FAST_FINISHED            53
1778
1779   The timestamp and usec fields represent the time on the KDC when the
1780   reply ticket was generated, these fields have the same semantics as
1781   the corresponding-identically-named fields in Section 5.6.1 of
1782   [RFC4120].  The client MUST use the KDC's time in these fields
1783   thereafter when using the returned ticket.  Note that the KDC's time
1784   in AS-REP may not match the authtime in the reply ticket if the kdc-
1785   follow-referrals option is requested and honored by the KDC.  The
1786   client need not confirm that the timestamp returned is within
1787   allowable clock skew: the armor key guarantees that the reply is
1788
1789
1790
1791Hartman & Zhu           Expires December 6, 2009               [Page 32]
1792
1793Internet-Draft         Kerberos Preauth Framework              June 2009
1794
1795
1796   fresh.  The client MAY trust the time stamp returned.
1797
1798   The cname and crealm fields identify the authenticated client.  If
1799   facilities described in [REFERRALS] are used, the authenticated
1800   client may differ from the client in the FAST request.
1801
1802   The ticket-checksum is a checksum of the issued ticket.  The checksum
1803   key is the armor key, and the checksum type is the required checksum
1804   type of the enctype of that key, and the key usage number is
1805   KEY_USAGE_FAST_FINISHED.
1806
1807   When FAST padata is included, the PA-FX-COOKIE padata as defined in
1808   Section 6.3 MUST be included in the padata sequence in the
1809   KrbFastResponse sequence if the KDC expects at least one more message
1810   from the client in order to complete the authentication.
1811
1812   The nonce field in the KrbFastResponse contains the value of the
1813   nonce field in the KDC-REQ of the corresponding client request and it
1814   binds the KDC response with the client request.  The client MUST
1815   verify that this nonce value in the reply matches with that of the
1816   request and reject the KDC reply otherwise.  To prevent the response
1817   from one message in a conversation from being replayed to a request
1818   in another message, clients SHOULD use a new nonce for each message
1819   in a conversation.
1820
18216.5.4.  Authenticated Kerberos Error Messages using Kerberos FAST
1822
1823   If the Kerberos FAST padata was included in the request, unless
1824   otherwise specified, the e-data field of the KRB-ERROR message
1825   [RFC4120] contains the ASN.1 DER encoding of the type METHOD-DATA
1826   [RFC4120] and a PA-FX-FAST is included in the METHOD-DATA.  The KDC
1827   MUST include all the padata elements such as PA-ETYPE-INFO2 and
1828   padata elements that indicate acceptable pre-authentication
1829   mechanisms [RFC4120] in the KrbFastResponse structure.
1830
1831   The KDC MUST also include a PA-FX-ERROR padata item in the
1832   KRBFastResponse structure.  The padata-value element of this sequence
1833   is the ASN.1 DER encoding of the type KRB-ERROR.  The e-data field
1834   MUST be absent in the PA-FX-ERROR padata.  All other fields should be
1835   the same as the outer KRB-ERROR.  The client ignores the outer error
1836   and uses the combination of the padata in the KRBFastResponse and the
1837   error information in the PA-FX-ERROR.
1838
1839              PA-FX-ERROR                        137
1840
1841   If the Kerberos FAST padata is included in the request but not
1842   included in the error reply, it is a matter of the local policy on
1843   the client to accept the information in the error message without
1844
1845
1846
1847Hartman & Zhu           Expires December 6, 2009               [Page 33]
1848
1849Internet-Draft         Kerberos Preauth Framework              June 2009
1850
1851
1852   integrity protection.  The client SHOULD however process the KDC
1853   errors as the result of the KDC's inability to accept the AP_REQ
1854   armor and potentially retry another request with a different armor
1855   when applicable.  The Kerberos client MAY process an error message
1856   without a PA-FX-FAST-REPLY, if that is only intended to return better
1857   error information to the application, typically for trouble-shooting
1858   purposes.
1859
1860   In the cases where the e-data field of the KRB-ERROR message is
1861   expected to carry a TYPED-DATA [RFC4120] element, then that
1862   information should be transmitted in a pa-data element within the
1863   KRBFastResponse structure.  The padata-type is the same as the data-
1864   type would be in the typed data element and the padata-value is the
1865   same as the data-value.  As discussed in Section 8, data-types and
1866   padata-types are drawn from the same namespace.  For example, the
1867   TD_TRUSTED_CERTIFIERS structure is expected to be in the KRB-ERROR
1868   message when the error code is KDC_ERR_CANT_VERIFY_CERTIFICATE
1869   [RFC4556].
1870
18716.5.5.  Outer and Inner Requests
1872
1873   Typically, a client will know that FAST is being used before a
1874   request containing PA-FX-FAST is sent.  So, the outer AS request
1875   typically only includes one pa-data item: PA-FX-FAST.  The client MAY
1876   include additional pa-data, but the KDC MUST ignore the outer request
1877   body and any padata besides PA-FX-FAST if and only if PA-FX-FAST is
1878   processed.  In the case of the TGS request, the outer request should
1879   include PA-FX-FAST and PA-TGS-REQ.
1880
1881   When an AS generates a response, all padata besides PA-FX-FAST should
1882   be included in PA-FX-FAST.  The client MUST ignore other padata
1883   outside of PA-FX-FAST.
1884
18856.5.6.  The Encrypted Challenge FAST Factor
1886
1887   The encrypted challenge FAST factor authenticates a client using the
1888   client's long-term key.  This factor works similarly to the encrypted
1889   time stamp pre-authentication option described in [RFC4120].  The
1890   client encrypts a structure containing a timestamp in the challenge
1891   key.  The challenge key used by the client to send a message to the
1892   KDC is KRB-FX-CF2(armor_key,long_term_key, "clientchallengearmor",
1893   "challengelongterm").  The challenge key used by the KDC encrypting
1894   to the client is KRB-FX-CF2(armor_key, long_term_key,
1895   "kdcchallengearmor", "challengelongterm").  Because the armor key is
1896   fresh and random, the challenge key is fresh and random.  The only
1897   purpose of the timestamp is to limit the validity of the
1898   authentication so that a request cannot be replayed.  A client MAY
1899   base the timestamp on the KDC time in a KDC error and need not
1900
1901
1902
1903Hartman & Zhu           Expires December 6, 2009               [Page 34]
1904
1905Internet-Draft         Kerberos Preauth Framework              June 2009
1906
1907
1908   maintain accurate time synchronization itself.  If a client bases its
1909   time on an untrusted source, an attacker may trick the client into
1910   producing an authentication request that is valid at some future
1911   time.  The attacker may be able to use this authentication request to
1912   make it appear that a client has authenticated at that future time.
1913   If ticket-based armor is used, then the lifetime of the ticket will
1914   limit the window in which an attacker can make the client appear to
1915   have authenticated.  For many situations, the ability of an attacker
1916   to cause a client to appear to have authenticated is not a
1917   significant concern; the ability to avoid requiring time
1918   synchronization on clients is more valuable.
1919
1920   The client sends a padata of type PA-ENCRYPTED-CHALLENGE the
1921   corresponding padata-value contains the DER encoding of ASN.1 type
1922   EncryptedChallenge.
1923
1924      EncryptedChallenge ::= EncryptedData
1925              -- Encrypted PA-ENC-TS-ENC, encrypted in the challenge key
1926              -- using key usage KEY_USAGE_ENC_CHALLENGE_CLIENT for the
1927              -- client and KEY_USAGE_ENC_CHALLENGE_KDC for the KDC.
1928
1929      PA-ENCRYPTED-CHALLENGE          138
1930      KEY_USAGE_ENC_CHALLENGE_CLIENT  54
1931      KEY_USAGE_ENC_CHALLENGE_KDC     55
1932
1933   The client includes some time stamp reasonably close to the KDC's
1934   current time and encrypts it in the challenge key.  Clients MAY use
1935   the current time; doing so prevents the exposure where an attacker
1936   can cause a client to appear to authenticate in the future.  The
1937   client sends the request including this factor.
1938
1939   On receiving an AS-REQ containing the PA-ENCRYPTED-CHALLENGE fast
1940   factor, the KDC decrypts the timestamp.  If the decryption fails the
1941   KDC SHOULD return KDC_ERR_PREAUTH_FAILED, including PA-ETYPE-INFO2 in
1942   the KRBFastResponse in the error.  The KDC confirms that the
1943   timestamp falls within its current clock skew returning
1944   KRB_APP_ERR_SKEW if not.  The KDC then SHOULD check to see if the
1945   encrypted challenge is a replay.  The KDC MUST NOT consider two
1946   encrypted challenges replays simply because the time stamps are the
1947   same; to be a replay, the ciphertext MUST be identical.  Allowing
1948   clients to re-use time stamps avoids requiring that clients maintain
1949   state about which time stamps have been used.
1950
1951   If the KDC accepts the encrypted challenge, it MUST include a padata
1952   element of type PA-ENCRYPTED-CHALLENGE.  The KDC encrypts its current
1953   time in the challenge key.  The KDC MUST strengthen the reply key
1954   before issuing a ticket.  The client MUST check that the timestamp
1955   decrypts properly.  The client MAY check that the timestamp is
1956
1957
1958
1959Hartman & Zhu           Expires December 6, 2009               [Page 35]
1960
1961Internet-Draft         Kerberos Preauth Framework              June 2009
1962
1963
1964   winthin the window of acceptable clock skew for the client.  The
1965   client MUST NOT require that the timestamp be identical to the
1966   timestamp in the issued credentials or the returned message.
1967
1968   The encrypted challenge FAST factor provides the following
1969   facilities: client-authentication and KDC authentication.  This FAST
1970   factor also takes advantage of the FAST facility to strengthen the
1971   reply key.  It does not provide the replacing-reply-key facility.
1972   The security considerations section of this document provides an
1973   explanation why the security requirements are met.
1974
1975   The encrypted challenge FAST factor can be useful in an
1976   authentication set.  No pa-hint is defined because the only
1977   information needed by this mechanism is information contained in the
1978   PA-ETYPE-INFO2 pre-authentication data.  KDCs are already required to
1979   send PA-ETYPE-INFO2.  If KDCs were not required to send PA-ETYPE-
1980   INFO2 then that information would need to be part of a hint for
1981   encrypted challenge.
1982
1983   Conforming implementations MUST support the encrypted challenge FAST
1984   factor.
1985
19866.6.  Authentication Strength Indication
1987
1988   Implementations that have pre-authentication mechanisms offering
1989   significantly different strengths of client authentication MAY choose
1990   to keep track of the strength of the authentication used as an input
1991   into policy decisions.  For example, some principals might require
1992   strong pre-authentication, while less sensitive principals can use
1993   relatively weak forms of pre-authentication like encrypted timestamp.
1994
1995   An AuthorizationData data type AD-Authentication-Strength is defined
1996   for this purpose.
1997
1998        AD-authentication-strength         70
1999
2000   The corresponding ad-data field contains the DER encoding of the pre-
2001   authentication data set as defined in Section 6.4.  This set contains
2002   all the pre-authentication mechanisms that were used to authenticate
2003   the client.  If only one pre-authentication mechanism was used to
2004   authenticate the client, the pre-authentication set contains one
2005   element.
2006
2007   The AD-authentication-strength element MUST be included in the AD-IF-
2008   RELEVANT, thus it can be ignored if it is unknown to the receiver.
2009
2010
2011
2012
2013
2014
2015Hartman & Zhu           Expires December 6, 2009               [Page 36]
2016
2017Internet-Draft         Kerberos Preauth Framework              June 2009
2018
2019
20207.  Assigned Constants
2021
2022   The pre-authentication framework and FAST involve using a number of
2023   Kerberos protocol constants.  This section lists protocol constants
2024   first introduced in this specification drawn from registries not
2025   managed by IANA.  Many of these registries would best be managed by
2026   IANA; that is a known issue that is out of scope for this document.
2027   The constants described in this section have been accounted for and
2028   will appear in the next revision of the Kerberos core specification
2029   or in a document creating IANA registries.
2030
2031   Section 8 creates IANA registries for a different set of constants
2032   used by the extensions described in this document.
2033
20347.1.  New Errors
2035
2036           KDC_ERR_PREAUTH_EXPIRED                 90
2037           KDC_ERR_MORE_PREAUTH_DATA_NEEDED        91
2038           KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET  92
2039           KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTIONS   93
2040
20417.2.  Key Usage Numbers
2042
2043           KEY_USAGE_FAST_REQ_CHKSUM               50
2044           KEY_USAGE_FAST_ENC                      51
2045           KEY_USAGE_FAST_REP                      52
2046           KEY_USAGE_FAST_FINISHED                 53
2047           KEY_USAGE_ENC_CHALLENGE_CLIENT          54
2048           KEY_USAGE_ENC_CHALLENGE_KDC             55
2049
20507.3.  Authorization Data Elements
2051
2052           AD-authentication-strength              70
2053           AD-fx-fast-armor                        71
2054           AD-fx-fast-used                         72
2055
20567.4.  New PA-DATA Types
2057
2058           PA-FX-COOKIE                            133
2059           PA-AUTHENTICATION-SET                   134
2060           PA-AUTH-SET-SELECTED                    135
2061           PA-FX-FAST                              136
2062           PA-FX-ERROR                             137
2063           PA-ENCRYPTED-CHALLENGE                  138
2064
2065
2066
2067
2068
2069
2070
2071Hartman & Zhu           Expires December 6, 2009               [Page 37]
2072
2073Internet-Draft         Kerberos Preauth Framework              June 2009
2074
2075
20768.  IANA Considerations
2077
2078   This document creates a number of IANA registries.  These registries
2079   should all be located under
2080   http://www.iana.org/assignments/kerberos-parameters.
2081
20828.1.  Pre-authentication and Typed Data
2083
2084   RFC 4120 defines pre-authentication data, which can be included in a
2085   KDC request or response in order to authenticate the client or extend
2086   the protocol.  In addition, it defines Typed-Data which is an
2087   extension mechanism for errors.  Both pre-authentication data and
2088   typed data are carried as a 32-bit signed integer along with an octet
2089   string.  The encoding of typed data and pre-authentication data is
2090   slightly different.  However the types for pre-authentication data
2091   and typed-data are drawn from the same namespace.  By convention,
2092   registrations starting with TD- are typed data and registration
2093   starting with PA- are pre-authentication data.  It is important that
2094   these data types be drawn from the same namespace, because some
2095   errors where it would be desirable to include typed data require the
2096   e-data field to be formatted as pre-authentication data.
2097
2098   When Kerberos FAST is used, pre-authentication data encoding is
2099   always used.
2100
2101   There is one apparently conflicting registration between typed data
2102   and pre-authentication data.  PA-GET-FROM-TYPED-DATA and TD-PADATA
2103   are both assigned the value 22.  However this registration is simply
2104   a mechanism to include an element of the other encoding.  The use of
2105   both should be deprecated.
2106
2107   This document creates a registry for pre-authentication and typed
2108   data.  The registration procedures are as follows.  Expert review for
2109   pre-authentication mechanisms designed to authenticate users, KDCs,
2110   or establish the reply key.  The expert first determines that the
2111   purpose of the method is to authenticate clients, KDCs, or to
2112   establish the reply key.  If so, expert review is appropriate.  The
2113   expert evaluates the security and interoperability of the
2114   specification.
2115
2116   IETF review is required if the expert believes that the pre-
2117   authentication method is broader than these three areas.  Pre-
2118   authentication methods that change the Kerberos state machine or
2119   otherwise make significant changes to the Kerberos protocol should be
2120   standards track RFCs.  A concern that a particular method needs to be
2121   a standards track RFC may be raised as an objection during IETF
2122   review.
2123
2124
2125
2126
2127Hartman & Zhu           Expires December 6, 2009               [Page 38]
2128
2129Internet-Draft         Kerberos Preauth Framework              June 2009
2130
2131
2132      Type                Value    Reference
2133  ----------------------------------------------------------------------
2134  PA-TGS-REQ                 1    RFC 4120
2135  PA-ENC-TIMESTAMP           2    RFC 4120
2136  PA-PW-SALT                 3    RFC 4120
2137  [reserved]                 4
2138  PA-ENC-UNIX-TIME           5    (deprecated)
2139  PA-SANDIA-SECUREID         6
2140  PA-SESAME                  7
2141  PA-OSF-DCE                 8
2142  PA-CYBERSAFE-SECUREID      9
2143  PA-AFS3-SALT               10
2144  PA-ETYPE-INFO              11   RFC 4120
2145  PA-SAM-CHALLENGE           12   (sam/otp)
2146  PA-SAM-RESPONSE            13   (sam/otp)
2147  PA-PK-AS-REQ_OLD           14   draft-ietf-cat-kerberos-pk-init-09
2148  PA-PK-AS-REP_OLD           15   draft-ietf-cat-kerberos-pk-init-09
2149  PA-PK-AS-REQ               16   RFC 4556
2150  PA-PK-AS-REP               17   RFC 4556
2151  PA-PK-OCSP-RESPONSE        18   RFC 4557
2152  PA-ETYPE-INFO2             19   RFC 4120
2153  PA-USE-SPECIFIED-KVNO      20
2154  PA-SVR-REFERRAL-INFO       20   (referrals)
2155  PA-SAM-REDIRECT            21   (sam/otp)
2156  PA-GET-FROM-TYPED-DATA     22   (embedded in typed data)
2157  TD-PADATA                  22   (embeds padata)
2158  PA-SAM-ETYPE-INFO          23   (sam/otp)
2159  PA-ALT-PRINC               24   (crawdad@fnal.gov)
2160  PA-SERVER-REFERRAL         25   (referrals)
2161  PA-SAM-CHALLENGE2          30   (kenh@pobox.com)
2162  PA-SAM-RESPONSE2           31   (kenh@pobox.com)
2163  PA-EXTRA-TGT               41   Reserved extra TGT
2164  TD-PKINIT-CMS-CERTIFICATES 101  CertificateSet from CMS
2165  TD-KRB-PRINCIPAL           102  PrincipalName
2166  TD-KRB-REALM               103  Realm
2167  TD-TRUSTED-CERTIFIERS      104  PKINIT
2168  TD-CERTIFICATE-INDEX       105  PKINIT
2169  TD-APP-DEFINED-ERROR       106  Application specific
2170  TD-REQ-NONCE               107  INTEGER
2171  TD-REQ-SEQ                 108  INTEGER
2172  PA-PAC-REQUEST             128  MS-KILE
2173  PA-FOR_USER                129  MS-KILE
2174  PA-FOR-X509-USER           130  MS-KILE
2175  PA-FOR-CHECK_DUPS          131  MS-KILE
2176  PA-AS-CHECKSUM             132  MS-KILE
2177  PA-FX-COOKIE               133  draft-ietf-krb-wg-preauth-framework
2178  PA-AUTHENTICATION-SET      134  draft-ietf-krb-wg-preauth-framework
2179  PA-AUTH-SET-SELECTED       135  draft-ietf-krb-wg-preauth-framework
2180
2181
2182
2183Hartman & Zhu           Expires December 6, 2009               [Page 39]
2184
2185Internet-Draft         Kerberos Preauth Framework              June 2009
2186
2187
2188  PA-FX-FAST                 136  draft-ietf-krb-wg-preauth-framework
2189  PA-FX-ERROR                137  draft-ietf-krb-wg-preauth-framework
2190  PA-ENCRYPTED-CHALLENGE     138  draft-ietf-krb-wg-preauth-framework
2191  PA-OTP-CHALLENGE           141  (gareth.richards@rsa.com)
2192  PA-OTP-REQUEST             142  (gareth.richards@rsa.com)
2193  PA-OTP-CONFIRM             143  (gareth.richards@rsa.com)
2194  PA-OTP-PIN-CHANGE          144  (gareth.richards@rsa.com)
2195  PA-EPAK-AS-REQ             145  (sshock@gmail.com)
2196  PA-EPAK-AS-REP             146  (sshock@gmail.com>)
2197  PA_PKINIT_KX               147  draft-ietf-krb-wg-anon
2198  PA_PKU2U_NAME              148  draft-zhu-pku2u
2199  PA-SUPPORTED-ETYPES        165  MS-KILE
2200  PA-EXTENDED_ERROR          166  MS-KILE
2201
22028.2.  Fast Armor Types
2203
2204   FAST armor types are defined in Section 6.5.1.  A FAST armor type is
2205   a signed 32-bit integer.  FAST armor types are assigned by standards
2206   action.
2207
2208          Type    Name                   Description
2209        ------------------------------------------------------------
2210          0                              Reserved.
2211          1   FX_FAST_ARMOR_AP_REQUEST   Ticket armor using an ap-req.
2212
22138.3.  FAST Options
2214
2215   A FAST request includes a set of bit flags to indicate additional
2216   options.  Bits 0-15 are critical; other bits are non-critical.
2217   Assigning bits greater than 31 may require special support in
2218   implementations.  Assignment of FAST options requires standards
2219   action.
2220
2221      Type    Name                   Description
2222     -------------------------------------------------------------------
2223      0     RESERVED               Reserved for future expansion of this
2224                                   field.
2225      1     hide-client-names      Requesting the KDC to hide client
2226                                   names in  the KDC response
2227      16    kdc-follow-referrals   Requesting the KDC to follow
2228                                   referrals
2229
2230
22319.  Security Considerations
2232
2233   The kdc-referrals option in the Kerberos FAST padata requests the KDC
2234   to act as the client to follow referrals.  This can overload the KDC.
2235   To limit the damages of denial of service using this option, KDCs MAY
2236
2237
2238
2239Hartman & Zhu           Expires December 6, 2009               [Page 40]
2240
2241Internet-Draft         Kerberos Preauth Framework              June 2009
2242
2243
2244   restrict the number of simultaneous active requests with this option
2245   for any given client principal.
2246
2247   With regarding to the facilities provided by the Encrypted Challenge
2248   FAST factor, the challenge key is derived from the client secrets and
2249   because the client secrets are known only to the client and the KDC,
2250   the verification of the EncryptedChallenge structure proves the
2251   client's identity, the verification of the EncryptedChallenge
2252   structure in the KDC reply proves that the expected KDC responded.
2253   Therefore, the Encrypted Challenge FAST factor as a pre-
2254   authentication mechanism offers the following facilities: client-
2255   authentication and KDC-authentication.  There is no un-authenticated
2256   clear text introduced by the Encrypted Challenge FAST factor.
2257
2258   FAST provides an encrypted tunnel over which pre-authentication
2259   conversations can take place.  In addition, FAST optionally
2260   authenticates the KDC to the client.  It is the responsibility of
2261   FAST factors to authenticate the client to the KDC.  Care MUST be
2262   taken to design FAST factors such that they are bound to the
2263   conversation.  If this is not done, a man-in-the-middle may be able
2264   to cut&paste a fast factor from one conversation to another.  The
2265   easiest way to do this is to bind each fast factor to the armor key
2266   which is guaranteed to be unique for each conversation.
2267
2268   The anonymous pkinit mode for obtaining an armor ticket does not
2269   always authenticate the KDC to the client before the conversation
2270   begins.  Tracking the KDC verified state guarantees that by the end
2271   of the conversation, the client has authenticated the KDC.  However
2272   fast factor designers need to consider the implications of using
2273   their factor when the KDC has not yet been authenticated.  If this
2274   proves problematic in an environment, then the particular fast factor
2275   should not be used with anonymous PKINIT.
2276
2277   Existing pre-authentication mechanisms are believed to be at least as
2278   secure when used with FAST as they are when used outside of FAST.
2279   One part of this security is making sure that when pre-authentication
2280   methods checksum the request, they checksum the inner request rather
2281   than the outer request.  If the mechanism checksummed the outer
2282   request, a man-in-the-middle could observe it outside a FAST tunnel
2283   and then cut&paste it into a FAST exchange where the inner rather
2284   than outer request would be used to select attributes of the issued
2285   ticket.  Such attacks would typically invalidate auditing information
2286   or create a situation where the client and KDC disagree about what
2287   ticket is issued.  However, such attacks are unlikely to allow an
2288   attacker who would not be able to authenticate as a principal to do
2289   so.  Even so, FAST is believed to defend against these attacks in
2290   existing legacy mechanism.  However since there is no standard for
2291   how legacy mechanisms bind the request to the pre-authentication or
2292
2293
2294
2295Hartman & Zhu           Expires December 6, 2009               [Page 41]
2296
2297Internet-Draft         Kerberos Preauth Framework              June 2009
2298
2299
2300   provide integrity protection, security analysis can be difficult.  In
2301   some cases FAST may significantly improve the integrity protection of
2302   legacy mechanisms.
2303
2304
230510.  Acknowledgements
2306
2307   Sam Hartman would like to thank the MIT Kerberos Consortium for its
2308   funding of his time on this project.
2309
2310   Several suggestions from Jeffrey Hutzelman based on early revisions
2311   of this documents led to significant improvements of this document.
2312
2313   The proposal to ask one KDC to chase down the referrals and return
2314   the final ticket is based on requirements in [ID.CROSS].
2315
2316   Joel Webber had a proposal for a mechanism similar to FAST that
2317   created a protected tunnel for Kerberos pre-authentication.
2318
2319   Srinivas Cheruku and Greg Hudson provided valuable review comments.
2320
2321
232211.  References
2323
232411.1.  Normative References
2325
2326   [KRB-ANON]
2327              Zhu, L. and P. Leach, "Kerberos Anonymity Support",
2328              draft-ietf-krb-wg-anon-04.txt (work in progress), 2007.
2329
2330   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
2331              Requirement Levels", BCP 14, RFC 2119, March 1997.
2332
2333   [RFC3961]  Raeburn, K., "Encryption and Checksum Specifications for
2334              Kerberos 5", RFC 3961, February 2005.
2335
2336   [RFC4120]  Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The
2337              Kerberos Network Authentication Service (V5)", RFC 4120,
2338              July 2005.
2339
2340   [RFC4556]  Zhu, L. and B. Tung, "Public Key Cryptography for Initial
2341              Authentication in Kerberos (PKINIT)", RFC 4556, June 2006.
2342
234311.2.  Informative References
2344
2345   [ID.CROSS]
2346              Sakane, S., Zrelli, S., and M. Ishiyama , "Problem
2347              Statement on the Operation of Kerberos in a Specific
2348
2349
2350
2351Hartman & Zhu           Expires December 6, 2009               [Page 42]
2352
2353Internet-Draft         Kerberos Preauth Framework              June 2009
2354
2355
2356              System", draft-sakane-krb-cross-problem-statement-02.txt
2357              (work in progress), April 2007.
2358
2359   [KRB-WG.SAM]
2360              Hornstein, K., Renard, K., Neuman, C., and G. Zorn,
2361              "Integrating Single-use Authentication Mechanisms with
2362              Kerberos", draft-ietf-krb-wg-kerberos-sam-02.txt (work in
2363              progress), October 2003.
2364
2365   [REFERRALS]
2366              Raeburn, K. and L. Zhu, "Generating KDC Referrals to
2367              Locate Kerberos Realms",
2368              draft-ietf-krb-wg-kerberos-referrals-10.txt (work in
2369              progress), 2007.
2370
2371
2372Appendix A.  Test Vectors for KRB-FX-CF2
2373
2374   This informative appendix presents test vectors for the KRB-FX-CF2
2375   function.  Test vectors are presented for several encryption types.
2376   In all cases the first key (k1) is the result of string-to-
2377   key("key1", "key1", default_parameters) and the second key (k2) is
2378   the result of string-to-key("key2", "key2", default_parameters).
2379   Both keys are of the same enctype.  The presented test vector is the
2380   hexadecimal encoding of the key produced by KRB-FX-CF2(k1, k2, "a",
2381   "b").  The peppers are one-octet ASCII strings.
2382
2383   In performing interoperability testing, there was significant
2384   ambiguity surrounding [RFC3961] pseudo-random operations.  These test
2385   vectors assume that the AES pseudo-random operation is aes-
2386   ecb(trunc128(sha-1(input))) where trunc128 truncates its input to
2387   128-bits.  The 3DES pseudo-random operation is assumed to be des3-
2388   cbc(trunc128(sha-1(input))).  The DES pseudo-random operation is
2389   assumed to be des-cbc(md5(input).  As specified in RFC 4757, the RC4
2390   pseudo-random operation is hmac-sha1(input).
2391
2392   These test vectors were produced with revision 22359 of the MIT
2393   Kerberos sources.  The AES 256 and AES 128 test vectors have been
2394   confirmed by another implementer.  The RC4 implementation of KRB-FX-
2395   CF2 from that revision of MIT Kerberos worked against another
2396   implementation during an interoperability event, although these
2397   specific test vectors have not been confirmed.  The DES and triple
2398   DES test vectors have not been confirmed.
2399
2400
2401
2402
2403
2404
2405
2406
2407Hartman & Zhu           Expires December 6, 2009               [Page 43]
2408
2409Internet-Draft         Kerberos Preauth Framework              June 2009
2410
2411
2412   aes 128 (enctype 17): 97df97e4b798b29eb31ed7280287a92a
2413   AES256 (enctype 18): 4d6ca4e629785c1f01baf55e2e548566
2414                        b9617ae3a96868c337cb93b5e72b1c7b
2415   DES (enctype 1): 43bae3738c9467e6
2416   3DES (enctype 16): e58f9eb643862c13ad38e529313462a7f73e62834fe54a01
2417   RC4 (enctype 23): 24d7f6b6bae4e5c00d2082c5ebab3672
2418
2419
2420Appendix B.  Change History
2421
2422   RFC editor, please remove this section before publication.
2423
2424B.1.  Changes since 11
2425
2426      Checksum the inner request body in methods like PKINIT, not the
2427      outer request body.  Per mailing list discussion, this change
2428      addresses a potential security weakness.
2429      Add additional security considerations text
2430
2431B.2.  Changes since 10
2432
2433      The checksum member of the KrbFastFinished sequence has been
2434      removed.  A nonce field has been added to KrbFastResponse.
2435      The cookie no longer needs to be outside of FAST.  In fact, some
2436      security guarantees depend on the cookie being inside FAST now
2437      that the finish checksum has been removed.  Affected that change.
2438      Replace the rep-key field in KrbFastResponse with the strengthen-
2439      key field.  Per mailing list discussion, there are security
2440      advantages to strengthening the reply key.
2441      Clarify handling of authentication sets.
2442      Include the AD-fx-fast-used authorization data type.
2443      Include note about random nonces.
2444
2445B.3.  Changes since 09
2446
2447      Clarify conversations by defining for TGS and by describing how
2448      cookies form conversation boundaries.
2449      Simplify text surrounding when finish is included: always for AS
2450      and TGS reply, never for error.
2451      Fill in IANA and constants
2452
2453B.4.  Changes since 08
2454
2455      Fix a number of typos
2456      Rename anonymous flag to hide-client-name; rename kdc-referals to
2457      kdc-follow-referrals
2458
2459
2460
2461
2462
2463Hartman & Zhu           Expires December 6, 2009               [Page 44]
2464
2465Internet-Draft         Kerberos Preauth Framework              June 2009
2466
2467
2468      Clarify how anonymous pkinit interacts with KDC verified.
2469      Introduce AD-fx-fast-armor authorization data to deal with
2470      unprivileged processes constructing KDC requests.  Note that a TGT
2471      is always used for armor tickets if the armor field is present; if
2472      you proxy or validate you'll end up with a TGT armor ticket and
2473      another ticket in the pa-tgs-req.  Alternatively you can simply
2474      use the other ticket in the PA-TGS-REQ; weak consensus within WG.
2475      All KDCs in a realm MUST support FAST if it is to be offered.
2476      The cookie message is always generated by the KDC.
2477      Note that the client can trust and need not verify the time stamp
2478      in the finish message.  This can seed the client's idea of KDC
2479      time.
2480      Note that the client name in the finish message may differ from
2481      the name in the request if referrals are used.
2482      Note that KDCs should advertize fast in preauth_required errors.
2483      Armor key is constructed using KRB-FX-CF2.  This is true even in
2484      the TGS case; there is no security reason to do this.  Using the
2485      subkey as done in draft 08 would be fine, but the current text
2486      uses the same procedure both in the TGS and AS case.
2487      Use a different challenge key in each direction in the encrypted
2488      challenge option.
2489      Note that the KDC should process PA-FX-COOKIE before other padata.
2490      KRB-FX-CF2 uses k1's enctype for the result; change around calling
2491      order so we pass in subkeys and armor keys as k1 in preference to
2492      long-term keys or ticket session keys.
2493      Clarify the relationship between authentication sets and cookies.
2494      A cookie may not be needed in the first message.  Clarify how this
2495      interacts with optimistic clients.
2496      Remove text raising a concern that RFC 3961 may permit ciphertext
2497      transformations that do not change plaintext: discussion on the
2498      list came to the conclusion that RFC 3961 does not permit this.
2499      Remove binding key concept; use the armor key instead.  The cookie
2500      becomes just an octet string.
2501      Include PA-FX-ERROR to protect the error information per Dublin.
2502      Returning preauth_failed in the failed to decrypt encrypted
2503      challenge seems fine; remove the issue marker
2504      Add a section describing what goes in the inner and outer request.
2505      I believe it is redundant but found it useful while putting
2506      together an implementation proposal.
2507      Use hyphen rather than underscore in the constants for pre-
2508      authentication data to be consistent with RFC 4120.
2509      Add a ticket-checksum to the finished message
2510      Remove redundant KEY_USAGE_FAST_ARMOR.
2511      Add protocol constants section for non-IANA registrations and
2512      flesh out IANA section.
2513      Clarify that kdc-req-body checksums should always use the outer
2514      body even for mechanisms like PKINIT that include their own (now
2515      redundant) checksum.
2516
2517
2518
2519Hartman & Zhu           Expires December 6, 2009               [Page 45]
2520
2521Internet-Draft         Kerberos Preauth Framework              June 2009
2522
2523
2524      Remove mechanism for encapsulating typed data in padata; just
2525      reflect the value.
2526
2527B.5.  Changes since 07
2528
2529      Propose replacement of authenticated timestamp with encrypted
2530      challenge.  The desire to avoid clients needing time
2531      synchronization and to simply the factor.
2532      Add a requirement that any FAST armor scheme must provide a fresh
2533      key for each conversation.  This allows us to assume that anything
2534      encrypted/integrity protected in the right key is fresh and not
2535      subject to cross-conversation cut and paste.
2536      Removed heartbeat padata.  The KDC will double up messages if it
2537      needs to; the client simply sends its message and waits for the
2538      next response.
2539      Define PA-AUTH-SET-SELECTED
2540      Clarify a KDC cannot ignore padata is has claimed to support
2541
2542B.6.  Changes since 06
2543
2544      Note that even for replace reply key it is likely that the side
2545      using the mechanism will know that the other side supports it.
2546      Since it is reasonably unlikely we'll need a container mechanism
2547      other than FAST itself, we don't need to optimize for that case.
2548      So, we want to optimize for implementation simplicity.  Thus if
2549      you do have such a container mechanism interacting with
2550      authentication sets we'll assume that the hint need to describe
2551      hints for all contained mechanisms.  This closes out a long-
2552      standing issue.
2553      Write up what Sam believes is the consensus on UI and prompts in
2554      the authentication set: clients MAY assume that they have all the
2555      UI information they need.
2556
2557
2558Appendix C.  ASN.1 module
2559
2560      KerberosPreauthFramework {
2561            iso(1) identified-organization(3) dod(6) internet(1)
2562            security(5) kerberosV5(2) modules(4) preauth-framework(3)
2563      } DEFINITIONS EXPLICIT TAGS ::= BEGIN
2564
2565      IMPORTS
2566           KerberosTime, PrincipalName, Realm, EncryptionKey, Checksum,
2567           Int32, EncryptedData, PA-ENC-TS-ENC, PA-DATA, KDC-REQ-BODY,
2568           Microseconds, KerberosFlags
2569                FROM KerberosV5Spec2 { iso(1) identified-organization(3)
2570                  dod(6) internet(1) security(5) kerberosV5(2)
2571                  modules(4) krb5spec2(2) };
2572
2573
2574
2575Hartman & Zhu           Expires December 6, 2009               [Page 46]
2576
2577Internet-Draft         Kerberos Preauth Framework              June 2009
2578
2579
2580                  -- as defined in RFC 4120.
2581
2582
2583      PA-AUTHENTICATION-SET ::= SEQUENCE OF PA-AUTHENTICATION-SET-ELEM
2584
2585      PA-AUTHENTICATION-SET-ELEM ::= SEQUENCE {
2586          pa-type      [0] Int32,
2587              -- same as padata-type.
2588          pa-hint      [1] OCTET STRING OPTIONAL,
2589          pa-value     [2] OCTET STRING OPTIONAL,
2590          ...
2591      }
2592
2593      KrbFastArmor ::= SEQUENCE {
2594          armor-type   [0] Int32,
2595              -- Type of the armor.
2596          armor-value  [1] OCTET STRING,
2597              -- Value of the armor.
2598          ...
2599      }
2600
2601      PA-FX-FAST-REQUEST ::= CHOICE {
2602          armored-data [0] KrbFastArmoredReq,
2603          ...
2604      }
2605
2606      KrbFastArmoredReq ::= SEQUENCE {
2607          armor        [0] KrbFastArmor OPTIONAL,
2608              -- Contains the armor that identifies the armor key.
2609              -- MUST be present in AS-REQ.
2610          req-checksum [1] Checksum,
2611              -- For AS, contains the checksum performed over the type
2612              -- KDC-REQ-BODY for the req-body field of the KDC-REQ
2613              -- structure;
2614              -- For TGS, contains the checksum performed over the type
2615              -- AP-REQ in the PA-TGS-REQ padata.
2616              -- The checksum key is the armor key, the checksum
2617              -- type is the required checksum type for the enctype of
2618              -- the armor key, and the key usage number is
2619              -- KEY_USAGE_FAST_REQ_CHKSUM.
2620          enc-fast-req [2] EncryptedData, -- KrbFastReq --
2621              -- The encryption key is the armor key, and the key usage
2622              -- number is KEY_USAGE_FAST_ENC.
2623          ...
2624      }
2625
2626      KrbFastReq ::= SEQUENCE {
2627          fast-options [0] FastOptions,
2628
2629
2630
2631Hartman & Zhu           Expires December 6, 2009               [Page 47]
2632
2633Internet-Draft         Kerberos Preauth Framework              June 2009
2634
2635
2636              -- Additional options.
2637          padata       [1] SEQUENCE OF PA-DATA,
2638              -- padata typed holes.
2639          req-body     [2] KDC-REQ-BODY,
2640              -- Contains the KDC request body as defined in Section
2641              -- 5.4.1 of [RFC4120].
2642              -- This req-body field is preferred over the outer field
2643              -- in the KDC request.
2644           ...
2645      }
2646
2647      FastOptions ::= KerberosFlags
2648          -- reserved(0),
2649          -- hide-client-names(1),
2650          -- kdc-follow-referrals(16)
2651
2652      PA-FX-FAST-REPLY ::= CHOICE {
2653          armored-data [0] KrbFastArmoredRep,
2654          ...
2655      }
2656
2657      KrbFastArmoredRep ::= SEQUENCE {
2658          enc-fast-rep      [0] EncryptedData, -- KrbFastResponse --
2659              -- The encryption key is the armor key in the request, and
2660              -- the key usage number is KEY_USAGE_FAST_REP.
2661          ...
2662      }
2663
2664      KrbFastResponse ::= SEQUENCE {
2665          padata         [0] SEQUENCE OF PA-DATA,
2666              -- padata typed holes.
2667          strengthen-key [1] EncryptionKey OPTIONAL,
2668              -- This, if present, strengthens the reply key for AS and
2669              -- TGS.
2670              -- MUST be absent in KRB-ERROR.
2671          finished       [2] KrbFastFinished OPTIONAL,
2672              -- Present in AS or TGS reply; absent otherwise.
2673          nonce          [3] UInt32,
2674              -- Nonce from the client request.
2675          ...
2676      }
2677
2678      KrbFastFinished ::= SEQUENCE {
2679          timestamp       [0] KerberosTime,
2680          usec            [1] Microseconds,
2681              -- timestamp and usec represent the time on the KDC when
2682              -- the reply was generated.
2683          crealm          [2] Realm,
2684
2685
2686
2687Hartman & Zhu           Expires December 6, 2009               [Page 48]
2688
2689Internet-Draft         Kerberos Preauth Framework              June 2009
2690
2691
2692          cname           [3] PrincipalName,
2693              -- Contains the client realm and the client name.
2694          ticket-checksum [4] Checksum,
2695              -- checksum of the ticket in the KDC-REP  using the armor
2696              -- and the key usage is KEY_USAGE_FAST_FINISH.
2697              -- The checksum type is the required checksum type
2698              -- of the armor key.
2699          ...
2700      }
2701
2702      EncryptedChallenge ::= EncryptedData
2703              -- Encrypted PA-ENC-TS-ENC, encrypted in the challenge key
2704              -- using key usage KEY_USAGE_ENC_CHALLENGE_CLIENT for the
2705              -- client and KEY_USAGE_ENC_CHALLENGE_KDC for the KDC.
2706      END
2707
2708
2709Authors' Addresses
2710
2711   Sam hartman
2712   Painless Security
2713
2714   Email: hartmans-ietf@mit.edu
2715
2716
2717   Larry Zhu
2718   Microsoft Corporation
2719   One Microsoft Way
2720   Redmond, WA  98052
2721   US
2722
2723   Email: lzhu@microsoft.com
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743Hartman & Zhu           Expires December 6, 2009               [Page 49]
2744
2745
2746