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: September 10, 2009                                March 9, 2009
9
10
11        A Generalized Framework for Kerberos Pre-Authentication
12                 draft-ietf-krb-wg-preauth-framework-10
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 September 10, 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 September 10, 2009               [Page 1]
56
57Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009               [Page 2]
112
113Internet-Draft         Kerberos Preauth Framework             March 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 . . . . . . . . . . . . . . . . . . . . . . 36
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  . . . . . . . . . . . . . . . . . . . . . 37
151     8.1.  Pre-authentication and Typed Data  . . . . . . . . . . . . 37
152     8.2.  Fast Armor Types . . . . . . . . . . . . . . . . . . . . . 39
153     8.3.  FAST Options . . . . . . . . . . . . . . . . . . . . . . . 40
154   9.  Security Considerations  . . . . . . . . . . . . . . . . . . . 40
155   10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 40
156   11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 41
157     11.1. Normative References . . . . . . . . . . . . . . . . . . . 41
158     11.2. Informative References . . . . . . . . . . . . . . . . . . 41
159   Appendix A.  Change History  . . . . . . . . . . . . . . . . . . . 42
160     A.1.  Changes since 09 . . . . . . . . . . . . . . . . . . . . . 42
161     A.2.  Changes since 08 . . . . . . . . . . . . . . . . . . . . . 42
162     A.3.  Changes since 07 . . . . . . . . . . . . . . . . . . . . . 43
163     A.4.  Changes since 06 . . . . . . . . . . . . . . . . . . . . . 43
164
165
166
167Hartman & Zhu          Expires September 10, 2009               [Page 3]
168
169Internet-Draft         Kerberos Preauth Framework             March 2009
170
171
172   Appendix B.  ASN.1 module  . . . . . . . . . . . . . . . . . . . . 44
173   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 46
174
175
176
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 September 10, 2009               [Page 4]
224
225Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009               [Page 5]
280
281Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009               [Page 6]
336
337Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009               [Page 7]
392
393Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009               [Page 8]
448
449Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009               [Page 9]
504
505Internet-Draft         Kerberos Preauth Framework             March 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 or offered alone.  For each mechanism that is
529   offered alone, the KDC includes the pre-authentication type ID of the
530   mechanism in the padata sequence returned in the
531   KDC_ERR_PREAUTH_REQUIRED error.
532
533   The KDC SHOULD NOT send data that is encrypted in the long-term
534   password-based key of the principal.  Doing so has the same security
535   exposures as the Kerberos protocol without pre-authentication.  There
536   are few situations where the KDC needs to expose cipher text
537   encrypted in a weak key before the client has proven knowledge of
538   that key, and pre-authentication is desirable.
539
5403.3.  Client to KDC
541
542   This description assumes that a client has already received a
543   KDC_ERR_PREAUTH_REQUIRED from the KDC.  If the client performs
544   optimistic pre-authentication then the client needs to guess values
545   for the information it would normally receive from that error
546   response or use cached information obtained in prior interactions
547   with the KDC.
548
549   The client starts by initializing the pre-authentication state as
550   specified.  It then processes the padata in the
551   KDC_ERR_PREAUTH_REQUIRED.
552
553   When processing the response to the KDC_ERR_PREAUTH_REQUIRED, the
554   client MAY ignore any padata it chooses unless doing so violates a
555   specification to which the client conforms.  Clients conforming to
556
557
558
559Hartman & Zhu          Expires September 10, 2009              [Page 10]
560
561Internet-Draft         Kerberos Preauth Framework             March 2009
562
563
564   this specification MUST NOT ignore the padata defined in Section 6.3.
565   Clients SHOULD process padata unrelated to this framework or other
566   means of authenticating the user.  Clients SHOULD choose one
567   authentication set or mechanism that could lead to authenticating the
568   user and ignore the rest.  Since the list of mechanisms offered by
569   the KDC is in the decreasing preference order, clients typically
570   choose the first mechanism or authentication set that the client can
571   usefully perform.  If a client chooses to ignore a padata it MUST NOT
572   process the padata, allow the padata to affect the pre-authentication
573   state, nor respond to the padata.
574
575   For each padata the client chooses to process, the client processes
576   the padata and modifies the pre-authentication state as required by
577   that mechanism.  Padata are processed in the order received from the
578   KDC.
579
580   After processing the padata in the KDC error, the client generates a
581   new request.  It processes the pre-authentication mechanisms in the
582   order in which they will appear in the next request, updating the
583   state as appropriate.  The request is sent when it is complete.
584
5853.4.  KDC to Client
586
587   When a KDC receives an AS request from a client, it needs to
588   determine whether it will respond with an error or an AS reply.
589   There are many causes for an error to be generated that have nothing
590   to do with pre-authentication; they are discussed in the core
591   Kerberos specification.
592
593   From the standpoint of evaluating the pre-authentication, the KDC
594   first starts by initializing the pre-authentication state.  If a PA-
595   FX-COOKIE pre-authentication data item is present, it is processed
596   first; see Section 6.3 for a definition.  It then processes the
597   padata in the request.  As mentioned in Section 3.3, the KDC MAY
598   ignore padata that is inappropriate for the configuration and MUST
599   ignore padata of an unknown type.  The KDC MUST NOT ignore padata of
600   types used in previous messages.  For example, if a KDC issues a
601   KDC_ERR_PREAUTH_REQUIRED error including padata of type x, then the
602   KDC cannot ignore padata of type x received in an AS-REQ message from
603   the client.
604
605   At this point the KDC decides whether it will issue an error or a
606   reply.  Typically a KDC will issue a reply if the client's identity
607   has been authenticated to a sufficient degree.
608
609   In the case of a KDC_ERR_MORE_PREAUTH_DATA_NEEDED error, the KDC
610   first starts by initializing the pre-authentication state.  Then it
611   processes any padata in the client's request in the order provided by
612
613
614
615Hartman & Zhu          Expires September 10, 2009              [Page 11]
616
617Internet-Draft         Kerberos Preauth Framework             March 2009
618
619
620   the client.  Mechanisms that are not understood by the KDC are
621   ignored.  Next, it generates padata for the error response, modifying
622   the pre-authentication state appropriately as each mechanism is
623   processed.  The KDC chooses the order in which it will generate
624   padata (and thus the order of padata in the response), but it needs
625   to modify the pre-authentication state consistently with the choice
626   of order.  For example, if some mechanism establishes an
627   authenticated client identity, then the subsequent mechanisms in the
628   generated response receive this state as input.  After the padata is
629   generated, the error response is sent.  Typically the errors with the
630   code KDC_ERR_MORE_PREAUTH_DATA_NEEDED in a conversation will include
631   KDC state as discussed in Section 6.3.
632
633   To generate a final reply, the KDC generates the padata modifying the
634   pre-authentication state as necessary.  Then it generates the final
635   response, encrypting it in the current pre-authentication reply key.
636
637
6384.  Pre-Authentication Facilities
639
640   Pre-Authentication mechanisms can be thought of as providing various
641   conceptual facilities.  This serves two useful purposes.  First,
642   mechanism authors can choose only to solve one specific small
643   problem.  It is often useful for a mechanism designed to offer key
644   management not to directly provide client authentication but instead
645   to allow one or more other mechanisms to handle this need.  Secondly,
646   thinking about the abstract services that a mechanism provides yields
647   a minimum set of security requirements that all mechanisms providing
648   that facility must meet.  These security requirements are not
649   complete; mechanisms will have additional security requirements based
650   on the specific protocol they employ.
651
652   A mechanism is not constrained to only offering one of these
653   facilities.  While such mechanisms can be designed and are sometimes
654   useful, many pre-authentication mechanisms implement several
655   facilities.  By combining multiple facilities in a single mechanism,
656   it is often easier to construct a secure, simple solution than by
657   solving the problem in full generality.  Even when mechanisms provide
658   multiple facilities, they need to meet the security requirements for
659   all the facilities they provide.  If the FAST factor approach is
660   used, it is likely that one or a small number of facilities can be
661   provided by a single mechanism without complicating the security
662   analysis.
663
664   According to Kerberos extensibility rules (Section 1.5 of the
665   Kerberos specification [RFC4120]), an extension MUST NOT change the
666   semantics of a message unless a recipient is known to understand that
667   extension.  Because a client does not know that the KDC supports a
668
669
670
671Hartman & Zhu          Expires September 10, 2009              [Page 12]
672
673Internet-Draft         Kerberos Preauth Framework             March 2009
674
675
676   particular pre-authentication mechanism when it sends an initial
677   request, a pre-authentication mechanism MUST NOT change the semantics
678   of the request in a way that will break a KDC that does not
679   understand that mechanism.  Similarly, KDCs MUST NOT send messages to
680   clients that affect the core semantics unless the client has
681   indicated support for the message.
682
683   The only state in this model that would break the interpretation of a
684   message is changing the expected reply key.  If one mechanism changed
685   the reply key and a later mechanism used that reply key, then a KDC
686   that interpreted the second mechanism but not the first would fail to
687   interpret the request correctly.  In order to avoid this problem,
688   extensions that change core semantics are typically divided into two
689   parts.  The first part proposes a change to the core semantic--for
690   example proposes a new reply key.  The second part acknowledges that
691   the extension is understood and that the change takes effect.
692   Section 4.2 discusses how to design mechanisms that modify the reply
693   key to be split into a proposal and acceptance without requiring
694   additional round trips to use the new reply key in subsequent pre-
695   authentication.  Other changes in the state described in Section 3.1
696   can safely be ignored by a KDC that does not understand a mechanism.
697   Mechanisms that modify the behavior of the request outside the scope
698   of this framework need to carefully consider the Kerberos
699   extensibility rules to avoid similar problems.
700
7014.1.  Client-authentication Facility
702
703   The client authentication facility proves the identity of a user to
704   the KDC before a ticket is issued.  Examples of mechanisms
705   implementing this facility include the encrypted timestamp facility
706   defined in Section 5.2.7.2 of the Kerberos specification [RFC4120].
707   Mechanisms that provide this facility are expected to mark the client
708   as authenticated.
709
710   Mechanisms implementing this facility SHOULD require the client to
711   prove knowledge of the reply key before transmitting a successful KDC
712   reply.  Otherwise, an attacker can intercept the pre-authentication
713   exchange and get a reply to attack.  One way of proving the client
714   knows the reply key is to implement the Replace Reply Key facility
715   along with this facility.  The PKINIT mechanism [RFC4556] implements
716   Client Authentication alongside Replace Reply Key.
717
718   If the reply key has been replaced, then mechanisms such as
719   encrypted-timestamp that rely on knowledge of the reply key to
720   authenticate the client MUST NOT be used.
721
722
723
724
725
726
727Hartman & Zhu          Expires September 10, 2009              [Page 13]
728
729Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 14]
784
785Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 15]
840
841Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 16]
896
897Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 17]
952
953Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 18]
1008
1009Internet-Draft         Kerberos Preauth Framework             March 2009
1010
1011
1012   authentication mechanisms.
1013
10146.3.  Managing States for the KDC
1015
1016   Kerberos KDCs are stateless.  There is no requirement that clients
1017   will choose the same KDC for the second request in a conversation.
1018   Proxies or other intermediate nodes may also influence KDC selection.
1019   So, each request from a client to a KDC must include sufficient
1020   information that the KDC can regenerate any needed state.  This is
1021   accomplished by giving the client a potentially long opaque cookie in
1022   responses to include in future requests in the same conversation.
1023   The KDC MAY respond that a conversation is too old and needs to
1024   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 September 10, 2009              [Page 19]
1064
1065Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 20]
1120
1121Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 21]
1176
1177Internet-Draft         Kerberos Preauth Framework             March 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 so that the
1207   conversation can continue if the conversation involves multiple KDCs.
1208   The cookie may not be needed in the first message containing the PA-
1209   AUTHENTICATION-SET sequence as the KDC may be able to reconstruct the
1210   state from the PA-AUTHENTICATION-SET-SELECTED padata.  KDCs MUST
1211   support clients that do not include a cookie because they
1212   optimistically choose an authentication set, although they MAY always
1213   return KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET and include a cookie in
1214   that message.  Clients that support PA-AUTHENTICATION-SET MUST
1215   support PA-FX-COOKIE.
1216
1217   Before the authentication succeeds and a ticket is returned, the
1218   message that the client sends is an AS_REQ and the message that the
1219   KDC sends is a KRB-ERROR message.  The error code in the KRB-ERROR
1220   message from the KDC is KDC_ERR_MORE_PREAUTH_DATA_NEEDED as defined
1221   in Section 6.3 and the accompanying e-data contains the DER encoding
1222   of ASN.1 type METHOD-DATA.  The KDC includes the padata elements in
1223   the METHOD-DATA.  If there is no padata, the e-data field is absent
1224   in the KRB-ERROR message.
1225
1226   If the client sends the last message for a given mechanism, then the
1227   KDC sends the first message for the next mechanism.  If the next
1228
1229
1230
1231Hartman & Zhu          Expires September 10, 2009              [Page 22]
1232
1233Internet-Draft         Kerberos Preauth Framework             March 2009
1234
1235
1236   mechanism does not start with a KDC-side challenge, then the KDC
1237   includes a padata item with the appropriate pa-type and an empty pa-
1238   data.
1239
1240   If the KDC sends the last message for a particular mechanism, the KDC
1241   also includes the first padata for the next mechanism.
1242
12436.5.  Definition of Kerberos FAST Padata
1244
1245   As described in [RFC4120], Kerberos is vulnerable to offline
1246   dictionary attacks.  An attacker can request an AS-REP and try
1247   various passwords to see if they can decrypt the resulting ticket.
1248   RFC 4120 provides the encrypted timestamp pre-authentication method
1249   that ameliorates the situation somewhat by requiring that an attacker
1250   observe a successful authentication.  However stronger security is
1251   desired in many environments.  The Kerberos FAST pre-authentication
1252   padata defined in this section provides a tool to significantly
1253   reduce vulnerability to offline dictionary attack.  When combined
1254   with encrypted challenge, FAST requires an attacker to mount a
1255   successful man-in-the-middle attack to observe ciphertext.  When
1256   combined with host keys, FAST can even protect against active
1257   attacks.  FAST also provides solutions to common problems for pre-
1258   authentication mechanisms such as binding of the request and the
1259   reply, freshness guarantee of the authentication.  FAST itself,
1260   however, does not authenticate the client or the KDC, instead, it
1261   provides a typed hole to allow pre-authentication data be tunneled.
1262   A pre-authentication data element used within FAST is called a FAST
1263   factor.  A FAST factor captures the minimal work required for
1264   extending Kerberos to support a new pre-authentication scheme.
1265
1266   A FAST factor MUST NOT be used outside of FAST unless its
1267   specification explicitly allows so.  The typed holes in FAST messages
1268   can also be used as generic holes for other padata that are not
1269   intended to prove the client's identity, or establish the reply key.
1270
1271   New pre-authentication mechanisms SHOULD be designed as FAST factors,
1272   instead of full-blown pre-authentication mechanisms.
1273
1274   FAST factors that are pre-authentication mechanisms MUST meet the
1275   requirements in Section 5.
1276
1277   FAST employs an armoring scheme.  The armor can be a Ticket Granting
1278   Ticket (TGT) obtained by the client's machine using the host keys to
1279   pre-authenticate with the KDC, or an anonymous TGT obtained based on
1280   anonymous PKINIT [KRB-ANON] [RFC4556].
1281
1282   The rest of this section describes the types of armors and the syntax
1283   of the messages used by FAST.  Conforming implementations MUST
1284
1285
1286
1287Hartman & Zhu          Expires September 10, 2009              [Page 23]
1288
1289Internet-Draft         Kerberos Preauth Framework             March 2009
1290
1291
1292   support Kerberos FAST padata.
1293
1294   Any FAST armor scheme MUST provide a fresh armor key for each
1295   conversation.  Clients and KDCs can assume that if a message is
1296   encrypted and integrity protected with a given armor key then it is
1297   part of the conversation using that armor key.
1298
1299   All KDCs in a realm MUST support FAST if FAST is offered by any KDC
1300   as a pre-authentication mechanism.
1301
13026.5.1.  FAST Armors
1303
1304   An armor key is used to encrypt pre-authentication data in the FAST
1305   request and the response.  The KrbFastArmor structure is defined to
1306   identify the armor key.  This structure contains the following two
1307   fields: the armor-type identifies the type of armors, and the armor-
1308   value is an OCTET STRING that contains the description of the armor
1309   scheme and the armor key.
1310
1311        KrbFastArmor ::= SEQUENCE {
1312            armor-type   [0] Int32,
1313                -- Type of the armor.
1314            armor-value  [1] OCTET STRING,
1315                -- Value of the armor.
1316            ...
1317        }
1318
1319   The value of the armor key is a matter of the armor type
1320   specification.  Only one armor type is defined in this document.
1321
1322        FX_FAST_ARMOR_AP_REQUEST           1
1323
1324   The FX_FAST_ARMOR_AP_REQUEST armor is based on Kerberos tickets.
1325
1326   Conforming implementations MUST implement the
1327   FX_FAST_ARMOR_AP_REQUEST armor type.
1328
1329   FAST implementations MUST maintain state about whether the armor
1330   mechanism authenticates the KDC.  If it does not, then a fast factor
1331   that authenticates the KDC MUST be used if the reply key is replaced.
1332
13336.5.1.1.  Ticket-based Armors
1334
1335   This is a ticket-based armoring scheme.  The armor-type is
1336   FX_FAST_ARMOR_AP_REQUEST, the armor-value contains an ASN.1 DER
1337   encoded AP-REQ.  The ticket in the AP-REQ is called an armor ticket
1338   or an armor TGT.  The subkey field in the AP-REQ MUST be present.
1339   The armor key is defined by the following function:
1340
1341
1342
1343Hartman & Zhu          Expires September 10, 2009              [Page 24]
1344
1345Internet-Draft         Kerberos Preauth Framework             March 2009
1346
1347
1348       armor_key = KRB-FX-CF2( subkey, ticket_session_key,
1349                   "subkeyarmor", "ticketarmor" )
1350
1351   The `ticket_key' is the session key from the ticket in the ap-req.
1352   The `subkey' is the ap-req subkey.  This construction guarantees that
1353   both the KDC (through the session key) and the client (through the
1354   subkey) contribute to the armor key.
1355
1356   The server name field of the armor ticket MUST identify the TGS of
1357   the target realm.  Here are three common ways in the decreasing
1358   preference order how an armor TGT SHOULD be obtained:
1359
1360   1.  If the client is authenticating from a host machine whose
1361       Kerberos realm has an authentication path to the client's realm,
1362       the host machine obtains a TGT by using the host keys.  If the
1363       client's realm is different than the realm of the local host, the
1364       machine then obtains a cross-realm TGT to the client's realm as
1365       the armor ticket.  Otherwise, the host's primary TGT is the armor
1366       ticket.
1367
1368   2.  If the client's host machine cannot obtain a host ticket strictly
1369       based on RFC4120, but the KDC has an asymmetric signing key whose
1370       binding with the expected KDC can be verified by the client, the
1371       client can use anonymous PKINIT [KRB-ANON] [RFC4556] to
1372       authenticate the KDC and obtain an anonymous TGT as the armor
1373       ticket.  The armor ticket can also be a cross-realm TGT obtained
1374       based on the initial primary TGT obtained using anonymous PKINIT
1375       with KDC authentication.
1376
1377   3.  Otherwise, the client uses anonymous PKINIT to get an anonymous
1378       TGT without KDC authentication and that TGT is the armor ticket.
1379       Note that this mode of operation is vulnerable to man-in-the-
1380       middle attacks at the time of obtaining the initial anonymous
1381       armor TGT.
1382
1383   If anonymous PKINIT is used to obtain the armor ticket, the KDC
1384   cannot know whether its signing key can be verified by the client,
1385   hence the KDC MUST be marked as unverified from the KDC's point of
1386   view while the client could be able to authenticate the KDC by
1387   verifying the KDC's signing key is bound with the expected KDC.  The
1388   client needs to carefully consider the risk and benefit tradeoffs
1389   associated with active attacks before exposing cipher text encrypted
1390   using the user's long-term secrets when the armor does not
1391   authenticate the KDC.
1392
1393   The TGS MUST reject a request if there is an AD-fx-fast-armor (TBD)
1394   element in the authenticator of the pa-tgs-req padata or if the
1395   ticket in the authenticator of a pa-tgs-req contains the AD-fx-fast-
1396
1397
1398
1399Hartman & Zhu          Expires September 10, 2009              [Page 25]
1400
1401Internet-Draft         Kerberos Preauth Framework             March 2009
1402
1403
1404   armor authorization data element.  These tickets and authenticators
1405   MAY be used as FAST armor tickets but not to obtain a ticket via the
1406   TGS.  This authorization data is used in a system where the
1407   encryption of the user's pre-authentication data is performed in an
1408   unprivileged user process.  A privileged process can provide to the
1409   user process a host ticket, an authenticator for use with that
1410   ticket, and the sub session key contained in the authenticator.  In
1411   order for the host process to ensure that the host ticket is not
1412   accidentally or intentionally misused, (i.e. the user process might
1413   use the host ticket to authenticate as the host), it MUST include a
1414   critical authorization data element of the type AD-fx-fast-armor when
1415   providing the authenticator or in the enc-authorization-data field of
1416   the TGS request used to obtain the TGT.  The corresponding ad-data
1417   field of the AD-fx-fast-armor element is empty.
1418
1419   As discussed previously, the server of an armor ticket MUST be the
1420   TGS of the realm from whom service is requested.  As a result, if
1421   this armor type is used when a ticket is being validated, proxied, or
1422   in other cases where a ticket other than a TGT is presented to the
1423   TGS, a TGT will be used as an armor ticket, while another ticket will
1424   be used in the pa-tgs-req authenticator.
1425
14266.5.2.  FAST Request
1427
1428   A padata type PA-FX-FAST is defined for the Kerberos FAST pre-
1429   authentication padata.  The corresponding padata-value field
1430   [RFC4120] contains the DER encoding of the ASN.1 type PA-FX-FAST-
1431   REQUEST.  As with all pre-authentication types, the KDC SHOULD
1432   advertise PA-FX-FAST with an empty pa-value in a PREAUTH_REQUIRED
1433   error.  Clients MUST ignore the pa-value of PA-FX-FAST in an initial
1434   PREAUTH_REQUIRED error.  FAST is not expected to be used in an
1435   authentication set: clients will typically use FAST padata if
1436   available and this decision should not depend on what other pre-
1437   authentication methods are available.  As such, no pa-hint is defined
1438   for FAST at this time.
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455Hartman & Zhu          Expires September 10, 2009              [Page 26]
1456
1457Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 27]
1512
1513Internet-Draft         Kerberos Preauth Framework             March 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 is
1537   included in order to bind the FAST padata to the outer request.  A
1538   KDC that implements FAST will ignore the outer request, but including
1539   a checksum is relatively cheap and may prevent confusing behavior.
1540
1541   The KrbFastReq structure contains the following information:
1542
1543        KrbFastReq ::= SEQUENCE {
1544            fast-options [0] FastOptions,
1545                -- Additional options.
1546            padata       [1] SEQUENCE OF PA-DATA,
1547                -- padata typed holes.
1548            req-body     [2] KDC-REQ-BODY,
1549                -- Contains the KDC request body as defined in Section
1550                -- 5.4.1 of [RFC4120].
1551                -- This req-body field is preferred over the outer field
1552                -- in the KDC request.
1553             ...
1554        }
1555
1556   The fast-options field indicates various options that are to modify
1557   the behavior of the KDC.  The following options are defined:
1558
1559        FastOptions ::= KerberosFlags
1560            -- reserved(0),
1561            -- hide-client-names(1),
1562            -- kdcfollow--referrals(16)
1563
1564
1565
1566
1567Hartman & Zhu          Expires September 10, 2009              [Page 28]
1568
1569Internet-Draft         Kerberos Preauth Framework             March 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 September 10, 2009              [Page 29]
1624
1625Internet-Draft         Kerberos Preauth Framework             March 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.  However pre-
1656   authentication data methods such as [RFC4556] that include a checksum
1657   of the KDC-REQ-BODY should checksum the outer KDC-REQ-BODY.  These
1658   methods will already be bound to the inner body through the integrity
1659   protection in the FAST request.
1660
16616.5.3.  FAST Response
1662
1663   The KDC that supports the PA-FX-FAST padata MUST include a PA-FX-FAST
1664   padata element in the KDC reply.  In the case of an error, the PA-FX-
1665   FAST padata is included in the KDC responses according to
1666   Section 6.5.4.
1667
1668   The corresponding padata-value field [RFC4120] for the PA-FX-FAST in
1669   the KDC response contains the DER encoding of the ASN.1 type PA-FX-
1670   FAST-REPLY.
1671
1672
1673
1674
1675
1676
1677
1678
1679Hartman & Zhu          Expires September 10, 2009              [Page 30]
1680
1681Internet-Draft         Kerberos Preauth Framework             March 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            rep-key     [1] EncryptionKey OPTIONAL,
1716                -- This, if present, replaces 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            ...
1722        }
1723
1724   The padata field in the KrbFastResponse structure contains a list of
1725   PA-DATA structures as described in Section 5.2.7 of [RFC4120].  These
1726   PA-DATA structures are used to carry data advancing the exchange
1727   specific for the FAST factors.  They can also be used as generic
1728   typed-holes for protocol extensibility.  Unless otherwise specified,
1729   the KDC MUST include any padata that is otherwise in the outer KDC-
1730   REP structure into this field.  The padata field in the KDC reply
1731   structure outside of the PA-FX-FAST-REPLY structure typically
1732
1733
1734
1735Hartman & Zhu          Expires September 10, 2009              [Page 31]
1736
1737Internet-Draft         Kerberos Preauth Framework             March 2009
1738
1739
1740   includes only the PA-FX- FAST-REPLY padata and optionally the PA-FX-
1741   COOKIE padata.
1742
1743   The rep-key field, if present, contains the reply key that is used to
1744   encrypted the KDC reply.  The rep-key field MUST be absent in the
1745   case where an error occurs.  The enctype of the rep-key is the
1746   strongest mutually supported by the KDC and the client.
1747
1748   The finished field contains a KrbFastFinished structure.  It is
1749   filled by the KDC in the final message in the conversation.  This
1750   field is present in an AS-REP or a TGS-REP when a ticket is returned,
1751   and it is not present in an error reply.
1752
1753   The KrbFastFinished structure contains the following information:
1754
1755      KrbFastFinished ::= SEQUENCE {
1756          timestamp   [0] KerberosTime,
1757          usec        [1] Microseconds,
1758              -- timestamp and usec represent the time on the KDC when
1759              -- the reply was generated.
1760          crealm      [2] Realm,
1761          cname       [3] PrincipalName,
1762              -- Contains the client realm and the client name.
1763          checksum    [4] Checksum,
1764              -- Checksum performed over all the messages in the
1765              -- conversation, except the containing message.
1766              -- The checksum key is the armor key as defined in
1767              -- Section 6.5.1, and the checksum type is the required
1768              -- checksum type of the armor key.
1769          ticket-checksum [5] Checksum,
1770              -- checksum  of the ticket in the KDC-REP  using the armor
1771              -- and the key usage is KEY_USAGE_FAST_FINISH.
1772              -- The checksum type is the required checksum type
1773              -- of the armor key.
1774          ...
1775      }
1776      KEY_USAGE_FAST_FINISHED            53
1777
1778   The timestamp and usec fields represent the time on the KDC when the
1779   reply ticket was generated, these fields have the same semantics as
1780   the corresponding-identically-named fields in Section 5.6.1 of
1781   [RFC4120].  The client MUST use the KDC's time in these fields
1782   thereafter when using the returned ticket.  Note that the KDC's time
1783   in AS-REP may not match the authtime in the reply ticket if the kdc-
1784   follow-referrals option is requested and honored by the KDC.  The
1785   client need not confirm that the timestamp returned is within
1786   allowable clock skew: the armor key guarantees that the reply is
1787   fresh.  The client MAY trust the time stamp returned.
1788
1789
1790
1791Hartman & Zhu          Expires September 10, 2009              [Page 32]
1792
1793Internet-Draft         Kerberos Preauth Framework             March 2009
1794
1795
1796   The cname and crealm fields identify the authenticated client.  If
1797   facilities described in [REFERRALS] are used, the authenticated
1798   client may differ from the client in the FAST request.
1799
1800   The checksum field contains a checksum of all the messages in the
1801   conversation prior to the containing message (the containing message
1802   is excluded).  The checksum key is the armor key, and the checksum
1803   type is the required checksum type of the enctype of that key, and
1804   the key usage number is KEY_USAGE_FAST_FINISHED.  The ticket-checksum
1805   is a checksum of the issued ticket using the same key and key usage.
1806
1807   When FAST padata is included, the PA-FX-COOKIE padata as defined in
1808   Section 6.3 MUST also be included if the KDC expects at least one
1809   more message from the client in order to complete the authentication.
1810
18116.5.4.  Authenticated Kerberos Error Messages using Kerberos FAST
1812
1813   If the Kerberos FAST padata was included in the request, unless
1814   otherwise specified, the e-data field of the KRB-ERROR message
1815   [RFC4120] contains the ASN.1 DER encoding of the type METHOD-DATA
1816   [RFC4120] and a PA-FX-FAST is included in the METHOD-DATA.  The KDC
1817   MUST include all the padata elements such as PA-ETYPE-INFO2 and
1818   padata elements that indicate acceptable pre-authentication
1819   mechanisms [RFC4120] in the KrbFastResponse structure.
1820
1821   The KDC MUST also include a PA-FX-ERROR padata item in the
1822   KRBFastResponse structure.  The padata-value element of this sequence
1823   is the ASN.1 DER encoding of the type KRB-ERROR.  The e-data field
1824   MUST be absent in the PA-FX-ERROR padata.  All other fields should be
1825   the same as the outer KRB-ERROR.  The client ignores the outer error
1826   and uses the combination of the padata in the KRBFastResponse and the
1827   error information in the PA-FX-ERROR.
1828
1829              PA-FX-ERROR                        137
1830
1831   If the Kerberos FAST padata is included in the request but not
1832   included in the error reply, it is a matter of the local policy on
1833   the client to accept the information in the error message without
1834   integrity protection.  The Kerberos client MAY process an error
1835   message without a PA-FX-FAST-REPLY, if that is only intended to
1836   return better error information to the application, typically for
1837   trouble-shooting purposes.
1838
1839   In the cases where the e-data field of the KRB-ERROR message is
1840   expected to carry a TYPED-DATA [RFC4120] element, then that
1841   information should be transmitted in a pa-data element within the
1842   KRBFastResponse structure.  The padata-type is the same as the data-
1843   type would be in the typed data element and the padata-value is the
1844
1845
1846
1847Hartman & Zhu          Expires September 10, 2009              [Page 33]
1848
1849Internet-Draft         Kerberos Preauth Framework             March 2009
1850
1851
1852   same as the data-value.  As discussed in Section 8, data-types and
1853   padata-types are drawn from the same namespace.  For example, the
1854   TD_TRUSTED_CERTIFIERS structure is expected to be in the KRB-ERROR
1855   message when the error code is KDC_ERR_CANT_VERIFY_CERTIFICATE
1856   [RFC4556].
1857
18586.5.5.  Outer and Inner Requests
1859
1860   Typically, a client will know that FAST is being used before a
1861   request containing PA-FX-FAST is sent.  So, the outer AS request
1862   typically only includes two pa-data items: PA-FX-FAST and PA-FX-
1863   COOKIE.  The client MAY include additional pa-data, but the KDC MUST
1864   ignore the outer request body and any padata besides PA-FX-FAST and
1865   PA-FX-COOKIE if PA-FX-FAST is processed.  In the case of the TGS
1866   request, the outer request should include PA-FX-FAST and PA-TGS-REQ.
1867
1868   When an AS generates a response, all padata besides PA-FX-FAST and
1869   PA-FX-COOKIE should be included in PA-FX-FAST.  The client MUST
1870   ignore other padata outside of PA-FX-FAST.
1871
18726.5.6.  The Encrypted Challenge FAST Factor
1873
1874   The encrypted challenge FAST factor authenticates a client using the
1875   client's long-term key.  This factor works similarly to the encrypted
1876   time stamp pre-authentication option described in [RFC4120].  The
1877   client encrypts a structure containing a timestamp in the challenge
1878   key.  The challenge key used by the client to send a message to the
1879   KDC is KRB-FX-CF2(armor_key,long_term_key, "clientchallengearmor",
1880   "challengelongterm").  The challenge key used by the KDC encrypting
1881   to the client is KRB-FX-CF2(armor_key, long_term_key,
1882   "kdcchallengearmor", "challengelongterm").  Because the armor key is
1883   fresh and random, the challenge key is fresh and random.  The only
1884   purpose of the timestamp is to limit the validity of the
1885   authentication so that a request cannot be replayed.  A client MAY
1886   base the timestamp on the KDC time in a KDC error and need not
1887   maintain accurate time synchronization itself.  If a client bases its
1888   time on an untrusted source, an attacker may trick the client into
1889   producing an authentication request that is valid at some future
1890   time.  The attacker may be able to use this authentication request to
1891   make it appear that a client has authenticated at that future time.
1892   If ticket-based armor is used, then the lifetime of the ticket will
1893   limit the window in which an attacker can make the client appear to
1894   have authenticated.  For many situations, the ability of an attacker
1895   to cause a client to appear to have authenticated is not a
1896   significant concern; the ability to avoid requiring time
1897   synchronization on clients is more valuable.
1898
1899   The client sends a padata of type PA-ENCRYPTED-CHALLENGE the
1900
1901
1902
1903Hartman & Zhu          Expires September 10, 2009              [Page 34]
1904
1905Internet-Draft         Kerberos Preauth Framework             March 2009
1906
1907
1908   corresponding padata-value contains the DER encoding of ASN.1 type
1909   EncryptedChallenge.
1910
1911      EncryptedChallenge ::= EncryptedData
1912              -- Encrypted PA-ENC-TS-ENC, encrypted in the challenge key
1913              -- using key usage KEY_USAGE_ENC_CHALLENGE_CLIENT for the
1914              -- client and KEY_USAGE_ENC_CHALLENGE_KDC for the KDC.
1915
1916      PA-ENCRYPTED-CHALLENGE          138
1917      KEY_USAGE_ENC_CHALLENGE_CLIENT  54
1918      KEY_USAGE_ENC_CHALLENGE_KDC     55
1919
1920   The client includes some time stamp reasonably close to the KDC's
1921   current time and encrypts it in the challenge key.  Clients MAY use
1922   the current time; doing so prevents the exposure where an attacker
1923   can cause a client to appear to authenticate in the future.  The
1924   client sends the request including this factor.
1925
1926   On receiving an AS-REQ containing the PA-ENCRYPTED-CHALLENGE fast
1927   factor, the KDC decrypts the timestamp.  If the decryption fails the
1928   KDC SHOULD return KDC_ERR_PREAUTH_FAILED, including PA-ETYPE-INFO2 in
1929   the KRBFastResponse in the error.  The KDC confirms that the
1930   timestamp falls within its current clock skew returning
1931   KRB_APP_ERR_SKEW if not.  The KDC then SHOULD check to see if the
1932   encrypted challenge is a replay.  The KDC MUST NOT consider two
1933   encrypted challenges replays simply because the time stamps are the
1934   same; to be a replay, the ciphertext MUST be identical.  Allowing
1935   clients to re-use time stamps avoids requiring that clients maintain
1936   state about which time stamps have been used.
1937
1938   If the KDC accepts the encrypted challenge, it MUST include a padata
1939   element of type PA-ENCRYPTED-CHALLENGE.  The KDC encrypts its current
1940   time in the challenge key.  The KDC MUST replace the reply key before
1941   issuing a ticket.  The client MUST check that the timestamp decrypts
1942   properly.  The client MAY check that the timestamp is winthin the
1943   window of acceptable clock skew for the client.  The client MUST NOT
1944   require that the timestamp be identical to the timestamp in the
1945   issued credentials or the returned message.
1946
1947   The encrypted challenge FAST factor provides the following
1948   facilities: client-authentication and KDC authentication.  This FAST
1949   factor also takes advantage of the FAST facility to replace the reply
1950   key.  It does not provide the strengthening-reply-key facility.  The
1951   security considerations section of this document provides an
1952   explanation why the security requirements are met.
1953
1954   The encrypted challenge FAST factor can be useful in an
1955   authentication set.  No pa-hint is defined because the only
1956
1957
1958
1959Hartman & Zhu          Expires September 10, 2009              [Page 35]
1960
1961Internet-Draft         Kerberos Preauth Framework             March 2009
1962
1963
1964   information needed by this mechanism is information contained in the
1965   PA-ETYPE-INFO2 pre-authentication data.  KDCs are already required to
1966   send PA-ETYPE-INFO2.  If KDCs were not required to send PA-ETYPE-
1967   INFO2 then that information would need to be part of a hint for
1968   encrypted challenge.
1969
1970   Conforming implementations MUST support the encrypted challenge FAST
1971   factor.
1972
19736.6.  Authentication Strength Indication
1974
1975   Implementations that have pre-authentication mechanisms offering
1976   significantly different strengths of client authentication MAY choose
1977   to keep track of the strength of the authentication used as an input
1978   into policy decisions.  For example, some principals might require
1979   strong pre-authentication, while less sensitive principals can use
1980   relatively weak forms of pre-authentication like encrypted timestamp.
1981
1982   An AuthorizationData data type AD-Authentication-Strength is defined
1983   for this purpose.
1984
1985        AD-authentication-strength         70
1986
1987   The corresponding ad-data field contains the DER encoding of the pre-
1988   authentication data set as defined in Section 6.4.  This set contains
1989   all the pre-authentication mechanisms that were used to authenticate
1990   the client.  If only one pre-authentication mechanism was used to
1991   authenticate the client, the pre-authentication set contains one
1992   element.
1993
1994   The AD-authentication-strength element MUST be included in the AD-IF-
1995   RELEVANT, thus it can be ignored if it is unknown to the receiver.
1996
1997
19987.  Assigned Constants
1999
2000   The pre-authentication framework and FAST involve using a number of
2001   Kerberos protocol constants.  This section lists protocol constants
2002   first introduced in this specification drawn from registries not
2003   managed by IANA.  Many of these registries would best be managed by
2004   IANA; that is a known issue that is out of scope for this document.
2005   The constants described in this section have been accounted for and
2006   will appear in the next revision of the Kerberos core specification
2007   or in a document creating IANA registries.
2008
2009   Section 8 creates IANA registries for a different set of constants
2010   used by the extensions described in this document.
2011
2012
2013
2014
2015Hartman & Zhu          Expires September 10, 2009              [Page 36]
2016
2017Internet-Draft         Kerberos Preauth Framework             March 2009
2018
2019
20207.1.  New Errors
2021
2022           KDC_ERR_PREAUTH_EXPIRED                 90
2023           KDC_ERR_MORE_PREAUTH_DATA_NEEDED        91
2024           KDC_ERR_PREAUTH_BAD_AUTHENTICATION_SET  92
2025           KDC_ERR_UNKNOWN_CRITICAL_FAST_OPTIONS            93
2026
20277.2.  Key Usage Numbers
2028
2029           KEY_USAGE_FAST_REQ_CHKSUM               50
2030           KEY_USAGE_FAST_ENC                      51
2031           KEY_USAGE_FAST_REP                      52
2032           KEY_USAGE_FAST_FINISHED                 53
2033           KEY_USAGE_ENC_CHALLENGE_CLIENT          54
2034           KEY_USAGE_ENC_CHALLENGE_KDC             55
2035
20367.3.  Authorization Data Elements
2037
2038           AD-authentication-strength              70
2039           AD-fx-fast-armor                        71
2040
20417.4.  New PA-DATA Types
2042
2043           PA-FX-COOKIE                            133
2044           PA-AUTHENTICATION-SET                   134
2045           PA-AUTH-SET-SELECTED                    135
2046           PA-FX-FAST                              136
2047           PA-FX-ERROR                             137
2048           PA-ENCRYPTED-CHALLENGE                  138
2049
2050
20518.  IANA Considerations
2052
2053   This document creates a number of IANA registries.  These registries
2054   should all be located under
2055   http://www.iana.org/assignments/kerberos-parameters.
2056
20578.1.  Pre-authentication and Typed Data
2058
2059   RFC 4120 defines pre-authentication data, which can be included in a
2060   KDC request or response in order to authenticate the client or extend
2061   the protocol.  In addition, it defines Typed-Data which is an
2062   extension mechanism for errors.  Both pre-authentication data and
2063   typed data are carried as a 32-bit signed integer along with an octet
2064   string.  The encoding of typed data and pre-authentication data is
2065   slightly different.  However the types for pre-authentication data
2066   and typed-data are drawn from the same namespace.  By convention,
2067   registrations starting with TD- are typed data and registration
2068
2069
2070
2071Hartman & Zhu          Expires September 10, 2009              [Page 37]
2072
2073Internet-Draft         Kerberos Preauth Framework             March 2009
2074
2075
2076   starting with PA- are pre-authentication data.  It is important that
2077   these data types be drawn from the same namespace, because some
2078   errors where it would be desirable to include typed data require the
2079   e-data field to be formatted as pre-authentication data.
2080
2081   When Kerberos FAST is used, pre-authentication data encoding is
2082   always used.
2083
2084   There is one apparently conflicting registration between typed data
2085   and pre-authentication data.  PA-GET-FROM-TYPED-DATA and TD-PADATA
2086   are both assigned the value 22.  However this registration is simply
2087   a mechanism to include an element of the other encoding.  The use of
2088   both should be deprecated.
2089
2090   This document creates a registry for pre-authentication and typed
2091   data.  The registration procedures are as follows.  Expert review for
2092   pre-authentication mechanisms designed to authenticate users, KDCs,
2093   or establish the reply key.  The expert first determines that the
2094   purpose of the method is to authenticate clients, KDCs, or to
2095   establish the reply key.  If so, expert review is appropriate.  The
2096   expert evaluates the security and interoperability of the
2097   specification.
2098
2099   IETF review is required if the expert believes that the pre-
2100   authentication method is broader than these three areas.  Pre-
2101   authentication methods that change the Kerberos state machine or
2102   otherwise make significant changes to the Kerberos protocol should be
2103   standards track RFCs.  A concern that a particular method needs to be
2104   a standards track RFC may be raised as an objection during IETF
2105   review.
2106
2107      Type                Value    Reference
2108  ----------------------------------------------------------------------
2109  PA-TGS-REQ                 1    RFC 4120
2110  PA-ENC-TIMESTAMP           2    RFC 4120
2111  PA-PW-SALT                 3    RFC 4120
2112  [reserved]                 4
2113  PA-ENC-UNIX-TIME           5    (deprecated)
2114  PA-SANDIA-SECUREID         6
2115  PA-SESAME                  7
2116  PA-OSF-DCE                 8
2117  PA-CYBERSAFE-SECUREID      9
2118  PA-AFS3-SALT               10
2119  PA-ETYPE-INFO              11   RFC 4120
2120  PA-SAM-CHALLENGE           12   (sam/otp)
2121  PA-SAM-RESPONSE            13   (sam/otp)
2122  PA-PK-AS-REQ_OLD           14   draft-ietf-cat-kerberos-pk-init-09
2123  PA-PK-AS-REP_OLD           15   draft-ietf-cat-kerberos-pk-init-09
2124
2125
2126
2127Hartman & Zhu          Expires September 10, 2009              [Page 38]
2128
2129Internet-Draft         Kerberos Preauth Framework             March 2009
2130
2131
2132  PA-PK-AS-REQ               16   RFC 4556
2133  PA-PK-AS-REP               17   RFC 4556
2134  PA-ETYPE-INFO2             19   RFC 4120
2135  PA-USE-SPECIFIED-KVNO      20
2136  PA-SAM-REDIRECT            21   (sam/otp)
2137  PA-GET-FROM-TYPED-DATA     22   (embedded in typed data)
2138  TD-PADATA                  22   (embeds padata)
2139  PA-SAM-ETYPE-INFO          23   (sam/otp)
2140  PA-ALT-PRINC               24   (crawdad@fnal.gov)
2141  PA-SAM-CHALLENGE2          30   (kenh@pobox.com)
2142  PA-SAM-RESPONSE2           31   (kenh@pobox.com)
2143  PA-EXTRA-TGT               41   Reserved extra TGT
2144  TD-PKINIT-CMS-CERTIFICATES 101  CertificateSet from CMS
2145  TD-KRB-PRINCIPAL           102  PrincipalName
2146  TD-KRB-REALM               103  Realm
2147  TD-TRUSTED-CERTIFIERS      104  PKINIT
2148  TD-CERTIFICATE-INDEX       105  PKINIT
2149  TD-APP-DEFINED-ERROR       106  Application specific
2150  TD-REQ-NONCE               107  INTEGER
2151  TD-REQ-SEQ                 108  INTEGER
2152  PA-PAC-REQUEST             128  MS-KILE
2153  PA-FOR_USER                129  MS-KILE
2154  PA-FOR-X509-USER           130  MS-KILE
2155  PA-FOR-CHECK_DUPS          131  MS-KILE
2156  PA-AS-CHECKSUM             132  MS-KILE
2157  PA-FX-COOKIE               133  draft-ietf-krb-wg-preauth-framework
2158  PA-AUTHENTICATION-SET      134  draft-ietf-krb-wg-preauth-framework
2159  PA-AUTH-SET-SELECTED       135  draft-ietf-krb-wg-preauth-framework
2160  PA-FX-FAST                 136  draft-ietf-krb-wg-preauth-framework
2161  PA-FX-ERROR                137  draft-ietf-krb-wg-preauth-framework
2162  PA-ENCRYPTED-CHALLENGE     138  draft-ietf-krb-wg-preauth-framework
2163  PA-OTP-CHALLENGE           141  (gareth.richards@rsa.com)
2164  PA-OTP-REQUEST             142  (gareth.richards@rsa.com)
2165  PA-OTP-CONFIRM             143  (gareth.richards@rsa.com)
2166  PA-SUPPORTED-ETYPES        165  MS-KILE
2167
21688.2.  Fast Armor Types
2169
2170   FAST armor types are defined in Section 6.5.1.  A FAST armor type is
2171   a signed 32-bit integer.  FAST armor types are assigned by standards
2172   action.
2173
2174          Type    Name                   Description
2175        ------------------------------------------------------------
2176          0                              Reserved.
2177          1   FX_FAST_ARMOR_AP_REQUEST   Ticket armor using an ap-req.
2178
2179
2180
2181
2182
2183Hartman & Zhu          Expires September 10, 2009              [Page 39]
2184
2185Internet-Draft         Kerberos Preauth Framework             March 2009
2186
2187
21888.3.  FAST Options
2189
2190   A FAST request includes a set of bit flags to indicate additional
2191   options.  Bits 0-15 are critical; other bits are non-critical.
2192   Assigning bits greater than 31 may require special support in
2193   implementations.  Assignment of FAST options requires standards
2194   action.
2195
2196      Type    Name                   Description
2197     -------------------------------------------------------------------
2198      0     RESERVED               Reserved for future expansion of this
2199                                   field.
2200      1     hide-client-names      Requesting the KDC to hide client
2201                                   names in  the KDC response
2202      16    kdc-follow-referrals   Requesting the KDC to follow
2203                                   referrals
2204
2205
22069.  Security Considerations
2207
2208   The kdc-referrals option in the Kerberos FAST padata requests the KDC
2209   to act as the client to follow referrals.  This can overload the KDC.
2210   To limit the damages of denied of service using this option, KDCs MAY
2211   restrict the number of simultaneous active requests with this option
2212   for any given client principal.
2213
2214   With regarding to the facilities provided by the Encrypted Challenge
2215   FAST factor, the challenge key is derived from the client secrets and
2216   because the client secrets are known only to the client and the KDC,
2217   the verification of the EncryptedChallenge structure proves the
2218   client's identity, the verification of the EncryptedChallenge
2219   structure in the KDC reply proves that the expected KDC responded.
2220   Therefore, the Encrypted Challenge FAST factor as a pre-
2221   authentication mechanism offers the following facilities: client-
2222   authentication and KDC-authentication.  There is no un-authenticated
2223   clear text introduced by the Encrypted Challenge FAST factor.
2224
2225
222610.  Acknowledgements
2227
2228   Sam Hartman would like to thank the MIT Kerberos Consortium for its
2229   funding of his time on this project.
2230
2231   Several suggestions from Jeffrey Hutzelman based on early revisions
2232   of this documents led to significant improvements of this document.
2233
2234   The proposal to ask one KDC to chase down the referrals and return
2235   the final ticket is based on requirements in [ID.CROSS].
2236
2237
2238
2239Hartman & Zhu          Expires September 10, 2009              [Page 40]
2240
2241Internet-Draft         Kerberos Preauth Framework             March 2009
2242
2243
2244   Joel Webber had a proposal for a mechanism similar to FAST that
2245   created a protected tunnel for Kerberos pre-authentication.
2246
2247
224811.  References
2249
225011.1.  Normative References
2251
2252   [KRB-ANON]
2253              Zhu, L. and P. Leach, "Kerberos Anonymity Support",
2254              draft-ietf-krb-wg-anon-04.txt (work in progress), 2007.
2255
2256   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
2257              Requirement Levels", BCP 14, RFC 2119, March 1997.
2258
2259   [RFC3961]  Raeburn, K., "Encryption and Checksum Specifications for
2260              Kerberos 5", RFC 3961, February 2005.
2261
2262   [RFC4120]  Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The
2263              Kerberos Network Authentication Service (V5)", RFC 4120,
2264              July 2005.
2265
2266   [RFC4556]  Zhu, L. and B. Tung, "Public Key Cryptography for Initial
2267              Authentication in Kerberos (PKINIT)", RFC 4556, June 2006.
2268
226911.2.  Informative References
2270
2271   [ID.CROSS]
2272              Sakane, S., Zrelli, S., and M. Ishiyama , "Problem
2273              Statement on the Operation of Kerberos in a Specific
2274              System", draft-sakane-krb-cross-problem-statement-02.txt
2275              (work in progress), April 2007.
2276
2277   [KRB-WG.SAM]
2278              Hornstein, K., Renard, K., Neuman, C., and G. Zorn,
2279              "Integrating Single-use Authentication Mechanisms with
2280              Kerberos", draft-ietf-krb-wg-kerberos-sam-02.txt (work in
2281              progress), October 2003.
2282
2283   [REFERRALS]
2284              Raeburn, K. and L. Zhu, "Generating KDC Referrals to
2285              Locate Kerberos Realms",
2286              draft-ietf-krb-wg-kerberos-referrals-10.txt (work in
2287              progress), 2007.
2288
2289
2290
2291
2292
2293
2294
2295Hartman & Zhu          Expires September 10, 2009              [Page 41]
2296
2297Internet-Draft         Kerberos Preauth Framework             March 2009
2298
2299
2300Appendix A.  Change History
2301
2302   RFC editor, please remove this section before publication.
2303
2304A.1.  Changes since 09
2305
2306      Clarify conversations by defining for TGS and by describing how
2307      cookies form conversation boundaries.
2308      Simplify text surrounding when finish is included: always for AS
2309      and TGS reply, never for error.
2310      Fill in IANA and constants
2311
2312A.2.  Changes since 08
2313
2314      Fix a number of typos
2315      Rename anonymous flag to hide-client-name; rename kdc-referals to
2316      kdc-follow-referrals
2317      Clarify how anonymous pkinit interacts with KDC verified.
2318      Introduce AD-fx-fast-armor authorization data to deal with
2319      unprivileged processes constructing KDC requests.  Note that a TGT
2320      is always used for armor tickets if the armor field is present; if
2321      you proxy or validate you'll end up with a TGT armor ticket and
2322      another ticket in the pa-tgs-req.  Alternatively you can simply
2323      use the other ticket in the PA-TGS-REQ; weak consensus within WG.
2324      All KDCs in a realm MUST support FAST if it is to be offered.
2325      The cookie message is always generated by the KDC.
2326      Note that the client can trust and need not verify the time stamp
2327      in the finish message.  This can seed the client's idea of KDC
2328      time.
2329      Note that the client name in the finish message may differ from
2330      the name in the request if referrals are used.
2331      Note that KDCs should advertize fast in preauth_required errors.
2332      Armor key is constructed using KRB-FX-CF2.  This is true even in
2333      the TGS case; there is no security reason to do this.  Using the
2334      subkey as done in draft 08 would be fine, but the current text
2335      uses the same procedure both in the TGS and AS case.
2336      Use a different challenge key in each direction in the encrypted
2337      challenge option.
2338      Note that the KDC should process PA-FX-COOKIE before other padata.
2339      KRB-FX-CF2 uses k1's enctype for the result; change around calling
2340      order so we pass in subkeys and armor keys as k1 in preference to
2341      long-term keys or ticket session keys.
2342      Clarify the relationship between authentication sets and cookies.
2343      A cookie may not be needed in the first message.  Clarify how this
2344      interacts with optimistic clients.
2345      Remove text raising a concern that RFC 3961 may permit ciphertext
2346      transformations that do not change plaintext: discussion on the
2347      list came to the conclusion that RFC 3961 does not permit this.
2348
2349
2350
2351Hartman & Zhu          Expires September 10, 2009              [Page 42]
2352
2353Internet-Draft         Kerberos Preauth Framework             March 2009
2354
2355
2356      Remove binding key concept; use the armor key instead.  The cookie
2357      becomes just an octet string.
2358      Include PA-FX-ERROR to protect the error information per Dublin.
2359      Returning preauth_failed in the failed to decrypt encrypted
2360      challenge seems fine; remove the issue marker
2361      Add a section describing what goes in the inner and outer request.
2362      I believe it is redundant but found it useful while putting
2363      together an implementation proposal.
2364      Use hyphen rather than underscore in the constants for pre-
2365      authentication data to be consistent with RFC 4120.
2366      Add a ticket-checksum to the finished message
2367      Remove redundant KEY_USAGE_FAST_ARMOR.
2368      Add protocol constants section for non-IANA registrations and
2369      flesh out IANA section.
2370      Clarify that kdc-req-body checksums should always use the outer
2371      body even for mechanisms like PKINIT that include their own (now
2372      redundant) checksum.
2373      Remove mechanism for encapsulating typed data in padata; just
2374      reflect the value.
2375
2376A.3.  Changes since 07
2377
2378      Propose replacement of authenticated timestamp with encrypted
2379      challenge.  The desire to avoid clients needing time
2380      synchronization and to simply the factor.
2381      Add a requirement that any FAST armor scheme must provide a fresh
2382      key for each conversation.  This allows us to assume that anything
2383      encrypted/integrity protected in the right key is fresh and not
2384      subject to cross-conversation cut and paste.
2385      Removed heartbeat padata.  The KDC will double up messages if it
2386      needs to; the client simply sends its message and waits for the
2387      next response.
2388      Define PA-AUTH-SET-SELECTED
2389      Clarify a KDC cannot ignore padata is has claimed to support
2390
2391A.4.  Changes since 06
2392
2393      Note that even for replace reply key it is likely that the side
2394      using the mechanism will know that the other side supports it.
2395      Since it is reasonably unlikely we'll need a container mechanism
2396      other than FAST itself, we don't need to optimize for that case.
2397      So, we want to optimize for implementation simplicity.  Thus if
2398      you do have such a container mechanism interacting with
2399      authentication sets we'll assume that the hint need to describe
2400      hints for all contained mechanisms.  This closes out a long-
2401      standing issue.
2402
2403
2404
2405
2406
2407Hartman & Zhu          Expires September 10, 2009              [Page 43]
2408
2409Internet-Draft         Kerberos Preauth Framework             March 2009
2410
2411
2412      Write up what Sam believes is the consensus on UI and prompts in
2413      the authentication set: clients MAY assume that they have all the
2414      UI information they need.
2415
2416
2417Appendix B.  ASN.1 module
2418
2419      KerberosPreauthFramework {
2420            iso(1) identified-organization(3) dod(6) internet(1)
2421            security(5) kerberosV5(2) modules(4) preauth-framework(3)
2422      } DEFINITIONS EXPLICIT TAGS ::= BEGIN
2423
2424      IMPORTS
2425           KerberosTime, PrincipalName, Realm, EncryptionKey, Checksum,
2426           Int32, EncryptedData, PA-ENC-TS-ENC, PA-DATA, KDC-REQ-BODY,
2427           Microseconds, KerberosFlags
2428                FROM KerberosV5Spec2 { iso(1) identified-organization(3)
2429                  dod(6) internet(1) security(5) kerberosV5(2)
2430                  modules(4) krb5spec2(2) };
2431                  -- as defined in RFC 4120.
2432
2433
2434      PA-AUTHENTICATION-SET ::= SEQUENCE OF PA-AUTHENTICATION-SET-ELEM
2435
2436      PA-AUTHENTICATION-SET-ELEM ::= SEQUENCE {
2437          pa-type      [0] Int32,
2438              -- same as padata-type.
2439          pa-hint      [1] OCTET STRING OPTIONAL,
2440          pa-value  [2] OCTET STRING OPTIONAL,
2441          ...
2442      }
2443
2444      KrbFastArmor ::= SEQUENCE {
2445          armor-type   [0] Int32,
2446              -- Type of the armor.
2447          armor-value  [1] OCTET STRING,
2448              -- Value of the armor.
2449          ...
2450      }
2451
2452      PA-FX-FAST-REQUEST ::= CHOICE {
2453          armored-data [0] KrbFastArmoredReq,
2454          ...
2455      }
2456
2457      KrbFastArmoredReq ::= SEQUENCE {
2458          armor        [0] KrbFastArmor OPTIONAL,
2459              -- Contains the armor that identifies the armor key.
2460
2461
2462
2463Hartman & Zhu          Expires September 10, 2009              [Page 44]
2464
2465Internet-Draft         Kerberos Preauth Framework             March 2009
2466
2467
2468              -- MUST be present in AS-REQ.
2469          req-checksum [1] Checksum,
2470              -- For AS, contains the checksum performed over the type
2471              -- KDC-REQ-BODY for the req-body field of the KDC-REQ
2472              -- structure;
2473              -- For TGS, contains the checksum performed over the type
2474              -- AP-REQ in the PA-TGS-REQ padata.
2475              -- The checksum key is the armor key, the checksum
2476              -- type is the required checksum type for the enctype of
2477              -- the armor key, and the key usage number is
2478              -- KEY_USAGE_FAST_REQ_CHKSUM.
2479          enc-fast-req [2] EncryptedData, -- KrbFastReq --
2480              -- The encryption key is the armor key, and the key usage
2481              -- number is KEY_USAGE_FAST_ENC.
2482          ...
2483      }
2484
2485      KrbFastReq ::= SEQUENCE {
2486          fast-options [0] FastOptions,
2487              -- Additional options.
2488          padata       [1] SEQUENCE OF PA-DATA,
2489              -- padata typed holes.
2490          req-body     [2] KDC-REQ-BODY,
2491              -- Contains the KDC request body as defined in Section
2492              -- 5.4.1 of [RFC4120].
2493              -- This req-body field is preferred over the outer field
2494              -- in the KDC request.
2495           ...
2496      }
2497
2498      FastOptions ::= KerberosFlags
2499          -- reserved(0),
2500          -- anonymous(1),
2501          -- kdc-referrals(16)
2502
2503      PA-FX-FAST-REPLY ::= CHOICE {
2504          armored-data [0] KrbFastArmoredRep,
2505          ...
2506      }
2507
2508      KrbFastArmoredRep ::= SEQUENCE {
2509          enc-fast-rep      [0] EncryptedData, -- KrbFastResponse --
2510              -- The encryption key is the armor key in the request, and
2511              -- the key usage number is KEY_USAGE_FAST_REP.
2512          ...
2513      }
2514
2515      KrbFastResponse ::= SEQUENCE {
2516
2517
2518
2519Hartman & Zhu          Expires September 10, 2009              [Page 45]
2520
2521Internet-Draft         Kerberos Preauth Framework             March 2009
2522
2523
2524          padata      [0] SEQUENCE OF PA-DATA,
2525              -- padata typed holes.
2526          rep-key     [1] EncryptionKey OPTIONAL,
2527              -- This, if present, replaces the reply key for AS and
2528              -- TGS.
2529              -- MUST be absent in KRB-ERROR.
2530          finished    [2] KrbFastFinished OPTIONAL,
2531              -- Present in AS or TGS reply; absent otherwise.
2532          ...
2533      }
2534
2535      KrbFastFinished ::= SEQUENCE {
2536          timestamp   [0] KerberosTime,
2537          usec        [1] Microseconds,
2538              -- timestamp and usec represent the time on the KDC when
2539              -- the reply was generated.
2540          crealm      [2] Realm,
2541          cname       [3] PrincipalName,
2542              -- Contains the client realm and the client name.
2543          checksum    [4] Checksum,
2544              -- Checksum performed over all the messages in the
2545              -- conversation, except the containing message.
2546              -- The checksum key is the armor key as defined in
2547              -- Section 6.5.1, and the checksum type is the required
2548              -- checksum type of the armor key.
2549          ticket-checksum [5] Checksum,
2550              -- checksum  of the ticket in the KDC-REP  using the armor
2551              -- and the key usage is KEY_USAGE_FAST_FINISH.
2552              -- The checksum type is the required checksum type
2553              -- of the armor key.
2554          ...
2555      }
2556
2557      EncryptedChallenge ::= EncryptedData
2558              -- Encrypted PA-ENC-TS-ENC, encrypted in the challenge key
2559              -- using key usage KEY_USAGE_ENC_CHALLENGE_CLIENT for the
2560              -- client and KEY_USAGE_ENC_CHALLENGE_KDC for the KDC.
2561      END
2562
2563
2564Authors' Addresses
2565
2566   Sam hartman
2567   Painless Security
2568
2569   Email: hartmans-ietf@mit.edu
2570
2571
2572
2573
2574
2575Hartman & Zhu          Expires September 10, 2009              [Page 46]
2576
2577Internet-Draft         Kerberos Preauth Framework             March 2009
2578
2579
2580   Larry Zhu
2581   Microsoft Corporation
2582   One Microsoft Way
2583   Redmond, WA  98052
2584   US
2585
2586   Email: lzhu@microsoft.com
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631Hartman & Zhu          Expires September 10, 2009              [Page 47]
2632
2633
2634