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