1 INTERNET-DRAFT Clifford Neuman
7 The Kerberos Network Authentication Service (V5)
9 draft-ietf-cat-kerberos-revisions-07.txt.
13 This document is an Internet-Draft and is in full conformance with all
14 provisions of Section 10 of RFC 2026. Internet-Drafts are working documents
15 of the Internet Engineering Task Force (IETF), its areas, and its working
16 groups. Note that other groups may also distribute working documents as
19 Internet-Drafts are draft documents valid for a maximum of six months and
20 may be updated, replaced, or obsoleted by other documents at any time. It is
21 inappropriate to use Internet-Drafts as reference material or to cite them
22 other than as "work in progress."
24 The list of current Internet-Drafts can be accessed at
25 http://www.ietf.org/ietf/1id-abstracts.txt
27 The list of Internet-Draft Shadow Directories can be accessed at
28 http://www.ietf.org/shadow.html.
30 To learn the current status of any Internet-Draft, please check the
31 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
32 Directories on ftp.ietf.org (US East Coast), nic.nordu.net (Europe),
33 ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
35 The distribution of this memo is unlimited. It is filed as
36 draft-ietf-cat-kerberos-revisions-07.txt, and expires May 24, 2001.
37 Please send comments to: ietf-krb-wg@anl.gov
41 This document provides an overview and specification of Version 5 of the
42 Kerberos protocol, and updates RFC1510 to clarify aspects of the protocol
43 and its intended use that require more detailed or clearer explanation than
44 was provided in RFC1510. This document is intended to provide a detailed
45 description of the protocol, suitable for implementation, together with
46 descriptions of the appropriate use of protocol messages and fields within
49 This document is not intended to describe Kerberos to the end user, system
50 administrator, or application developer. Higher level papers describing
51 Version 5 of the Kerberos system [NT94] and documenting version 4 [SNS88],
52 are available elsewhere.
54 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
58 This INTERNET-DRAFT describes the concepts and model upon which the Kerberos
59 network authentication system is based. It also specifies Version 5 of the
62 The motivations, goals, assumptions, and rationale behind most design
63 decisions are treated cursorily; they are more fully described in a paper
64 available in IEEE communications [NT94] and earlier in the Kerberos portion
65 of the Athena Technical Plan [MNSS87]. The protocols have been a proposed
66 standard and are being considered for advancement for draft standard through
67 the IETF standard process. Comments are encouraged on the presentation, but
68 only minor refinements to the protocol as implemented or extensions that fit
69 within current protocol framework will be considered at this time.
71 Requests for addition to an electronic mailing list for discussion of
72 Kerberos, kerberos@MIT.EDU, may be addressed to kerberos-request@MIT.EDU.
73 This mailing list is gatewayed onto the Usenet as the group
74 comp.protocols.kerberos. Requests for further information, including
75 documents and code availability, may be sent to info-kerberos@MIT.EDU.
79 The Kerberos model is based in part on Needham and Schroeder's trusted
80 third-party authentication protocol [NS78] and on modifications suggested by
81 Denning and Sacco [DS81]. The original design and implementation of Kerberos
82 Versions 1 through 4 was the work of two former Project Athena staff
83 members, Steve Miller of Digital Equipment Corporation and Clifford Neuman
84 (now at the Information Sciences Institute of the University of Southern
85 California), along with Jerome Saltzer, Technical Director of Project
86 Athena, and Jeffrey Schiller, MIT Campus Network Manager. Many other members
87 of Project Athena have also contributed to the work on Kerberos.
89 Version 5 of the Kerberos protocol (described in this document) has evolved
90 from Version 4 based on new requirements and desires for features not
91 available in Version 4. The design of Version 5 of the Kerberos protocol was
92 led by Clifford Neuman and John Kohl with much input from the community. The
93 development of the MIT reference implementation was led at MIT by John Kohl
94 and Theodore T'so, with help and contributed code from many others. Since
95 RFC1510 was issued, extensions and revisions to the protocol have been
96 proposed by many individuals. Some of these proposals are reflected in this
97 document. Where such changes involved significant effort, the document cites
98 the contribution of the proposer.
100 Reference implementations of both version 4 and version 5 of Kerberos are
101 publicly available and commercial implementations have been developed and
102 are widely used. Details on the differences between Kerberos Versions 4 and
103 5 can be found in [KNT92].
105 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
109 Kerberos provides a means of verifying the identities of principals, (e.g. a
110 workstation user or a network server) on an open (unprotected) network. This
111 is accomplished without relying on assertions by the host operating system,
112 without basing trust on host addresses, without requiring physical security
113 of all the hosts on the network, and under the assumption that packets
114 traveling along the network can be read, modified, and inserted at
115 will[1.1]. Kerberos performs authentication under these conditions as a
116 trusted third-party authentication service by using conventional (shared
117 secret key [1.2]) cryptography. Kerberos extensions described in [PKINIT
118 reference as RFC] provide for the use of public key cryptography during
119 certain phases of the authentication protocol. These extensions allow
120 authentication of users registered with public key certification
121 authorities, and provide certain benefits of public key cryptography in
122 situations where they are needed.
124 The basic Kerberos authentication process proceeds as follows: A client
125 sends a request to the authentication server (AS) requesting 'credentials'
126 for a given server. The AS responds with these credentials, encrypted in the
127 client's key. The credentials consist of 1) a 'ticket' for the server and 2)
128 a temporary encryption key (often called a "session key"). The client
129 transmits the ticket (which contains the client's identity and a copy of the
130 session key, all encrypted in the server's key) to the server. The session
131 key (now shared by the client and server) is used to authenticate the
132 client, and may optionally be used to authenticate the server. It may also
133 be used to encrypt further communication between the two parties or to
134 exchange a separate sub-session key to be used to encrypt further
137 Implementation of the basic protocol consists of one or more authentication
138 servers running on physically secure hosts. The authentication servers
139 maintain a database of principals (i.e., users and servers) and their secret
140 keys. Code libraries provide encryption and implement the Kerberos protocol.
141 In order to add authentication to its transactions, a typical network
142 application adds one or two calls to the Kerberos library directly or
143 through the Generic Security Services Application Programming Interface,
144 GSSAPI, described in separate document [ref to GSSAPI RFC]. These calls
145 result in the transmission of the necessary messages to achieve
148 The Kerberos protocol consists of several sub-protocols (or exchanges).
149 There are two basic methods by which a client can ask a Kerberos server for
150 credentials. In the first approach, the client sends a cleartext request for
151 a ticket for the desired server to the AS. The reply is sent encrypted in
152 the client's secret key. Usually this request is for a ticket-granting
153 ticket (TGT) which can later be used with the ticket-granting server (TGS).
154 In the second method, the client sends a request to the TGS. The client uses
155 the TGT to authenticate itself to the TGS in the same manner as if it were
156 contacting any other application server that requires Kerberos
157 authentication. The reply is encrypted in the session key from the TGT.
158 Though the protocol specification describes the AS and the TGS as separate
159 servers, they are implemented in practice as different protocol entry points
160 within a single Kerberos server.
162 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
164 Once obtained, credentials may be used to verify the identity of the
165 principals in a transaction, to ensure the integrity of messages exchanged
166 between them, or to preserve privacy of the messages. The application is
167 free to choose whatever protection may be necessary.
169 To verify the identities of the principals in a transaction, the client
170 transmits the ticket to the application server. Since the ticket is sent "in
171 the clear" (parts of it are encrypted, but this encryption doesn't thwart
172 replay) and might be intercepted and reused by an attacker, additional
173 information is sent to prove that the message originated with the principal
174 to whom the ticket was issued. This information (called the authenticator)
175 is encrypted in the session key, and includes a timestamp. The timestamp
176 proves that the message was recently generated and is not a replay.
177 Encrypting the authenticator in the session key proves that it was generated
178 by a party possessing the session key. Since no one except the requesting
179 principal and the server know the session key (it is never sent over the
180 network in the clear) this guarantees the identity of the client.
182 The integrity of the messages exchanged between principals can also be
183 guaranteed using the session key (passed in the ticket and contained in the
184 credentials). This approach provides detection of both replay attacks and
185 message stream modification attacks. It is accomplished by generating and
186 transmitting a collision-proof checksum (elsewhere called a hash or digest
187 function) of the client's message, keyed with the session key. Privacy and
188 integrity of the messages exchanged between principals can be secured by
189 encrypting the data to be passed using the session key contained in the
190 ticket or the sub-session key found in the authenticator.
192 The authentication exchanges mentioned above require read-only access to the
193 Kerberos database. Sometimes, however, the entries in the database must be
194 modified, such as when adding new principals or changing a principal's key.
195 This is done using a protocol between a client and a third Kerberos server,
196 the Kerberos Administration Server (KADM). There is also a protocol for
197 maintaining multiple copies of the Kerberos database. Neither of these
198 protocols are described in this document.
200 1.1. Cross-realm operation
202 The Kerberos protocol is designed to operate across organizational
203 boundaries. A client in one organization can be authenticated to a server in
204 another. Each organization wishing to run a Kerberos server establishes its
205 own 'realm'. The name of the realm in which a client is registered is part
206 of the client's name, and can be used by the end-service to decide whether
209 By establishing 'inter-realm' keys, the administrators of two realms can
210 allow a client authenticated in the local realm to prove its identity to
211 servers in other realms[1.3]. The exchange of inter-realm keys (a separate
212 key may be used for each direction) registers the ticket-granting service of
213 each realm as a principal in the other realm. A client is then able to
214 obtain a ticket-granting ticket for the remote realm's ticket-granting
215 service from its local realm. When that ticket-granting ticket is used, the
216 remote ticket-granting service uses the inter-realm key (which usually
217 differs from its own normal TGS key) to decrypt the ticket-granting ticket,
218 and is thus certain that it was issued by the client's own TGS. Tickets
219 issued by the remote ticket-granting service will indicate to the
220 end-service that the client was authenticated from another realm.
222 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
224 A realm is said to communicate with another realm if the two realms share an
225 inter-realm key, or if the local realm shares an inter-realm key with an
226 intermediate realm that communicates with the remote realm. An
227 authentication path is the sequence of intermediate realms that are
228 transited in communicating from one realm to another.
230 Realms are typically organized hierarchically. Each realm shares a key with
231 its parent and a different key with each child. If an inter-realm key is not
232 directly shared by two realms, the hierarchical organization allows an
233 authentication path to be easily constructed. If a hierarchical organization
234 is not used, it may be necessary to consult a database in order to construct
235 an authentication path between realms.
237 Although realms are typically hierarchical, intermediate realms may be
238 bypassed to achieve cross-realm authentication through alternate
239 authentication paths (these might be established to make communication
240 between two realms more efficient). It is important for the end-service to
241 know which realms were transited when deciding how much faith to place in
242 the authentication process. To facilitate this decision, a field in each
243 ticket contains the names of the realms that were involved in authenticating
246 The application server is ultimately responsible for accepting or rejecting
247 authentication and should check the transited field. The application server
248 may choose to rely on the KDC for the application server's realm to check
249 the transited field. The application server's KDC will set the
250 TRANSITED-POLICY-CHECKED flag in this case. The KDC's for intermediate
251 realms may also check the transited field as they issue
252 ticket-granting-tickets for other realms, but they are encouraged not to do
253 so. A client may request that the KDC's not check the transited field by
254 setting the DISABLE-TRANSITED-CHECK flag. KDC's are encouraged but not
255 required to honor this flag.
257 1.2. Choosing a principal with which to communicate
259 The Kerberos protocol provides the means for verifying (subject to the
260 assumptions in 1.4) that the entity with which one communicates is the same
261 entity that was registered with the KDC using the claimed identity
262 (principal name). It is still necessary to determine whether that identity
263 corresponds to the entity with which one intends to communicate.
265 When appropriate data has been exchanged in advance, this determination may
266 be performed syntactically by the application based on the application
267 protocol specification, information provided by the user, and configuration
268 files. For example, the server principal name (including realm) for a telnet
269 server might be derived from the user specified host name (from the telnet
270 command line), the "host/" prefix specified in the application protocol
271 specification, and a mapping to a Kerberos realm derived syntactically from
272 the domain part of the specified hostname and information from the local
273 Kerberos realms database.
275 One can also rely on trusted third parties to make this determination, but
276 only when the data obtained from the third party is suitably integrity
277 protected wile resident on the third party server and when transmitted.
278 Thus, for example, one should not rely on an unprotected domain name system
279 record to map a host alias to the primary name of a server, accepting the
280 primary name as the party one intends to contact since an attacker can
281 modify the mapping and impersonate the party with which one intended to
284 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
286 If a Kerberos server supports name canonicalization, it may be relied upon
287 as a third party to aid in this determination. When utilizing the name
288 canonicalization function provided by the Kerberos server, a client, having
289 already located the instance of a service it wishes to contact, makes a
290 request to the KDC using the server's name information as specified by the
291 user. The Kerberos server will attempt to locate a service principal in its
292 database that corresponds to the requested name and return a ticket for the
293 appropriate server principal to the client. If the KDC determines that the
294 correct server principal is registered in another realm, the KDC will
295 provide a referral to the Kerberos realm that is known to contain the
296 requested service principal. The name canonicalization function supports
297 identity mapping only, and it may not be used as a general name service to
298 locate service instances. There is no guarantee that the returned server
299 principal name (identity) will embed the name of the host on which the
304 As an authentication service, Kerberos provides a means of verifying the
305 identity of principals on a network. Authentication is usually useful
306 primarily as a first step in the process of authorization, determining
307 whether a client may use a service, which objects the client is allowed to
308 access, and the type of access allowed for each. Kerberos does not, by
309 itself, provide authorization. Possession of a client ticket for a service
310 provides only for authentication of the client to that service, and in the
311 absence of a separate authorization procedure, it should not be considered
312 by an application as authorizing the use of that service.
314 Such separate authorization methods may be implemented as application
315 specific access control functions and may utilize files on the application
316 server, or on separately issued authorization credentials such as those
317 based on proxies [Neu93], or on other authorization services. Separately
318 authenticated authorization credentials may be embedded in a tickets
319 authorization data when encapsulated by the kdc-issued authorization data
322 Applications should not accept the mere issuance of a service ticket by the
323 Kerberos server (even by a modified Kerberos server) as granting authority
324 to use the service, since such applications may become vulnerable to the
325 bypass of this authorization check in an environment if they interoperate
326 with other KDCs or where other options for application authentication (e.g.
327 the PKTAPP proposal) are provided.
329 1.4. Environmental assumptions
331 Kerberos imposes a few assumptions on the environment in which it can
334 * 'Denial of service' attacks are not solved with Kerberos. There are
335 places in the protocols where an intruder can prevent an application
336 from participating in the proper authentication steps. Detection and
337 solution of such attacks (some of which can appear to be not-uncommon
338 'normal' failure modes for the system) is usually best left to the
339 human administrators and users.
340 * Principals must keep their secret keys secret. If an intruder somehow
341 steals a principal's key, it will be able to masquerade as that
342 principal or impersonate any server to the legitimate principal.
344 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
346 * 'Password guessing' attacks are not solved by Kerberos. If a user
347 chooses a poor password, it is possible for an attacker to successfully
348 mount an offline dictionary attack by repeatedly attempting to decrypt,
349 with successive entries from a dictionary, messages obtained which are
350 encrypted under a key derived from the user's password.
351 * Each host on the network must have a clock which is 'loosely
352 synchronized' to the time of the other hosts; this synchronization is
353 used to reduce the bookkeeping needs of application servers when they
354 do replay detection. The degree of "looseness" can be configured on a
355 per-server basis, but is typically on the order of 5 minutes. If the
356 clocks are synchronized over the network, the clock synchronization
357 protocol must itself be secured from network attackers.
358 * Principal identifiers are not recycled on a short-term basis. A typical
359 mode of access control will use access control lists (ACLs) to grant
360 permissions to particular principals. If a stale ACL entry remains for
361 a deleted principal and the principal identifier is reused, the new
362 principal will inherit rights specified in the stale ACL entry. By not
363 re-using principal identifiers, the danger of inadvertent access is
366 1.5. Glossary of terms
368 Below is a list of terms used throughout this document.
371 Verifying the claimed identity of a principal.
372 Authentication header
373 A record containing a Ticket and an Authenticator to be presented to a
374 server as part of the authentication process.
376 A sequence of intermediate realms transited in the authentication
377 process when communicating from one realm to another.
379 A record containing information that can be shown to have been recently
380 generated using the session key known only by the client and server.
382 The process of determining whether a client may use a service, which
383 objects the client is allowed to access, and the type of access allowed
386 A token that grants the bearer permission to access an object or
387 service. In Kerberos, this might be a ticket whose use is restricted by
388 the contents of the authorization data field, but which lists no
389 network addresses, together with the session key necessary to use the
392 The output of an encryption function. Encryption transforms plaintext
395 A process that makes use of a network service on behalf of a user. Note
396 that in some cases a Server may itself be a client of some other server
397 (e.g. a print server may be a client of a file server).
399 A ticket plus the secret session key necessary to successfully use that
400 ticket in an authentication exchange.
403 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
406 Key Distribution Center, a network service that supplies tickets and
407 temporary session keys; or an instance of that service or the host on
408 which it runs. The KDC services both initial ticket and ticket-granting
409 ticket requests. The initial ticket portion is sometimes referred to as
410 the Authentication Server (or service). The ticket-granting ticket
411 portion is sometimes referred to as the ticket-granting server (or
414 Aside from the 3-headed dog guarding Hades, the name given to Project
415 Athena's authentication service, the protocol used by that service, or
416 the code used to implement the authentication service.
418 The input to an encryption function or the output of a decryption
419 function. Decryption transforms ciphertext into plaintext.
421 A named client or server entity that participates in a network
422 communication, with one name that is considered canonical.
424 The canonical name used to uniquely identify each different principal.
426 To encipher a record containing several fields in such a way that the
427 fields cannot be individually replaced without either knowledge of the
428 encryption key or leaving evidence of tampering.
430 An encryption key shared by a principal and the KDC, distributed
431 outside the bounds of the system, with a long lifetime. In the case of
432 a human user's principal, the secret key may be derived from a
435 A particular Principal which provides a resource to network clients.
436 The server is sometimes referred to as the Application Server.
438 A resource provided to network clients; often provided by more than one
439 server (for example, remote file service).
441 A temporary encryption key used between two principals, with a lifetime
442 limited to the duration of a single login "session".
444 A temporary encryption key used between two principals, selected and
445 exchanged by the principals using the session key, and with a lifetime
446 limited to the duration of a single association.
448 A record that helps a client authenticate itself to a server; it
449 contains the client's identity, a session key, a timestamp, and other
450 information, all sealed using the server's secret key. It only serves
451 to authenticate a client when presented along with a fresh
454 2. Ticket flag uses and requests
456 Each Kerberos ticket contains a set of flags which are used to indicate
457 attributes of that ticket. Most flags may be requested by a client when the
458 ticket is obtained; some are automatically turned on and off by a Kerberos
459 server as required. The following sections explain what the various flags
460 mean, and gives examples of reasons to use such a flag.
462 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
464 2.1. Initial, pre-authenticated, and hardware authenticated tickets
466 The INITIAL flag indicates that a ticket was issued using the AS protocol
467 and not issued based on a ticket-granting ticket. Application servers that
468 want to require the demonstrated knowledge of a client's secret key (e.g. a
469 password-changing program) can insist that this flag be set in any tickets
470 they accept, and thus be assured that the client's key was recently
471 presented to the application client.
473 The PRE-AUTHENT and HW-AUTHENT flags provide additional information about
474 the initial authentication, regardless of whether the current ticket was
475 issued directly (in which case INITIAL will also be set) or issued on the
476 basis of a ticket-granting ticket (in which case the INITIAL flag is clear,
477 but the PRE-AUTHENT and HW-AUTHENT flags are carried forward from the
478 ticket-granting ticket).
482 The INVALID flag indicates that a ticket is invalid. Application servers
483 must reject tickets which have this flag set. A postdated ticket will
484 usually be issued in this form. Invalid tickets must be validated by the KDC
485 before use, by presenting them to the KDC in a TGS request with the VALIDATE
486 option specified. The KDC will only validate tickets after their starttime
487 has passed. The validation is required so that postdated tickets which have
488 been stolen before their starttime can be rendered permanently invalid
489 (through a hot-list mechanism) (see section 3.3.3.1).
491 2.3. Renewable tickets
493 Applications may desire to hold tickets which can be valid for long periods
494 of time. However, this can expose their credentials to potential theft for
495 equally long periods, and those stolen credentials would be valid until the
496 expiration time of the ticket(s). Simply using short-lived tickets and
497 obtaining new ones periodically would require the client to have long-term
498 access to its secret key, an even greater risk. Renewable tickets can be
499 used to mitigate the consequences of theft. Renewable tickets have two
500 "expiration times": the first is when the current instance of the ticket
501 expires, and the second is the latest permissible value for an individual
502 expiration time. An application client must periodically (i.e. before it
503 expires) present a renewable ticket to the KDC, with the RENEW option set in
504 the KDC request. The KDC will issue a new ticket with a new session key and
505 a later expiration time. All other fields of the ticket are left unmodified
506 by the renewal process. When the latest permissible expiration time arrives,
507 the ticket expires permanently. At each renewal, the KDC may consult a
508 hot-list to determine if the ticket had been reported stolen since its last
509 renewal; it will refuse to renew such stolen tickets, and thus the usable
510 lifetime of stolen tickets is reduced.
512 The RENEWABLE flag in a ticket is normally only interpreted by the
513 ticket-granting service (discussed below in section 3.3). It can usually be
514 ignored by application servers. However, some particularly careful
515 application servers may wish to disallow renewable tickets.
517 If a renewable ticket is not renewed by its expiration time, the KDC will
518 not renew the ticket. The RENEWABLE flag is reset by default, but a client
519 may request it be set by setting the RENEWABLE option in the KRB_AS_REQ
520 message. If it is set, then the renew-till field in the ticket contains the
521 time after which the ticket may not be renewed.
523 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
525 2.4. Postdated tickets
527 Applications may occasionally need to obtain tickets for use much later,
528 e.g. a batch submission system would need tickets to be valid at the time
529 the batch job is serviced. However, it is dangerous to hold valid tickets in
530 a batch queue, since they will be on-line longer and more prone to theft.
531 Postdated tickets provide a way to obtain these tickets from the KDC at job
532 submission time, but to leave them "dormant" until they are activated and
533 validated by a further request of the KDC. If a ticket theft were reported
534 in the interim, the KDC would refuse to validate the ticket, and the thief
537 The MAY-POSTDATE flag in a ticket is normally only interpreted by the
538 ticket-granting service. It can be ignored by application servers. This flag
539 must be set in a ticket-granting ticket in order to issue a postdated ticket
540 based on the presented ticket. It is reset by default; it may be requested
541 by a client by setting the ALLOW-POSTDATE option in the KRB_AS_REQ message.
542 This flag does not allow a client to obtain a postdated ticket-granting
543 ticket; postdated ticket-granting tickets can only by obtained by requesting
544 the postdating in the KRB_AS_REQ message. The life (endtime-starttime) of a
545 postdated ticket will be the remaining life of the ticket-granting ticket at
546 the time of the request, unless the RENEWABLE option is also set, in which
547 case it can be the full life (endtime-starttime) of the ticket-granting
548 ticket. The KDC may limit how far in the future a ticket may be postdated.
550 The POSTDATED flag indicates that a ticket has been postdated. The
551 application server can check the authtime field in the ticket to see when
552 the original authentication occurred. Some services may choose to reject
553 postdated tickets, or they may only accept them within a certain period
554 after the original authentication. When the KDC issues a POSTDATED ticket,
555 it will also be marked as INVALID, so that the application client must
556 present the ticket to the KDC to be validated before use.
558 2.5. Proxiable and proxy tickets
560 At times it may be necessary for a principal to allow a service to perform
561 an operation on its behalf. The service must be able to take on the identity
562 of the client, but only for a particular purpose. A principal can allow a
563 service to take on the principal's identity for a particular purpose by
566 The process of granting a proxy using the proxy and proxiable flags is used
567 to provide credentials for use with specific services. Though conceptually
568 also a proxy, user's wishing to delegate their identity for ANY purpose must
569 use the ticket forwarding mechanism described in the next section to forward
570 a ticket granting ticket.
572 The PROXIABLE flag in a ticket is normally only interpreted by the
573 ticket-granting service. It can be ignored by application servers. When set,
574 this flag tells the ticket-granting server that it is OK to issue a new
575 ticket (but not a ticket-granting ticket) with a different network address
576 based on this ticket. This flag is set if requested by the client on initial
577 authentication. By default, the client will request that it be set when
578 requesting a ticket granting ticket, and reset when requesting any other
581 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
583 This flag allows a client to pass a proxy to a server to perform a remote
584 request on its behalf, e.g. a print service client can give the print server
585 a proxy to access the client's files on a particular file server in order to
586 satisfy a print request.
588 In order to complicate the use of stolen credentials, Kerberos tickets are
589 usually valid from only those network addresses specifically included in the
590 ticket[2.1]. When granting a proxy, the client must specify the new network
591 address from which the proxy is to be used, or indicate that the proxy is to
592 be issued for use from any address.
594 The PROXY flag is set in a ticket by the TGS when it issues a proxy ticket.
595 Application servers may check this flag and at their option they may require
596 additional authentication from the agent presenting the proxy in order to
597 provide an audit trail.
599 2.6. Forwardable tickets
601 Authentication forwarding is an instance of a proxy where the service
602 granted is complete use of the client's identity. An example where it might
603 be used is when a user logs in to a remote system and wants authentication
604 to work from that system as if the login were local.
606 The FORWARDABLE flag in a ticket is normally only interpreted by the
607 ticket-granting service. It can be ignored by application servers. The
608 FORWARDABLE flag has an interpretation similar to that of the PROXIABLE
609 flag, except ticket-granting tickets may also be issued with different
610 network addresses. This flag is reset by default, but users may request that
611 it be set by setting the FORWARDABLE option in the AS request when they
612 request their initial ticket-granting ticket.
614 This flag allows for authentication forwarding without requiring the user to
615 enter a password again. If the flag is not set, then authentication
616 forwarding is not permitted, but the same result can still be achieved if
617 the user engages in the AS exchange specifying the requested network
618 addresses and supplies a password.
620 The FORWARDED flag is set by the TGS when a client presents a ticket with
621 the FORWARDABLE flag set and requests a forwarded ticket by specifying the
622 FORWARDED KDC option and supplying a set of addresses for the new ticket. It
623 is also set in all tickets issued based on tickets with the FORWARDED flag
624 set. Application servers may choose to process FORWARDED tickets differently
625 than non-FORWARDED tickets.
627 2.7 Transited Policy Checking
629 While the application server is ultimately responsible for accepting or
630 rejecting authentication and should check the transited field, a KDC may
631 apply a realm specific policy for validating the transited field and
632 accepting credentials for cross-realm authentication. When the KDC applies
633 such checks and accepts such cross-realm authentication it will set the
634 TRANSITED-POLICY-CHECKED flag in the service tickets it issues based on the
635 cross-realm TGT. A client may request that the KDC's not check the transited
636 field by setting the DISABLE-TRANSITED-CHECK flag. KDC's are encouraged but
637 not required to honor this flag.
639 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
641 2.8 Anonymous Tickets
643 When policy allows, a KDC may issue anonymous tickets for the purpose of
644 enabling encrypted communication between a client and server without
645 identifying the client to the server. Such anonymous tickets are issued with
646 a generic principal name configured on the KDC (e.g. "anonymous@") and will
647 have the ANONYMOUS flag set. A server accepting such a ticket may assume
648 that subsequent requests using the same ticket and session key originate
649 from the same user. Requests with the same username but different tickets
650 are likely to originate from different users. Users request anonymous ticket
651 by setting the REQUEST-ANONYMOUS option in an AS or TGS request.
653 2.9. Other KDC options
655 There are three additional options which may be set in a client's request of
658 2.9.1 Name canonicalization [JBrezak]
660 The NAME-CANONICALIZATION option allows the KDC to replace the name of the
661 client or server requested by the client with the canonical form of the
662 principal's name, if known, or to refer the client to a KDC for the realm
663 with which the requested principal is registered.
665 Where name cannonicalization is supported a client who can identify a
666 principal but does not know the full principal name can request that the
667 Kerberos server attempt to lookup the name in its database and use the
668 canonical name of the requested principal or return a referral to a realm
669 that has the requested principal in its namespace. Use of name
670 canonicalization supports the case where a principal has multiple common
671 names (names typed by a user[2.2]), all of which are known to the KDC, but
672 only one Kerberos identity (the canonical name is the Kerberos principal
673 name). Name canonicalization is intended solely to provide a secure mapping
674 from the name known by a user to its principal identifier. It is not
675 intended for use as a general purpose nameserver or to identify instances of
678 The CANONICALIZE flag in a ticket request is used to indicate to the
679 Kerberos server that the client will accept an alternative name to the
680 principal in the request or a referral to another realm. When name
681 cannonicalization is supported in a realm, all instances of the AS and TGS
682 for the realm must be able to interpret requests with this flag. In realms
683 where name cannonicalization is not supported, this flag may be ignored. By
684 using this flag, the client can avoid extensive configuration needed to map
685 specific host names to a particular realm.
689 The RENEWABLE-OK option indicates that the client will accept a renewable
690 ticket if a ticket with the requested life cannot otherwise be provided. If
691 a ticket with the requested life cannot be provided, then the KDC may issue
692 a renewable ticket with a renew-till equal to the the requested endtime. The
693 value of the renew-till field may still be adjusted by site-determined
694 limits or limits imposed by the individual principal or server.
696 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
698 2.9.3 ENC-TKT-IN-SKEY
700 The ENC-TKT-IN-SKEY option supports user-to-user authentication. It allows
701 the KDC to issue a service ticket encrypted using the session key from a
702 ticket granting ticket issued to another user. This is needed to support
703 peer-to-peer authentication since the long term key of the user does not
704 remain on the workstation after initial login. The ENC-TKT-IN-SKEY option is
705 honored only by the ticket-granting service. It indicates that the ticket to
706 be issued for the end server is to be encrypted in the session key from the
707 additional second ticket-granting ticket provided with the request. See
708 section 3.3.3 for specific details.
712 The following sections describe the interactions between network clients and
713 servers and the messages involved in those exchanges.
715 3.1. The Authentication Service Exchange
718 Message direction Message type Section
719 1. Client to Kerberos KRB_AS_REQ 5.4.1
720 2. Kerberos to client KRB_AS_REP or 5.4.2
723 The Authentication Service (AS) Exchange between the client and the Kerberos
724 Authentication Server is initiated by a client when it wishes to obtain
725 authentication credentials for a given server but currently holds no
726 credentials. In its basic form, the client's secret key is used for
727 encryption and decryption. This exchange is typically used at the initiation
728 of a login session to obtain credentials for a Ticket-Granting Server which
729 will subsequently be used to obtain credentials for other servers (see
730 section 3.3) without requiring further use of the client's secret key. This
731 exchange is also used to request credentials for services which must not be
732 mediated through the Ticket-Granting Service, but rather require a
733 principal's secret key, such as the password-changing service[3.1]. This
734 exchange does not by itself provide any assurance of the the identity of the
737 The exchange consists of two messages: KRB_AS_REQ from the client to
738 Kerberos, and KRB_AS_REP or KRB_ERROR in reply. The formats for these
739 messages are described in sections 5.4.1, 5.4.2, and 5.9.1.
741 In the request, the client sends (in cleartext) its own identity and the
742 identity of the server for which it is requesting credentials. The response,
743 KRB_AS_REP, contains a ticket for the client to present to the server, and a
744 session key that will be shared by the client and the server. The session
745 key and additional information are encrypted in the client's secret key. The
746 KRB_AS_REP message contains information which can be used to detect replays,
747 and to associate it with the message to which it replies.
749 Without pre-authentication, the authentication server does not know whether
750 the client is actually the principal named in the request. It simply sends a
751 reply without knowing or caring whether they are the same. This is
752 acceptable because nobody but the principal whose identity was given in the
753 request will be able to use the reply. Its critical information is encrypted
754 in that principal's key. The initial request supports an optional field that
755 can be used to pass additional information that might be needed for the
756 initial exchange. This field may be used for pre-authentication as described
759 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
761 Various errors can occur; these are indicated by an error response
762 (KRB_ERROR) instead of the KRB_AS_REP response. The error message is not
763 encrypted. The KRB_ERROR message contains information which can be used to
764 associate it with the message to which it replies. If suitable
765 preauthentication has occurred, an optional checksum may be included in the
766 KRB_ERROR message to prevent fabrication or modification of the KRB_ERROR
767 message. When a checksum is not present, the lack of integrity protection
768 precludes the ability to detect replays, fabrications, or modifications of
769 the message, and the client must not depend on information in the KRB_ERROR
770 message for security critical operations.
772 3.1.1. Generation of KRB_AS_REQ message
774 The client may specify a number of options in the initial request. Among
775 these options are whether pre-authentication is to be performed; whether the
776 requested ticket is to be renewable, proxiable, or forwardable; whether it
777 should be postdated or allow postdating of derivative tickets; whether the
778 client requests name-canonicalization or an anonymous ticket; and whether a
779 renewable ticket will be accepted in lieu of a non-renewable ticket if the
780 requested ticket expiration date cannot be satisfied by a non-renewable
781 ticket (due to configuration constraints; see section 4). See section A.1
784 The client prepares the KRB_AS_REQ message and sends it to the KDC.
786 3.1.2. Receipt of KRB_AS_REQ message
788 If all goes well, processing the KRB_AS_REQ message will result in the
789 creation of a ticket for the client to present to the server. The format for
790 the ticket is described in section 5.3.1. The contents of the ticket are
791 determined as follows.
793 3.1.3. Generation of KRB_AS_REP message
795 The authentication server looks up the client and server principals named in
796 the KRB_AS_REQ in its database, extracting their respective keys. If the
797 requested client principal named in the request is not known because it
798 doesn't exist in the KDC's principal database and if an acceptable canonical
799 name of the client is not known, then an error message with a
800 KDC_ERR_C_PRINCIPAL_UNKNOWN is returned.
802 If the request had the CANONICALIZE option set and if the AS finds the
803 canonical name for the client and it is in another realm, then an error
804 message with a KDC_ERR_WRONG_REALM error code and the cname and crealm in
805 the error message will contain the true client principal name and realm. In
806 this case, since no key is shared with the client, the response from the KDC
807 is not integrity protected and the referral can only be considered a hint;
808 the validity of the referral is validated upon successful completion of
809 initial authentication with the correct AS using the appropriate user key.
811 If required, the server pre-authenticates the request, and if the
812 pre-authentication check fails, an error message with the code
813 KDC_ERR_PREAUTH_FAILED is returned. If pre-authentication is required, but
814 was not present in the request, an error message with the code
815 KDC_ERR_PREAUTH_FAILED is returned and the PA-ETYPE-INFO pre-authentication
816 field will be included in the KRB-ERROR message. If the server cannot
817 accommodate an encryption type requested by the client, an error message
818 with code KDC_ERR_ETYPE_NOSUPP is returned. Otherwise the KDC generates a
819 'random' session key[3.3].
821 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
823 When responding to an AS request, if there are multiple encryption keys
824 registered for a client in the Kerberos database (or if the key registered
825 supports multiple encryption types; e.g. DES3-CBC-SHA1 and
826 DES3-CBC-SHA1-KD), then the etype field from the AS request is used by the
827 KDC to select the encryption method to be used to protect the encrypted part
828 of the KRB_AS_REP message which is sent to the client. If there is more than
829 one supported strong encryption type in the etype list, the first valid
830 etype for which an encryption key is available is used. The encryption
831 method used to protect the encrypted part of the KRB_TGS_REP message is the
832 keytype of the session key found in the ticket granting ticket presented in
835 If the user's key was generated using an alternate string to key function
836 than that used by the selected encryption type, information needed by the
837 string to key function will be returned to the client in the padata field of
838 the KRB_AS_REP message using the PA-PW-SALT, PA-AFS3-SALT, or similar
839 pre-authentication typed values. This does not affect the encryption
840 performed by the KDC since the key stored in the principal database already
841 has the string to key transformation applied.
843 When the etype field is present in a KDC request, whether an AS or TGS
844 request, the KDC will attempt to assign the type of the random session key
845 from the list of methods in the etype field. The KDC will select the
846 appropriate type using the list of methods provided together with
847 information from the Kerberos database indicating acceptable encryption
848 methods for the application server. The KDC will not issue tickets with a
849 weak session key encryption type.
851 If the requested start time is absent, indicates a time in the past, or is
852 within the window of acceptable clock skew for the KDC and the POSTDATE
853 option has not been specified, then the start time of the ticket is set to
854 the authentication server's current time. If it indicates a time in the
855 future beyond the acceptable clock skew, but the POSTDATED option has not
856 been specified then the error KDC_ERR_CANNOT_POSTDATE is returned. Otherwise
857 the requested start time is checked against the policy of the local realm
858 (the administrator might decide to prohibit certain types or ranges of
859 postdated tickets), and if acceptable, the ticket's start time is set as
860 requested and the INVALID flag is set in the new ticket. The postdated
861 ticket must be validated before use by presenting it to the KDC after the
862 start time has been reached.
864 The expiration time of the ticket will be set to the earlier of the
865 requested endtime and a time determined by local policy, possibly determined
866 using realm or principal specific factors. For example, the expiration time
867 may be set to the minimum of the following:
869 * The expiration time (endtime) requested in the KRB_AS_REQ message.
870 * The ticket's start time plus the maximum allowable lifetime associated
871 with the client principal from the authentication server's database
873 * The ticket's start time plus the maximum allowable lifetime associated
874 with the server principal.
875 * The ticket's start time plus the maximum lifetime set by the policy of
878 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
880 If the requested expiration time minus the start time (as determined above)
881 is less than a site-determined minimum lifetime, an error message with code
882 KDC_ERR_NEVER_VALID is returned. If the requested expiration time for the
883 ticket exceeds what was determined as above, and if the 'RENEWABLE-OK'
884 option was requested, then the 'RENEWABLE' flag is set in the new ticket,
885 and the renew-till value is set as if the 'RENEWABLE' option were requested
886 (the field and option names are described fully in section 5.4.1).
888 If the RENEWABLE option has been requested or if the RENEWABLE-OK option has
889 been set and a renewable ticket is to be issued, then the renew-till field
890 is set to the minimum of:
892 * Its requested value.
893 * The start time of the ticket plus the minimum of the two maximum
894 renewable lifetimes associated with the principals' database entries.
895 * The start time of the ticket plus the maximum renewable lifetime set by
896 the policy of the local realm.
898 The flags field of the new ticket will have the following options set if
899 they have been requested and if the policy of the local realm allows:
900 FORWARDABLE, MAY-POSTDATE, POSTDATED, PROXIABLE, RENEWABLE, ANONYMOUS. If
901 the new ticket is post-dated (the start time is in the future), its INVALID
902 flag will also be set.
904 If all of the above succeed, the server will encrypt ciphertext part of the
905 ticket using the encryption key extracted from the server principal's record
906 in the Kerberos database using the encryption type associated with the
907 server principal's key (this choice is NOT affected by the etype field in
908 the request). It then formats a KRB_AS_REP message (see section 5.4.2),
909 copying the addresses in the request into the caddr of the response, placing
910 any required pre-authentication data into the padata of the response, and
911 encrypts the ciphertext part in the client's key using an acceptable
912 encryption method requested in the etype field of the request, and sends the
913 message to the client. See section A.2 for pseudocode.
915 3.1.4. Generation of KRB_ERROR message
917 Several errors can occur, and the Authentication Server responds by
918 returning an error message, KRB_ERROR, to the client, with the error-code,
919 e-text, and optional e-cksum fields set to appropriate values. The error
920 message contents and details are described in Section 5.9.1.
922 3.1.5. Receipt of KRB_AS_REP message
924 If the reply message type is KRB_AS_REP, then the client verifies that the
925 cname and crealm fields in the cleartext portion of the reply match what it
926 requested. If any padata fields are present, they may be used to derive the
927 proper secret key to decrypt the message. The client decrypts the encrypted
928 part of the response using its secret key, verifies that the nonce in the
929 encrypted part matches the nonce it supplied in its request (to detect
930 replays). It also verifies that the sname and srealm in the response match
931 those in the request (or are otherwise expected values), and that the host
932 address field is also correct. It then stores the ticket, session key, start
933 and expiration times, and other information for later use. The
934 key-expiration field from the encrypted part of the response may be checked
935 to notify the user of impending key expiration (the client program could
936 then suggest remedial action, such as a password change). See section A.3
939 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
941 Proper decryption of the KRB_AS_REP message is not sufficient for the host
942 to verify the identity of the user; the user and an attacker could cooperate
943 to generate a KRB_AS_REP format message which decrypts properly but is not
944 from the proper KDC. If the host wishes to verify the identity of the user,
945 it must require the user to present application credentials which can be
946 verified using a securely-stored secret key for the host. If those
947 credentials can be verified, then the identity of the user can be assured.
949 3.1.6. Receipt of KRB_ERROR message
951 If the reply message type is KRB_ERROR, then the client interprets it as an
952 error and performs whatever application-specific tasks are necessary to
953 recover. If the client set the CANONICALIZE option and a KDC_ERR_WRONG_REALM
954 error was returned, the AS request should be retried to the realm and client
955 principal name specified in the error message crealm and cname field
958 3.2. The Client/Server Authentication Exchange
961 Message direction Message type Section
962 Client to Application server KRB_AP_REQ 5.5.1
963 [optional] Application server to client KRB_AP_REP or 5.5.2
966 The client/server authentication (CS) exchange is used by network
967 applications to authenticate the client to the server and vice versa. The
968 client must have already acquired credentials for the server using the AS or
971 3.2.1. The KRB_AP_REQ message
973 The KRB_AP_REQ contains authentication information which should be part of
974 the first message in an authenticated transaction. It contains a ticket, an
975 authenticator, and some additional bookkeeping information (see section
976 5.5.1 for the exact format). The ticket by itself is insufficient to
977 authenticate a client, since tickets are passed across the network in
978 cleartext[3.4], so the authenticator is used to prevent invalid replay of
979 tickets by proving to the server that the client knows the session key of
980 the ticket and thus is entitled to use the ticket. The KRB_AP_REQ message is
981 referred to elsewhere as the 'authentication header.'
983 3.2.2. Generation of a KRB_AP_REQ message
985 When a client wishes to initiate authentication to a server, it obtains
986 (either through a credentials cache, the AS exchange, or the TGS exchange) a
987 ticket and session key for the desired service. The client may re-use any
988 tickets it holds until they expire. To use a ticket the client constructs a
989 new Authenticator from the the system time, its name, and optionally an
990 application specific checksum, an initial sequence number to be used in
991 KRB_SAFE or KRB_PRIV messages, and/or a session subkey to be used in
992 negotiations for a session key unique to this particular session.
993 Authenticators may not be re-used and will be rejected if replayed to a
994 server[3.5]. If a sequence number is to be included, it should be randomly
995 chosen so that even after many messages have been exchanged it is not likely
996 to collide with other sequence numbers in use.
998 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1000 The client may indicate a requirement of mutual authentication or the use of
1001 a session-key based ticket by setting the appropriate flag(s) in the
1002 ap-options field of the message.
1004 The Authenticator is encrypted in the session key and combined with the
1005 ticket to form the KRB_AP_REQ message which is then sent to the end server
1006 along with any additional application-specific information. See section A.9
1009 3.2.3. Receipt of KRB_AP_REQ message
1011 Authentication is based on the server's current time of day (clocks must be
1012 loosely synchronized), the authenticator, and the ticket. Several errors are
1013 possible. If an error occurs, the server is expected to reply to the client
1014 with a KRB_ERROR message. This message may be encapsulated in the
1015 application protocol if its 'raw' form is not acceptable to the protocol.
1016 The format of error messages is described in section 5.9.1.
1018 The algorithm for verifying authentication information is as follows. If the
1019 message type is not KRB_AP_REQ, the server returns the KRB_AP_ERR_MSG_TYPE
1020 error. If the key version indicated by the Ticket in the KRB_AP_REQ is not
1021 one the server can use (e.g., it indicates an old key, and the server no
1022 longer possesses a copy of the old key), the KRB_AP_ERR_BADKEYVER error is
1023 returned. If the USE-SESSION-KEY flag is set in the ap-options field, it
1024 indicates to the server that the ticket is encrypted in the session key from
1025 the server's ticket-granting ticket rather than its secret key [3.6].
1027 Since it is possible for the server to be registered in multiple realms,
1028 with different keys in each, the srealm field in the unencrypted portion of
1029 the ticket in the KRB_AP_REQ is used to specify which secret key the server
1030 should use to decrypt that ticket. The KRB_AP_ERR_NOKEY error code is
1031 returned if the server doesn't have the proper key to decipher the ticket.
1033 The ticket is decrypted using the version of the server's key specified by
1034 the ticket. If the decryption routines detect a modification of the ticket
1035 (each encryption system must provide safeguards to detect modified
1036 ciphertext; see section 6), the KRB_AP_ERR_BAD_INTEGRITY error is returned
1037 (chances are good that different keys were used to encrypt and decrypt).
1039 The authenticator is decrypted using the session key extracted from the
1040 decrypted ticket. If decryption shows it to have been modified, the
1041 KRB_AP_ERR_BAD_INTEGRITY error is returned. The name and realm of the client
1042 from the ticket are compared against the same fields in the authenticator.
1043 If they don't match, the KRB_AP_ERR_BADMATCH error is returned (they might
1044 not match, for example, if the wrong session key was used to encrypt the
1045 authenticator). The addresses in the ticket (if any) are then searched for
1046 an address matching the operating-system reported address of the client. If
1047 no match is found or the server insists on ticket addresses but none are
1048 present in the ticket, the KRB_AP_ERR_BADADDR error is returned. If the
1049 local (server) time and the client time in the authenticator differ by more
1050 than the allowable clock skew (e.g., 5 minutes), the KRB_AP_ERR_SKEW error
1053 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1055 Unless the application server provides its own suitable means to protect
1056 against replay (for example, a challenge-response sequence initiated by the
1057 server after authentication, or use of a server-generated encryption
1058 subkey), the server must utilize a replay cache to remember any
1059 authenticator presented within the allowable clock skew. Careful analysis of
1060 the application protocol and implementation is recommended before
1061 eliminating this cache. The replay cache will store the server name, along
1062 with the client name, time and microsecond fields from the recently-seen
1063 authenticators and if a matching tuple is found, the KRB_AP_ERR_REPEAT error
1064 is returned [3.7]. If a server loses track of authenticators presented
1065 within the allowable clock skew, it must reject all requests until the clock
1066 skew interval has passed, providing assurance that any lost or re-played
1067 authenticators will fall outside the allowable clock skew and can no longer
1068 be successfully replayed[3.8].
1070 If a sequence number is provided in the authenticator, the server saves it
1071 for later use in processing KRB_SAFE and/or KRB_PRIV messages. If a subkey
1072 is present, the server either saves it for later use or uses it to help
1073 generate its own choice for a subkey to be returned in a KRB_AP_REP message.
1075 If multiple servers (for example, different services on one machine, or a
1076 single service implemented on multiple machines) share a service principal
1077 (a practice we do not recommend in general, but acknowledge will be used in
1078 some cases), they should also share this replay cache, or the application
1079 protocol should be designed so as to eliminate the need for it. Note that
1080 this applies to all of the services, if any of the application protocols
1081 does not have replay protection built in; an authenticator used with such a
1082 service could later be replayed to a different service with the same service
1083 principal but no replay protection, if the former doesn't record the
1084 authenticator information in the common replay cache.
1086 The server computes the age of the ticket: local (server) time minus the
1087 start time inside the Ticket. If the start time is later than the current
1088 time by more than the allowable clock skew or if the INVALID flag is set in
1089 the ticket, the KRB_AP_ERR_TKT_NYV error is returned. Otherwise, if the
1090 current time is later than end time by more than the allowable clock skew,
1091 the KRB_AP_ERR_TKT_EXPIRED error is returned.
1093 If all these checks succeed without an error, the server is assured that the
1094 client possesses the credentials of the principal named in the ticket and
1095 thus, the client has been authenticated to the server. See section A.10 for
1098 Passing these checks provides only authentication of the named principal; it
1099 does not imply authorization to use the named service. Applications must
1100 make a separate authorization decisions based upon the authenticated name of
1101 the user, the requested operation, local access control information such as
1102 that contained in a .k5login or .k5users file, and possibly a separate
1103 distributed authorization service.
1105 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1107 3.2.4. Generation of a KRB_AP_REP message
1109 Typically, a client's request will include both the authentication
1110 information and its initial request in the same message, and the server need
1111 not explicitly reply to the KRB_AP_REQ. However, if mutual authentication
1112 (not only authenticating the client to the server, but also the server to
1113 the client) is being performed, the KRB_AP_REQ message will have
1114 MUTUAL-REQUIRED set in its ap-options field, and a KRB_AP_REP message is
1115 required in response. As with the error message, this message may be
1116 encapsulated in the application protocol if its "raw" form is not acceptable
1117 to the application's protocol. The timestamp and microsecond field used in
1118 the reply must be the client's timestamp and microsecond field (as provided
1119 in the authenticator)[3.9]. If a sequence number is to be included, it
1120 should be randomly chosen as described above for the authenticator. A subkey
1121 may be included if the server desires to negotiate a different subkey. The
1122 KRB_AP_REP message is encrypted in the session key extracted from the
1123 ticket. See section A.11 for pseudocode.
1125 3.2.5. Receipt of KRB_AP_REP message
1127 If a KRB_AP_REP message is returned, the client uses the session key from
1128 the credentials obtained for the server[3.10] to decrypt the message, and
1129 verifies that the timestamp and microsecond fields match those in the
1130 Authenticator it sent to the server. If they match, then the client is
1131 assured that the server is genuine. The sequence number and subkey (if
1132 present) are retained for later use. See section A.12 for pseudocode.
1134 3.2.6. Using the encryption key
1136 After the KRB_AP_REQ/KRB_AP_REP exchange has occurred, the client and server
1137 share an encryption key which can be used by the application. In some cases,
1138 the use of this session key will be implicit in the protocol; in others the
1139 method of use must be chosen from several alternatives. The 'true session
1140 key' to be used for KRB_PRIV, KRB_SAFE, or other application-specific uses
1141 may be chosen by the application based on the session key from the ticket
1142 and subkeys in the KRB_AP_REP message and the authenticator[3.11]. To
1143 mitigate the effect of failures in random number generation on the client it
1144 is strongly encouraged that any key derived by an application for subsequent
1145 use include the full key entropy derived from the KDC generated session key
1146 carried in the ticket. We leave the protocol negotiations of how to use the
1147 key (e.g. selecting an encryption or checksum type) to the application
1148 programmer; the Kerberos protocol does not constrain the implementation
1149 options, but an example of how this might be done follows.
1151 One way that an application may choose to negotiate a key to be used for
1152 subsequent integrity and privacy protection is for the client to propose a
1153 key in the subkey field of the authenticator. The server can then choose a
1154 key using the proposed key from the client as input, returning the new
1155 subkey in the subkey field of the application reply. This key could then be
1156 used for subsequent communication.
1158 To make this example more concrete, if the communication patterns of an
1159 application dictates the use of encryption modes of operation incompatible
1160 with the encryption system used for the authenticator, then a key compatible
1161 with the required encryption system may be generated by either the client,
1162 the server, or collaboratively by both and exchanged using the subkey field.
1163 This generation might involve the use of a random number as a pre-key,
1166 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1168 initially generated by either party, which could then be encrypted using the
1169 session key from the ticket, and the result exchanged and used for
1170 subsequent encryption. By encrypting the pre-key with the session key from
1171 the ticket, randomness from the KDC generated key is assured of being
1172 present in the negotiated key. Application developers must be careful
1173 however, to use a means of introducing this entropy that does not allow an
1174 attacker to learn the session key from the ticket if it learns the key
1175 generated and used for subsequent communication. The reader should note that
1176 this is only an example, and that an analysis of the particular cryptosystem
1177 to be used, must be made before deciding how to generate values for the
1178 subkey fields, and the key to be used for subsequent communication.
1180 With both the one-way and mutual authentication exchanges, the peers should
1181 take care not to send sensitive information to each other without proper
1182 assurances. In particular, applications that require privacy or integrity
1183 should use the KRB_AP_REP response from the server to client to assure both
1184 client and server of their peer's identity. If an application protocol
1185 requires privacy of its messages, it can use the KRB_PRIV message (section
1186 3.5). The KRB_SAFE message (section 3.4) can be used to assure integrity.
1188 3.3. The Ticket-Granting Service (TGS) Exchange
1191 Message direction Message type Section
1192 1. Client to Kerberos KRB_TGS_REQ 5.4.1
1193 2. Kerberos to client KRB_TGS_REP or 5.4.2
1196 The TGS exchange between a client and the Kerberos Ticket-Granting Server is
1197 initiated by a client when it wishes to obtain authentication credentials
1198 for a given server (which might be registered in a remote realm), when it
1199 wishes to renew or validate an existing ticket, or when it wishes to obtain
1200 a proxy ticket. In the first case, the client must already have acquired a
1201 ticket for the Ticket-Granting Service using the AS exchange (the
1202 ticket-granting ticket is usually obtained when a client initially
1203 authenticates to the system, such as when a user logs in). The message
1204 format for the TGS exchange is almost identical to that for the AS exchange.
1205 The primary difference is that encryption and decryption in the TGS exchange
1206 does not take place under the client's key. Instead, the session key from
1207 the ticket-granting ticket or renewable ticket, or sub-session key from an
1208 Authenticator is used. As is the case for all application servers, expired
1209 tickets are not accepted by the TGS, so once a renewable or ticket-granting
1210 ticket expires, the client must use a separate exchange to obtain valid
1213 The TGS exchange consists of two messages: A request (KRB_TGS_REQ) from the
1214 client to the Kerberos Ticket-Granting Server, and a reply (KRB_TGS_REP or
1215 KRB_ERROR). The KRB_TGS_REQ message includes information authenticating the
1216 client plus a request for credentials. The authentication information
1217 consists of the authentication header (KRB_AP_REQ) which includes the
1218 client's previously obtained ticket-granting, renewable, or invalid ticket.
1219 In the ticket-granting ticket and proxy cases, the request may include one
1220 or more of: a list of network addresses, a collection of typed authorization
1221 data to be sealed in the ticket for authorization use by the application
1222 server, or additional tickets (the use of which are described later). The
1225 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1227 TGS reply (KRB_TGS_REP) contains the requested credentials, encrypted in the
1228 session key from the ticket-granting ticket or renewable ticket, or if
1229 present, in the sub-session key from the Authenticator (part of the
1230 authentication header). The KRB_ERROR message contains an error code and
1231 text explaining what went wrong. The KRB_ERROR message is not encrypted. The
1232 KRB_TGS_REP message contains information which can be used to detect
1233 replays, and to associate it with the message to which it replies. The
1234 KRB_ERROR message also contains information which can be used to associate
1235 it with the message to which it replies, but except when an optional
1236 checksum is included in the KRB_ERROR message, it is not possible to detect
1237 replays or fabrications of such messages.
1239 3.3.1. Generation of KRB_TGS_REQ message
1241 Before sending a request to the ticket-granting service, the client must
1242 determine in which realm the application server is believed to be
1243 registered[3.12]. If the client knows the service principal name and realm
1244 and it does not already possess a ticket-granting ticket for the appropriate
1245 realm, then one must be obtained. This is first attempted by requesting a
1246 ticket-granting ticket for the destination realm from a Kerberos server for
1247 which the client possesses a ticket-granting ticket (using the KRB_TGS_REQ
1248 message recursively). The Kerberos server may return a TGT for the desired
1249 realm in which case one can proceed. Alternatively, the Kerberos server may
1250 return a TGT for a realm which is 'closer' to the desired realm (further
1251 along the standard hierarchical path between the client's realm and the
1252 requested realm server's realm).
1254 If the client does not know the realm of the service or the true service
1255 principal name, then the CANONICALIZE option must be used in the request.
1256 This will cause the TGS to locate the service principal based on the target
1257 service name in the ticket and return the service principal name in the
1258 response. This function allows the KDC to inform the user of the registered
1259 Kerberos principal name and registered KDC for a server that may have more
1260 than one host name or whose registered realm can not be determined from the
1261 name of the host, but it is not to be used to locate the application server.
1263 If the server name determined by a TGS supporting name canonicalization is
1264 with a remote KDC, then the response will include the principal name
1265 determined by the KDC, and will include a TGT for the remote realm or a
1266 realm 'closer' to the realm with which the server principal is registered.
1267 In this case, the canonicalization request must be repeated with a Kerberos
1268 server in the realm specified in the returned TGT. If neither are returned,
1269 then the request may be retried with a Kerberos server for a realm higher in
1270 the hierarchy. This request will itself require a ticket-granting ticket for
1271 the higher realm which must be obtained by recursively applying these
1274 Once the client obtains a ticket-granting ticket for the appropriate realm,
1275 it determines which Kerberos servers serve that realm, and contacts one. The
1276 list might be obtained through a configuration file or network service or it
1277 may be generated from the name of the realm; as long as the secret keys
1278 exchanged by realms are kept secret, only denial of service results from
1279 using a false Kerberos server.
1281 As in the AS exchange, the client may specify a number of options in the
1282 KRB_TGS_REQ message. The client prepares the KRB_TGS_REQ message, providing
1283 an authentication header as an element of the padata field, and including
1286 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1288 the same fields as used in the KRB_AS_REQ message along with several
1289 optional fields: the enc-authorization-data field for application server use
1290 and additional tickets required by some options.
1292 In preparing the authentication header, the client can select a sub-session
1293 key under which the response from the Kerberos server will be
1294 encrypted[3.13]. If the sub-session key is not specified, the session key
1295 from the ticket-granting ticket will be used. If the enc-authorization-data
1296 is present, it must be encrypted in the sub-session key, if present, from
1297 the authenticator portion of the authentication header, or if not present,
1298 using the session key from the ticket-granting ticket.
1300 Once prepared, the message is sent to a Kerberos server for the destination
1301 realm. See section A.5 for pseudocode.
1303 3.3.2. Receipt of KRB_TGS_REQ message
1305 The KRB_TGS_REQ message is processed in a manner similar to the KRB_AS_REQ
1306 message, but there are many additional checks to be performed. First, the
1307 Kerberos server must determine which server the accompanying ticket is for
1308 and it must select the appropriate key to decrypt it. For a normal
1309 KRB_TGS_REQ message, it will be for the ticket granting service, and the
1310 TGS's key will be used. If the TGT was issued by another realm, then the
1311 appropriate inter-realm key must be used. If the accompanying ticket is not
1312 a ticket granting ticket for the current realm, but is for an application
1313 server in the current realm, the RENEW, VALIDATE, or PROXY options are
1314 specified in the request, and the server for which a ticket is requested is
1315 the server named in the accompanying ticket, then the KDC will decrypt the
1316 ticket in the authentication header using the key of the server for which it
1317 was issued. If no ticket can be found in the padata field, the
1318 KDC_ERR_PADATA_TYPE_NOSUPP error is returned.
1320 Once the accompanying ticket has been decrypted, the user-supplied checksum
1321 in the Authenticator must be verified against the contents of the request,
1322 and the message rejected if the checksums do not match (with an error code
1323 of KRB_AP_ERR_MODIFIED) or if the checksum is not keyed or not
1324 collision-proof (with an error code of KRB_AP_ERR_INAPP_CKSUM). If the
1325 checksum type is not supported, the KDC_ERR_SUMTYPE_NOSUPP error is
1326 returned. If the authorization-data are present, they are decrypted using
1327 the sub-session key from the Authenticator.
1329 If any of the decryptions indicate failed integrity checks, the
1330 KRB_AP_ERR_BAD_INTEGRITY error is returned. If the CANONICALIZE option is
1331 set in the KRB_TGS_REQ, then the requested service name might not be the
1332 true principal name or the service might not be in the TGS realm and the
1333 correct name must be determined.
1335 3.3.3. Generation of KRB_TGS_REP message
1337 The KRB_TGS_REP message shares its format with the KRB_AS_REP (KRB_KDC_REP),
1338 but with its type field set to KRB_TGS_REP. The detailed specification is in
1341 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1343 The response will include a ticket for the requested server or for a ticket
1344 granting server of an intermediate KDC to be contacted to obtain the
1345 requested ticket. The Kerberos database is queried to retrieve the record
1346 for the appropriate server (including the key with which the ticket will be
1347 encrypted). If the request is for a ticket granting ticket for a remote
1348 realm, and if no key is shared with the requested realm, then the Kerberos
1349 server will select the realm 'closest' to the requested realm with which it
1350 does share a key, and use that realm instead. If the CANONICALIZE option is
1351 set, the TGS may return a ticket containing the server name of the true
1352 service principal. If the requested server cannot be found in the TGS
1353 database, then a TGT for another trusted realm may be returned instead of a
1354 ticket for the service. This TGT is a referral mechanism to cause the client
1355 to retry the request to the realm of the TGT. These are the only cases where
1356 the response for the KDC will be for a different server than that requested
1359 By default, the address field, the client's name and realm, the list of
1360 transited realms, the time of initial authentication, the expiration time,
1361 and the authorization data of the newly-issued ticket will be copied from
1362 the ticket-granting ticket (TGT) or renewable ticket. If the transited field
1363 needs to be updated, but the transited type is not supported, the
1364 KDC_ERR_TRTYPE_NOSUPP error is returned.
1366 If the request specifies an endtime, then the endtime of the new ticket is
1367 set to the minimum of (a) that request, (b) the endtime from the TGT, and
1368 (c) the starttime of the TGT plus the minimum of the maximum life for the
1369 application server and the maximum life for the local realm (the maximum
1370 life for the requesting principal was already applied when the TGT was
1371 issued). If the new ticket is to be a renewal, then the endtime above is
1372 replaced by the minimum of (a) the value of the renew_till field of the
1373 ticket and (b) the starttime for the new ticket plus the life
1374 (endtime-starttime) of the old ticket.
1376 If the FORWARDED option has been requested, then the resulting ticket will
1377 contain the addresses specified by the client. This option will only be
1378 honored if the FORWARDABLE flag is set in the TGT. The PROXY option is
1379 similar; the resulting ticket will contain the addresses specified by the
1380 client. It will be honored only if the PROXIABLE flag in the TGT is set. The
1381 PROXY option will not be honored on requests for additional ticket-granting
1384 If the requested start time is absent, indicates a time in the past, or is
1385 within the window of acceptable clock skew for the KDC and the POSTDATE
1386 option has not been specified, then the start time of the ticket is set to
1387 the authentication server's current time. If it indicates a time in the
1388 future beyond the acceptable clock skew, but the POSTDATED option has not
1389 been specified or the MAY-POSTDATE flag is not set in the TGT, then the
1390 error KDC_ERR_CANNOT_POSTDATE is returned. Otherwise, if the ticket-granting
1391 ticket has the MAY-POSTDATE flag set, then the resulting ticket will be
1392 postdated and the requested starttime is checked against the policy of the
1393 local realm. If acceptable, the ticket's start time is set as requested, and
1394 the INVALID flag is set. The postdated ticket must be validated before use
1395 by presenting it to the KDC after the starttime has been reached. However,
1396 in no case may the starttime, endtime, or renew-till time of a newly-issued
1397 postdated ticket extend beyond the renew-till time of the ticket-granting
1400 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1402 If the ENC-TKT-IN-SKEY option has been specified and an additional ticket
1403 has been included in the request, the KDC will decrypt the additional ticket
1404 using the key for the server to which the additional ticket was issued and
1405 verify that it is a ticket-granting ticket. If the name of the requested
1406 server is missing from the request, the name of the client in the additional
1407 ticket will be used. Otherwise the name of the requested server will be
1408 compared to the name of the client in the additional ticket and if
1409 different, the request will be rejected. If the request succeeds, the
1410 session key from the additional ticket will be used to encrypt the new
1411 ticket that is issued instead of using the key of the server for which the
1412 new ticket will be used.
1414 If the name of the server in the ticket that is presented to the KDC as part
1415 of the authentication header is not that of the ticket-granting server
1416 itself, the server is registered in the realm of the KDC, and the RENEW
1417 option is requested, then the KDC will verify that the RENEWABLE flag is set
1418 in the ticket, that the INVALID flag is not set in the ticket, and that the
1419 renew_till time is still in the future. If the VALIDATE option is requested,
1420 the KDC will check that the starttime has passed and the INVALID flag is
1421 set. If the PROXY option is requested, then the KDC will check that the
1422 PROXIABLE flag is set in the ticket. If the tests succeed, and the ticket
1423 passes the hotlist check described in the next section, the KDC will issue
1424 the appropriate new ticket.
1426 The ciphertext part of the response in the KRB_TGS_REP message is encrypted
1427 in the sub-session key from the Authenticator, if present, or the session
1428 key key from the ticket-granting ticket. It is not encrypted using the
1429 client's secret key. Furthermore, the client's key's expiration date and the
1430 key version number fields are left out since these values are stored along
1431 with the client's database record, and that record is not needed to satisfy
1432 a request based on a ticket-granting ticket. See section A.6 for pseudocode.
1434 3.3.3.1. Checking for revoked tickets
1436 Whenever a request is made to the ticket-granting server, the presented
1437 ticket(s) is(are) checked against a hot-list of tickets which have been
1438 canceled. This hot-list might be implemented by storing a range of issue
1439 timestamps for 'suspect tickets'; if a presented ticket had an authtime in
1440 that range, it would be rejected. In this way, a stolen ticket-granting
1441 ticket or renewable ticket cannot be used to gain additional tickets
1442 (renewals or otherwise) once the theft has been reported to the KDC for the
1443 realm in which the server resides. Any normal ticket obtained before it was
1444 reported stolen will still be valid (because they require no interaction
1445 with the KDC), but only until their normal expiration time. If TGT's have
1446 been issued for cross-realm authentication, use of the cross-realm TGT will
1447 not be affected unless the hot-list is propagated to the KDC's for the
1448 realms for which such cross-realm tickets were issued.
1450 3.3.3.2. Encoding the transited field
1452 If the identity of the server in the TGT that is presented to the KDC as
1453 part of the authentication header is that of the ticket-granting service,
1454 but the TGT was issued from another realm, the KDC will look up the
1455 inter-realm key shared with that realm and use that key to decrypt the
1456 ticket. If the ticket is valid, then the KDC will honor the request, subject
1457 to the constraints outlined above in the section describing the AS exchange.
1458 The realm part of the client's identity will be taken from the
1461 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1463 ticket-granting ticket. The name of the realm that issued the
1464 ticket-granting ticket will be added to the transited field of the ticket to
1465 be issued. This is accomplished by reading the transited field from the
1466 ticket-granting ticket (which is treated as an unordered set of realm
1467 names), adding the new realm to the set, then constructing and writing out
1468 its encoded (shorthand) form (this may involve a rearrangement of the
1471 Note that the ticket-granting service does not add the name of its own
1472 realm. Instead, its responsibility is to add the name of the previous realm.
1473 This prevents a malicious Kerberos server from intentionally leaving out its
1474 own name (it could, however, omit other realms' names).
1476 The names of neither the local realm nor the principal's realm are to be
1477 included in the transited field. They appear elsewhere in the ticket and
1478 both are known to have taken part in authenticating the principal. Since the
1479 endpoints are not included, both local and single-hop inter-realm
1480 authentication result in a transited field that is empty.
1482 Because the name of each realm transited is added to this field, it might
1483 potentially be very long. To decrease the length of this field, its contents
1484 are encoded. The initially supported encoding is optimized for the normal
1485 case of inter-realm communication: a hierarchical arrangement of realms
1486 using either domain or X.500 style realm names. This encoding (called
1487 DOMAIN-X500-COMPRESS) is now described.
1489 Realm names in the transited field are separated by a ",". The ",", "\",
1490 trailing "."s, and leading spaces (" ") are special characters, and if they
1491 are part of a realm name, they must be quoted in the transited field by
1492 preceding them with a "\".
1494 A realm name ending with a "." is interpreted as being prepended to the
1495 previous realm. For example, we can encode traversal of EDU, MIT.EDU,
1496 ATHENA.MIT.EDU, WASHINGTON.EDU, and CS.WASHINGTON.EDU as:
1498 "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.".
1500 Note that if ATHENA.MIT.EDU, or CS.WASHINGTON.EDU were end-points, that they
1501 would not be included in this field, and we would have:
1503 "EDU,MIT.,WASHINGTON.EDU"
1505 A realm name beginning with a "/" is interpreted as being appended to the
1506 previous realm[18]. If it is to stand by itself, then it should be preceded
1507 by a space (" "). For example, we can encode traversal of /COM/HP/APOLLO,
1508 /COM/HP, /COM, and /COM/DEC as:
1510 "/COM,/HP,/APOLLO, /COM/DEC".
1512 Like the example above, if /COM/HP/APOLLO and /COM/DEC are endpoints, they
1513 they would not be included in this field, and we would have:
1517 A null subfield preceding or following a "," indicates that all realms
1518 between the previous realm and the next realm have been traversed[19]. Thus,
1519 "," means that all realms along the path between the client and the server
1522 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1524 have been traversed. ",EDU, /COM," means that that all realms from the
1525 client's realm up to EDU (in a domain style hierarchy) have been traversed,
1526 and that everything from /COM down to the server's realm in an X.500 style
1527 has also been traversed. This could occur if the EDU realm in one hierarchy
1528 shares an inter-realm key directly with the /COM realm in another hierarchy.
1530 3.3.4. Receipt of KRB_TGS_REP message
1532 When the KRB_TGS_REP is received by the client, it is processed in the same
1533 manner as the KRB_AS_REP processing described above. The primary difference
1534 is that the ciphertext part of the response must be decrypted using the
1535 session key from the ticket-granting ticket rather than the client's secret
1536 key. The server name returned in the reply is the true principal name of the
1537 service. See section A.7 for pseudocode.
1539 3.4. The KRB_SAFE Exchange
1541 The KRB_SAFE message may be used by clients requiring the ability to detect
1542 modifications of messages they exchange. It achieves this by including a
1543 keyed collision-proof checksum of the user data and some control
1544 information. The checksum is keyed with an encryption key (usually the last
1545 key negotiated via subkeys, or the session key if no negotiation has
1548 3.4.1. Generation of a KRB_SAFE message
1550 When an application wishes to send a KRB_SAFE message, it collects its data
1551 and the appropriate control information and computes a checksum over them.
1552 The checksum algorithm should be a keyed one-way hash function (such as the
1553 RSA- MD5-DES checksum algorithm specified in section 6.4.5, or the DES MAC),
1554 generated using the sub-session key if present, or the session key.
1555 Different algorithms may be selected by changing the checksum type in the
1556 message. Unkeyed or non-collision-proof checksums are not suitable for this
1559 The control information for the KRB_SAFE message includes both a timestamp
1560 and a sequence number. The designer of an application using the KRB_SAFE
1561 message must choose at least one of the two mechanisms. This choice should
1562 be based on the needs of the application protocol.
1564 Sequence numbers are useful when all messages sent will be received by one's
1565 peer. Connection state is presently required to maintain the session key, so
1566 maintaining the next sequence number should not present an additional
1569 If the application protocol is expected to tolerate lost messages without
1570 them being resent, the use of the timestamp is the appropriate replay
1571 detection mechanism. Using timestamps is also the appropriate mechanism for
1572 multi-cast protocols where all of one's peers share a common sub-session
1573 key, but some messages will be sent to a subset of one's peers.
1575 After computing the checksum, the client then transmits the information and
1576 checksum to the recipient in the message format specified in section 5.6.1.
1578 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1580 3.4.2. Receipt of KRB_SAFE message
1582 When an application receives a KRB_SAFE message, it verifies it as follows.
1583 If any error occurs, an error code is reported for use by the application.
1585 The message is first checked by verifying that the protocol version and type
1586 fields match the current version and KRB_SAFE, respectively. A mismatch
1587 generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The
1588 application verifies that the checksum used is a collision-proof keyed
1589 checksum, and if it is not, a KRB_AP_ERR_INAPP_CKSUM error is generated. If
1590 the sender's address was included in the control information, the recipient
1591 verifies that the operating system's report of the sender's address matches
1592 the sender's address in the message, and (if a recipient address is
1593 specified or the recipient requires an address) that one of the recipient's
1594 addresses appears as the recipient's address in the message. A failed match
1595 for either case generates a KRB_AP_ERR_BADADDR error. Then the timestamp and
1596 usec and/or the sequence number fields are checked. If timestamp and usec
1597 are expected and not present, or they are present but not current, the
1598 KRB_AP_ERR_SKEW error is generated. If the server name, along with the
1599 client name, time and microsecond fields from the Authenticator match any
1600 recently-seen (sent or received[20] ) such tuples, the KRB_AP_ERR_REPEAT
1601 error is generated. If an incorrect sequence number is included, or a
1602 sequence number is expected but not present, the KRB_AP_ERR_BADORDER error
1603 is generated. If neither a time-stamp and usec or a sequence number is
1604 present, a KRB_AP_ERR_MODIFIED error is generated. Finally, the checksum is
1605 computed over the data and control information, and if it doesn't match the
1606 received checksum, a KRB_AP_ERR_MODIFIED error is generated.
1608 If all the checks succeed, the application is assured that the message was
1609 generated by its peer and was not modified in transit.
1611 3.5. The KRB_PRIV Exchange
1613 The KRB_PRIV message may be used by clients requiring confidentiality and
1614 the ability to detect modifications of exchanged messages. It achieves this
1615 by encrypting the messages and adding control information.
1617 3.5.1. Generation of a KRB_PRIV message
1619 When an application wishes to send a KRB_PRIV message, it collects its data
1620 and the appropriate control information (specified in section 5.7.1) and
1621 encrypts them under an encryption key (usually the last key negotiated via
1622 subkeys, or the session key if no negotiation has occurred). As part of the
1623 control information, the client must choose to use either a timestamp or a
1624 sequence number (or both); see the discussion in section 3.4.1 for
1625 guidelines on which to use. After the user data and control information are
1626 encrypted, the client transmits the ciphertext and some 'envelope'
1627 information to the recipient.
1629 3.5.2. Receipt of KRB_PRIV message
1631 When an application receives a KRB_PRIV message, it verifies it as follows.
1632 If any error occurs, an error code is reported for use by the application.
1634 The message is first checked by verifying that the protocol version and type
1635 fields match the current version and KRB_PRIV, respectively. A mismatch
1636 generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The
1639 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1641 application then decrypts the ciphertext and processes the resultant
1642 plaintext. If decryption shows the data to have been modified, a
1643 KRB_AP_ERR_BAD_INTEGRITY error is generated. If the sender's address was
1644 included in the control information, the recipient verifies that the
1645 operating system's report of the sender's address matches the sender's
1646 address in the message, and (if a recipient address is specified or the
1647 recipient requires an address) that one of the recipient's addresses appears
1648 as the recipient's address in the message. A failed match for either case
1649 generates a KRB_AP_ERR_BADADDR error. Then the timestamp and usec and/or the
1650 sequence number fields are checked. If timestamp and usec are expected and
1651 not present, or they are present but not current, the KRB_AP_ERR_SKEW error
1652 is generated. If the server name, along with the client name, time and
1653 microsecond fields from the Authenticator match any recently-seen such
1654 tuples, the KRB_AP_ERR_REPEAT error is generated. If an incorrect sequence
1655 number is included, or a sequence number is expected but not present, the
1656 KRB_AP_ERR_BADORDER error is generated. If neither a time-stamp and usec or
1657 a sequence number is present, a KRB_AP_ERR_MODIFIED error is generated.
1659 If all the checks succeed, the application can assume the message was
1660 generated by its peer, and was securely transmitted (without intruders able
1661 to see the unencrypted contents).
1663 3.6. The KRB_CRED Exchange
1665 The KRB_CRED message may be used by clients requiring the ability to send
1666 Kerberos credentials from one host to another. It achieves this by sending
1667 the tickets together with encrypted data containing the session keys and
1668 other information associated with the tickets.
1670 3.6.1. Generation of a KRB_CRED message
1672 When an application wishes to send a KRB_CRED message it first (using the
1673 KRB_TGS exchange) obtains credentials to be sent to the remote host. It then
1674 constructs a KRB_CRED message using the ticket or tickets so obtained,
1675 placing the session key needed to use each ticket in the key field of the
1676 corresponding KrbCredInfo sequence of the encrypted part of the the KRB_CRED
1679 Other information associated with each ticket and obtained during the
1680 KRB_TGS exchange is also placed in the corresponding KrbCredInfo sequence in
1681 the encrypted part of the KRB_CRED message. The current time and, if
1682 specifically required by the application the nonce, s-address, and r-address
1683 fields, are placed in the encrypted part of the KRB_CRED message which is
1684 then encrypted under an encryption key previously exchanged in the KRB_AP
1685 exchange (usually the last key negotiated via subkeys, or the session key if
1686 no negotiation has occurred).
1688 3.6.2. Receipt of KRB_CRED message
1690 When an application receives a KRB_CRED message, it verifies it. If any
1691 error occurs, an error code is reported for use by the application. The
1692 message is verified by checking that the protocol version and type fields
1693 match the current version and KRB_CRED, respectively. A mismatch generates a
1694 KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The application then
1695 decrypts the ciphertext and processes the resultant plaintext. If decryption
1696 shows the data to have been modified, a KRB_AP_ERR_BAD_INTEGRITY error is
1699 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1701 If present or required, the recipient verifies that the operating system's
1702 report of the sender's address matches the sender's address in the message,
1703 and that one of the recipient's addresses appears as the recipient's address
1704 in the message. A failed match for either case generates a
1705 KRB_AP_ERR_BADADDR error. The timestamp and usec fields (and the nonce field
1706 if required) are checked next. If the timestamp and usec are not present, or
1707 they are present but not current, the KRB_AP_ERR_SKEW error is generated.
1709 If all the checks succeed, the application stores each of the new tickets in
1710 its ticket cache together with the session key and other information in the
1711 corresponding KrbCredInfo sequence from the encrypted part of the KRB_CRED
1714 4. The Kerberos Database
1716 The Kerberos server must have access to a database containing the principal
1717 identifiers and secret keys of any principals to be authenticated[4.1] using
1718 such secret keys. The keying material in the database must be protected so
1719 that they are only accessible to the Kerberos server and administrative
1720 functions specifically authorized to access such material. Specific
1721 implementations may handle the storage of keying material separate from the
1722 Kerberos database (e.g. in hardware) or by encrypting the keying material
1723 before placing it in the Kerberos database. Some implementations might
1724 provide a means for using long term secret keys, but not for retrieving them
1725 from the Kerberos database.
1727 4.1. Database contents
1729 A database entry will typically contain the following fields, though in some
1730 instances a KDC may obtain these values through other means:
1734 name Principal's identifier
1735 key Principal's secret key
1736 p_kvno Principal's key version
1737 max_life Maximum lifetime for Tickets
1738 max_renewable_life Maximum total lifetime for renewable Tickets
1740 The name field is an encoding of the principal's identifier. The key field
1741 contains an encryption key. This key is the principal's secret key. (The key
1742 can be encrypted before storage under a Kerberos "master key" to protect it
1743 in case the database is compromised but the master key is not. In that case,
1744 an extra field must be added to indicate the master key version used, see
1745 below.) The p_kvno field is the key version number of the principal's secret
1746 key. The max_life field contains the maximum allowable lifetime (endtime -
1747 starttime) for any Ticket issued for this principal. The max_renewable_life
1748 field contains the maximum allowable total lifetime for any renewable Ticket
1749 issued for this principal. (See section 3.1 for a description of how these
1750 lifetimes are used in determining the lifetime of a given Ticket.)
1752 A server may provide KDC service to several realms, as long as the database
1753 representation provides a mechanism to distinguish between principal records
1754 with identifiers which differ only in the realm name.
1756 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1758 When an application server's key changes, if the change is routine (i.e. not
1759 the result of disclosure of the old key), the old key should be retained by
1760 the server until all tickets that had been issued using that key have
1761 expired. Because of this, it is possible for several keys to be active for a
1762 single principal. Ciphertext encrypted in a principal's key is always tagged
1763 with the version of the key that was used for encryption, to help the
1764 recipient find the proper key for decryption.
1766 When more than one key is active for a particular principal, the principal
1767 will have more than one record in the Kerberos database. The keys and key
1768 version numbers will differ between the records (the rest of the fields may
1769 or may not be the same). Whenever Kerberos issues a ticket, or responds to a
1770 request for initial authentication, the most recent key (known by the
1771 Kerberos server) will be used for encryption. This is the key with the
1772 highest key version number.
1774 4.2. Additional fields
1776 Project Athena's KDC implementation uses additional fields in its database:
1780 K_kvno Kerberos' key version
1781 expiration Expiration date for entry
1782 attributes Bit field of attributes
1783 mod_date Timestamp of last modification
1784 mod_name Modifying principal's identifier
1786 The K_kvno field indicates the key version of the Kerberos master key under
1787 which the principal's secret key is encrypted.
1789 After an entry's expiration date has passed, the KDC will return an error to
1790 any client attempting to gain tickets as or for the principal. (A database
1791 may want to maintain two expiration dates: one for the principal, and one
1792 for the principal's current key. This allows password aging to work
1793 independently of the principal's expiration date. However, due to the
1794 limited space in the responses, the KDC combines the key expiration and
1795 principal expiration date into a single value called 'key_exp', which is
1796 used as a hint to the user to take administrative action.)
1798 The attributes field is a bitfield used to govern the operations involving
1799 the principal. This field might be useful in conjunction with user
1800 registration procedures, for site-specific policy implementations (Project
1801 Athena currently uses it for their user registration process controlled by
1802 the system-wide database service, Moira [LGDSR87]), to identify whether a
1803 principal can play the role of a client or server or both, to note whether a
1804 server is appropriately trusted to receive credentials delegated by a
1805 client, or to identify the 'string to key' conversion algorithm used for a
1806 principal's key[4.2]. Other bits are used to indicate that certain ticket
1807 options should not be allowed in tickets encrypted under a principal's key
1808 (one bit each): Disallow issuing postdated tickets, disallow issuing
1809 forwardable tickets, disallow issuing tickets based on TGT authentication,
1810 disallow issuing renewable tickets, disallow issuing proxiable tickets, and
1811 disallow issuing tickets for which the principal is the server.
1813 The mod_date field contains the time of last modification of the entry, and
1814 the mod_name field contains the name of the principal which last modified
1817 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1819 4.3. Frequently Changing Fields
1821 Some KDC implementations may wish to maintain the last time that a request
1822 was made by a particular principal. Information that might be maintained
1823 includes the time of the last request, the time of the last request for a
1824 ticket-granting ticket, the time of the last use of a ticket-granting
1825 ticket, or other times. This information can then be returned to the user in
1826 the last-req field (see section 5.2).
1828 Other frequently changing information that can be maintained is the latest
1829 expiration time for any tickets that have been issued using each key. This
1830 field would be used to indicate how long old keys must remain valid to allow
1831 the continued use of outstanding tickets.
1835 The KDC implementation should have the following configurable constants or
1836 options, to allow an administrator to make and enforce policy decisions:
1838 * The minimum supported lifetime (used to determine whether the
1839 KDC_ERR_NEVER_VALID error should be returned). This constant should
1840 reflect reasonable expectations of round-trip time to the KDC,
1841 encryption/decryption time, and processing time by the client and
1842 target server, and it should allow for a minimum 'useful' lifetime.
1843 * The maximum allowable total (renewable) lifetime of a ticket
1844 (renew_till - starttime).
1845 * The maximum allowable lifetime of a ticket (endtime - starttime).
1846 * Whether to allow the issue of tickets with empty address fields
1847 (including the ability to specify that such tickets may only be issued
1848 if the request specifies some authorization_data).
1849 * Whether proxiable, forwardable, renewable or post-datable tickets are
1852 5. Message Specifications
1854 This section (5) still has revisions that are pending based on comments by
1855 Tom Yu. Please see http://www.isi.edu/people/bcn/krb-revisions for the
1856 latest versions. There will be additional updates prior to the San Diego
1859 The following sections describe the exact contents and encoding of protocol
1860 messages and objects. The ASN.1 base definitions are presented in the first
1861 subsection. The remaining subsections specify the protocol objects (tickets
1862 and authenticators) and messages. Specification of encryption and checksum
1863 techniques, and the fields related to them, appear in section 6.
1865 Optional field in ASN.1 sequences
1867 For optional integer value and date fields in ASN.1 sequences where a
1868 default value has been specified, certain default values will not be allowed
1869 in the encoding because these values will always be represented through
1870 defaulting by the absence of the optional field. For example, one will not
1871 send a microsecond zero value because one must make sure that there is only
1872 one way to encode this value.
1874 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1876 Additional fields in ASN.1 sequences
1878 Implementations receiving Kerberos messages with additional fields present
1879 in ASN.1 sequences should carry those fields through, unmodified, when the
1880 message is forwarded. Implementations should not drop such fields if the
1881 sequence is re-encoded.
1883 5.1. ASN.1 Distinguished Encoding Representation
1885 All uses of ASN.1 in Kerberos shall use the Distinguished Encoding
1886 Representation of the data elements as described in the X.509 specification,
1887 section 8.7 [X509-88].
1889 5.2. ASN.1 Base Definitions
1891 The following ASN.1 base definitions are used in the rest of this section.
1892 Note that since the underscore character (_) is not permitted in ASN.1
1893 names, the hyphen (-) is used in its place for the purposes of ASN.1 names.
1895 Realm ::= GeneralString
1896 PrincipalName ::= SEQUENCE {
1897 name-type[0] INTEGER,
1898 name-string[1] SEQUENCE OF GeneralString
1901 Kerberos realms are encoded as GeneralStrings. Realms shall not contain a
1902 character with the code 0 (the ASCII NUL). Most realms will usually consist
1903 of several components separated by periods (.), in the style of Internet
1904 Domain Names, or separated by slashes (/) in the style of X.500 names.
1905 Acceptable forms for realm names are specified in section 7. A PrincipalName
1906 is a typed sequence of components consisting of the following sub-fields:
1909 This field specifies the type of name that follows. Pre-defined values
1910 for this field are specified in section 7.2. The name-type should be
1911 treated as a hint. Ignoring the name type, no two names can be the same
1912 (i.e. at least one of the components, or the realm, must be different).
1913 This constraint may be eliminated in the future.
1915 This field encodes a sequence of components that form a name, each
1916 component encoded as a GeneralString. Taken together, a PrincipalName
1917 and a Realm form a principal identifier. Most PrincipalNames will have
1918 only a few components (typically one or two).
1920 KerberosTime ::= GeneralizedTime
1921 -- Specifying UTC time zone (Z)
1923 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1925 The timestamps used in Kerberos are encoded as GeneralizedTimes. An encoding
1926 shall specify the UTC time zone (Z) and shall not include any fractional
1927 portions of the seconds. It further shall not include any separators.
1928 Example: The only valid format for UTC time 6 minutes, 27 seconds after 9 pm
1929 on 6 November 1985 is 19851106210627Z.
1931 HostAddress ::= SEQUENCE {
1932 addr-type[0] INTEGER,
1933 address[1] OCTET STRING
1936 HostAddresses ::= SEQUENCE OF HostAddress
1938 The host address encodings consists of two fields:
1941 This field specifies the type of address that follows. Pre-defined
1942 values for this field are specified in section 8.1.
1944 This field encodes a single address of type addr-type.
1946 The two forms differ slightly. HostAddress contains exactly one address;
1947 HostAddresses contains a sequence of possibly many addresses.
1949 AuthorizationData ::= SEQUENCE OF SEQUENCE {
1951 ad-data[1] OCTET STRING
1955 This field contains authorization data to be interpreted according to
1956 the value of the corresponding ad-type field.
1958 This field specifies the format for the ad-data subfield. All negative
1959 values are reserved for local use. Non-negative values are reserved for
1962 Each sequence of type and data is referred to as an authorization element.
1963 Elements may be application specific, however, there is a common set of
1964 recursive elements that should be understood by all implementations. These
1965 elements contain other elements embedded within them, and the interpretation
1966 of the encapsulating element determines which of the embedded elements must
1967 be interpreted, and which may be ignored. Definitions for these common
1968 elements may be found in Appendix B.
1970 TicketExtensions ::= SEQUENCE OF SEQUENCE {
1972 te-data[1] OCTET STRING
1978 This field contains opaque data that must be carried with the ticket to
1979 support extensions to the Kerberos protocol including but not limited
1980 to some forms of inter-realm key exchange and plaintext authorization
1981 data. See appendix C for some common uses of this field.
1984 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
1987 This field specifies the format for the te-data subfield. All negative
1988 values are reserved for local use. Non-negative values are reserved for
1991 APOptions ::= BIT STRING
1993 -- use-session-key(1),
1994 -- mutual-required(2)
1996 TicketFlags ::= BIT STRING
2009 -- transited-policy-checked(12),
2010 -- ok-as-delegate(13)
2012 KDCOptions ::= BIT STRING io
2018 -- allow-postdate(5),
2027 -- requestanonymous(14),
2028 -- canonicalize(15),
2029 -- disable-transited-check(26),
2030 -- renewable-ok(27),
2031 -- enc-tkt-in-skey(28),
2035 ASN.1 Bit strings have a length and a value. When used in Kerberos for the
2036 APOptions, TicketFlags, and KDCOptions, the length of the bit string on
2037 generated values should be the smallest number of bits needed to include the
2038 highest order bit that is set (1), but in no case less than 32 bits. The
2039 ASN.1 representation of the bit strings uses unnamed bits, with the meaning
2040 of the individual bits defined by the comments in the specification above.
2041 Implementations should accept values of bit strings of any length and treat
2042 the value of flags corresponding to bits beyond the end of the bit string as
2043 if the bit were reset (0). Comparison of bit strings of different length
2044 should treat the smaller string as if it were padded with zeros beyond the
2045 high order bits to the length of the longer string[23].
2047 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2049 LastReq ::= SEQUENCE OF SEQUENCE {
2051 lr-value[1] KerberosTime
2055 This field indicates how the following lr-value field is to be
2056 interpreted. Negative values indicate that the information pertains
2057 only to the responding server. Non-negative values pertain to all
2058 servers for the realm. If the lr-type field is zero (0), then no
2059 information is conveyed by the lr-value subfield. If the absolute value
2060 of the lr-type field is one (1), then the lr-value subfield is the time
2061 of last initial request for a TGT. If it is two (2), then the lr-value
2062 subfield is the time of last initial request. If it is three (3), then
2063 the lr-value subfield is the time of issue for the newest
2064 ticket-granting ticket used. If it is four (4), then the lr-value
2065 subfield is the time of the last renewal. If it is five (5), then the
2066 lr-value subfield is the time of last request (of any type). If it is
2067 (6), then the lr-value subfield is the time when the password will
2070 This field contains the time of the last request. the time must be
2071 interpreted according to the contents of the accompanying lr-type
2074 See section 6 for the definitions of Checksum, ChecksumType, EncryptedData,
2075 EncryptionKey, EncryptionType, and KeyType.
2077 5.3. Tickets and Authenticators
2079 This section describes the format and encryption parameters for tickets and
2080 authenticators. When a ticket or authenticator is included in a protocol
2081 message it is treated as an opaque object.
2083 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2087 A ticket is a record that helps a client authenticate to a service. A Ticket
2088 contains the following information:
2090 Ticket ::= [APPLICATION 1] SEQUENCE {
2093 sname[2] PrincipalName,
2094 enc-part[3] EncryptedData, -- EncTicketPart
2095 extensions[4] TicketExtensions OPTIONAL
2098 -- Encrypted part of ticket
2099 EncTicketPart ::= [APPLICATION 3] SEQUENCE {
2100 flags[0] TicketFlags,
2101 key[1] EncryptionKey,
2103 cname[3] PrincipalName,
2104 transited[4] TransitedEncoding,
2105 authtime[5] KerberosTime,
2106 starttime[6] KerberosTime OPTIONAL,
2107 endtime[7] KerberosTime,
2108 renew-till[8] KerberosTime OPTIONAL,
2109 caddr[9] HostAddresses OPTIONAL,
2110 authorization-data[10] AuthorizationData OPTIONAL
2112 -- encoded Transited field
2113 TransitedEncoding ::= SEQUENCE {
2114 tr-type[0] INTEGER, -- must be registered
2115 contents[1] OCTET STRING
2118 The encoding of EncTicketPart is encrypted in the key shared by Kerberos and
2119 the end server (the server's secret key). See section 6 for the format of
2123 This field specifies the version number for the ticket format. This
2124 document describes version number 5.
2126 This field specifies the realm that issued a ticket. It also serves to
2127 identify the realm part of the server's principal identifier. Since a
2128 Kerberos server can only issue tickets for servers within its realm,
2129 the two will always be identical.
2131 This field specifies all components of the name part of the server's
2132 identity, including those parts that identify a specific instance of a
2135 This field holds the encrypted encoding of the EncTicketPart sequence.
2137 This optional field contains a sequence of extensions that may be used
2138 to carry information that must be carried with the ticket to support
2139 several extensions, including but not limited to plaintext
2140 authorization data, tokens for exchanging inter-realm keys, and other
2141 information that must be associated with a ticket for use by the
2142 application server. See Appendix C for definitions of common
2145 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2147 Note that some older versions of Kerberos did not support this field.
2148 Because this is an optional field it will not break older clients, but
2149 older clients might strip this field from the ticket before sending it
2150 to the application server. This limits the usefulness of this ticket
2151 field to environments where the ticket will not be parsed and
2152 reconstructed by these older Kerberos clients.
2154 If it is known that the client will strip this field from the ticket,
2155 as an interim measure the KDC may append this field to the end of the
2156 enc-part of the ticket and append a trailer indicating the length of
2157 the appended extensions field.
2159 This field indicates which of various options were used or requested
2160 when the ticket was issued. It is a bit-field, where the selected
2161 options are indicated by the bit being set (1), and the unselected
2162 options and reserved fields being reset (0). Bit 0 is the most
2163 significant bit. The encoding of the bits is specified in section 5.2.
2164 The flags are described in more detail above in section 2. The meanings
2166 Bits Name Description
2168 0 RESERVED Reserved for future expansion of this
2171 The FORWARDABLE flag is normally only
2172 interpreted by the TGS, and can be
2173 ignored by end servers. When set, this
2174 1 FORWARDABLE flag tells the ticket-granting server
2175 that it is OK to issue a new
2176 ticket-granting ticket with a
2177 different network address based on the
2180 When set, this flag indicates that the
2181 ticket has either been forwarded or
2182 2 FORWARDED was issued based on authentication
2183 involving a forwarded ticket-granting
2186 The PROXIABLE flag is normally only
2187 interpreted by the TGS, and can be
2188 ignored by end servers. The PROXIABLE
2189 flag has an interpretation identical
2190 3 PROXIABLE to that of the FORWARDABLE flag,
2191 except that the PROXIABLE flag tells
2192 the ticket-granting server that only
2193 non-ticket-granting tickets may be
2194 issued with different network
2197 4 PROXY When set, this flag indicates that a
2200 The MAY-POSTDATE flag is normally only
2201 interpreted by the TGS, and can be
2203 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2205 5 MAY-POSTDATE ignored by end servers. This flag
2206 tells the ticket-granting server that
2207 a post-dated ticket may be issued
2208 based on this ticket-granting ticket.
2210 This flag indicates that this ticket
2211 has been postdated. The end-service
2212 6 POSTDATED can check the authtime field to see
2213 when the original authentication
2216 This flag indicates that a ticket is
2217 invalid, and it must be validated by
2218 7 INVALID the KDC before use. Application
2219 servers must reject tickets which have
2222 The RENEWABLE flag is normally only
2223 interpreted by the TGS, and can
2224 usually be ignored by end servers
2225 8 RENEWABLE (some particularly careful servers may
2226 wish to disallow renewable tickets). A
2227 renewable ticket can be used to obtain
2228 a replacement ticket that expires at a
2231 This flag indicates that this ticket
2232 9 INITIAL was issued using the AS protocol, and
2233 not issued based on a ticket-granting
2236 This flag indicates that during
2237 initial authentication, the client was
2238 authenticated by the KDC before a
2239 10 PRE-AUTHENT ticket was issued. The strength of the
2240 preauthentication method is not
2241 indicated, but is acceptable to the
2244 This flag indicates that the protocol
2245 employed for initial authentication
2246 required the use of hardware expected
2247 11 HW-AUTHENT to be possessed solely by the named
2248 client. The hardware authentication
2249 method is selected by the KDC and the
2250 strength of the method is not
2253 This flag indicates that the KDC for
2254 the realm has checked the transited
2255 field against a realm defined policy
2256 for trusted certifiers. If this flag
2257 is reset (0), then the application
2258 server must check the transited field
2259 itself, and if unable to do so it must
2261 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2263 12 TRANSITED- reject the authentication. If the flag
2265 is set (1) then the application server
2266 may skip its own validation of the
2267 transited field, relying on the
2268 validation performed by the KDC. At
2269 its option the application server may
2270 still apply its own validation based
2271 on a separate policy for acceptance.
2273 This flag indicates that the server
2274 (not the client) specified in the
2275 ticket has been determined by policy
2276 of the realm to be a suitable
2277 recipient of delegation. A client can
2278 use the presence of this flag to help
2279 it make a decision whether to delegate
2280 credentials (either grant a proxy or a
2281 13 OK-AS-DELEGATE forwarded ticket granting ticket) to
2282 this server. The client is free to
2283 ignore the value of this flag. When
2284 setting this flag, an administrator
2285 should consider the Security and
2286 placement of the server on which the
2287 service will run, as well as whether
2288 the service requires the use of
2289 delegated credentials.
2291 This flag indicates that the principal
2292 named in the ticket is a generic
2293 principal for the realm and does not
2294 identify the individual using the
2295 ticket. The purpose of the ticket is
2296 only to securely distribute a session
2297 14 ANONYMOUS key, and not to identify the user.
2298 Subsequent requests using the same
2299 ticket and session may be considered
2300 as originating from the same user, but
2301 requests with the same username but a
2302 different ticket are likely to
2303 originate from different users.
2305 15-31 RESERVED Reserved for future use.
2307 This field exists in the ticket and the KDC response and is used to
2308 pass the session key from Kerberos to the application server and the
2309 client. The field's encoding is described in section 6.2.
2311 This field contains the name of the realm in which the client is
2312 registered and in which initial authentication took place.
2314 This field contains the name part of the client's principal identifier.
2317 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2320 This field lists the names of the Kerberos realms that took part in
2321 authenticating the user to whom this ticket was issued. It does not
2322 specify the order in which the realms were transited. See section
2323 3.3.3.2 for details on how this field encodes the traversed realms.
2324 When the names of CA's are to be embedded in the transited field (as
2325 specified for some extensions to the protocol), the X.500 names of the
2326 CA's should be mapped into items in the transited field using the
2327 mapping defined by RFC2253.
2329 This field indicates the time of initial authentication for the named
2330 principal. It is the time of issue for the original ticket on which
2331 this ticket is based. It is included in the ticket to provide
2332 additional information to the end service, and to provide the necessary
2333 information for implementation of a `hot list' service at the KDC. An
2334 end service that is particularly paranoid could refuse to accept
2335 tickets for which the initial authentication occurred "too far" in the
2336 past. This field is also returned as part of the response from the KDC.
2337 When returned as part of the response to initial authentication
2338 (KRB_AS_REP), this is the current time on the Kerberos server[24].
2340 This field in the ticket specifies the time after which the ticket is
2341 valid. Together with endtime, this field specifies the life of the
2342 ticket. If it is absent from the ticket, its value should be treated as
2343 that of the authtime field.
2345 This field contains the time after which the ticket will not be honored
2346 (its expiration time). Note that individual services may place their
2347 own limits on the life of a ticket and may reject tickets which have
2348 not yet expired. As such, this is really an upper bound on the
2349 expiration time for the ticket.
2351 This field is only present in tickets that have the RENEWABLE flag set
2352 in the flags field. It indicates the maximum endtime that may be
2353 included in a renewal. It can be thought of as the absolute expiration
2354 time for the ticket, including all renewals.
2356 This field in a ticket contains zero (if omitted) or more (if present)
2357 host addresses. These are the addresses from which the ticket can be
2358 used. If there are no addresses, the ticket can be used from any
2359 location. The decision by the KDC to issue or by the end server to
2360 accept zero-address tickets is a policy decision and is left to the
2361 Kerberos and end-service administrators; they may refuse to issue or
2362 accept such tickets. The suggested and default policy, however, is that
2363 such tickets will only be issued or accepted when additional
2364 information that can be used to restrict the use of the ticket is
2365 included in the authorization_data field. Such a ticket is a
2368 Network addresses are included in the ticket to make it harder for an
2369 attacker to use stolen credentials. Because the session key is not sent
2370 over the network in cleartext, credentials can't be stolen simply by
2371 listening to the network; an attacker has to gain access to the session
2372 key (perhaps through operating system security breaches or a careless
2373 user's unattended session) to make use of stolen tickets.
2375 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2377 It is important to note that the network address from which a
2378 connection is received cannot be reliably determined. Even if it could
2379 be, an attacker who has compromised the client's workstation could use
2380 the credentials from there. Including the network addresses only makes
2381 it more difficult, not impossible, for an attacker to walk off with
2382 stolen credentials and then use them from a "safe" location.
2384 The authorization-data field is used to pass authorization data from
2385 the principal on whose behalf a ticket was issued to the application
2386 service. If no authorization data is included, this field will be left
2387 out. Experience has shown that the name of this field is confusing, and
2388 that a better name for this field would be restrictions. Unfortunately,
2389 it is not possible to change the name of this field at this time.
2391 This field contains restrictions on any authority obtained on the basis
2392 of authentication using the ticket. It is possible for any principal in
2393 posession of credentials to add entries to the authorization data field
2394 since these entries further restrict what can be done with the ticket.
2395 Such additions can be made by specifying the additional entries when a
2396 new ticket is obtained during the TGS exchange, or they may be added
2397 during chained delegation using the authorization data field of the
2400 Because entries may be added to this field by the holder of
2401 credentials, except when an entry is separately authenticated by
2402 encapsulation in the kdc-issued element, it is not allowable for the
2403 presence of an entry in the authorization data field of a ticket to
2404 amplify the privileges one would obtain from using a ticket.
2406 The data in this field may be specific to the end service; the field
2407 will contain the names of service specific objects, and the rights to
2408 those objects. The format for this field is described in section 5.2.
2409 Although Kerberos is not concerned with the format of the contents of
2410 the sub-fields, it does carry type information (ad-type).
2412 By using the authorization_data field, a principal is able to issue a
2413 proxy that is valid for a specific purpose. For example, a client
2414 wishing to print a file can obtain a file server proxy to be passed to
2415 the print server. By specifying the name of the file in the
2416 authorization_data field, the file server knows that the print server
2417 can only use the client's rights when accessing the particular file to
2420 A separate service providing authorization or certifying group
2421 membership may be built using the authorization-data field. In this
2422 case, the entity granting authorization (not the authorized entity),
2423 may obtain a ticket in its own name (e.g. the ticket is issued in the
2424 name of a privilege server), and this entity adds restrictions on its
2425 own authority and delegates the restricted authority through a proxy to
2426 the client. The client would then present this authorization credential
2427 to the application server separately from the authentication exchange.
2428 Alternatively, such authorization credentials may be embedded in the
2429 ticket authenticating the authorized entity, when the authorization is
2430 separately authenticated using the kdc-issued authorization data
2433 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2435 Similarly, if one specifies the authorization-data field of a proxy and
2436 leaves the host addresses blank, the resulting ticket and session key
2437 can be treated as a capability. See [Neu93] for some suggested uses of
2440 The authorization-data field is optional and does not have to be
2441 included in a ticket.
2443 5.3.2. Authenticators
2445 An authenticator is a record sent with a ticket to a server to certify the
2446 client's knowledge of the encryption key in the ticket, to help the server
2447 detect replays, and to help choose a "true session key" to use with the
2448 particular session. The encoding is encrypted in the ticket's session key
2449 shared by the client and the server:
2451 -- Unencrypted authenticator
2452 Authenticator ::= [APPLICATION 2] SEQUENCE {
2453 authenticator-vno[0] INTEGER,
2455 cname[2] PrincipalName,
2456 cksum[3] Checksum OPTIONAL,
2458 ctime[5] KerberosTime,
2459 subkey[6] EncryptionKey OPTIONAL,
2460 seq-number[7] INTEGER OPTIONAL,
2461 authorization-data[8] AuthorizationData OPTIONAL
2466 This field specifies the version number for the format of the
2467 authenticator. This document specifies version 5.
2469 These fields are the same as those described for the ticket in section
2472 This field contains a checksum of the the application data that
2473 accompanies the KRB_AP_REQ.
2475 This field contains the microsecond part of the client's timestamp. Its
2476 value (before encryption) ranges from 0 to 999999. It often appears
2477 along with ctime. The two fields are used together to specify a
2478 reasonably accurate timestamp.
2480 This field contains the current time on the client's host.
2482 This field contains the client's choice for an encryption key which is
2483 to be used to protect this specific application session. Unless an
2484 application specifies otherwise, if this field is left out the session
2485 key from the ticket will be used.
2487 This optional field includes the initial sequence number to be used by
2488 the KRB_PRIV or KRB_SAFE messages when sequence numbers are used to
2489 detect replays (It may also be used by application specific messages).
2490 When included in the authenticator this field specifies the initial
2491 sequence number for messages from the client to the server. When
2494 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2496 included in the AP-REP message, the initial sequence number is that for
2497 messages from the server to the client. When used in KRB_PRIV or
2498 KRB_SAFE messages, it is incremented by one after each message is sent.
2499 Sequence numbers fall in the range of 0 through 2^32 - 1 and wrap to
2500 zero following the value 2^32 - 1.
2502 For sequence numbers to adequately support the detection of replays
2503 they should be non-repeating, even across connection boundaries. The
2504 initial sequence number should be random and uniformly distributed
2505 across the full space of possible sequence numbers, so that it cannot
2506 be guessed by an attacker and so that it and the successive sequence
2507 numbers do not repeat other sequences.
2509 This field is the same as described for the ticket in section 5.3.1. It
2510 is optional and will only appear when additional restrictions are to be
2511 placed on the use of a ticket, beyond those carried in the ticket
2514 5.4. Specifications for the AS and TGS exchanges
2516 This section specifies the format of the messages used in the exchange
2517 between the client and the Kerberos server. The format of possible error
2518 messages appears in section 5.9.1.
2520 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2522 5.4.1. KRB_KDC_REQ definition
2524 The KRB_KDC_REQ message has no type of its own. Instead, its type is one of
2525 KRB_AS_REQ or KRB_TGS_REQ depending on whether the request is for an initial
2526 ticket or an additional ticket. In either case, the message is sent from the
2527 client to the Authentication Server to request credentials for a service.
2529 The message fields are:
2531 AS-REQ ::= [APPLICATION 10] KDC-REQ
2532 TGS-REQ ::= [APPLICATION 12] KDC-REQ
2534 KDC-REQ ::= SEQUENCE {
2536 msg-type[2] INTEGER,
2537 padata[3] SEQUENCE OF PA-DATA OPTIONAL,
2538 req-body[4] KDC-REQ-BODY
2541 PA-DATA ::= SEQUENCE {
2542 padata-type[1] INTEGER,
2543 padata-value[2] OCTET STRING,
2544 -- might be encoded AP-REQ
2547 KDC-REQ-BODY ::= SEQUENCE {
2548 kdc-options[0] KDCOptions,
2549 cname[1] PrincipalName OPTIONAL,
2550 -- Used only in AS-REQ
2551 realm[2] Realm, -- Server's realm
2552 -- Also client's in AS-REQ
2553 sname[3] PrincipalName OPTIONAL,
2554 from[4] KerberosTime OPTIONAL,
2555 till[5] KerberosTime OPTIONAL,
2556 rtime[6] KerberosTime OPTIONAL,
2558 etype[8] SEQUENCE OF INTEGER,
2560 -- in preference order
2561 addresses[9] HostAddresses OPTIONAL,
2562 enc-authorization-data[10] EncryptedData OPTIONAL,
2563 -- Encrypted AuthorizationData
2565 additional-tickets[11] SEQUENCE OF Ticket OPTIONAL
2568 The fields in this message are:
2571 This field is included in each message, and specifies the protocol
2572 version number. This document specifies protocol version 5.
2574 This field indicates the type of a protocol message. It will almost
2575 always be the same as the application identifier associated with a
2576 message. It is included to make the identifier more readily accessible
2577 to the application. For the KDC-REQ message, this type will be
2578 KRB_AS_REQ or KRB_TGS_REQ.
2581 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2584 The padata (pre-authentication data) field contains a sequence of
2585 authentication information which may be needed before credentials can
2586 be issued or decrypted. In the case of requests for additional tickets
2587 (KRB_TGS_REQ), this field will include an element with padata-type of
2588 PA-TGS-REQ and data of an authentication header (ticket-granting ticket
2589 and authenticator). The checksum in the authenticator (which must be
2590 collision-proof) is to be computed over the KDC-REQ-BODY encoding. In
2591 most requests for initial authentication (KRB_AS_REQ) and most replies
2592 (KDC-REP), the padata field will be left out.
2594 This field may also contain information needed by certain extensions to
2595 the Kerberos protocol. For example, it might be used to initially
2596 verify the identity of a client before any response is returned. When
2597 this field is used to authenticate or pre-authenticate a request, it
2598 should contain a keyed checksum over the KDC-REQ-BODY to bind the
2599 pre-authentication data to rest of the request. The KDC, as a matter of
2600 policy, may decide whether to honor a KDC-REQ which includes any
2601 pre-authentication data that does not contain the checksum field.
2603 PA-ENC-TIMESTAMP defines a pre-authentication data type that is used
2604 for authenticating a client by way of an encrypted timestamp. This is
2605 accomplished with a padata field with padata-type equal to
2606 PA-ENC-TIMESTAMP and padata-value defined as follows (query: the
2607 checksum is new in this definition. If the optional field will break
2608 things we can keep the old PA-ENC-TS-ENC, and define a new alternate
2609 form that includes the checksum). :
2611 padata-type ::= PA-ENC-TIMESTAMP
2612 padata-value ::= EncryptedData -- PA-ENC-TS-ENC
2614 PA-ENC-TS-ENC ::= SEQUENCE {
2615 patimestamp[0] KerberosTime, -- client's time
2616 pausec[1] INTEGER OPTIONAL,
2617 pachecksum[2] checksum OPTIONAL
2618 -- keyed checksum of KDC-REQ-BODY
2621 with patimestamp containing the client's time and pausec containing the
2622 microseconds which may be omitted if a client will not generate more
2623 than one request per second. The ciphertext (padata-value) consists of
2624 the PA-ENC-TS-ENC sequence, encrypted using the client's secret key.
2626 It may also be used by the client to specify the version of a key that
2627 is being used for accompanying preauthentication, and/or which should
2628 be used to encrypt the reply from the KDC.
2630 padata-type ::= PA-USE-SPECIFIED-KVNO
2631 padata-value ::= Integer
2634 The KDC should only accept and abide by the value of the
2635 use-specified-kvno preauthentication data field when the specified key
2636 is still valid and until use of a new key is confirmed. This situation
2637 is likely to occur primarily during the period during which an updated
2638 key is propagating to other KDC's in a realm.
2640 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2642 The padata field can also contain information needed to help the KDC or
2643 the client select the key needed for generating or decrypting the
2644 response. This form of the padata is useful for supporting the use of
2645 certain token cards with Kerberos. The details of such extensions are
2646 specified in separate documents. See [Pat92] for additional uses of
2649 The padata-type element of the padata field indicates the way that the
2650 padata-value element is to be interpreted. Negative values of
2651 padata-type are reserved for unregistered use; non-negative values are
2652 used for a registered interpretation of the element type.
2654 This field is a placeholder delimiting the extent of the remaining
2655 fields. If a checksum is to be calculated over the request, it is
2656 calculated over an encoding of the KDC-REQ-BODY sequence which is
2657 enclosed within the req-body field.
2659 This field appears in the KRB_AS_REQ and KRB_TGS_REQ requests to the
2660 KDC and indicates the flags that the client wants set on the tickets as
2661 well as other information that is to modify the behavior of the KDC.
2662 Where appropriate, the name of an option may be the same as the flag
2663 that is set by that option. Although in most case, the bit in the
2664 options field will be the same as that in the flags field, this is not
2665 guaranteed, so it is not acceptable to simply copy the options field to
2666 the flags field. There are various checks that must be made before
2667 honoring an option anyway.
2669 The kdc_options field is a bit-field, where the selected options are
2670 indicated by the bit being set (1), and the unselected options and
2671 reserved fields being reset (0). The encoding of the bits is specified
2672 in section 5.2. The options are described in more detail above in
2673 section 2. The meanings of the options are:
2674 Bits Name Description
2676 0 RESERVED Reserved for future expansion of
2679 The FORWARDABLE option indicates
2680 that the ticket to be issued is to
2681 have its forwardable flag set. It
2682 1 FORWARDABLE may only be set on the initial
2683 request, or in a subsequent request
2684 if the ticket-granting ticket on
2685 which it is based is also
2688 The FORWARDED option is only
2689 specified in a request to the
2690 ticket-granting server and will only
2691 be honored if the ticket-granting
2692 ticket in the request has its
2694 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2696 2 FORWARDED FORWARDABLE bit set. This option
2697 indicates that this is a request for
2698 forwarding. The address(es) of the
2699 host from which the resulting ticket
2700 is to be valid are included in the
2701 addresses field of the request.
2703 The PROXIABLE option indicates that
2704 the ticket to be issued is to have
2705 its proxiable flag set. It may only
2706 3 PROXIABLE be set on the initial request, or in
2707 a subsequent request if the
2708 ticket-granting ticket on which it
2709 is based is also proxiable.
2711 The PROXY option indicates that this
2712 is a request for a proxy. This
2713 option will only be honored if the
2714 ticket-granting ticket in the
2715 4 PROXY request has its PROXIABLE bit set.
2716 The address(es) of the host from
2717 which the resulting ticket is to be
2718 valid are included in the addresses
2719 field of the request.
2721 The ALLOW-POSTDATE option indicates
2722 that the ticket to be issued is to
2723 have its MAY-POSTDATE flag set. It
2724 5 ALLOW-POSTDATE may only be set on the initial
2725 request, or in a subsequent request
2726 if the ticket-granting ticket on
2727 which it is based also has its
2728 MAY-POSTDATE flag set.
2730 The POSTDATED option indicates that
2731 this is a request for a postdated
2732 ticket. This option will only be
2733 honored if the ticket-granting
2734 ticket on which it is based has its
2735 6 POSTDATED MAY-POSTDATE flag set. The resulting
2736 ticket will also have its INVALID
2737 flag set, and that flag may be reset
2738 by a subsequent request to the KDC
2739 after the starttime in the ticket
2742 7 UNUSED This option is presently unused.
2744 The RENEWABLE option indicates that
2745 the ticket to be issued is to have
2746 its RENEWABLE flag set. It may only
2747 be set on the initial request, or
2748 when the ticket-granting ticket on
2750 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2752 8 RENEWABLE which the request is based is also
2753 renewable. If this option is
2754 requested, then the rtime field in
2755 the request contains the desired
2756 absolute expiration time for the
2759 9 RESERVED Reserved for PK-Cross
2761 10-13 UNUSED These options are presently unused.
2763 The REQUEST-ANONYMOUS option
2764 indicates that the ticket to be
2765 issued is not to identify the user
2766 to which it was issued. Instead, the
2767 principal identifier is to be
2768 generic, as specified by the policy
2769 of the realm (e.g. usually
2770 14 REQUEST-ANONYMOUS anonymous@realm). The purpose of the
2771 ticket is only to securely
2772 distribute a session key, and not to
2773 identify the user. The ANONYMOUS
2774 flag on the ticket to be returned
2775 should be set. If the local realms
2776 policy does not permit anonymous
2777 credentials, the request is to be
2780 The CANONICALIZE option indicates
2781 that the client will accept the
2782 return of a true server name instead
2783 of the name specified in the
2784 request. In addition the client will
2785 be able to process any TGT referrals
2786 that will direct the client to
2787 15 CANONICALIZE another realm to locate the
2788 requested server. If a KDC does not
2789 support name- canonicalization, the
2790 option is ignored and the
2792 KDC_ERR_C_PRINCIPAL_UNKNOWN or
2793 KDC_ERR_S_PRINCIPAL_UNKNOWN error is
2796 16-25 RESERVED Reserved for future use.
2798 By default the KDC will check the
2799 transited field of a
2800 ticket-granting-ticket against the
2801 policy of the local realm before it
2802 will issue derivative tickets based
2803 on the ticket granting ticket. If
2804 this flag is set in the request,
2805 checking of the transited field is
2807 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2809 26 DISABLE-TRANSITED-CHECK disabled. Tickets issued without the
2810 performance of this check will be
2811 noted by the reset (0) value of the
2812 TRANSITED-POLICY-CHECKED flag,
2813 indicating to the application server
2814 that the tranisted field must be
2815 checked locally. KDC's are
2816 encouraged but not required to honor
2817 the DISABLE-TRANSITED-CHECK option.
2819 The RENEWABLE-OK option indicates
2820 that a renewable ticket will be
2821 acceptable if a ticket with the
2822 requested life cannot otherwise be
2823 provided. If a ticket with the
2824 requested life cannot be provided,
2825 27 RENEWABLE-OK then a renewable ticket may be
2826 issued with a renew-till equal to
2827 the the requested endtime. The value
2828 of the renew-till field may still be
2829 limited by local limits, or limits
2830 selected by the individual principal
2833 This option is used only by the
2834 ticket-granting service. The
2835 ENC-TKT-IN-SKEY option indicates
2836 28 ENC-TKT-IN-SKEY that the ticket for the end server
2837 is to be encrypted in the session
2838 key from the additional
2839 ticket-granting ticket provided.
2841 29 RESERVED Reserved for future use.
2843 This option is used only by the
2844 ticket-granting service. The RENEW
2845 option indicates that the present
2846 request is for a renewal. The ticket
2847 provided is encrypted in the secret
2848 key for the server on which it is
2849 30 RENEW valid. This option will only be
2850 honored if the ticket to be renewed
2851 has its RENEWABLE flag set and if
2852 the time in its renew-till field has
2853 not passed. The ticket to be renewed
2854 is passed in the padata field as
2855 part of the authentication header.
2857 This option is used only by the
2858 ticket-granting service. The
2859 VALIDATE option indicates that the
2860 request is to validate a postdated
2861 ticket. It will only be honored if
2862 the ticket presented is postdated,
2863 presently has its INVALID flag set,
2866 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2868 31 VALIDATE and would be otherwise usable at
2869 this time. A ticket cannot be
2870 validated before its starttime. The
2871 ticket presented for validation is
2872 encrypted in the key of the server
2873 for which it is valid and is passed
2874 in the padata field as part of the
2875 authentication header.
2877 These fields are the same as those described for the ticket in section
2878 5.3.1. sname may only be absent when the ENC-TKT-IN-SKEY option is
2879 specified. If absent, the name of the server is taken from the name of
2880 the client in the ticket passed as additional-tickets.
2881 enc-authorization-data
2882 The enc-authorization-data, if present (and it can only be present in
2883 the TGS_REQ form), is an encoding of the desired authorization-data
2884 encrypted under the sub-session key if present in the Authenticator, or
2885 alternatively from the session key in the ticket-granting ticket, both
2886 from the padata field in the KRB_AP_REQ.
2888 This field specifies the realm part of the server's principal
2889 identifier. In the AS exchange, this is also the realm part of the
2890 client's principal identifier. If the CANONICALIZE option is set, the
2891 realm is used as a hint to the KDC for its database lookup.
2893 This field is included in the KRB_AS_REQ and KRB_TGS_REQ ticket
2894 requests when the requested ticket is to be postdated. It specifies the
2895 desired start time for the requested ticket. If this field is omitted
2896 then the KDC should use the current time instead.
2898 This field contains the expiration date requested by the client in a
2899 ticket request. It is optional and if omitted the requested ticket is
2900 to have the maximum endtime permitted according to KDC policy for the
2901 parties to the authentication exchange as limited by expiration date of
2902 the ticket granting ticket or other preauthentication credentials.
2904 This field is the requested renew-till time sent from a client to the
2905 KDC in a ticket request. It is optional.
2907 This field is part of the KDC request and response. It it intended to
2908 hold a random number generated by the client. If the same number is
2909 included in the encrypted response from the KDC, it provides evidence
2910 that the response is fresh and has not been replayed by an attacker.
2911 Nonces must never be re-used. Ideally, it should be generated randomly,
2912 but if the correct time is known, it may suffice[25].
2914 This field specifies the desired encryption algorithm to be used in the
2917 This field is included in the initial request for tickets, and
2918 optionally included in requests for additional tickets from the
2919 ticket-granting server. It specifies the addresses from which the
2920 requested ticket is to be valid. Normally it includes the addresses for
2921 the client's host. If a proxy is requested, this field will contain
2922 other addresses. The contents of this field are usually copied by the
2923 KDC into the caddr field of the resulting ticket.
2926 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2929 Additional tickets may be optionally included in a request to the
2930 ticket-granting server. If the ENC-TKT-IN-SKEY option has been
2931 specified, then the session key from the additional ticket will be used
2932 in place of the server's key to encrypt the new ticket. When he
2933 ENC-TKT-IN-SKEY option is used for user-to-user authentication, this
2934 addional ticket may be a TGT issued by the local realm or an
2935 inter-realm TGT issued for the current KDC's realm by a remote KDC. If
2936 more than one option which requires additional tickets has been
2937 specified, then the additional tickets are used in the order specified
2938 by the ordering of the options bits (see kdc-options, above).
2940 The application code will be either ten (10) or twelve (12) depending on
2941 whether the request is for an initial ticket (AS-REQ) or for an additional
2944 The optional fields (addresses, authorization-data and additional-tickets)
2945 are only included if necessary to perform the operation specified in the
2948 It should be noted that in KRB_TGS_REQ, the protocol version number appears
2949 twice and two different message types appear: the KRB_TGS_REQ message
2950 contains these fields as does the authentication header (KRB_AP_REQ) that is
2951 passed in the padata field.
2953 5.4.2. KRB_KDC_REP definition
2955 The KRB_KDC_REP message format is used for the reply from the KDC for either
2956 an initial (AS) request or a subsequent (TGS) request. There is no message
2957 type for KRB_KDC_REP. Instead, the type will be either KRB_AS_REP or
2958 KRB_TGS_REP. The key used to encrypt the ciphertext part of the reply
2959 depends on the message type. For KRB_AS_REP, the ciphertext is encrypted in
2960 the client's secret key, and the client's key version number is included in
2961 the key version number for the encrypted data. For KRB_TGS_REP, the
2962 ciphertext is encrypted in the sub-session key from the Authenticator, or if
2963 absent, the session key from the ticket-granting ticket used in the request.
2964 In that case, no version number will be present in the EncryptedData
2967 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
2969 The KRB_KDC_REP message contains the following fields:
2971 AS-REP ::= [APPLICATION 11] KDC-REP
2972 TGS-REP ::= [APPLICATION 13] KDC-REP
2974 KDC-REP ::= SEQUENCE {
2976 msg-type[1] INTEGER,
2977 padata[2] SEQUENCE OF PA-DATA OPTIONAL,
2979 cname[4] PrincipalName,
2981 enc-part[6] EncryptedData
2982 -- EncASREpPart or EncTGSReoOart
2985 EncASRepPart ::= [APPLICATION 25[27]] EncKDCRepPart
2986 EncTGSRepPart ::= [APPLICATION 26] EncKDCRepPart
2988 EncKDCRepPart ::= SEQUENCE {
2989 key[0] EncryptionKey,
2990 last-req[1] LastReq,
2992 key-expiration[3] KerberosTime OPTIONAL,
2993 flags[4] TicketFlags,
2994 authtime[5] KerberosTime,
2995 starttime[6] KerberosTime OPTIONAL,
2996 endtime[7] KerberosTime,
2997 renew-till[8] KerberosTime OPTIONAL,
2999 sname[10] PrincipalName,
3000 caddr[11] HostAddresses OPTIONAL
3004 These fields are described above in section 5.4.1. msg-type is either
3005 KRB_AS_REP or KRB_TGS_REP.
3007 This field is described in detail in section 5.4.1. One possible use
3008 for this field is to encode an alternate "mix-in" string to be used
3009 with a string-to-key algorithm (such as is described in section 6.3.2).
3010 This ability is useful to ease transitions if a realm name needs to
3011 change (e.g. when a company is acquired); in such a case all existing
3012 password-derived entries in the KDC database would be flagged as
3013 needing a special mix-in string until the next password change.
3014 crealm, cname, srealm and sname
3015 These fields are the same as those described for the ticket in section
3018 The newly-issued ticket, from section 5.3.1.
3020 This field is a place holder for the ciphertext and related information
3021 that forms the encrypted part of a message. The description of the
3022 encrypted part of the message follows each appearance of this field.
3023 The encrypted part is encoded as described in section 6.1.
3025 This field is the same as described for the ticket in section 5.3.1.
3028 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3031 This field is returned by the KDC and specifies the time(s) of the last
3032 request by a principal. Depending on what information is available,
3033 this might be the last time that a request for a ticket-granting ticket
3034 was made, or the last time that a request based on a ticket-granting
3035 ticket was successful. It also might cover all servers for a realm, or
3036 just the particular server. Some implementations may display this
3037 information to the user to aid in discovering unauthorized use of one's
3038 identity. It is similar in spirit to the last login time displayed when
3039 logging into timesharing systems.
3041 This field is described above in section 5.4.1.
3043 The key-expiration field is part of the response from the KDC and
3044 specifies the time that the client's secret key is due to expire. The
3045 expiration might be the result of password aging or an account
3046 expiration. This field will usually be left out of the TGS reply since
3047 the response to the TGS request is encrypted in a session key and no
3048 client information need be retrieved from the KDC database. It is up to
3049 the application client (usually the login program) to take appropriate
3050 action (such as notifying the user) if the expiration time is imminent.
3051 flags, authtime, starttime, endtime, renew-till and caddr
3052 These fields are duplicates of those found in the encrypted portion of
3053 the attached ticket (see section 5.3.1), provided so the client may
3054 verify they match the intended request and to assist in proper ticket
3055 caching. If the message is of type KRB_TGS_REP, the caddr field will
3056 only be filled in if the request was for a proxy or forwarded ticket,
3057 or if the user is substituting a subset of the addresses from the
3058 ticket granting ticket. If the client-requested addresses are not
3059 present or not used, then the addresses contained in the ticket will be
3060 the same as those included in the ticket-granting ticket.
3062 5.5. Client/Server (CS) message specifications
3064 This section specifies the format of the messages used for the
3065 authentication of the client to the application server.
3067 5.5.1. KRB_AP_REQ definition
3069 The KRB_AP_REQ message contains the Kerberos protocol version number, the
3070 message type KRB_AP_REQ, an options field to indicate any options in use,
3071 and the ticket and authenticator themselves. The KRB_AP_REQ message is often
3072 referred to as the 'authentication header'.
3074 AP-REQ ::= [APPLICATION 14] SEQUENCE {
3076 msg-type[1] INTEGER,
3077 ap-options[2] APOptions,
3079 authenticator[4] EncryptedData
3080 -- Authenticator from 5.3.2
3083 APOptions ::= BIT STRING {
3089 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3094 These fields are described above in section 5.4.1. msg-type is
3097 This field appears in the application request (KRB_AP_REQ) and affects
3098 the way the request is processed. It is a bit-field, where the selected
3099 options are indicated by the bit being set (1), and the unselected
3100 options and reserved fields being reset (0). The encoding of the bits
3101 is specified in section 5.2. The meanings of the options are:
3103 Bit(s) Name Description
3106 Reserved for future expansion of this
3110 The USE-SESSION-KEY option indicates
3111 that the ticket the client is presenting
3112 to a server is encrypted in the session
3113 key from the server's ticket-granting
3114 ticket. When this option is not speci-
3115 fied, the ticket is encrypted in the
3116 server's secret key.
3119 The MUTUAL-REQUIRED option tells the
3120 server that the client requires mutual
3121 authentication, and that it must respond
3122 with a KRB_AP_REP message.
3125 Reserved for future use.
3128 This field is a ticket authenticating the client to the server.
3130 This contains the authenticator, which includes the client's choice of
3131 a subkey. Its encoding is described in section 5.3.2.
3133 5.5.2. KRB_AP_REP definition
3135 The KRB_AP_REP message contains the Kerberos protocol version number, the
3136 message type, and an encrypted time- stamp. The message is sent in in
3137 response to an application request (KRB_AP_REQ) where the mutual
3138 authentication option has been selected in the ap-options field.
3140 AP-REP ::= [APPLICATION 15] SEQUENCE {
3142 msg-type[1] INTEGER,
3143 enc-part[2] EncryptedData
3147 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3149 EncAPRepPart ::= [APPLICATION 27[29]] SEQUENCE {
3150 ctime[0] KerberosTime,
3152 subkey[2] EncryptionKey OPTIONAL,
3153 seq-number[3] INTEGER OPTIONAL
3156 The encoded EncAPRepPart is encrypted in the shared session key of the
3157 ticket. The optional subkey field can be used in an application-arranged
3158 negotiation to choose a per association session key.
3161 These fields are described above in section 5.4.1. msg-type is
3164 This field is described above in section 5.4.2.
3166 This field contains the current time on the client's host.
3168 This field contains the microsecond part of the client's timestamp.
3170 This field contains an encryption key which is to be used to protect
3171 this specific application session. See section 3.2.6 for specifics on
3172 how this field is used to negotiate a key. Unless an application
3173 specifies otherwise, if this field is left out, the sub-session key
3174 from the authenticator, or if also left out, the session key from the
3175 ticket will be used.
3177 This field is described above in section 5.3.2.
3179 5.5.3. Error message reply
3181 If an error occurs while processing the application request, the KRB_ERROR
3182 message will be sent in response. See section 5.9.1 for the format of the
3183 error message. The cname and crealm fields may be left out if the server
3184 cannot determine their appropriate values from the corresponding KRB_AP_REQ
3185 message. If the authenticator was decipherable, the ctime and cusec fields
3186 will contain the values from it.
3188 5.6. KRB_SAFE message specification
3190 This section specifies the format of a message that can be used by either
3191 side (client or server) of an application to send a tamper-proof message to
3192 its peer. It presumes that a session key has previously been exchanged (for
3193 example, by using the KRB_AP_REQ/KRB_AP_REP messages).
3195 5.6.1. KRB_SAFE definition
3197 The KRB_SAFE message contains user data along with a collision-proof
3198 checksum keyed with the last encryption key negotiated via subkeys, or the
3199 session key if no negotiation has occurred. The message fields are:
3201 KRB-SAFE ::= [APPLICATION 20] SEQUENCE {
3203 msg-type[1] INTEGER,
3204 safe-body[2] KRB-SAFE-BODY,
3208 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3210 KRB-SAFE-BODY ::= SEQUENCE {
3211 user-data[0] OCTET STRING,
3212 timestamp[1] KerberosTime OPTIONAL,
3213 usec[2] INTEGER OPTIONAL,
3214 seq-number[3] INTEGER OPTIONAL,
3215 s-address[4] HostAddress OPTIONAL,
3216 r-address[5] HostAddress OPTIONAL
3220 These fields are described above in section 5.4.1. msg-type is
3223 This field is a placeholder for the body of the KRB-SAFE message.
3225 This field contains the checksum of the application data. Checksum
3226 details are described in section 6.4. The checksum is computed over the
3227 encoding of the KRB-SAFE sequence. First, the cksum is zeroed and the
3228 checksum is computed over the encoding of the KRB-SAFE sequence, then
3229 the checksum is set to the result of that computation, and finally the
3230 KRB-SAFE sequence is encoded again.
3232 This field is part of the KRB_SAFE and KRB_PRIV messages and contain
3233 the application specific data that is being passed from the sender to
3236 This field is part of the KRB_SAFE and KRB_PRIV messages. Its contents
3237 are the current time as known by the sender of the message. By checking
3238 the timestamp, the recipient of the message is able to make sure that
3239 it was recently generated, and is not a replay.
3241 This field is part of the KRB_SAFE and KRB_PRIV headers. It contains
3242 the microsecond part of the timestamp.
3244 This field is described above in section 5.3.2.
3246 This field specifies the address in use by the sender of the message.
3247 It may be omitted if not required by the application protocol. The
3248 application designer considering omission of this field is warned, that
3249 the inclusion of this address prevents some kinds of replay attacks
3250 (e.g., reflection attacks) and that it is only acceptable to omit this
3251 address if there is sufficient information in the integrity protected
3252 part of the application message for the recipient to unambiguously
3253 determine if it was the intended recipient.
3255 This field specifies the address in use by the recipient of the
3256 message. It may be omitted for some uses (such as broadcast protocols),
3257 but the recipient may arbitrarily reject such messages. This field
3258 along with s-address can be used to help detect messages which have
3259 been incorrectly or maliciously delivered to the wrong recipient.
3261 5.7. KRB_PRIV message specification
3263 This section specifies the format of a message that can be used by either
3264 side (client or server) of an application to securely and privately send a
3265 message to its peer. It presumes that a session key has previously been
3266 exchanged (for example, by using the KRB_AP_REQ/KRB_AP_REP messages).
3268 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3270 5.7.1. KRB_PRIV definition
3272 The KRB_PRIV message contains user data encrypted in the Session Key. The
3275 KRB-PRIV ::= [APPLICATION 21] SEQUENCE {
3277 msg-type[1] INTEGER,
3278 enc-part[3] EncryptedData
3282 EncKrbPrivPart ::= [APPLICATION 28[31]] SEQUENCE {
3283 user-data[0] OCTET STRING,
3284 timestamp[1] KerberosTime OPTIONAL,
3285 usec[2] INTEGER OPTIONAL,
3286 seq-number[3] INTEGER OPTIONAL,
3287 s-address[4] HostAddress OPTIONAL, -- sender's addr
3288 r-address[5] HostAddress OPTIONAL -- recip's addr
3292 These fields are described above in section 5.4.1. msg-type is
3295 This field holds an encoding of the EncKrbPrivPart sequence encrypted
3296 under the session key[32]. This encrypted encoding is used for the
3297 enc-part field of the KRB-PRIV message. See section 6 for the format of
3299 user-data, timestamp, usec, s-address and r-address
3300 These fields are described above in section 5.6.1.
3302 This field is described above in section 5.3.2.
3304 5.8. KRB_CRED message specification
3306 This section specifies the format of a message that can be used to send
3307 Kerberos credentials from one principal to another. It is presented here to
3308 encourage a common mechanism to be used by applications when forwarding
3309 tickets or providing proxies to subordinate servers. It presumes that a
3310 session key has already been exchanged perhaps by using the
3311 KRB_AP_REQ/KRB_AP_REP messages.
3313 5.8.1. KRB_CRED definition
3315 The KRB_CRED message contains a sequence of tickets to be sent and
3316 information needed to use the tickets, including the session key from each.
3317 The information needed to use the tickets is encrypted under an encryption
3318 key previously exchanged or transferred alongside the KRB_CRED message. The
3321 KRB-CRED ::= [APPLICATION 22] SEQUENCE {
3323 msg-type[1] INTEGER, -- KRB_CRED
3324 tickets[2] SEQUENCE OF Ticket,
3325 enc-part[3] EncryptedData -- EncKrbCredPart
3330 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3332 EncKrbCredPart ::= [APPLICATION 29] SEQUENCE {
3333 ticket-info[0] SEQUENCE OF KrbCredInfo,
3334 nonce[1] INTEGER OPTIONAL,
3335 timestamp[2] KerberosTime OPTIONAL,
3336 usec[3] INTEGER OPTIONAL,
3337 s-address[4] HostAddress OPTIONAL,
3338 r-address[5] HostAddress OPTIONAL
3341 KrbCredInfo ::= SEQUENCE {
3342 key[0] EncryptionKey,
3343 prealm[1] Realm OPTIONAL,
3344 pname[2] PrincipalName OPTIONAL,
3345 flags[3] TicketFlags OPTIONAL,
3346 authtime[4] KerberosTime OPTIONAL,
3347 starttime[5] KerberosTime OPTIONAL,
3348 endtime[6] KerberosTime OPTIONAL
3349 renew-till[7] KerberosTime OPTIONAL,
3350 srealm[8] Realm OPTIONAL,
3351 sname[9] PrincipalName OPTIONAL,
3352 caddr[10] HostAddresses OPTIONAL
3356 These fields are described above in section 5.4.1. msg-type is
3359 These are the tickets obtained from the KDC specifically for use by the
3360 intended recipient. Successive tickets are paired with the
3361 corresponding KrbCredInfo sequence from the enc-part of the KRB-CRED
3364 This field holds an encoding of the EncKrbCredPart sequence encrypted
3365 under the session key shared between the sender and the intended
3366 recipient. This encrypted encoding is used for the enc-part field of
3367 the KRB-CRED message. See section 6 for the format of the ciphertext.
3369 If practical, an application may require the inclusion of a nonce
3370 generated by the recipient of the message. If the same value is
3371 included as the nonce in the message, it provides evidence that the
3372 message is fresh and has not been replayed by an attacker. A nonce must
3373 never be re-used; it should be generated randomly by the recipient of
3374 the message and provided to the sender of the message in an application
3377 These fields specify the time that the KRB-CRED message was generated.
3378 The time is used to provide assurance that the message is fresh.
3379 s-address and r-address
3380 These fields are described above in section 5.6.1. They are used
3381 optionally to provide additional assurance of the integrity of the
3384 This field exists in the corresponding ticket passed by the KRB-CRED
3385 message and is used to pass the session key from the sender to the
3386 intended recipient. The field's encoding is described in section 6.2.
3388 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3390 The following fields are optional. If present, they can be associated with
3391 the credentials in the remote ticket file. If left out, then it is assumed
3392 that the recipient of the credentials already knows their value.
3395 The name and realm of the delegated principal identity.
3396 flags, authtime, starttime, endtime, renew-till, srealm, sname, and caddr
3397 These fields contain the values of the corresponding fields from the
3398 ticket found in the ticket field. Descriptions of the fields are
3399 identical to the descriptions in the KDC-REP message.
3401 5.9. Error message specification
3403 This section specifies the format for the KRB_ERROR message. The fields
3404 included in the message are intended to return as much information as
3405 possible about an error. It is not expected that all the information
3406 required by the fields will be available for all types of errors. If the
3407 appropriate information is not available when the message is composed, the
3408 corresponding field will be left out of the message.
3410 Note that since the KRB_ERROR message is only optionally integrity
3411 protected, it is quite possible for an intruder to synthesize or modify such
3412 a message. In particular, this means that unless appropriate integrity
3413 protection mechanisms have been applied to the KRB_ERROR message, the client
3414 should not use any fields in this message for security-critical purposes,
3415 such as setting a system clock or generating a fresh authenticator. The
3416 message can be useful, however, for advising a user on the reason for some
3419 5.9.1. KRB_ERROR definition
3421 The KRB_ERROR message consists of the following fields:
3423 KRB-ERROR ::= [APPLICATION 30] SEQUENCE {
3425 msg-type[1] INTEGER,
3426 ctime[2] KerberosTime OPTIONAL,
3427 cusec[3] INTEGER OPTIONAL,
3428 stime[4] KerberosTime,
3430 error-code[6] INTEGER,
3431 crealm[7] Realm OPTIONAL,
3432 cname[8] PrincipalName OPTIONAL,
3433 realm[9] Realm, -- Correct realm
3434 sname[10] PrincipalName, -- Correct name
3435 e-text[11] GeneralString OPTIONAL,
3436 e-data[12] OCTET STRING OPTIONAL,
3437 e-cksum[13] Checksum OPTIONAL,
3443 These fields are described above in section 5.4.1. msg-type is
3446 This field is described above in section 5.4.1.
3449 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3452 This field is described above in section 5.5.2.
3454 This field contains the current time on the server. It is of type
3457 This field contains the microsecond part of the server's timestamp. Its
3458 value ranges from 0 to 999999. It appears along with stime. The two
3459 fields are used in conjunction to specify a reasonably accurate
3462 This field contains the error code returned by Kerberos or the server
3463 when a request fails. To interpret the value of this field see the list
3464 of error codes in section 8. Implementations are encouraged to provide
3465 for national language support in the display of error messages.
3466 crealm, cname, srealm and sname
3467 These fields are described above in section 5.3.1.
3469 This field contains additional text to help explain the error code
3470 associated with the failed request (for example, it might include a
3471 principal name which was unknown).
3473 This field contains additional data about the error for use by the
3474 application to help it recover from or handle the error. If present,
3475 this field will contain the encoding of a sequence of TypedData
3476 (TYPED-DATA below), unless the errorcode is KDC_ERR_PREAUTH_REQUIRED,
3477 in which case it will contain the encoding of a sequence of of padata
3478 fields (METHOD-DATA below), each corresponding to an acceptable
3479 pre-authentication method and optionally containing data for the
3482 TYPED-DATA ::= SEQUENCE of TypedData
3483 METHOD-DATA ::= SEQUENCE of PA-DATA
3485 TypedData ::= SEQUENCE {
3486 data-type[0] INTEGER,
3487 data-value[1] OCTET STRING OPTIONAL
3490 Note that the padata-type field in the PA-DATA structure and the
3491 data-type field in the TypedData structure share a common range of
3492 allocated values which are coordinated to avoid conflicts. One Kerberos
3493 error message, KDC_ERR_PREAUTH_REQUIRED, embeds elements of type
3494 PA-DATA, while all other error messages embed TypedData.
3496 While preauthentication methods of type PA-DATA should be encapsulated
3497 within a TypedData element of type TD-PADATA, for compatibility with
3498 old clients, the KDC should include PA-DATA types below 22 directly as
3499 method-data. All new implementations interpreting the METHOD-DATA field
3500 for the KDC_ERR_PREAUTH_REQUIRED message must accept a type of
3501 TD-PADATA, extract the typed data field and interpret the use any
3502 elements encapsulated in the TD-PADATA elements as if they were present
3503 in the METHOD-DATA sequence.
3505 Unless otherwise specified, unrecognized TypedData elements within the
3506 KRB-ERROR message MAY be ignored by implementations that do not support
3507 them. Note that all TypedData MAY be bound to the KRB-ERROR message via
3510 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3512 An application may use the TD-APP-DEFINED-ERROR typed data type for
3513 data carried in a Kerberos error message that is specific to the
3514 application. TD-APP-SPECIFIC must set the data-type value of TypedData
3515 to TD-APP-SPECIFIC and the data-value field to
3517 AppSpecificTypedData as follows:
3518 AppSpecificTypedData ::= SEQUENCE {
3519 oid[0] OPTIONAL OBJECT IDENTIFIER,
3520 -- identifies the application
3521 data-value[1] OCTET STRING
3526 The TD-REQ-NONCE TypedData MAY be used to bind a KRB-ERROR to a
3527 KDC-REQ. The data-value is an INTEGER that is equivalent to the
3530 The TD-REQ-SEQ TypedData MAY be used for binding a KRB-ERROR to
3531 the sequence number from an authenticator. The data-value is an
3532 INTEGER, and it is identical to sequence number sent in the
3535 The data-value for TD-KRB-PRINCIPAL is the Kerberos-defined
3536 PrincipalName. The data-value for TD-KRB-REALM is the
3537 Kerberos-defined Realm. These TypedData types MAY be used to
3538 indicate principal and realm name when appropriate.
3540 This field contains an optional checksum for the KRB-ERROR message. The
3541 checksum is calculated over the Kerberos ASN.1 encoding of the
3542 KRB-ERROR message with the checksum absent. The checksum is then added
3543 to the KRB-ERROR structure and the message is re-encoded. The Checksum
3544 should be calculated using the session key from the ticket granting
3545 ticket or service ticket, where available. If the error is in response
3546 to a TGS or AP request, the checksum should be calculated using the the
3547 session key from the client's ticket. If the error is in response to an
3548 AS request, then the checksum should be calulated using the client's
3549 secret key ONLY if there has been suitable preauthentication to prove
3550 knowledge of the secret key by the client[33]. If a checksum can not be
3551 computed because the key to be used is not available, no checksum will
3554 6. Encryption and Checksum Specifications
3556 This section is undergoing major revision to include rijndael support based
3557 on the Internet Draft by Ken Raeburn
3558 (draft-raeburn-krb-rijndael-krb-00.txt). The discussions of 3DES are also
3559 undergoing revision. Please see http://www.isi.edu/people/bcn/krb-revisions
3560 for the latest versions of this section when it becomes available.
3562 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3564 7. Naming Constraints
3568 Although realm names are encoded as GeneralStrings and although a realm can
3569 technically select any name it chooses, interoperability across realm
3570 boundaries requires agreement on how realm names are to be assigned, and
3571 what information they imply.
3573 To enforce these conventions, each realm must conform to the conventions
3574 itself, and it must require that any realms with which inter-realm keys are
3575 shared also conform to the conventions and require the same from its
3578 Kerberos realm names are case sensitive. Realm names that differ only in the
3579 case of the characters are not equivalent. There are presently four styles
3580 of realm names: domain, X500, other, and reserved. Examples of each style
3583 domain: ATHENA.MIT.EDU (example)
3584 X500: C=US/O=OSF (example)
3585 other: NAMETYPE:rest/of.name=without-restrictions (example)
3586 reserved: reserved, but will not conflict with above
3588 Domain names must look like domain names: they consist of components
3589 separated by periods (.) and they contain neither colons (:) nor slashes
3590 (/). Though domain names themselves are case insensitive, in order for
3591 realms to match, the case must match as well. When establishing a new realm
3592 name based on an internet domain name it is recommended by convention that
3593 the characters be converted to upper case.
3595 X.500 names contain an equal (=) and cannot contain a colon (:) before the
3596 equal. The realm names for X.500 names will be string representations of the
3597 names with components separated by slashes. Leading and trailing slashes
3598 will not be included. Note that the slash separator is consistent with
3599 Kerberos implementations based on RFC1510, but it is different from the
3600 separator recommended in RFC2253.
3602 Names that fall into the other category must begin with a prefix that
3603 contains no equal (=) or period (.) and the prefix must be followed by a
3604 colon (:) and the rest of the name. All prefixes must be assigned before
3605 they may be used. Presently none are assigned.
3607 The reserved category includes strings which do not fall into the first
3608 three categories. All names in this category are reserved. It is unlikely
3609 that names will be assigned to this category unless there is a very strong
3610 argument for not using the 'other' category.
3612 These rules guarantee that there will be no conflicts between the various
3613 name styles. The following additional constraints apply to the assignment of
3614 realm names in the domain and X.500 categories: the name of a realm for the
3615 domain or X.500 formats must either be used by the organization owning (to
3616 whom it was assigned) an Internet domain name or X.500 name, or in the case
3617 that no such names are registered, authority to use a realm name may be
3618 derived from the authority of the parent realm. For example, if there is no
3619 domain name for E40.MIT.EDU, then the administrator of the MIT.EDU realm can
3620 authorize the creation of a realm with that name.
3622 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3624 This is acceptable because the organization to which the parent is assigned
3625 is presumably the organization authorized to assign names to its children in
3626 the X.500 and domain name systems as well. If the parent assigns a realm
3627 name without also registering it in the domain name or X.500 hierarchy, it
3628 is the parent's responsibility to make sure that there will not in the
3629 future exist a name identical to the realm name of the child unless it is
3630 assigned to the same entity as the realm name.
3632 7.2. Principal Names
3634 As was the case for realm names, conventions are needed to ensure that all
3635 agree on what information is implied by a principal name. The name-type
3636 field that is part of the principal name indicates the kind of information
3637 implied by the name. The name-type should be treated as a hint. Ignoring the
3638 name type, no two names can be the same (i.e. at least one of the
3639 components, or the realm, must be different). The following name types are
3642 name-type value meaning
3644 NT-UNKNOWN 0 Name type not known
3645 NT-PRINCIPAL 1 General principal name (e.g. username, or DCE principal)
3646 NT-SRV-INST 2 Service and other unique instance (krbtgt)
3647 NT-SRV-HST 3 Service with host name as instance (telnet, rcommands)
3648 NT-SRV-XHST 4 Service with slash-separated host name components
3650 NT-X500-PRINCIPAL 6 Encoded X.509 Distingished name [RFC 1779]
3651 NT-SMTP-NAME 7 Name in form of SMTP email name (e.g. user@foo.com)
3653 When a name implies no information other than its uniqueness at a particular
3654 time the name type PRINCIPAL should be used. The principal name type should
3655 be used for users, and it might also be used for a unique server. If the
3656 name is a unique machine generated ID that is guaranteed never to be
3657 reassigned then the name type of UID should be used (note that it is
3658 generally a bad idea to reassign names of any type since stale entries might
3659 remain in access control lists).
3661 If the first component of a name identifies a service and the remaining
3662 components identify an instance of the service in a server specified manner,
3663 then the name type of SRV-INST should be used. An example of this name type
3664 is the Kerberos ticket-granting service whose name has a first component of
3665 krbtgt and a second component identifying the realm for which the ticket is
3668 If instance is a single component following the service name and the
3669 instance identifies the host on which the server is running, then the name
3670 type SRV-HST should be used. This type is typically used for Internet
3671 services such as telnet and the Berkeley R commands. If the separate
3672 components of the host name appear as successive components following the
3673 name of the service, then the name type SRV-XHST should be used. This type
3674 might be used to identify servers on hosts with X.500 names where the slash
3675 (/) might otherwise be ambiguous.
3677 A name type of NT-X500-PRINCIPAL should be used when a name from an X.509
3678 certificate is translated into a Kerberos name. The encoding of the X.509
3679 name as a Kerberos principal shall conform to the encoding rules specified
3682 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3684 A name type of SMTP allows a name to be of a form that resembles a SMTP
3685 email name. This name, including an "@" and a domain name, is used as the
3686 one component of the principal name. This name type can be used in
3687 conjunction with name-canonicalization to allow a free-form of email address
3688 to be specified as a client name and allow the KDC to determine the Kerberos
3689 principal name for the requested name. [JBrezak, Raeburn]
3691 A name type of UNKNOWN should be used when the form of the name is not
3692 known. When comparing names, a name of type UNKNOWN will match principals
3693 authenticated with names of any type. A principal authenticated with a name
3694 of type UNKNOWN, however, will only match other names of type UNKNOWN.
3696 Names of any type with an initial component of 'krbtgt' are reserved for the
3697 Kerberos ticket granting service. See section 8.2.3 for the form of such
3700 7.2.1. Name of server principals
3702 The principal identifier for a server on a host will generally be composed
3703 of two parts: (1) the realm of the KDC with which the server is registered,
3704 and (2) a two-component name of type NT-SRV-HST if the host name is an
3705 Internet domain name or a multi-component name of type NT-SRV-XHST if the
3706 name of the host is of a form such as X.500 that allows slash (/)
3707 separators. The first component of the two- or multi-component name will
3708 identify the service and the latter components will identify the host. Where
3709 the name of the host is not case sensitive (for example, with Internet
3710 domain names) the name of the host must be lower case. If specified by the
3711 application protocol for services such as telnet and the Berkeley R commands
3712 which run with system privileges, the first component may be the string
3713 'host' instead of a service specific identifier. When a host has an official
3714 name and one or more aliases and the official name can be reliably
3715 determined, the official name of the host should be used when constructing
3716 the name of the server principal.
3718 8. Constants and other defined values
3720 8.1. Host address types
3722 All negative values for the host address type are reserved for local use.
3723 All non-negative values are reserved for officially assigned type fields and
3726 The values of the types for the following addresses are chosen to match the
3727 defined address family constants in the Berkeley Standard Distributions of
3728 Unix. They can be found in with symbolic names AF_xxx (where xxx is an
3729 abbreviation of the address family name).
3731 Internet (IPv4) Addresses
3733 Internet (IPv4) addresses are 32-bit (4-octet) quantities, encoded in MSB
3734 order. The IPv4 loopback address should not appear in a Kerberos packet. The
3735 type of IPv4 addresses is two (2).
3737 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3739 Internet (IPv6) Addresses [Westerlund]
3741 IPv6 addresses are 128-bit (16-octet) quantities, encoded in MSB order. The
3742 type of IPv6 addresses is twenty-four (24). [RFC1883] [RFC1884]. The
3743 following addresses (see [RFC1884]) MUST not appear in any Kerberos packet:
3745 * the Unspecified Address
3746 * the Loopback Address
3747 * Link-Local addresses
3749 IPv4-mapped IPv6 addresses MUST be represented as addresses of type 2.
3753 CHAOSnet addresses are 16-bit (2-octet) quantities, encoded in MSB order.
3754 The type of CHAOSnet addresses is five (5).
3758 ISO addresses are variable-length. The type of ISO addresses is seven (7).
3760 Xerox Network Services (XNS) addresses
3762 XNS addresses are 48-bit (6-octet) quantities, encoded in MSB order. The
3763 type of XNS addresses is six (6).
3765 AppleTalk Datagram Delivery Protocol (DDP) addresses
3767 AppleTalk DDP addresses consist of an 8-bit node number and a 16-bit network
3768 number. The first octet of the address is the node number; the remaining two
3769 octets encode the network number in MSB order. The type of AppleTalk DDP
3770 addresses is sixteen (16).
3772 DECnet Phase IV addresses
3774 DECnet Phase IV addresses are 16-bit addresses, encoded in LSB order. The
3775 type of DECnet Phase IV addresses is twelve (12).
3779 Netbios addresses are 16-octet addresses typically composed of 1 to 15
3780 characters, trailing blank (ascii char 20) filled, with a 16th octet of 0x0.
3781 The type of Netbios addresses is 20 (0x14).
3785 8.2.1. UDP/IP transport
3787 When contacting a Kerberos server (KDC) for a KRB_KDC_REQ request using UDP
3788 IP transport, the client shall send a UDP datagram containing only an
3789 encoding of the request to port 88 (decimal) at the KDC's IP address; the
3790 KDC will respond with a reply datagram containing only an encoding of the
3791 reply message (either a KRB_ERROR or a KRB_KDC_REP) to the sending port at
3792 the sender's IP address. Kerberos servers supporting IP transport must
3793 accept UDP requests on port 88 (decimal). The response to a request made
3794 through UDP/IP transport must also use UDP/IP transport.
3797 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3799 8.2.2. TCP/IP transport [Westerlund,Danielsson]
3801 Kerberos servers (KDC's) should accept TCP requests on port 88 (decimal) and
3802 clients should support the sending of TCP requests on port 88 (decimal).
3803 When the KRB_KDC_REQ message is sent to the KDC over a TCP stream, a new
3804 connection will be established for each authentication exchange (request and
3805 response). The KRB_KDC_REP or KRB_ERROR message will be returned to the
3806 client on the same TCP stream that was established for the request. The
3807 response to a request made through TCP/IP transport must also use TCP/IP
3808 transport. Implementors should note that some extensions to the Kerberos
3809 protocol will not work if any implementation not supporting the TCP
3810 transport is involved (client or KDC). Implementors are strongly urged to
3811 support the TCP transport on both the client and server and are advised that
3812 the current notation of "should" support will likely change in the future to
3813 must support. The KDC may close the TCP stream after sending a response, but
3814 may leave the stream open if it expects a followup - in which case it may
3815 close the stream at any time if resource constraints or other factors make
3816 it desirable to do so. Care must be taken in managing TCP/IP connections
3817 with the KDC to prevent denial of service attacks based on the number of
3818 TCP/IP connections with the KDC that remain open. If multiple exchanges with
3819 the KDC are needed for certain forms of preauthentication, multiple TCP
3820 connections may be required. A client may close the stream after receiving
3821 response, and should close the stream if it does not expect to send followup
3822 messages. The client must be prepared to have the stream closed by the KDC
3823 at anytime, in which case it must simply connect again when it is ready to
3824 send subsequent messages.
3826 The first four octets of the TCP stream used to transmit the request request
3827 will encode in network byte order the length of the request (KRB_KDC_REQ),
3828 and the length will be followed by the request itself. The response will
3829 similarly be preceded by a 4 octet encoding in network byte order of the
3830 length of the KRB_KDC_REP or the KRB_ERROR message and will be followed by
3831 the KRB_KDC_REP or the KRB_ERROR response. If the sign bit is set on the
3832 integer represented by the first 4 octets, then the next 4 octets will be
3833 read, extending the length of the field by another 4 octets (less the sign
3834 bit of the additional four octets which is reserved for future expansion and
3835 which at present must be zero).
3837 8.2.3. OSI transport
3839 During authentication of an OSI client to an OSI server, the mutual
3840 authentication of an OSI server to an OSI client, the transfer of
3841 credentials from an OSI client to an OSI server, or during exchange of
3842 private or integrity checked messages, Kerberos protocol messages may be
3843 treated as opaque objects and the type of the authentication mechanism will
3846 OBJECT IDENTIFIER ::= {iso (1), org(3), dod(6),internet(1), security(5),kerberosv5(2)}
3848 Depending on the situation, the opaque object will be an authentication
3849 header (KRB_AP_REQ), an authentication reply (KRB_AP_REP), a safe message
3850 (KRB_SAFE), a private message (KRB_PRIV), or a credentials message
3851 (KRB_CRED). The opaque data contains an application code as specified in the
3852 ASN.1 description for each message. The application code may be used by
3853 Kerberos to determine the message type.
3855 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3857 8.2.3. Name of the TGS
3859 The principal identifier of the ticket-granting service shall be composed of
3860 three parts: (1) the realm of the KDC issuing the TGS ticket (2) a two-part
3861 name of type NT-SRV-INST, with the first part "krbtgt" and the second part
3862 the name of the realm which will accept the ticket-granting ticket. For
3863 example, a ticket-granting ticket issued by the ATHENA.MIT.EDU realm to be
3864 used to get tickets from the ATHENA.MIT.EDU KDC has a principal identifier
3865 of "ATHENA.MIT.EDU" (realm), ("krbtgt", "ATHENA.MIT.EDU") (name). A
3866 ticket-granting ticket issued by the ATHENA.MIT.EDU realm to be used to get
3867 tickets from the MIT.EDU realm has a principal identifier of
3868 "ATHENA.MIT.EDU" (realm), ("krbtgt", "MIT.EDU") (name).
3870 8.3. Protocol constants and associated values
3872 The following tables list constants used in the protocol and define their
3873 meanings. Ranges are specified in the "specification" section that limit the
3874 values of constants for which values are defined here. This allows
3875 implementations to make assumptions about the maximum values that will be
3876 received for these constants. Implementation receiving values outside the
3877 range specified in the "specification" section may reject the request, but
3878 they must recover cleanly.
3880 Encryption type etype value block size minimum pad size confounder size
3886 des3-cbc-md5 5 8 0 8
3888 des3-cbc-sha1 7 8 0 8
3889 dsaWithSHA1-CmsOID 9 (pkinit)
3890 md5WithRSAEncryption-CmsOID 10 (pkinit)
3891 sha1WithRSAEncryption-CmsOID 11 (pkinit)
3892 rc2CBC-EnvOID 12 (pkinit)
3893 rsaEncryption-EnvOID 13 (pkinit from PKCS#1 v1.5)
3894 rsaES-OAEP-ENV-OID 14 (pkinit from PKCS#1 v2.0)
3895 des-ede3-cbc-Env-OID 15 (pkinit)
3896 des3-cbc-sha1-kd 16 (Tom Yu)
3898 rc4-hmac-exp 24 (swift)
3899 subkey-keynaterial 65 (opaque mhur)
3903 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3905 Checksum type sumtype value checksum size
3911 rsa-md4-des-k 6 16 (drop rsa ?)
3912 rsa-md5 7 16 (drop rsa ?)
3913 rsa-md5-des 8 24 (drop rsa ?)
3914 rsa-md5-des3 9 24 (drop rsa ?)
3915 hmac-sha1-des3-kd 12 20
3916 hmac-sha1-des3 13 20
3917 sha1 (unkeyed) 14 20
3919 padata and data types padata-type value comment
3925 PA-ENC-UNIX-TIME 5 (depricated)
3926 PA-SANDIA-SECUREID 6
3929 PA-CYBERSAFE-SECUREID 9
3932 PA-SAM-CHALLENGE 12 (sam/otp)
3933 PA-SAM-RESPONSE 13 (sam/otp)
3934 PA-PK-AS-REQ 14 (pkinit)
3935 PA-PK-AS-REP 15 (pkinit)
3936 PA-USE-SPECIFIED-KVNO 20
3937 PA-SAM-REDIRECT 21 (sam/otp)
3938 PA-GET-FROM-TYPED-DATA 22 (embedded in typed data)
3939 TD-PADATA 22 (embeds padata)
3940 PA-SAM-ETYPE-INFO 23 (sam/otp)
3941 TD-PKINIT-CMS-CERTIFICATES 101 CertificateSet from CMS
3942 TD-KRB-PRINCIPAL 102 PrincipalName (see Sec.5.9.1)
3943 TD-KRB-REALM 103 Realm (see Sec.5.9.1)
3944 TD-TRUSTED-CERTIFIERS 104 from PKINIT
3945 TD-CERTIFICATE-INDEX 105 from PKINIT
3946 TD-APP-DEFINED-ERROR 106 application specific (see Sec.5.9.1)
3947 TD-REQ-NONCE 107 INTEGER (see Sec.5.9.1)
3948 TD-REQ-SEQ 108 INTEGER (see Sec.5.9.1)
3950 authorization data type ad-type value
3952 AD-INTENDED-FOR-SERVER 2
3953 AD-INTENDED-FOR-APPLICATION-CLASS 3
3956 AD-MANDATORY-TICKET-EXTENSIONS 6
3957 AD-IN-TICKET-EXTENSIONS 7
3958 reserved values 8-63
3961 AD-OSF-DCE-PKI-CERTID 66 (hemsath@us.ibm.com)
3962 AD-WIN200-PAC 128 (jbrezak@exchange.microsoft.com)
3964 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
3966 Ticket Extension Types
3968 TE-TYPE-NULL 0 Null ticket extension
3969 TE-TYPE-EXTERNAL-ADATA 1 Integrity protected authorization data
3970 [reserved] 2 TE-TYPE-PKCROSS-KDC (I have reservations)
3971 TE-TYPE-PKCROSS-CLIENT 3 PKCROSS cross realm key ticket
3972 TE-TYPE-CYBERSAFE-EXT 4 Assigned to CyberSafe Corp
3973 [reserved] 5 TE-TYPE-DEST-HOST (I have reservations)
3975 alternate authentication type method-type value
3976 reserved values 0-63
3977 ATT-CHALLENGE-RESPONSE 64
3979 transited encoding type tr-type value
3980 DOMAIN-X500-COMPRESS 1
3981 reserved values all others
3983 Label Value Meaning or MIT code
3985 pvno 5 current Kerberos protocol version number
3989 KRB_AS_REQ 10 Request for initial authentication
3990 KRB_AS_REP 11 Response to KRB_AS_REQ request
3991 KRB_TGS_REQ 12 Request for authentication based on TGT
3992 KRB_TGS_REP 13 Response to KRB_TGS_REQ request
3993 KRB_AP_REQ 14 application request to server
3994 KRB_AP_REP 15 Response to KRB_AP_REQ_MUTUAL
3995 KRB_SAFE 20 Safe (checksummed) application message
3996 KRB_PRIV 21 Private (encrypted) application message
3997 KRB_CRED 22 Private (encrypted) message to forward credentials
3998 KRB_ERROR 30 Error response
4002 KRB_NT_UNKNOWN 0 Name type not known
4003 KRB_NT_PRINCIPAL 1 Just the name of the principal as in DCE, or for users
4004 KRB_NT_SRV_INST 2 Service and other unique instance (krbtgt)
4005 KRB_NT_SRV_HST 3 Service with host name as instance (telnet, rcommands)
4006 KRB_NT_SRV_XHST 4 Service with host as remaining components
4007 KRB_NT_UID 5 Unique ID
4008 KRB_NT_X500_PRINCIPAL 6 Encoded X.509 Distingished name [RFC 2253]
4010 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4014 KDC_ERR_NONE 0 No error
4015 KDC_ERR_NAME_EXP 1 Client's entry in database has expired
4016 KDC_ERR_SERVICE_EXP 2 Server's entry in database has expired
4017 KDC_ERR_BAD_PVNO 3 Requested protocol version number not supported
4018 KDC_ERR_C_OLD_MAST_KVNO 4 Client's key encrypted in old master key
4019 KDC_ERR_S_OLD_MAST_KVNO 5 Server's key encrypted in old master key
4020 KDC_ERR_C_PRINCIPAL_UNKNOWN 6 Client not found in Kerberos database
4021 KDC_ERR_S_PRINCIPAL_UNKNOWN 7 Server not found in Kerberos database
4022 KDC_ERR_PRINCIPAL_NOT_UNIQUE 8 Multiple principal entries in database
4023 KDC_ERR_NULL_KEY 9 The client or server has a null key
4024 KDC_ERR_CANNOT_POSTDATE 10 Ticket not eligible for postdating
4025 KDC_ERR_NEVER_VALID 11 Requested start time is later than end time
4026 KDC_ERR_POLICY 12 KDC policy rejects request
4027 KDC_ERR_BADOPTION 13 KDC cannot accommodate requested option
4028 KDC_ERR_ETYPE_NOSUPP 14 KDC has no support for encryption type
4029 KDC_ERR_SUMTYPE_NOSUPP 15 KDC has no support for checksum type
4030 KDC_ERR_PADATA_TYPE_NOSUPP 16 KDC has no support for padata type
4031 KDC_ERR_TRTYPE_NOSUPP 17 KDC has no support for transited type
4032 KDC_ERR_CLIENT_REVOKED 18 Clients credentials have been revoked
4033 KDC_ERR_SERVICE_REVOKED 19 Credentials for server have been revoked
4034 KDC_ERR_TGT_REVOKED 20 TGT has been revoked
4035 KDC_ERR_CLIENT_NOTYET 21 Client not yet valid - try again later
4036 KDC_ERR_SERVICE_NOTYET 22 Server not yet valid - try again later
4037 KDC_ERR_KEY_EXPIRED 23 Password has expired - change password to reset
4038 KDC_ERR_PREAUTH_FAILED 24 Pre-authentication information was invalid
4039 KDC_ERR_PREAUTH_REQUIRED 25 Additional pre-authenticationrequired [40]
4040 KDC_ERR_SERVER_NOMATCH 26 Requested server and ticket don't match
4041 KDC_ERR_MUST_USE_USER2USER 27 Server principal valid for user2user only
4042 KDC_ERR_PATH_NOT_ACCPETED 28 KDC Policy rejects transited path
4043 KDC_ERR_SVC_UNAVAILABLE 29 A service is not available
4044 KRB_AP_ERR_BAD_INTEGRITY 31 Integrity check on decrypted field failed
4045 KRB_AP_ERR_TKT_EXPIRED 32 Ticket expired
4046 KRB_AP_ERR_TKT_NYV 33 Ticket not yet valid
4047 KRB_AP_ERR_REPEAT 34 Request is a replay
4048 KRB_AP_ERR_NOT_US 35 The ticket isn't for us
4049 KRB_AP_ERR_BADMATCH 36 Ticket and authenticator don't match
4050 KRB_AP_ERR_SKEW 37 Clock skew too great
4051 KRB_AP_ERR_BADADDR 38 Incorrect net address
4052 KRB_AP_ERR_BADVERSION 39 Protocol version mismatch
4053 KRB_AP_ERR_MSG_TYPE 40 Invalid msg type
4054 KRB_AP_ERR_MODIFIED 41 Message stream modified
4055 KRB_AP_ERR_BADORDER 42 Message out of order
4056 KRB_AP_ERR_BADKEYVER 44 Specified version of key is not available
4057 KRB_AP_ERR_NOKEY 45 Service key not available
4058 KRB_AP_ERR_MUT_FAIL 46 Mutual authentication failed
4059 KRB_AP_ERR_BADDIRECTION 47 Incorrect message direction
4060 KRB_AP_ERR_METHOD 48 Alternative authentication method required
4061 KRB_AP_ERR_BADSEQ 49 Incorrect sequence number in message
4062 KRB_AP_ERR_INAPP_CKSUM 50 Inappropriate type of checksum in message
4063 KRB_AP_PATH_NOT_ACCEPTED 51 Policy rejects transited path
4064 KRB_ERR_RESPONSE_TOO_BIG 52 Response too big for UDP, retry with TCP
4065 KRB_ERR_GENERIC 60 Generic error (description in e-text)
4066 KRB_ERR_FIELD_TOOLONG 61 Field is too long for this implementation
4067 KDC_ERROR_CLIENT_NOT_TRUSTED 62 (pkinit)
4068 KDC_ERROR_KDC_NOT_TRUSTED 63 (pkinit)
4072 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4074 KDC_ERROR_INVALID_SIG 64 (pkinit)
4075 KDC_ERR_KEY_TOO_WEAK 65 (pkinit)
4076 KDC_ERR_CERTIFICATE_MISMATCH 66 (pkinit)
4077 KRB_AP_ERR_NO_TGT 67 (user-to-user)
4078 KDC_ERR_WRONG_REALM 68 (user-to-user)
4079 KRB_AP_ERR_USER_TO_USER_REQUIRED 69 (user-to-user)
4080 KDC_ERR_CANT_VERIFY_CERTIFICATE 70 (pkinit)
4081 KDC_ERR_INVALID_CERTIFICATE 71 (pkinit)
4082 KDC_ERR_REVOKED_CERTIFICATE 72 (pkinit)
4083 KDC_ERR_REVOCATION_STATUS_UNKNOWN 73 (pkinit)
4084 KDC_ERR_REVOCATION_STATUS_UNAVAILABLE 74 (pkinit)
4085 KDC_ERR_CLIENT_NAME_MISMATCH 75 (pkinit)
4086 KDC_ERR_KDC_NAME_MISMATCH 76 (pkinit)
4088 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4090 9. Interoperability requirements
4092 Version 5 of the Kerberos protocol supports a myriad of options. Among these
4093 are multiple encryption and checksum types, alternative encoding schemes for
4094 the transited field, optional mechanisms for pre-authentication, the
4095 handling of tickets with no addresses, options for mutual authentication,
4096 user to user authentication, support for proxies, forwarding, postdating,
4097 and renewing tickets, the format of realm names, and the handling of
4100 In order to ensure the interoperability of realms, it is necessary to define
4101 a minimal configuration which must be supported by all implementations. This
4102 minimal configuration is subject to change as technology does. For example,
4103 if at some later date it is discovered that one of the required encryption
4104 or checksum algorithms is not secure, it will be replaced.
4106 9.1. Specification 2
4108 This section defines the second specification of these options.
4109 Implementations which are configured in this way can be said to support
4110 Kerberos Version 5 Specification 2 (5.1). Specification 1 (deprecated) may
4111 be found in RFC1510.
4115 TCP/IP and UDP/IP transport must be supported by KDCs claiming conformance
4116 to specification 2. Kerberos clients claiming conformance to specification 2
4117 must support UDP/IP transport for messages with the KDC and should support
4120 Encryption and checksum methods
4122 The following encryption and checksum mechanisms must be supported.
4123 Implementations may support other mechanisms as well, but the additional
4124 mechanisms may only be used when communicating with principals known to also
4125 support them: This list is to be determined.
4127 Encryption: DES-CBC-MD5, DES3-CBC-SHA1-KD, RIJNDAEL(decide identifier)
4128 Checksums: CRC-32, DES-MAC, DES-MAC-K, DES-MD5, HMAC-SHA1-DES3-KD
4132 All implementations must understand hierarchical realms in both the Internet
4133 Domain and the X.500 style. When a ticket granting ticket for an unknown
4134 realm is requested, the KDC must be able to determine the names of the
4135 intermediate realms between the KDCs realm and the requested realm.
4137 Transited field encoding
4139 DOMAIN-X500-COMPRESS (described in section 3.3.3.2) must be supported.
4140 Alternative encodings may be supported, but they may be used only when that
4141 encoding is supported by ALL intermediate realms.
4143 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4145 Pre-authentication methods
4147 The TGS-REQ method must be supported. The TGS-REQ method is not used on the
4148 initial request. The PA-ENC-TIMESTAMP method must be supported by clients
4149 but whether it is enabled by default may be determined on a realm by realm
4150 basis. If not used in the initial request and the error
4151 KDC_ERR_PREAUTH_REQUIRED is returned specifying PA-ENC-TIMESTAMP as an
4152 acceptable method, the client should retry the initial request using the
4153 PA-ENC-TIMESTAMP preauthentication method. Servers need not support the
4154 PA-ENC-TIMESTAMP method, but if not supported the server should ignore the
4155 presence of PA-ENC-TIMESTAMP pre-authentication in a request.
4157 Mutual authentication
4159 Mutual authentication (via the KRB_AP_REP message) must be supported.
4161 Ticket addresses and flags
4163 All KDC's must pass through tickets that carry no addresses (i.e. if a TGT
4164 contains no addresses, the KDC will return derivative tickets), but each
4165 realm may set its own policy for issuing such tickets, and each application
4166 server will set its own policy with respect to accepting them.
4168 Proxies and forwarded tickets must be supported. Individual realms and
4169 application servers can set their own policy on when such tickets will be
4172 All implementations must recognize renewable and postdated tickets, but need
4173 not actually implement them. If these options are not supported, the
4174 starttime and endtime in the ticket shall specify a ticket's entire useful
4175 life. When a postdated ticket is decoded by a server, all implementations
4176 shall make the presence of the postdated flag visible to the calling server.
4178 User-to-user authentication
4180 Support for user to user authentication (via the ENC-TKT-IN-SKEY KDC option)
4181 must be provided by implementations, but individual realms may decide as a
4182 matter of policy to reject such requests on a per-principal or realm-wide
4187 Implementations must pass all authorization data subfields from
4188 ticket-granting tickets to any derivative tickets unless directed to
4189 suppress a subfield as part of the definition of that registered subfield
4190 type (it is never incorrect to pass on a subfield, and no registered
4191 subfield types presently specify suppression at the KDC).
4193 Implementations must make the contents of any authorization data subfields
4194 available to the server when a ticket is used. Implementations are not
4195 required to allow clients to specify the contents of the authorization data
4200 All protocol constants are constrained to 32 bit (signed) values unless
4201 further constrained by the protocol definition. This limit is provided to
4202 allow implementations to make assumptions about the maximum values that will
4203 be received for these constants. Implementation receiving values outside
4204 this range may reject the request, but they must recover cleanly.
4206 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4208 9.2. Recommended KDC values
4210 Following is a list of recommended values for a KDC implementation, based on
4211 the list of suggested configuration constants (see section 4.4).
4213 minimum lifetime 5 minutes
4214 maximum renewable lifetime 1 week
4215 maximum ticket lifetime 1 day
4216 empty addresses only when suitable restrictions appear
4217 in authorization data
4218 proxiable, etc. Allowed.
4222 [NT94] B. Clifford Neuman and Theodore Y. Ts'o, "An Authenti-
4223 cation Service for Computer Networks," IEEE Communica-
4224 tions Magazine, Vol. 32(9), pp. 33-38 (September 1994).
4226 [MNSS87] S. P. Miller, B. C. Neuman, J. I. Schiller, and J. H.
4227 Saltzer, Section E.2.1: Kerberos Authentication and
4228 Authorization System, M.I.T. Project Athena, Cambridge,
4229 Massachusetts (December 21, 1987).
4231 [SNS88] J. G. Steiner, B. C. Neuman, and J. I. Schiller, "Ker-
4232 beros: An Authentication Service for Open Network Sys-
4233 tems," pp. 191-202 in Usenix Conference Proceedings,
4234 Dallas, Texas (February, 1988).
4236 [NS78] Roger M. Needham and Michael D. Schroeder, "Using
4237 Encryption for Authentication in Large Networks of Com-
4238 puters," Communications of the ACM, Vol. 21(12),
4239 pp. 993-999 (December, 1978).
4241 [DS81] Dorothy E. Denning and Giovanni Maria Sacco, "Time-
4242 stamps in Key Distribution Protocols," Communications
4243 of the ACM, Vol. 24(8), pp. 533-536 (August 1981).
4245 [KNT92] John T. Kohl, B. Clifford Neuman, and Theodore Y. Ts'o,
4246 "The Evolution of the Kerberos Authentication Service,"
4247 in an IEEE Computer Society Text soon to be published
4250 [Neu93] B. Clifford Neuman, "Proxy-Based Authorization and
4251 Accounting for Distributed Systems," in Proceedings of
4252 the 13th International Conference on Distributed Com-
4253 puting Systems, Pittsburgh, PA (May, 1993).
4255 [DS90] Don Davis and Ralph Swick, "Workstation Services and
4256 Kerberos Authentication at Project Athena," Technical
4257 Memorandum TM-424, MIT Laboratory for Computer Science
4260 [LGDSR87] P. J. Levine, M. R. Gretzinger, J. M. Diaz, W. E. Som-
4261 merfeld, and K. Raeburn, Section E.1: Service Manage-
4262 ment System, M.I.T. Project Athena, Cambridge, Mas-
4266 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4268 [X509-88] CCITT, Recommendation X.509: The Directory Authentica-
4269 tion Framework, December 1988.
4271 [Pat92]. J. Pato, Using Pre-Authentication to Avoid Password
4272 Guessing Attacks, Open Software Foundation DCE Request
4273 for Comments 26 (December 1992).
4275 [DES77] National Bureau of Standards, U.S. Department of Com-
4276 merce, "Data Encryption Standard," Federal Information
4277 Processing Standards Publication 46, Washington, DC
4280 [DESM80] National Bureau of Standards, U.S. Department of Com-
4281 merce, "DES Modes of Operation," Federal Information
4282 Processing Standards Publication 81, Springfield, VA
4285 [SG92] Stuart G. Stubblebine and Virgil D. Gligor, "On Message
4286 Integrity in Cryptographic Protocols," in Proceedings
4287 of the IEEE Symposium on Research in Security and
4288 Privacy, Oakland, California (May 1992).
4290 [IS3309] International Organization for Standardization, "ISO
4291 Information Processing Systems - Data Communication -
4292 High-Level Data Link Control Procedure - Frame Struc-
4293 ture," IS 3309 (October 1984). 3rd Edition.
4295 [MD4-92] R. Rivest, "The MD4 Message Digest Algorithm," RFC
4296 1320, MIT Laboratory for Computer Science (April
4299 [MD5-92] R. Rivest, "The MD5 Message Digest Algorithm," RFC
4300 1321, MIT Laboratory for Computer Science (April
4303 [KBC96] H. Krawczyk, M. Bellare, and R. Canetti, "HMAC: Keyed-
4304 Hashing for Message Authentication," Working Draft
4305 draft-ietf-ipsec-hmac-md5-01.txt, (August 1996).
4307 [Horowitz96] Horowitz, M., "Key Derivation for Authentication,
4308 Integrity, and Privacy", draft-horowitz-key-derivation-02.txt,
4311 [HorowitzB96] Horowitz, M., "Key Derivation for Kerberos V5", draft-
4312 horowitz-kerb-key-derivation-01.txt, September 1998.
4314 [Krawczyk96] Krawczyk, H., Bellare, and M., Canetti, R., "HMAC:
4315 Keyed-Hashing for Message Authentication", =
4316 draft-ietf-ipsec-hmac-
4317 md5-01.txt, August, 1996.
4319 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4321 A. Pseudo-code for protocol processing
4323 This appendix provides pseudo-code describing how the messages are to be
4324 constructed and interpreted by clients and servers.
4326 A.1. KRB_AS_REQ generation
4328 request.pvno :=3D protocol version; /* pvno =3D 5 */
4329 request.msg-type :=3D message type; /* type =3D KRB_AS_REQ */
4331 if(pa_enc_timestamp_required) then
4332 request.padata.padata-type =3D PA-ENC-TIMESTAMP;
4334 padata-body.patimestamp,pausec =3D system_time;
4335 encrypt padata-body into request.padata.padata-value
4336 using client.key; /* derived from password */
4339 body.kdc-options :=3D users's preferences;
4340 body.cname :=3D user's name;
4341 body.realm :=3D user's realm;
4342 body.sname :=3D service's name; /* usually "krbtgt", =
4344 if (body.kdc-options.POSTDATED is set) then
4345 body.from :=3D requested starting time;
4349 body.till :=3D requested end time;
4350 if (body.kdc-options.RENEWABLE is set) then
4351 body.rtime :=3D requested final renewal time;
4353 body.nonce :=3D random_nonce();
4354 body.etype :=3D requested etypes;
4355 if (user supplied addresses) then
4356 body.addresses :=3D user's addresses;
4358 omit body.addresses;
4360 omit body.enc-authorization-data;
4361 request.req-body :=3D body;
4363 kerberos :=3D lookup(name of local kerberos server (or =
4365 send(packet,kerberos);
4369 retry or use alternate server;
4372 A.2. KRB_AS_REQ verification and KRB_AS_REP generation
4374 decode message into req;
4376 client :=3D lookup(req.cname,req.realm);
4377 server :=3D lookup(req.sname,req.realm);
4380 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4383 kdc_time :=3D system_time.seconds;
4386 /* no client in Database */
4387 error_out(KDC_ERR_C_PRINCIPAL_UNKNOWN);
4390 /* no server in Database */
4391 error_out(KDC_ERR_S_PRINCIPAL_UNKNOWN);
4394 if(client.pa_enc_timestamp_required and
4395 pa_enc_timestamp not present) then
4396 error_out(KDC_ERR_PREAUTH_REQUIRED(PA_ENC_TIMESTAMP));
4399 if(pa_enc_timestamp present) then
4400 decrypt req.padata-value into decrypted_enc_timestamp
4402 using auth_hdr.authenticator.subkey;
4403 if (decrypt_error()) then
4404 error_out(KRB_AP_ERR_BAD_INTEGRITY);
4405 if(decrypted_enc_timestamp is not within allowable skew) =
4407 error_out(KDC_ERR_PREAUTH_FAILED);
4409 if(decrypted_enc_timestamp and usec is replay)
4410 error_out(KDC_ERR_PREAUTH_FAILED);
4412 add decrypted_enc_timestamp and usec to replay cache;
4415 use_etype :=3D first supported etype in req.etypes;
4417 if (no support for req.etypes) then
4418 error_out(KDC_ERR_ETYPE_NOSUPP);
4421 new_tkt.vno :=3D ticket version; /* =3D 5 */
4422 new_tkt.sname :=3D req.sname;
4423 new_tkt.srealm :=3D req.srealm;
4424 reset all flags in new_tkt.flags;
4426 /* It should be noted that local policy may affect the */
4427 /* processing of any of these flags. For example, some */
4428 /* realms may refuse to issue renewable tickets */
4430 if (req.kdc-options.FORWARDABLE is set) then
4431 set new_tkt.flags.FORWARDABLE;
4433 if (req.kdc-options.PROXIABLE is set) then
4434 set new_tkt.flags.PROXIABLE;
4437 if (req.kdc-options.ALLOW-POSTDATE is set) then
4438 set new_tkt.flags.MAY-POSTDATE;
4441 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4443 if ((req.kdc-options.RENEW is set) or
4444 (req.kdc-options.VALIDATE is set) or
4445 (req.kdc-options.PROXY is set) or
4446 (req.kdc-options.FORWARDED is set) or
4447 (req.kdc-options.ENC-TKT-IN-SKEY is set)) then
4448 error_out(KDC_ERR_BADOPTION);
4451 new_tkt.session :=3D random_session_key();
4452 new_tkt.cname :=3D req.cname;
4453 new_tkt.crealm :=3D req.crealm;
4454 new_tkt.transited :=3D empty_transited_field();
4456 new_tkt.authtime :=3D kdc_time;
4458 if (req.kdc-options.POSTDATED is set) then
4459 if (against_postdate_policy(req.from)) then
4460 error_out(KDC_ERR_POLICY);
4462 set new_tkt.flags.POSTDATED;
4463 set new_tkt.flags.INVALID;
4464 new_tkt.starttime :=3D req.from;
4466 omit new_tkt.starttime; /* treated as authtime when omitted =
4469 if (req.till =3D 0) then
4475 new_tkt.endtime :=3D min(till,
4476 new_tkt.starttime+client.max_life,
4477 new_tkt.starttime+server.max_life,
4478 new_tkt.starttime+max_life_for_realm);
4480 if ((req.kdc-options.RENEWABLE-OK is set) and
4481 (new_tkt.endtime < req.till)) then
4482 /* we set the RENEWABLE option for later processing */
4483 set req.kdc-options.RENEWABLE;
4484 req.rtime :=3D req.till;
4487 if (req.rtime =3D 0) then
4488 rtime :=3D infinity;
4490 rtime :=3D req.rtime;
4493 if (req.kdc-options.RENEWABLE is set) then
4494 set new_tkt.flags.RENEWABLE;
4495 new_tkt.renew-till :=3D min(rtime,
4496 new_tkt.starttime+client.max_rlife,
4497 new_tkt.starttime+server.max_rlife,
4498 new_tkt.starttime+max_rlife_for_realm);
4499 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4502 omit new_tkt.renew-till; /* only present if RENEWABLE */
4505 if (req.addresses) then
4506 new_tkt.caddr :=3D req.addresses;
4511 new_tkt.authorization_data :=3D empty_authorization_data();
4513 encode to-be-encrypted part of ticket into OCTET STRING;
4514 new_tkt.enc-part :=3D encrypt OCTET STRING
4515 using etype_for_key(server.key), server.key, =
4518 /* Start processing the response */
4521 resp.msg-type :=3D KRB_AS_REP;
4522 resp.cname :=3D req.cname;
4523 resp.crealm :=3D req.realm;
4524 resp.ticket :=3D new_tkt;
4526 resp.key :=3D new_tkt.session;
4527 resp.last-req :=3D fetch_last_request_info(client);
4528 resp.nonce :=3D req.nonce;
4529 resp.key-expiration :=3D client.expiration;
4530 resp.flags :=3D new_tkt.flags;
4532 resp.authtime :=3D new_tkt.authtime;
4533 resp.starttime :=3D new_tkt.starttime;
4534 resp.endtime :=3D new_tkt.endtime;
4536 if (new_tkt.flags.RENEWABLE) then
4537 resp.renew-till :=3D new_tkt.renew-till;
4540 resp.realm :=3D new_tkt.realm;
4541 resp.sname :=3D new_tkt.sname;
4543 resp.caddr :=3D new_tkt.caddr;
4545 encode body of reply into OCTET STRING;
4547 resp.enc-part :=3D encrypt OCTET STRING
4548 using use_etype, client.key, client.p_kvno;
4551 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4553 A.3. KRB_AS_REP verification
4555 decode response into resp;
4557 if (resp.msg-type =3D KRB_ERROR) then
4558 if(error =3D KDC_ERR_PREAUTH_REQUIRED(PA_ENC_TIMESTAMP)) =
4560 set pa_enc_timestamp_required;
4563 process_error(resp);
4567 /* On error, discard the response, and zero the session key */
4568 /* from the response immediately */
4570 key =3D get_decryption_key(resp.enc-part.kvno, =
4571 resp.enc-part.etype,
4573 unencrypted part of resp :=3D decode of decrypt of resp.enc-part
4574 using resp.enc-part.etype and key;
4577 if (common_as_rep_tgs_rep_checks fail) then
4582 if near(resp.princ_exp) then
4583 print(warning message);
4585 save_for_later(ticket,session,client,server,times,flags);
4587 A.4. KRB_AS_REP and KRB_TGS_REP common checks
4589 if (decryption_error() or
4590 (req.cname !=3D resp.cname) or
4591 (req.realm !=3D resp.crealm) or
4592 (req.sname !=3D resp.sname) or
4593 (req.realm !=3D resp.realm) or
4594 (req.nonce !=3D resp.nonce) or
4595 (req.addresses !=3D resp.caddr)) then
4597 return KRB_AP_ERR_MODIFIED;
4600 /* make sure no flags are set that shouldn't be, and that all =
4602 /* should be are set =
4604 if (!check_flags_for_compatability(req.kdc-options,resp.flags)) =
4607 return KRB_AP_ERR_MODIFIED;
4610 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4612 if ((req.from =3D 0) and
4613 (resp.starttime is not within allowable skew)) then
4615 return KRB_AP_ERR_SKEW;
4617 if ((req.from !=3D 0) and (req.from !=3D resp.starttime)) then
4619 return KRB_AP_ERR_MODIFIED;
4621 if ((req.till !=3D 0) and (resp.endtime > req.till)) then
4623 return KRB_AP_ERR_MODIFIED;
4626 if ((req.kdc-options.RENEWABLE is set) and
4627 (req.rtime !=3D 0) and (resp.renew-till > req.rtime)) then
4629 return KRB_AP_ERR_MODIFIED;
4631 if ((req.kdc-options.RENEWABLE-OK is set) and
4632 (resp.flags.RENEWABLE) and
4633 (req.till !=3D 0) and
4634 (resp.renew-till > req.till)) then
4636 return KRB_AP_ERR_MODIFIED;
4639 A.5. KRB_TGS_REQ generation
4641 /* Note that make_application_request might have to recursivly =
4643 /* call this routine to get the appropriate ticket-granting =
4646 request.pvno :=3D protocol version; /* pvno =3D 5 */
4647 request.msg-type :=3D message type; /* type =3D KRB_TGS_REQ */
4649 body.kdc-options :=3D users's preferences;
4650 /* If the TGT is not for the realm of the end-server */
4651 /* then the sname will be for a TGT for the end-realm */
4652 /* and the realm of the requested ticket (body.realm) */
4653 /* will be that of the TGS to which the TGT we are */
4654 /* sending applies */
4655 body.sname :=3D service's name;
4656 body.realm :=3D service's realm;
4658 if (body.kdc-options.POSTDATED is set) then
4659 body.from :=3D requested starting time;
4663 body.till :=3D requested end time;
4664 if (body.kdc-options.RENEWABLE is set) then
4665 body.rtime :=3D requested final renewal time;
4668 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4670 body.nonce :=3D random_nonce();
4671 body.etype :=3D requested etypes;
4672 if (user supplied addresses) then
4673 body.addresses :=3D user's addresses;
4675 omit body.addresses;
4678 body.enc-authorization-data :=3D user-supplied data;
4679 if (body.kdc-options.ENC-TKT-IN-SKEY) then
4680 body.additional-tickets_ticket :=3D second TGT;
4683 request.req-body :=3D body;
4684 check :=3D generate_checksum (req.body,checksumtype);
4686 request.padata[0].padata-type :=3D PA-TGS-REQ;
4687 request.padata[0].padata-value :=3D create a KRB_AP_REQ using
4688 the TGT and checksum
4690 /* add in any other padata as required/supplied */
4692 kerberos :=3D lookup(name of local kerberose server (or =
4694 send(packet,kerberos);
4698 retry or use alternate server;
4701 A.6. KRB_TGS_REQ verification and KRB_TGS_REP generation
4703 /* note that reading the application request requires first
4704 determining the server for which a ticket was issued, and =
4706 correct key for decryption. The name of the server appears in =
4708 plaintext part of the ticket. */
4710 if (no KRB_AP_REQ in req.padata) then
4711 error_out(KDC_ERR_PADATA_TYPE_NOSUPP);
4713 verify KRB_AP_REQ in req.padata;
4715 /* Note that the realm in which the Kerberos server is operating =
4717 determined by the instance from the ticket-granting ticket. The =
4719 in the ticket-granting ticket is the realm under which the =
4721 granting ticket was issued. It is possible for a single =
4723 server to support more than one realm. */
4725 auth_hdr :=3D KRB_AP_REQ;
4726 tgt :=3D auth_hdr.ticket;
4728 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4730 if (tgt.sname is not a TGT for local realm and is not req.sname) =
4732 error_out(KRB_AP_ERR_NOT_US);
4734 realm :=3D realm_tgt_is_for(tgt);
4736 decode remainder of request;
4738 if (auth_hdr.authenticator.cksum is missing) then
4739 error_out(KRB_AP_ERR_INAPP_CKSUM);
4742 if (auth_hdr.authenticator.cksum type is not supported) then
4743 error_out(KDC_ERR_SUMTYPE_NOSUPP);
4745 if (auth_hdr.authenticator.cksum is not both collision-proof and =
4747 error_out(KRB_AP_ERR_INAPP_CKSUM);
4750 set computed_checksum :=3D checksum(req);
4751 if (computed_checksum !=3D auth_hdr.authenticatory.cksum) then
4752 error_out(KRB_AP_ERR_MODIFIED);
4755 server :=3D lookup(req.sname,realm);
4758 if (is_foreign_tgt_name(req.sname)) then
4759 server :=3D best_intermediate_tgs(req.sname);
4761 /* no server in Database */
4762 error_out(KDC_ERR_S_PRINCIPAL_UNKNOWN);
4766 session :=3D generate_random_session_key();
4768 use_etype :=3D first supported etype in req.etypes;
4770 if (no support for req.etypes) then
4771 error_out(KDC_ERR_ETYPE_NOSUPP);
4774 new_tkt.vno :=3D ticket version; /* =3D 5 */
4775 new_tkt.sname :=3D req.sname;
4776 new_tkt.srealm :=3D realm;
4777 reset all flags in new_tkt.flags;
4779 /* It should be noted that local policy may affect the */
4780 /* processing of any of these flags. For example, some */
4781 /* realms may refuse to issue renewable tickets */
4783 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4785 new_tkt.caddr :=3D tgt.caddr;
4786 resp.caddr :=3D NULL; /* We only include this if they change */
4787 if (req.kdc-options.FORWARDABLE is set) then
4788 if (tgt.flags.FORWARDABLE is reset) then
4789 error_out(KDC_ERR_BADOPTION);
4791 set new_tkt.flags.FORWARDABLE;
4793 if (req.kdc-options.FORWARDED is set) then
4794 if (tgt.flags.FORWARDABLE is reset) then
4795 error_out(KDC_ERR_BADOPTION);
4797 set new_tkt.flags.FORWARDED;
4798 new_tkt.caddr :=3D req.addresses;
4799 resp.caddr :=3D req.addresses;
4801 if (tgt.flags.FORWARDED is set) then
4802 set new_tkt.flags.FORWARDED;
4805 if (req.kdc-options.PROXIABLE is set) then
4806 if (tgt.flags.PROXIABLE is reset)
4807 error_out(KDC_ERR_BADOPTION);
4809 set new_tkt.flags.PROXIABLE;
4811 if (req.kdc-options.PROXY is set) then
4812 if (tgt.flags.PROXIABLE is reset) then
4813 error_out(KDC_ERR_BADOPTION);
4815 set new_tkt.flags.PROXY;
4816 new_tkt.caddr :=3D req.addresses;
4817 resp.caddr :=3D req.addresses;
4820 if (req.kdc-options.ALLOW-POSTDATE is set) then
4821 if (tgt.flags.MAY-POSTDATE is reset)
4822 error_out(KDC_ERR_BADOPTION);
4824 set new_tkt.flags.MAY-POSTDATE;
4826 if (req.kdc-options.POSTDATED is set) then
4827 if (tgt.flags.MAY-POSTDATE is reset) then
4828 error_out(KDC_ERR_BADOPTION);
4830 set new_tkt.flags.POSTDATED;
4831 set new_tkt.flags.INVALID;
4832 if (against_postdate_policy(req.from)) then
4833 error_out(KDC_ERR_POLICY);
4835 new_tkt.starttime :=3D req.from;
4838 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4840 if (req.kdc-options.VALIDATE is set) then
4841 if (tgt.flags.INVALID is reset) then
4842 error_out(KDC_ERR_POLICY);
4844 if (tgt.starttime > kdc_time) then
4845 error_out(KRB_AP_ERR_NYV);
4847 if (check_hot_list(tgt)) then
4848 error_out(KRB_AP_ERR_REPEAT);
4851 reset new_tkt.flags.INVALID;
4854 if (req.kdc-options.(any flag except ENC-TKT-IN-SKEY, RENEW,
4855 and those already processed) is set) then
4856 error_out(KDC_ERR_BADOPTION);
4859 new_tkt.authtime :=3D tgt.authtime;
4861 if (req.kdc-options.RENEW is set) then
4862 /* Note that if the endtime has already passed, the ticket =
4864 /* have been rejected in the initial authentication stage, so =
4866 /* there is no need to check again here =
4868 if (tgt.flags.RENEWABLE is reset) then
4869 error_out(KDC_ERR_BADOPTION);
4871 if (tgt.renew-till < kdc_time) then
4872 error_out(KRB_AP_ERR_TKT_EXPIRED);
4875 new_tkt.starttime :=3D kdc_time;
4876 old_life :=3D tgt.endttime - tgt.starttime;
4877 new_tkt.endtime :=3D min(tgt.renew-till,
4878 new_tkt.starttime + old_life);
4880 new_tkt.starttime :=3D kdc_time;
4881 if (req.till =3D 0) then
4886 new_tkt.endtime :=3D min(till,
4888 new_tkt.starttime+client.max_life,
4890 new_tkt.starttime+server.max_life,
4892 new_tkt.starttime+max_life_for_realm,
4895 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4897 if ((req.kdc-options.RENEWABLE-OK is set) and
4898 (new_tkt.endtime < req.till) and
4899 (tgt.flags.RENEWABLE is set) then
4900 /* we set the RENEWABLE option for later =
4902 set req.kdc-options.RENEWABLE;
4903 req.rtime :=3D min(req.till, tgt.renew-till);
4907 if (req.rtime =3D 0) then
4908 rtime :=3D infinity;
4910 rtime :=3D req.rtime;
4913 if ((req.kdc-options.RENEWABLE is set) and
4914 (tgt.flags.RENEWABLE is set)) then
4915 set new_tkt.flags.RENEWABLE;
4916 new_tkt.renew-till :=3D min(rtime,
4918 new_tkt.starttime+client.max_rlife,
4920 new_tkt.starttime+server.max_rlife,
4922 new_tkt.starttime+max_rlife_for_realm,
4925 new_tkt.renew-till :=3D OMIT; /* leave the renew-till =
4928 if (req.enc-authorization-data is present) then
4929 decrypt req.enc-authorization-data into =
4930 decrypted_authorization_data
4931 using auth_hdr.authenticator.subkey;
4932 if (decrypt_error()) then
4933 error_out(KRB_AP_ERR_BAD_INTEGRITY);
4936 new_tkt.authorization_data :=3D =
4937 req.auth_hdr.ticket.authorization_data +
4938 decrypted_authorization_data;
4940 new_tkt.key :=3D session;
4941 new_tkt.crealm :=3D tgt.crealm;
4942 new_tkt.cname :=3D req.auth_hdr.ticket.cname;
4944 if (realm_tgt_is_for(tgt) :=3D tgt.realm) then
4945 /* tgt issued by local realm */
4946 new_tkt.transited :=3D tgt.transited;
4948 /* was issued for this realm by some other realm */
4949 if (tgt.transited.tr-type not supported) then
4950 error_out(KDC_ERR_TRTYPE_NOSUPP);
4952 new_tkt.transited :=3D compress_transited(tgt.transited =
4956 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
4958 /* Don't check tranited field if TGT for foreign realm,=20
4959 * or requested not to check */
4960 if (is_not_foreign_tgt_name(new_tkt.server)=20
4961 && req.kdc-options.DISABLE-TRANSITED-CHECK not set) =
4963 /* Check it, so end-server does not have to=20
4964 * but don't fail, end-server may still accept =
4966 if (check_transited_field(new_tkt.transited) =
4969 new_tkt.flags.TRANSITED-POLICY-CHECKED;
4974 encode encrypted part of new_tkt into OCTET STRING;
4975 if (req.kdc-options.ENC-TKT-IN-SKEY is set) then
4976 if (server not specified) then
4977 server =3D req.second_ticket.client;
4979 if ((req.second_ticket is not a TGT) or
4980 (req.second_ticket.client !=3D server)) then
4981 error_out(KDC_ERR_POLICY);
4984 new_tkt.enc-part :=3D encrypt OCTET STRING using
4985 using etype_for_key(second-ticket.key), =
4988 new_tkt.enc-part :=3D encrypt OCTET STRING
4989 using etype_for_key(server.key), server.key, =
4994 resp.msg-type :=3D KRB_TGS_REP;
4995 resp.crealm :=3D tgt.crealm;
4996 resp.cname :=3D tgt.cname;
4997 resp.ticket :=3D new_tkt;
4999 resp.key :=3D session;
5000 resp.nonce :=3D req.nonce;
5001 resp.last-req :=3D fetch_last_request_info(client);
5002 resp.flags :=3D new_tkt.flags;
5004 resp.authtime :=3D new_tkt.authtime;
5005 resp.starttime :=3D new_tkt.starttime;
5006 resp.endtime :=3D new_tkt.endtime;
5008 omit resp.key-expiration;
5010 resp.sname :=3D new_tkt.sname;
5011 resp.realm :=3D new_tkt.realm;
5013 if (new_tkt.flags.RENEWABLE) then
5014 resp.renew-till :=3D new_tkt.renew-till;
5017 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5019 encode body of reply into OCTET STRING;
5021 if (req.padata.authenticator.subkey)
5022 resp.enc-part :=3D encrypt OCTET STRING using use_etype,
5023 req.padata.authenticator.subkey;
5024 else resp.enc-part :=3D encrypt OCTET STRING using use_etype, =
5031 A.7. KRB_TGS_REP verification
5033 decode response into resp;
5035 if (resp.msg-type =3D KRB_ERROR) then
5036 process_error(resp);
5040 /* On error, discard the response, and zero the session key from
5041 the response immediately */
5043 if (req.padata.authenticator.subkey)
5044 unencrypted part of resp :=3D decode of decrypt of =
5046 using resp.enc-part.etype and subkey;
5047 else unencrypted part of resp :=3D decode of decrypt of =
5049 using resp.enc-part.etype and tgt's =
5051 if (common_as_rep_tgs_rep_checks fail) then
5056 check authorization_data as necessary;
5057 save_for_later(ticket,session,client,server,times,flags);
5059 A.8. Authenticator generation
5061 body.authenticator-vno :=3D authenticator vno; /* =3D 5 */
5062 body.cname, body.crealm :=3D client name;
5063 if (supplying checksum) then
5064 body.cksum :=3D checksum;
5067 body.ctime, body.cusec :=3D system_time;
5068 if (selecting sub-session key) then
5069 select sub-session key;
5070 body.subkey :=3D sub-session key;
5072 if (using sequence numbers) then
5073 select initial sequence number;
5074 body.seq-number :=3D initial sequence;
5077 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5079 A.9. KRB_AP_REQ generation
5081 obtain ticket and session_key from cache;
5083 packet.pvno :=3D protocol version; /* 5 */
5084 packet.msg-type :=3D message type; /* KRB_AP_REQ */
5086 if (desired(MUTUAL_AUTHENTICATION)) then
5087 set packet.ap-options.MUTUAL-REQUIRED;
5089 reset packet.ap-options.MUTUAL-REQUIRED;
5091 if (using session key for ticket) then
5092 set packet.ap-options.USE-SESSION-KEY;
5094 reset packet.ap-options.USE-SESSION-KEY;
5096 packet.ticket :=3D ticket; /* ticket */
5097 generate authenticator;
5098 encode authenticator into OCTET STRING;
5099 encrypt OCTET STRING into packet.authenticator using =
5102 A.10. KRB_AP_REQ verification
5105 if (packet.pvno !=3D 5) then
5106 either process using other protocol spec
5107 or error_out(KRB_AP_ERR_BADVERSION);
5109 if (packet.msg-type !=3D KRB_AP_REQ) then
5110 error_out(KRB_AP_ERR_MSG_TYPE);
5112 if (packet.ticket.tkt_vno !=3D 5) then
5113 either process using other protocol spec
5114 or error_out(KRB_AP_ERR_BADVERSION);
5116 if (packet.ap_options.USE-SESSION-KEY is set) then
5117 retrieve session key from ticket-granting ticket for
5118 packet.ticket.{sname,srealm,enc-part.etype};
5120 retrieve service key for
5122 packet.ticket.{sname,srealm,enc-part.etype,enc-part.skvno};
5124 if (no_key_available) then
5125 if (cannot_find_specified_skvno) then
5126 error_out(KRB_AP_ERR_BADKEYVER);
5128 error_out(KRB_AP_ERR_NOKEY);
5131 decrypt packet.ticket.enc-part into decr_ticket using retrieved =
5133 if (decryption_error()) then
5134 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5137 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5139 decrypt packet.authenticator into decr_authenticator
5140 using decr_ticket.key;
5141 if (decryption_error()) then
5142 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5144 if (decr_authenticator.{cname,crealm} !=3D
5145 decr_ticket.{cname,crealm}) then
5146 error_out(KRB_AP_ERR_BADMATCH);
5148 if (decr_ticket.caddr is present) then
5149 if (sender_address(packet) is not in decr_ticket.caddr) =
5151 error_out(KRB_AP_ERR_BADADDR);
5153 elseif (application requires addresses) then
5154 error_out(KRB_AP_ERR_BADADDR);
5156 if (not in_clock_skew(decr_authenticator.ctime,
5157 decr_authenticator.cusec)) then
5158 error_out(KRB_AP_ERR_SKEW);
5160 if (repeated(decr_authenticator.{ctime,cusec,cname,crealm})) =
5162 error_out(KRB_AP_ERR_REPEAT);
5164 save_identifier(decr_authenticator.{ctime,cusec,cname,crealm});
5166 if ((decr_ticket.starttime-system_time > CLOCK_SKEW) or
5167 (decr_ticket.flags.INVALID is set)) then
5168 /* it hasn't yet become valid */
5169 error_out(KRB_AP_ERR_TKT_NYV);
5171 if (system_time-decr_ticket.endtime > CLOCK_SKEW) then
5172 error_out(KRB_AP_ERR_TKT_EXPIRED);
5174 if (decr_ticket.transited) then
5175 /* caller may ignore the TRANSITED-POLICY-CHECKED and do
5177 if (decr_ticket.flags.TRANSITED-POLICY-CHECKED not set) then
5178 if (check_transited_field(decr_ticket.transited) then
5179 error_out(KDC_AP_PATH_NOT_ACCPETED);
5183 /* caller must check decr_ticket.flags for any pertinent details =
5185 return(OK, decr_ticket, packet.ap_options.MUTUAL-REQUIRED);
5187 A.11. KRB_AP_REP generation
5189 packet.pvno :=3D protocol version; /* 5 */
5190 packet.msg-type :=3D message type; /* KRB_AP_REP */
5192 body.ctime :=3D packet.ctime;
5193 body.cusec :=3D packet.cusec;
5194 if (selecting sub-session key) then
5195 select sub-session key;
5196 body.subkey :=3D sub-session key;
5199 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5201 if (using sequence numbers) then
5202 select initial sequence number;
5203 body.seq-number :=3D initial sequence;
5206 encode body into OCTET STRING;
5208 select encryption type;
5209 encrypt OCTET STRING into packet.enc-part;
5211 A.12. KRB_AP_REP verification
5214 if (packet.pvno !=3D 5) then
5215 either process using other protocol spec
5216 or error_out(KRB_AP_ERR_BADVERSION);
5218 if (packet.msg-type !=3D KRB_AP_REP) then
5219 error_out(KRB_AP_ERR_MSG_TYPE);
5221 cleartext :=3D decrypt(packet.enc-part) using ticket's session =
5223 if (decryption_error()) then
5224 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5226 if (cleartext.ctime !=3D authenticator.ctime) then
5227 error_out(KRB_AP_ERR_MUT_FAIL);
5229 if (cleartext.cusec !=3D authenticator.cusec) then
5230 error_out(KRB_AP_ERR_MUT_FAIL);
5232 if (cleartext.subkey is present) then
5233 save cleartext.subkey for future use;
5235 if (cleartext.seq-number is present) then
5236 save cleartext.seq-number for future verifications;
5238 return(AUTHENTICATION_SUCCEEDED);
5240 A.13. KRB_SAFE generation
5242 collect user data in buffer;
5244 /* assemble packet: */
5245 packet.pvno :=3D protocol version; /* 5 */
5246 packet.msg-type :=3D message type; /* KRB_SAFE */
5248 body.user-data :=3D buffer; /* DATA */
5249 if (using timestamp) then
5251 body.timestamp, body.usec :=3D system_time;
5253 if (using sequence numbers) then
5254 body.seq-number :=3D sequence number;
5256 body.s-address :=3D sender host addresses;
5257 if (only one recipient) then
5258 body.r-address :=3D recipient host address;
5262 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5264 checksum.cksumtype :=3D checksum type;
5265 compute checksum over body;
5266 checksum.checksum :=3D checksum value; /* checksum.checksum */
5267 packet.cksum :=3D checksum;
5268 packet.safe-body :=3D body;
5270 A.14. KRB_SAFE verification
5273 if (packet.pvno !=3D 5) then
5274 either process using other protocol spec
5275 or error_out(KRB_AP_ERR_BADVERSION);
5277 if (packet.msg-type !=3D KRB_SAFE) then
5278 error_out(KRB_AP_ERR_MSG_TYPE);
5280 if (packet.checksum.cksumtype is not both collision-proof and =
5282 error_out(KRB_AP_ERR_INAPP_CKSUM);
5284 if (safe_priv_common_checks_ok(packet)) then
5285 set computed_checksum :=3D checksum(packet.body);
5286 if (computed_checksum !=3D packet.checksum) then
5287 error_out(KRB_AP_ERR_MODIFIED);
5289 return (packet, PACKET_IS_GENUINE);
5291 return common_checks_error;
5294 A.15. KRB_SAFE and KRB_PRIV common checks
5296 if (packet.s-address !=3D O/S_sender(packet)) then
5297 /* O/S report of sender not who claims to have sent it =
5299 error_out(KRB_AP_ERR_BADADDR);
5301 if ((packet.r-address is present) and
5302 (packet.r-address !=3D local_host_address)) then
5303 /* was not sent to proper place */
5304 error_out(KRB_AP_ERR_BADADDR);
5306 if (((packet.timestamp is present) and
5307 (not in_clock_skew(packet.timestamp,packet.usec))) or
5308 (packet.timestamp is not present and timestamp expected)) =
5310 error_out(KRB_AP_ERR_SKEW);
5312 if (repeated(packet.timestamp,packet.usec,packet.s-address)) =
5314 error_out(KRB_AP_ERR_REPEAT);
5317 if (((packet.seq-number is present) and
5318 ((not in_sequence(packet.seq-number)))) or
5319 (packet.seq-number is not present and sequence expected)) =
5321 error_out(KRB_AP_ERR_BADORDER);
5325 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5327 if (packet.timestamp not present and packet.seq-number not =
5329 error_out(KRB_AP_ERR_MODIFIED);
5332 save_identifier(packet.{timestamp,usec,s-address},
5333 sender_principal(packet));
5335 return PACKET_IS_OK;
5337 A.16. KRB_PRIV generation
5339 collect user data in buffer;
5341 /* assemble packet: */
5342 packet.pvno :=3D protocol version; /* 5 */
5343 packet.msg-type :=3D message type; /* KRB_PRIV */
5345 packet.enc-part.etype :=3D encryption type;
5347 body.user-data :=3D buffer;
5348 if (using timestamp) then
5350 body.timestamp, body.usec :=3D system_time;
5352 if (using sequence numbers) then
5353 body.seq-number :=3D sequence number;
5355 body.s-address :=3D sender host addresses;
5356 if (only one recipient) then
5357 body.r-address :=3D recipient host address;
5360 encode body into OCTET STRING;
5362 select encryption type;
5363 encrypt OCTET STRING into packet.enc-part.cipher;
5365 A.17. KRB_PRIV verification
5368 if (packet.pvno !=3D 5) then
5369 either process using other protocol spec
5370 or error_out(KRB_AP_ERR_BADVERSION);
5372 if (packet.msg-type !=3D KRB_PRIV) then
5373 error_out(KRB_AP_ERR_MSG_TYPE);
5376 cleartext :=3D decrypt(packet.enc-part) using negotiated key;
5377 if (decryption_error()) then
5378 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5381 if (safe_priv_common_checks_ok(cleartext)) then
5382 return(cleartext.DATA, =
5383 PACKET_IS_GENUINE_AND_UNMODIFIED);
5385 return common_checks_error;
5388 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5390 A.18. KRB_CRED generation
5392 invoke KRB_TGS; /* obtain tickets to be provided to peer */
5394 /* assemble packet: */
5395 packet.pvno :=3D protocol version; /* 5 */
5396 packet.msg-type :=3D message type; /* KRB_CRED */
5398 for (tickets[n] in tickets to be forwarded) do
5399 packet.tickets[n] =3D tickets[n].ticket;
5402 packet.enc-part.etype :=3D encryption type;
5404 for (ticket[n] in tickets to be forwarded) do
5405 body.ticket-info[n].key =3D tickets[n].session;
5406 body.ticket-info[n].prealm =3D tickets[n].crealm;
5407 body.ticket-info[n].pname =3D tickets[n].cname;
5408 body.ticket-info[n].flags =3D tickets[n].flags;
5409 body.ticket-info[n].authtime =3D tickets[n].authtime;
5410 body.ticket-info[n].starttime =3D tickets[n].starttime;
5411 body.ticket-info[n].endtime =3D tickets[n].endtime;
5412 body.ticket-info[n].renew-till =3D =
5413 tickets[n].renew-till;
5414 body.ticket-info[n].srealm =3D tickets[n].srealm;
5415 body.ticket-info[n].sname =3D tickets[n].sname;
5416 body.ticket-info[n].caddr =3D tickets[n].caddr;
5420 body.timestamp, body.usec :=3D system_time;
5422 if (using nonce) then
5423 body.nonce :=3D nonce;
5426 if (using s-address) then
5427 body.s-address :=3D sender host addresses;
5429 if (limited recipients) then
5430 body.r-address :=3D recipient host address;
5433 encode body into OCTET STRING;
5435 select encryption type;
5436 encrypt OCTET STRING into packet.enc-part.cipher
5437 using negotiated encryption key;
5439 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5441 A.19. KRB_CRED verification
5444 if (packet.pvno !=3D 5) then
5445 either process using other protocol spec
5446 or error_out(KRB_AP_ERR_BADVERSION);
5448 if (packet.msg-type !=3D KRB_CRED) then
5449 error_out(KRB_AP_ERR_MSG_TYPE);
5452 cleartext :=3D decrypt(packet.enc-part) using negotiated key;
5453 if (decryption_error()) then
5454 error_out(KRB_AP_ERR_BAD_INTEGRITY);
5456 if ((packet.r-address is present or required) and
5457 (packet.s-address !=3D O/S_sender(packet)) then
5458 /* O/S report of sender not who claims to have sent it =
5460 error_out(KRB_AP_ERR_BADADDR);
5462 if ((packet.r-address is present) and
5463 (packet.r-address !=3D local_host_address)) then
5464 /* was not sent to proper place */
5465 error_out(KRB_AP_ERR_BADADDR);
5467 if (not in_clock_skew(packet.timestamp,packet.usec)) then
5468 error_out(KRB_AP_ERR_SKEW);
5470 if (repeated(packet.timestamp,packet.usec,packet.s-address)) =
5472 error_out(KRB_AP_ERR_REPEAT);
5474 if (packet.nonce is required or present) and
5475 (packet.nonce !=3D expected-nonce) then
5476 error_out(KRB_AP_ERR_MODIFIED);
5479 for (ticket[n] in tickets that were forwarded) do
5480 save_for_later(ticket[n],key[n],principal[n],
5481 server[n],times[n],flags[n]);
5484 A.20. KRB_ERROR generation
5486 /* assemble packet: */
5487 packet.pvno :=3D protocol version; /* 5 */
5488 packet.msg-type :=3D message type; /* KRB_ERROR */
5491 packet.stime, packet.susec :=3D system_time;
5492 packet.realm, packet.sname :=3D server name;
5494 if (client time available) then
5495 packet.ctime, packet.cusec :=3D client_time;
5499 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5501 packet.error-code :=3D error code;
5502 if (client name available) then
5503 packet.cname, packet.crealm :=3D client name;
5505 if (error text available) then
5506 packet.e-text :=3D error text;
5508 if (error data available) then
5509 packet.e-data :=3D error data;
5512 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5514 B. Definition of common authorization data elements
5516 This appendix contains the definitions of common authorization data
5517 elements. These common authorization data elements are recursivly defined,
5518 meaning the ad-data for these types will itself contain a sequence of
5519 authorization data whose interpretation is affected by the encapsulating
5520 element. Depending on the meaning of the encapsulating element, the
5521 encapsulated elements may be ignored, might be interpreted as issued
5522 directly by the KDC, or they might be stored in a separate plaintext part of
5523 the ticket. The types of the encapsulating elements are specified as part of
5524 the Kerberos specification because the behavior based on these values should
5525 be understood across implementations whereas other elements need only be
5526 understood by the applications which they affect.
5528 In the definitions that follow, the value of the ad-type for the element
5529 will be specified in the subsection number, and the value of the ad-data
5530 will be as shown in the ASN.1 structure that follows the subsection heading.
5534 AD-IF-RELEVANT AuthorizationData
5536 AD elements encapsulated within the if-relevant element are intended for
5537 interpretation only by application servers that understand the particular
5538 ad-type of the embedded element. Application servers that do not understand
5539 the type of an element embedded within the if-relevant element may ignore
5540 the uninterpretable element. This element promotes interoperability across
5541 implementations which may have local extensions for authorization.
5543 B.2. Intended for server
5545 AD-INTENDED-FOR-SERVER SEQUENCE {
5546 intended-server[0] SEQUENCE OF PrincipalName
5547 elements[1] AuthorizationData
5550 AD elements encapsulated within the intended-for-server element may be
5551 ignored if the application server is not in the list of principal names of
5552 intended servers. Further, a KDC issuing a ticket for an application server
5553 can remove this element if the application server is not in the list of
5556 Application servers should check for their principal name in the
5557 intended-server field of this element. If their principal name is not found,
5558 this element should be ignored. If found, then the encapsulated elements
5559 should be evaluated in the same manner as if they were present in the top
5560 level authorization data field. Applications and application servers that do
5561 not implement this element should reject tickets that contain authorization
5562 data elements of this type.
5564 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5566 B.3. Intended for application class
5568 AD-INTENDED-FOR-APPLICATION-CLASS SEQUENCE { intended-application-class[0]
5569 SEQUENCE OF GeneralString elements[1] AuthorizationData } AD elements
5570 encapsulated within the intended-for-application-class element may be
5571 ignored if the application server is not in one of the named classes of
5572 application servers. Examples of application server classes include
5573 "FILESYSTEM", and other kinds of servers.=20
5575 This element and the elements it encapulates may be safely ignored by
5576 applications, application servers, and KDCs that do not implement this
5581 AD-KDCIssued SEQUENCE {
5582 ad-checksum[0] Checksum,
5583 i-realm[1] Realm OPTIONAL,
5584 i-sname[2] PrincipalName OPTIONAL,
5585 elements[3] AuthorizationData.
5589 A checksum over the elements field using a cryptographic checksum
5590 method that is identical to the checksum used to protect the ticket
5591 itself (i.e. using the same hash function and the same encryption
5592 algorithm used to encrypt the ticket) and using a key derived from the
5593 same key used to protect the ticket.
5595 The name of the issuing principal if different from the KDC itself.
5596 This field would be used when the KDC can verify the authenticity of
5597 elements signed by the issuing principal and it allows this KDC to
5598 notify the application server of the validity of those elements.
5600 A sequence of authorization data elements issued by the KDC.
5602 The KDC-issued ad-data field is intended to provide a means for Kerberos
5603 principal credentials to embed within themselves privilege attributes and
5604 other mechanisms for positive authorization, amplifying the priveleges of
5605 the principal beyond what can be done using a credentials without such an
5608 This can not be provided without this element because the definition of the
5609 authorization-data field allows elements to be added at will by the bearer
5610 of a TGT at the time that they request service tickets and elements may also
5611 be added to a delegated ticket by inclusion in the authenticator.
5613 For KDC-issued elements this is prevented because the elements are signed by
5614 the KDC by including a checksum encrypted using the server's key (the same
5615 key used to encrypt the ticket - or a key derived from that key). Elements
5616 encapsulated with in the KDC-issued element will be ignored by the
5617 application server if this "signature" is not present. Further, elements
5618 encapsulated within this element from a ticket granting ticket may be
5619 interpreted by the KDC, and used as a basis according to policy for
5620 including new signed elements within derivative tickets, but they will not
5621 be copied to a derivative ticket directly. If they are copied directly to a
5622 derivative ticket by a KDC that is not aware of this element, the signature
5623 will not be correct for the application ticket elements, and the field will
5624 be ignored by the application server.
5626 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5628 This element and the elements it encapulates may be safely ignored by
5629 applications, application servers, and KDCs that do not implement this
5634 AD-AND-OR SEQUENCE {
5635 condition-count[0] INTEGER,
5636 elements[1] AuthorizationData
5639 When restrictive AD elements encapsulated within the and-or element are
5640 encountered, only the number specified in condition-count of the
5641 encapsulated conditions must be met in order to satisfy this element. This
5642 element may be used to implement an "or" operation by setting the
5643 condition-count field to 1, and it may specify an "and" operation by setting
5644 the condition count to the number of embedded elements. Application servers
5645 that do not implement this element must reject tickets that contain
5646 authorization data elements of this type.
5648 B.6. Mandatory ticket extensions
5650 AD-Mandatory-Ticket-Extensions SEQUENCE {
5652 te-checksum[0] Checksum
5655 An authorization data element of type mandatory-ticket-extensions specifies
5656 the type and a collision-proof checksum using the same hash algorithm used
5657 to protect the integrity of the ticket itself. This checksum will be
5658 calculated over an individual extension field of the type indicated. If
5659 there are more than one extension, multiple Mandatory-Ticket-Extensions
5660 authorization data elements may be present, each with a checksum for a
5661 different extension field. This restriction indicates that the ticket should
5662 not be accepted if a ticket extension is not present in the ticket for which
5663 the type and checksum do not match that checksum specified in the
5664 authorization data element. Note that although the type is redundant for the
5665 purposes of the comparison, it makes the comparison easier when multiple
5666 extensions are present. Application servers that do not implement this
5667 element must reject tickets that contain authorization data elements of this
5670 B.7. Authorization Data in ticket extensions
5672 AD-IN-Ticket-Extensions Checksum
5674 An authorization data element of type in-ticket-extensions specifies a
5675 collision-proof checksum using the same hash algorithm used to protect the
5676 integrity of the ticket itself. This checksum is calculated over a separate
5677 external AuthorizationData field carried in the ticket extensions.
5678 Application servers that do not implement this element must reject tickets
5679 that contain authorization data elements of this type. Application servers
5680 that do implement this element will search the ticket extensions for
5681 authorization data fields, calculate the specified checksum over each
5682 authorization data field and look for one matching the checksum in this
5683 in-ticket-extensions element. If not found, then the ticket must be
5684 rejected. If found, the corresponding authorization data elements will be
5685 interpreted in the same manner as if they were contained in the top level
5686 authorization data field.
5688 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5690 Note that if multiple external authorization data fields are present in a
5691 ticket, each will have a corresponding element of type in-ticket-extensions
5692 in the top level authorization data field, and the external entries will be
5693 linked to the corresponding element by their checksums.
5695 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5697 C. Definition of common ticket extensions
5699 This appendix contains the definitions of common ticket extensions. Support
5700 for these extensions is optional. However, certain extensions have
5701 associated authorization data elements that may require rejection of a
5702 ticket containing an extension by application servers that do not implement
5703 the particular extension. Other extensions have been defined beyond those
5704 described in this specification. Such extensions are described elswhere and
5705 for some of those extensions the reserved number may be found in the list of
5708 It is known that older versions of Kerberos did not support this field, and
5709 that some clients will strip this field from a ticket when they parse and
5710 then reassemble a ticket as it is passed to the application servers. The
5711 presence of the extension will not break such clients, but any functionaly
5712 dependent on the extensions will not work when such tickets are handled by
5713 old clients. In such situations, some implementation may use alternate
5714 methods to transmit the information in the extensions field.
5716 C.1. Null ticket extension
5718 TE-NullExtension OctetString -- The empty Octet String
5720 The te-data field in the null ticket extension is an octet string of lenght
5721 zero. This extension may be included in a ticket granting ticket so that the
5722 KDC can determine on presentation of the ticket granting ticket whether the
5723 client software will strip the extensions field. =20
5725 C.2. External Authorization Data
5727 TE-ExternalAuthorizationData AuthorizationData
5729 The te-data field in the external authorization data ticket extension is
5730 field of type AuthorizationData containing one or more authorization data
5731 elements. If present, a corresponding authorization data element will be
5732 present in the primary authorization data for the ticket and that element
5733 will contain a checksum of the external authorization data ticket extension.
5735 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5737 D. Significant changes since RFC 1510
5741 Section 1: The preamble and introduction does not define the protocol,
5742 mention is made in the introduction regarding the ability to rely on the KDC
5743 to check the transited field, and on the inclusion of a flag in a ticket
5744 indicating that this check has occurred. This is a new capability not
5745 present in RFC1510. Pre-existing implementation may ignore or not set this
5746 flag without negative security implications.
5748 The definition of the secret key says that in the case of a user the key may
5749 be derived from a password. In 1510, it said that the key was derived from
5750 the password. This change was made to accommodate situations where the user
5751 key might be stored on a smart-card, or otherwise obtained independent of a
5754 The introduction also mentions the use of public key for initial
5755 authentication in Kerberos by reference. RFC1510 did not include such a
5758 Section 1.2 was added to explain that while Kerberos provides authentication
5759 of a named principal, it is still the responsibility of the application to
5760 ensure that the authenticated name is the entity with which the application
5761 wishes to communicate. Because section 1.2 is completely new, I am
5762 particularly interested in suggestions to improve the wording of this
5763 section. Sections 1.2-4 were renumbered.
5765 Section 2: No changes were made to existing options and flags specified in
5766 RFC1510, though some of the sections in the specification were renumbered,
5767 and text was revised to make the description and intent of existing options
5768 clearer, especially with respect to the ENC-TKT-IN-SKEY option (now section
5769 2.9.3) which is used for user-to-user authentication. New options and ticket
5770 flags added since RFC1510 include transited policy checking (section 2.7),
5771 anonymous tickets (section 2.8) and name canonicalization (section 2.9.1).
5773 Section 3: Added mention of the optional checksum field in the KRB-ERROR
5774 message. Added mention of name canonicalization and anonymous tickets in
5775 exposition on KDC options. Mention of the name canonicalization case is
5776 included in the description of the KDC reply (3.1.3). A warning regarding
5777 generation of session keys for application use was added, urging the
5778 inclusion of key entropy from the KDC generated session key in the ticket.
5779 An example regarding use of the subsession key was added to section 3.2.6.
5780 Descriptions of the pa-etype-info, and pa-pw-salt preauthentication data
5783 Changes to section 4: Added language about who has access to the keys in the
5784 Kerberos database. Also made it clear that KDC's may obtain the information
5785 from some database field through other means - for example, one form of
5786 pkinit may extract some of these fields from a certificate.
5788 Regarding the discussion on the list regarding the use of tamper resistant
5789 hardware to store keys, I was not able to determine specific suggested
5790 changes to the text in the RFC regarding this. Much of this discussion
5791 centers around particular implementations. I did however loosen the wording
5792 about the database so as not to preclude keys that can not be extracted in
5793 the clear from such hardware.
5795 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5797 Section 5: A statement regarding the carrying of unrecognized additional
5798 fields in ASN.1 encoding through in tickets was added (still waiting on some
5799 better text regarding this).
5801 Ticket flags and KDC options were added to support the new functions
5802 described elsewhere in this document. The encoding of the options flags are
5803 now described to be no less than 32 bits, and the smallest number of bits
5804 beyond 32 needed to encode any set bits. It also describes the encoding of
5805 the bitstring as using "unnamed" bits.
5807 An optional ticket extensions field was added to support the carrying of
5808 auxiliary data that allows the passing of auxiliary that is to accompany a
5809 ticket to the verifier.
5811 (I would like to drop the part about optionally appending it of the opaque
5812 part of the ciphertext. We are still waiting on some text regarding how to
5813 assure backward compatibility).
5815 (Still pending, Tom Yu's request to change the application codes on KDC
5816 message to indicate which minor rev of the protocol - I think this might
5817 break things, but am not sure).
5819 Definition of the PA-USE-SPECIFIED-KVNO preauthentication data field was
5822 The optional e-cksum field was added to the KRB-ERROR message and the e-data
5823 filed was generalized for use in other than the KDC_ERR_PREAUTH_REQUIRED
5824 error. The TypedData structure was defined. Type tags for TypedData are
5825 defined in the same sequence as the PA-DATA type space to avoid confusion
5826 with the use of the PA-DATA namespace previously used for the e-data field
5827 for the KDC_ERR_PREAUTH_REQUIRED error.
5829 Section 7: Words were added describing the convention that domain based
5830 realm names for newly created realms should be specified as upper case. This
5831 recommendation does not make lower case realm names illegal. Words were
5832 added highlighting that the slash separated components in the X500 style of
5833 realm names is consistent with existing RFC1510 based implementations, but
5834 that it conflicts with the general recommendation of X.500 name
5835 representation specified in RFC2253.
5837 There were suggestions on the list regarding extensions to or new name
5838 types. These require discussion at the IETF meeting. My own feeling at this
5839 point is that in the absence of a strong consensus for for adding new types
5840 at this time, I would rather not add new name types in the current draft,
5841 but leave things open for additions later.
5843 Section 8: Since RFC1510, the definition of the TCP transport for Kerberos
5846 Section 9: Requirements for supporting DES3-CBC-SHA1-KD encryption and
5847 HMAC-SHA1-DES3-KD checksums were added.
5849 I would like to make support for Rijndael mandatory and for us to have a
5850 SINGLE standard for use of Rijndale in these revisions.
5853 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5855 ------------------------------------------------------------------------
5859 Section 8: Regarding the suggestion of weakening the requirement for use of
5860 port 88 for cases where the port can be looked up elsewhere - I did not
5861 incorporate this suggestion because cross realm authentication requires the
5862 ability to contact the appropriate KDC, and unless ALL implementations of
5863 Kerberos include support for finding such alternate port numbers, use of
5864 such KDC's would be non-interoperable.
5866 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5868 ------------------------------------------------------------------------
5869 [TM] Project Athena, Athena, and Kerberos are trademarks of the
5870 Massachusetts Institute of Technology (MIT). No commercial use of these
5871 trademarks may be made without prior written permission of MIT.
5873 [1.1] Note, however, that many applications use Kerberos' functions only
5874 upon the initiation of a stream-based network connection. Unless an
5875 application subsequently provides integrity protection for the data stream,
5876 the identity verification applies only to the initiation of the connection,
5877 and does not guarantee that subsequent messages on the connection originate
5878 from the same principal.
5880 [1.2] Secret and private are often used interchangeably in the literature.
5881 In our usage, it takes two (or more) to share a secret, thus a shared DES
5882 key is a secret key. Something is only private when no one but its owner
5883 knows it. Thus, in public key cryptosystems, one has a public and a private
5886 [1.3] Of course, with appropriate permission the client could arrange
5887 registration of a separately-named prin- cipal in a remote realm, and engage
5888 in normal exchanges with that realm's services. However, for even small
5889 numbers of clients this becomes cumbersome, and more automatic methods as
5890 described here are necessary.
5892 [2.1] Though it is permissible to request or issue tick- ets with no network
5893 addresses specified.
5895 [2.2] It is important that the KDC be sent the name as typed by the user,
5896 and not only the canonical form of the name. If the domain name system was
5897 used to find the canonical name on the client side, the mapping is
5898 vulnerable. [3.1] The password-changing request must not be honored unless
5899 the requester can provide the old password (the user's current secret key).
5900 Otherwise, it would be possible for someone to walk up to an unattended
5901 session and change another user's password.
5903 [3.2] To authenticate a user logging on to a local system, the credentials
5904 obtained in the AS exchange may first be used in a TGS exchange to obtain
5905 credentials for a local server. Those credentials must then be verified by a
5906 local server through successful completion of the Client/Server exchange.
5908 [3.3] "Random" means that, among other things, it should be impossible to
5909 guess the next session key based on knowledge of past session keys. This can
5910 only be achieved in a pseudo-random number generator if it is based on
5911 cryptographic principles. It is more desirable to use a truly random number
5912 generator, such as one based on measurements of random physical phenomena.
5914 [3.4] Tickets contain both an encrypted and unencrypted portion, so
5915 cleartext here refers to the entire unit, which can be copied from one
5916 message and replayed in another without any cryptographic skill.
5918 [3.5] Note that this can make applications based on unreliable transports
5919 difficult to code correctly. If the transport might deliver duplicated
5920 messages, either a new authenticator must be generated for each retry, or
5921 the application server must match requests and replies and replay the first
5922 reply in response to a detected duplicate.
5924 draft-ietf-cat-kerberos-revisions-07 Expires 24 May 2001
\f
5926 [3.6] This allows easy implementation of user-to-user authentication [8],
5927 which uses ticket-granting ticket session keys in lieu of secret server keys
5928 in situations where such secret keys could be easily compromised.
5930 [3.7]Note also that the rejection here is restricted to authenticators from
5931 the same principal to the same server. Other client principals communicating
5932 with the same server principal should not be have their authenticators
5933 rejected if the time and microsecond fields happen to match some other
5934 client's authenticator.
5936 [3.8] If this is not done, an attacker could subvert the authentication by
5937 recording the ticket and authenticator sent over the network to a server and
5938 replaying them following an event that caused the server to lose track of
5939 recently seen authenticators.
5941 [3.9] In the Kerberos version 4 protocol, the timestamp in the reply was the
5942 client's timestamp plus one. This is not necessary in version 5 because
5943 version 5 messages are formatted in such a way that it is not possible to
5944 create the reply by judicious message surgery (even in encrypted form)
5945 without knowledge of the appropriate encryption keys.
5947 [3.10] Note that for encrypting the KRB_AP_REP message, the sub-session key
5948 is not used, even if present in the Authenticator.
5950 [3.11] Implementations of the protocol may wish to provide routines to
5951 choose subkeys based on session keys and random numbers and to generate a
5952 negotiated key to be returned in the KRB_AP_REP message.
5954 [3.12]This can be accomplished in several ways. It might be known beforehand
5955 (since the realm is part of the principal identifier), it might be stored in
5956 a nameserver, or it might be obtained from a configuration file. If the
5957 realm to be used is obtained from a nameserver, there is a danger of being
5958 spoofed if the nameservice providing the realm name is not authenticated.
5959 This might result in the use of a realm which has been compromised, and
5960 would result in an attacker's ability to compromise the authentication of
5961 the application server to the client.
5963 [3.13] If the client selects a sub-session key, care must be taken to ensure
5964 the randomness of the selected sub-session key. One approach would be to
5965 generate a random number and XOR it with the session key from the
5966 ticket-granting ticket.
5968 [4.1] The implementation of the Kerberos server need not combine the
5969 database and the server on the same machine; it is feasible to store the
5970 principal database in, say, a network name service, as long as the entries
5971 stored therein are protected from disclosure to and modification by
5972 unauthorized parties. However, we recommend against such strategies, as they
5973 can make system management and threat analysis quite complex.
5975 [4.2] See the discussion of the padata field in section 5.4.2 for details on
5976 why this can be useful.