view Side-By-Side changes
INTERNET-DRAFT JohnNetwork Working Group J. KohlB. CliffordRequest for Comments: 1510 Digital Equipment Corporation C. Neuman21 AprilISI September 1993 The Kerberos Network Authentication Service (V5)STATUS OF THIS MEMOStatus of this Memo Thisdocument isRFC specifies an InternetDraft. Internet Drafts are working documents ofstandards track protocol for the InternetEngineering Task Force (IETF), its Areas,community, andits Working Groups. Note that other groups may also distribute working documents as Internet Drafts. Internet Drafts are draft documents validrequests discussion and suggestions fora maximum of six months. Internet Drafts may be updated, replaced, or obsoleted by other documents at any time. It is not appropriate to use Internet Drafts as reference material or to cite them other than as a "working draft" or "work in progress."improvements. Pleasecheck the I-D abstract listing contained in each Internet Draft directoryrefer tolearnthe current edition of the "Internet Official Protocol Standards" for the standardization state and status of thisor any other Internet Draft.protocol. Distribution of this memo is unlimited.Please send comments to "krb-protocol@MIT.EDU." ABSTRACTAbstract This document gives an overview and specification of Version 5 of the protocol for the Kerberos networkauthenti- cationauthentication system. Version 4, described elsewhere [1,2], is presently in production use at MIT's Project Athena, and at other Internet sites.OVERVIEWOverview Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, and Zephyr are trademarks of the Massachusetts Institute of Technology (MIT). No commercial use of these trademarks may be made without prior written permission of MIT. ThisINTERNET-DRAFTRFC describes the concepts and model upon which the Kerberos network authentication system is based. It also specifies Version 5 of the Kerberosproto- col.protocol. The motivations, goals, assumptions, and rationale behind most design decisions are treated cursorily; forVer- sionVersion 4 they are fully described in the Kerberos portion of__________________________ Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira, and Zephyr are trademarks of the Mas- sachusetts Institute of Technology (MIT). No commer- cial use of these trademarks may be made without prior written permission of MIT. Overview - 1 - Expires 15 October 1993 Version 5 - Revision 5.2the Athena Technical Plan [1]. The protocols are under review, and are not being submitted for consideration as an Internet standard at this time. Comments are encouraged. Requests for addition to an electronic mailing list fordis- cussiondiscussion of Kerberos, kerberos@MIT.EDU, may be addressed to kerberos-request@MIT.EDU. This mailing list is gatewayed onto the Usenet as the group comp.protocols.kerberos. Requests for further information, including documents and code availability, may be sent to info-kerberos@MIT.EDU.BACKGROUNDKohl & Neuman [Page 1] RFC 1510 Kerberos September 1993 Background The Kerberos model is based in part on Needham and Schroeder's trusted third-party authentication protocol [3] and on modifications suggested by Denning and Sacco [4]. The original design and implementation of Kerberos Versions 1 through 4 was the work of two former Project Athena staff members, Steve Miller of Digital Equipment Corporation and Clifford Neuman (now at the Information Sciences Institute of the University of Southern California), along with Jerome Saltzer, Technical Director of Project Athena, and Jeffrey Schiller, MIT Campus Network Manager. Many other members of Project Athena have also contributed to the work onKer- beros.Kerberos. Version 4 is publicly available, and has seen wide use across the Internet. Version 5 (described in this document) has evolved from Version 4 based on new requirements and desires for features not available in Version 4. Details on the differences between Kerberos Versions 4 and 5 can be found in [5]. Table of Contents 1. IntroductionKerberos provides a means of verifying the identities of principals, (e.g. a workstation user or a network server) on an open (unprotected) network. This is accomplished without relying on authentication by the host operating sys- tem, without basing trust on host addresses, without requir- ing physical security....................................... 5 1.1. Cross-Realm Operation ............................ 7 1.2. Environmental assumptions ........................ 8 1.3. Glossary ofall the hosts on the network,terms ................................ 9 2. Ticket flag uses andunder the assumption that packets traveling along the net- work can be read, modified,requests ...................... 12 2.1. Initial andinserted at will[1]. Ker- beros performs authentication under these conditions as a trusted third-party authentication service by using conven- tional (shared secret key[2]) cryptography. __________________________ [1] Note, however, that many applications use Kerberos' functions only upon the initiationpre-authenticated tickets ............ 12 2.2. Invalid tickets .................................. 12 2.3. Renewable tickets ................................ 12 2.4. Postdated tickets ................................ 13 2.5. Proxiable and proxy tickets ...................... 14 2.6. Forwardable tickets .............................. 15 2.7. Other KDC options ................................ 15 3. Message Exchanges .................................. 16 3.1. The Authentication Service Exchange .............. 16 3.1.1. Generation of KRB_AS_REQ message ............... 17 3.1.2. Receipt of KRB_AS_REQ message .................. 17 3.1.3. Generation of KRB_AS_REP message ............... 17 3.1.4. Generation of KRB_ERROR message ................ 19 3.1.5. Receipt of KRB_AS_REP message .................. 19 3.1.6. Receipt of KRB_ERROR message ................... 20 3.2. The Client/Server Authentication Exchange ........ 20 3.2.1. The KRB_AP_REQ message ......................... 20 3.2.2. Generation of astream-based network connection, and assume the absenceKRB_AP_REQ message ............. 20 3.2.3. Receipt of KRB_AP_REQ message .................. 21 3.2.4. Generation ofany ``hi- jackers'' who might subvert suchaconnection. Such use implicitly trusts the host addresses involved. [2] Secret and private are often used interchangeably inKRB_AP_REP message ............. 23 3.2.5. Receipt of KRB_AP_REP message .................. 23 Kohl & Neuman [Page 2] RFC 1510 Kerberos September 1993 3.2.6. Using theliterature. In our usage, it takes two (or more) to share a secret, thus a shared DESencryption keyis a secret key. Something is only private when no one but Section 1. - 2 - Expires 15 October 1993 Version 5 - Revision 5.2 The authentication process proceeds as follows: A client sends a request to the authentication server (AS) requesting "credentials" for a given server........................ 24 3.3. TheAS responds with these credentials, encrypted inTicket-Granting Service (TGS) Exchange ....... 24 3.3.1. Generation of KRB_TGS_REQ message .............. 25 3.3.2. Receipt of KRB_TGS_REQ message ................. 26 3.3.3. Generation of KRB_TGS_REP message .............. 27 3.3.3.1. Encoding theclient's key.transited field ................. 29 3.3.4. Receipt of KRB_TGS_REP message ................. 31 3.4. Thecredentials consistKRB_SAFE Exchange ............................ 31 3.4.1. Generation of1) a "ticket" for the server and 2)atemporary encryption key (often calledKRB_SAFE message ............... 31 3.4.2. Receipt of KRB_SAFE message .................... 32 3.5. The KRB_PRIV Exchange ............................ 33 3.5.1. Generation of a"session key").KRB_PRIV message ............... 33 3.5.2. Receipt of KRB_PRIV message .................... 33 3.6. Theclient transmits the ticket (which con- tains the client's identity andKRB_CRED Exchange ............................ 34 3.6.1. Generation of acopyKRB_CRED message ............... 34 3.6.2. Receipt ofthe session key, all encrypted in the server's key) to the server.KRB_CRED message .................... 34 4. Theses- sion key (now shared by the clientKerberos Database .............................. 35 4.1. Database contents ................................ 35 4.2. Additional fields ................................ 36 4.3. Frequently Changing Fields ....................... 37 4.4. Site Constants ................................... 37 5. Message Specifications ............................. 38 5.1. ASN.1 Distinguished Encoding Representation ...... 38 5.2. ASN.1 Base Definitions ........................... 38 5.3. Tickets andserver) is used to authenticateAuthenticators ....................... 42 5.3.1. Tickets ........................................ 42 5.3.2. Authenticators ................................. 47 5.4. Specifications for theclient,AS andmay optionally be used to authenticate the server. It may also be used to encrypt further communication between the two parties or to exchange a separate sub-session key to be used to encrypt further communication. The implementation consists of one or more authentica- tion servers running on physically secure hosts. The authentication servers maintain a database of principals (i.e., users and servers) and their secret keys. Code libraries provide encryptionTGS exchanges ...... 49 5.4.1. KRB_KDC_REQ definition ......................... 49 5.4.2. KRB_KDC_REP definition ......................... 56 5.5. Client/Server (CS) message specifications ........ 58 5.5.1. KRB_AP_REQ definition .......................... 58 5.5.2. KRB_AP_REP definition .......................... 60 5.5.3. Error message reply ............................ 61 5.6. KRB_SAFE message specification ................... 61 5.6.1. KRB_SAFE definition ............................ 61 5.7. KRB_PRIV message specification ................... 62 5.7.1. KRB_PRIV definition ............................ 62 5.8. KRB_CRED message specification ................... 63 5.8.1. KRB_CRED definition ............................ 63 5.9. Error message specification ...................... 65 5.9.1. KRB_ERROR definition ........................... 66 6. Encryption andimplement the Kerberos pro- tocol. In order to add authentication to its transactions,Checksum Specifications ............. 67 6.1. Encryption Specifications ........................ 68 6.2. Encryption Keys .................................. 71 6.3. Encryption Systems ............................... 71 6.3.1. The NULL Encryption System (null) .............. 71 6.3.2. DES in CBC mode with atypical network application adds one or two calls to theCRC-32 checksum (descbc-crc)71 Kohl & Neuman [Page 3] RFC 1510 Kerberoslibrary, which resultsSeptember 1993 6.3.3. DES inthe transmission of the necessary messages to achieve authentication.CBC mode with an MD4 checksum (descbc-md4) 72 6.3.4. DES in CBC mode with an MD5 checksum (descbc-md5) 72 6.4. Checksums ........................................ 74 6.4.1. TheKerberos protocol consists of several sub-protocols (or exchanges). There are two methods by which a client can ask a Kerberos server for credentials. In the first approach, the client sends a cleartext request for a ticket for the desired server to the AS. The reply is sent encrypted in the client's secret key. Usually this request is for a ticket-granting ticket (TGT) which can later be used with the ticket-granting server (TGS). In the second method, the client sends a request to the TGS.CRC-32 Checksum (crc32) .................... 74 6.4.2. Theclient sends the TGT to the TGS in the same manner as if it were contacting any other application server which requires Ker- beros credentials.RSA MD4 Checksum (rsa-md4) ................. 75 6.4.3. RSA MD4 Cryptographic Checksum Using DES (rsa-md4-des) ......................................... 75 6.4.4. Thereply is encrypted in the session key from the TGT. Once obtained, credentials may be used to verify the identityRSA MD5 Checksum (rsa-md5) ................. 76 6.4.5. RSA MD5 Cryptographic Checksum Using DES (rsa-md5-des) ......................................... 76 6.4.6. DES cipher-block chained checksum (des-mac) 6.4.7. RSA MD4 Cryptographic Checksum Using DES alternative (rsa-md4-des-k) ........................... 77 6.4.8. DES cipher-block chained checksum alternative (des-mac-k) ........................................... 77 7. Naming Constraints ................................. 78 7.1. Realm Names ...................................... 77 7.2. Principal Names .................................. 79 7.2.1. Name oftheserver principalsin a transaction, to ensure the integrity of...................... 80 8. Constants and other defined values ................. 80 8.1. Host address types ............................... 80 8.2. KDC messagesexchanged between them, or to preserve privacy..................................... 81 8.2.1. IP transport ................................... 81 8.2.2. OSI transport .................................. 82 8.2.3. Name of themessages. The application is free to choose whatever protection may be necessary. To verifyTGS ................................ 82 8.3. Protocol constants and associated values ......... 82 9. Interoperability requirements ...................... 86 9.1. Specification 1 .................................. 86 9.2. Recommended KDC values ........................... 88 10. Acknowledgments ................................... 88 11. References ........................................ 89 12. Security Considerations ........................... 90 13. Authors' Addresses ................................ 90 A. Pseudo-code for protocol processing ................ 91 A.1. KRB_AS_REQ generation ............................ 91 A.2. KRB_AS_REQ verification and KRB_AS_REP generation 92 A.3. KRB_AS_REP verification .......................... 95 A.4. KRB_AS_REP and KRB_TGS_REP common checks ......... 96 A.5. KRB_TGS_REQ generation ........................... 97 A.6. KRB_TGS_REQ verification and KRB_TGS_REP generation 98 A.7. KRB_TGS_REP verification ......................... 104 A.8. Authenticator generation ......................... 104 A.9. KRB_AP_REQ generation ............................ 105 A.10. KRB_AP_REQ verification ......................... 105 A.11. KRB_AP_REP generation ........................... 106 A.12. KRB_AP_REP verification ......................... 107 A.13. KRB_SAFE generation ............................. 107 A.14. KRB_SAFE verification ........................... 108 Kohl & Neuman [Page 4] RFC 1510 Kerberos September 1993 A.15. KRB_SAFE and KRB_PRIV common checks ............. 108 A.16. KRB_PRIV generation ............................. 109 A.17. KRB_PRIV verification ........................... 110 A.18. KRB_CRED generation ............................. 110 A.19. KRB_CRED verification ........................... 111 A.20. KRB_ERROR generation ............................ 112 1. Introduction Kerberos provides a means of verifying the identities ofthe principals inprincipals, (e.g., a workstation user or atran- saction,network server) on an open (unprotected) network. This is accomplished without relying on authentication by theclient transmitshost operating system, without basing trust on host addresses, without requiring physical security of all theticket tohosts on theserver. Sincenetwork, and under theticket is sent "inassumption that packets traveling along theclear" (parts of it are encrypted, but this encryption doesn't thwart replay)network can be read, modified, and__________________________ its owner knows it. Thus, in public key cryptosystems, one has a publicinserted at will. (Note, however, that many applications use Kerberos' functions only upon the initiation of a stream-based network connection, and assume the absence of any "hijackers" who might subvert such aprivateconnection. Such use implicitly trusts the host addresses involved.) Kerberos performs authentication under these conditions as a trusted third- party authentication service by using conventional cryptography, i.e., shared secret key.Section 1. - 3 - Expires 15 October 1993 Version 5(shared secret key -Revision 5.2 might be interceptedSecret andreused by an attacker, additional information is sent to prove that the message was originated byprivate are often used interchangeably in theprincipalliterature. In our usage, it takes two (or more) towhom the ticket was issued. This infor- mation (called the authenticator)share a secret, thus a shared DES key is a secret key. Something is only private when no one but its owner knows it. Thus, in public key cryptosystems, one has a public and a private key.) The authentication process proceeds as follows: A client sends a request to the authentication server (AS) requesting "credentials" for a given server. The AS responds with these credentials, encrypted in theses- sion key,client's key. The credentials consist of 1) a "ticket" for the server andincludes2) atimestamp.temporary encryption key (often called a "session key"). Thetimestamp proves thatclient transmits themessage was recently generatedticket (which contains the client's identity andis notareplay. Encryptingcopy of theauthenticatorsession key, all encrypted in the server's key) to the server. The session keyproves that it was generated(now shared bya party possessingthesession key. Since no one except the requesting principalclient and server) is used to authenticate theserver know the session key (it is never sent over the network in the clear) this guarantees the identity of the client. The integrity ofclient, and may optionally be used to authenticate themessages exchanged between princi- pals canserver. It may also beguaranteed usingused to encrypt further communication between thesessiontwo parties or to exchange a separate sub-session key(passed in the ticket and contained in the credentials). This approach provides detectionto be used to encrypt further communication. The implementation consists ofboth replay attacksone or more authentication servers running on physically secure hosts. The authentication servers maintain a database of principals (i.e., users andmessage stream modification attacks. It is accomplished by generatingservers) andtransmitting a collision-proof checksum (elsewhere calledtheir secret keys. Code libraries provide encryption and implement the Kerberos protocol. In order to add authentication to its Kohl & Neuman [Page 5] RFC 1510 Kerberos September 1993 transactions, ahashtypical network application adds one ordigest function) oftwo calls to theclient's message, keyed withKerberos library, which results in thesession key. Privacy and integritytransmission of the necessary messagesexchanged between principals can be secured by encrypting the datatobe passed using the session key passed in the ticket, and contained in the credentials.achieve authentication. Theauthentication exchanges mentioned above require read-only access to theKerberosdatabase. Sometimes, how- ever, the entries in the database must be modified, such as when adding new principals or changing a principal's key. This is done using aprotocolbetweenconsists of several sub-protocols (or exchanges). There are two methods by which a clientandcan ask athirdKerberosserver,server for credentials. In theKerberos Administration Server (KADM).first approach, the client sends a cleartext request for a ticket for the desired server to the AS. Theadministration protocolreply isnot describedsent encrypted in the client's secret key. Usually thisdocu- ment. Thererequest isalso a protocolformaintaining multiple copies of the Kerberos database, but thisa ticket-granting ticket (TGT) which can later beconsidered an implementation detail and may varyused with the ticket-granting server (TGS). In the second method, the client sends a request tosupport different database technologies. 1.1. Cross-Realm Operationthe TGS. The client sends the TGT to the TGS in the same manner as if it were contacting any other application server which requires Kerberosprotocolcredentials. The reply isdesigned to operate across organizational boundaries. A clientencrypted inone organization canthe session key from the TGT. Once obtained, credentials may beauthenticatedused toa serververify the identity of the principals inanother. Each organization wishing to runaKerberos server establishes its own "realm".transaction, to ensure the integrity of messages exchanged between them, or to preserve privacy of the messages. Thenameapplication is free to choose whatever protection may be necessary. To verify the identities of therealmprincipals inwhicha transaction, the client transmits the ticket to the server. Since the ticket isregistered is part ofsent "in theclient's name,clear" (parts of it are encrypted, but this encryption doesn't thwart replay) andcanmight beusedintercepted and reused bythe end-servicean attacker, additional information is sent todecide whetherprove that the message was originated by the principal tohonor a request. By establishing "inter-realm" keys,whom theadministrators of two realms can allow a client authenticated in the local realm to use its authentication remotely[3]. The exchange __________________________ [3] Of course, with appropriate permissionticket was issued. This information (called theclient could arrange registration of a separately-named prin- cipal in a remote realm, and engageauthenticator) is encrypted innormal exchanges with that realm's services. However, for even small Section 1.1. - 4 - Expires 15 October 1993 Version 5 - Revision 5.2 of inter-realm keys (a separate key may be used for each direction) registerstheticket-granting service of each realm assession key, and includes aprincipal intimestamp. The timestamp proves that theother realm. A clientmessage was recently generated and isthen able to obtainnot aticket-granting ticket for the remote realm's ticket-granting service from its local realm. When that ticket-granting ticket is used,replay. Encrypting theremote ticket- granting service usesauthenticator in theinter-realmsession key(which usually differs from its own normal TGS key) to decrypt the ticket- granting ticket, and is thus certainproves that it wasissuedgenerated by a party possessing theclient's own TGS. Tickets issued bysession key. Since no one except theremote ticket- granting service will indicate torequesting principal and theend-service thatserver know theclient was authenticated from another realm. A realmsession key (it issaid to communicate with another realm ifnever sent over thetwo realms share an inter-realm key, or ifnetwork in thelocal realm shares an inter-realm key with an intermediate realm that communicates withclear) this guarantees theremote realm. An authentication path isidentity of thesequenceclient. The integrity ofintermediate realms that are tran- sited in communicating from one realm to another. Realms are typically organized hierarchically. Each realm shares a key with its parent and a different key with each child. If an inter-realm key is not directly shared by two realms,thehierarchical organization allows an authen- tication path to be easily constructed. If a hierarchical organization is not used, it may be necessary to consult some database in order to construct an authentication pathmessages exchanged betweenrealms. Although realms are typically hierarchical, intermedi- ate realms may be bypassed to achieve cross-realm authenti- cation through alternate authentication paths (these mightprincipals can also beestablished to make communication between two realms more efficient). It is important forguaranteed using theend-service to know which realms were transited when deciding how much faith to placesession key (passed in theauthentication process. To facilitate this decision, a field in eachticketcontains the names of the realms that were involvedand contained inauthenticating the client. 1.2. Environmental assumptions Kerberos imposes a few assumptions ontheenvironment in which it can properly function: + "Denialcredentials). This approach provides detection ofservice"both replay attacksare not solvedand message stream modification attacks. It is accomplished by generating and transmitting a collision-proof checksum (elsewhere called a hash or digest function) of the client's message, keyed withKer- beros. There are places in these protocols where an intruder can prevent an application from participating intheproper authentication steps. Detectionsession key. Privacy andsolution of such attacks (someintegrity ofwhichthe messages exchanged between principals canappear tobenot-uncommon "normal" failure modes forsecured by encrypting thesystem) is usually best leftdata to be passed using thehuman administrators and __________________________ numbers of clients this becomes cumbersome,session key passed in the ticket, andmore automatic methods as described here are necessary. Section 1.2. - 5 - Expires 15 Octobercontained in the credentials. The authentication exchanges mentioned above require read-only access to the Kerberos database. Sometimes, however, the entries in the Kohl & Neuman [Page 6] RFC 1510 Kerberos September 1993Version 5 - Revision 5.2 users. + Principalsdatabase mustkeep their secret keys secret. If an intruder somehow steals a principal's key, it willbeable to masquerademodified, such asthat principalwhen adding new principals orimpersonate any server to the legitimate principal. + "Password guessing" attacks are not solved by Kerberos. If a user chooseschanging apoor password, itprincipal's key. This ispossible for an attacker to successfully mount an offline dictionary attack by repeatedly attempting to decrypt, with suc- cessive entries fromdone using adictionary, messages obtained which are encrypted underprotocol between akey derived from the user's password. + Each host on the network must haveclient and aclock which is "loosely synchronized" tothird Kerberos server, thetimeKerberos Administration Server (KADM). The administration protocol is not described in this document. There is also a protocol for maintaining multiple copies of theother hosts;Kerberos database, but thissynchronization is usedcan be considered an implementation detail and may vary toreduce the bookkeeping needs of application servers when they do replay detec- tion.support different database technologies. 1.1. Cross-Realm Operation Thedegree of "looseness"Kerberos protocol is designed to operate across organizational boundaries. A client in one organization can beconfigured onauthenticated to aper-server basis. If the clocks are synchronized over the network, the clock synchronization protocol must itself be secured from network attackers. + Principal identifiers are not recycled on a short-term basis. A typical mode of access control will use access control lists (ACLs) to grant permissionsserver in another. Each organization wishing toparticular principals. If a stale ACL entry remains forrun adeleted principal and the principal identifier is reused,Kerberos server establishes its own "realm". The name of thenew principal will inherit rights specifiedrealm inthe stale ACL entry. By not re-using principal identifiers, the danger of inadvertent accesswhich a client isremoved. 1.3. Glossary of terms Belowregistered isa listpart ofterms used throughout this document. Authentication Verifyingtheclaimed identity of a principal. Authentication headerA record containing a Ticketclient's name, andan Authenticator tocan bepresentedused by the end-service to decide whether to honor aserver as part ofrequest. By establishing "inter-realm" keys, theauthentication process. Authentication path A sequenceadministrators ofintermediatetwo realmstran- sitedcan allow a client authenticated in theauthentication process when communicating from onelocal realm toanother. Section 1.3. - 6 - Expires 15 October 1993 Version 5 - Revision 5.2 Authenticator A record containing information that can be shown to have been recently generated using the session key known only byuse its authentication remotely (Of course, with appropriate permission the clientand server. Authorization The processcould arrange registration ofdetermining whetheraclient may useseparately-named principal in aservice, which objects the client is allowed to access,remote realm, andthe type of access allowed for each. Capability A tokenengage in normal exchanges with thatgrants the bearer permis- sion to access an object or service. In Kerberos,realm's services. However, for even small numbers of clients thismight be a ticket whose use is restricted by the contentsbecomes cumbersome, and more automatic methods as described here are necessary). The exchange ofthe authorization data field, but which lists no network addresses, together with the sessioninter-realm keys (a separate keynecessary to usemay be used for each direction) registers theticket. Ciphertext The output of an encryption function. Encryption transforms plaintext into ciphertext. Client A process that makes use of a networkticket-granting serviceon behalfof each realm as auser. Note thatprincipal insome cases a Server may itself be a client of somethe otherserver (e.g. a print server may be a client of a file server). Credentialsrealm. Aticket plus the secret session key necessaryclient is then able tosuccessfully use that ticket in an authentication exchange. KDC Key Distribution Center,obtain anetwork ser- vice that supplies tickets and temporary session keys; or an instance of that service or the host on which it runs. The KDC services both initial ticket andticket-granting ticketrequests. The initial ticket portion is sometimes referred to asfor theAuthentication Server (or service). Theremote realm's ticket- granting service from its local realm. When that ticket-granting ticketportionissometimes referred to asused, the remote ticket-grantingserver (or ser- vice). Section 1.3. - 7 - Expires 15 October 1993 Version 5 - Revision 5.2 Kerberos Aside from the 3-headed dog guarding Hades,service uses thename giveninter- realm key (which usually differs from its own normal TGS key) toProject Athena's authentication service,decrypt theprotocol used by that service, orticket-granting ticket, and is thus certain that it was issued by thecode usedclient's own TGS. Tickets issued by the remote ticket- granting service will indicate toimplementtheauthentica- tion service. Plaintext The inputend-service that the client was authenticated from another realm. A realm is said to communicate with another realm if the two realms share anencryption functioninter-realm key, or if theoutputlocal realm shares an inter-realm key with an intermediate realm that communicates with the remote realm. An authentication path is the sequence ofa decryption function. Decryption transforms ciphertext into plaintext. Principal A uniquely named client or server instanceintermediate realms thatparticipatesare transited ina network communication. Principal identifierThe name usedcommunicating from one realm touniquely identify each different principal. Seal To encipher a record containing several fields in suchanother. Realms are typically organized hierarchically. Each realm shares away that the fields cannot be individually replaced without either knowledge of the encryptionkeyor leaving evidence of tampering. Secretwith its parent and a different keyAn encryptionwith each child. If an inter-realm key is not directly shared bya principal and the KDC, distributed outside the bounds of the system, with a long life- time. Intwo realms, thecase ofhierarchical organization allows an authentication path to be easily constructed. If ahuman user's principal, the secret keyhierarchical organization isderived from a password. Server A particular Principal which provides a resourcenot used, it may be necessary tonetwork clients. Service A resource providedconsult some database in order tonetwork clients; often provided by more than one server (for example, remote file service). Session key A temporary encryption key usedconstruct an Kohl & Neuman [Page 7] RFC 1510 Kerberos September 1993 authentication path betweentwo principals, with a lifetime limitedrealms. Although realms are typically hierarchical, intermediate realms may be bypassed tothe duration of a single login "ses- sion". Sub-session key A temporary encryption key usedachieve cross-realm authentication through alternate authentication paths (these might be established to make communication betweenSection 1.3. - 8 - Expires 15 October 1993 Version 5 - Revision 5.2twoprincipals, selected and exchanged byrealms more efficient). It is important for theprincipals usingend-service to know which realms were transited when deciding how much faith to place in thesession key, and withauthentication process. To facilitate this decision, alifetime limited tofield in each ticket contains thedura- tionnames ofa single association. Ticket A recordthe realms thathelps a client authenti- cate itself to a server; it containswere involved in authenticating theclient's identity, a session key,client. 1.2. Environmental assumptions Kerberos imposes atimestamp, and other information, all sealed usingfew assumptions on theserver's secret key. It only serves to authenticate a client when presented alongenvironment in which it can properly function: + "Denial of service" attacks are not solved witha fresh Authenticator. 2. Ticket flag usesKerberos. There are places in these protocols where an intruder intruder can prevent an application from participating in the proper authentication steps. Detection andrequests Each Kerberos ticket contains a setsolution of such attacks (some offlagswhichare usedcan appear toindicate various attributes of that ticket. Most flags mayberequested by a client when the ticket is obtained; some are automatically turned onnot-uncommon "normal" failure modes for the system) is usually best left to the human administrators andoff byusers. + Principals must keep their secret keys secret. If an intruder somehow steals aKerberos serverprincipal's key, it will be able to masquerade asrequired. The following sections explain whatthat principal or impersonate any server to thevarious flags mean, and gives examples of reasonslegitimate principal. + "Password guessing" attacks are not solved by Kerberos. If a user chooses a poor password, it is possible for an attacker touse suchsuccessfully mount an offline dictionary attack by repeatedly attempting to decrypt, with successive entries from aflag. 2.1. Initial and pre-authenticated tickets The INITIAL flag indicates thatdictionary, messages obtained which are encrypted under aticket was issued usingkey derived from theAS protocol and not issued baseduser's password. + Each host on the network must have aticket- granting ticket. Application servers that wantclock which is "loosely synchronized" torequiretheknowledgetime ofa client's secret key (e.g. a password- changing program) can insist that this flag be set in any tickets they accept, and thus be assured thattheclient's key was recently presentedother hosts; this synchronization is used to reduce the bookkeeping needs of applicationclient.servers when they do replay detection. ThePRE-AUTHENT and HW-AUTHENT flags provide addition information about the initial authentication, regardlessdegree ofwhether the current ticket was issued directly (in which case INITIAL will also"looseness" can beset) or issuedconfigured onthe basis ofaticket-granting ticket (in which caseper-server basis. If theINITIAL flag is clear, but the PRE-AUTHENT and HW-AUTHENT flagsclocks arecarried forward fromsynchronized over theticket-granting ticket). 2.2. Invalid tickets The INVALID flag indicates that a ticket is invalid. Application servers must reject tickets which have this flag set. A postdated ticket will usually be issued in this form. Invalid ticketsnetwork, the clock synchronization protocol must itself bevalidated by the KDC before use, by presenting them to the KDC insecured from network attackers. + Principal identifiers are not recycled on aTGS request with the VALIDATE option specified. The KDCshort-term basis. A typical mode of access control willonly validate tick- ets after their starttime has passed. The validation is required so that postdated tickets which have been stolen before their starttime can be rendered permanently invalid Section 2.2. - 9 - Expires 15 October 1993 Version 5 - Revision 5.2 (through a hot-list mechanism). 2.3. Renewable tickets Applications may desireuse access control lists (ACLs) tohold tickets which can be valid for long periods of time. However, this can expose their credentialsgrant permissions topotential theftparticular principals. If a Kohl & Neuman [Page 8] RFC 1510 Kerberos September 1993 stale ACL entry remains forequally long periods,a deleted principal andthose stolen credentials would be valid untiltheexpiration time ofprincipal identifier is reused, theticket(s). Simply using short- lived tickets and obtainingnewones periodically would requireprincipal will inherit rights specified in theclient to have long-term access to its secret key, an even greater risk. Renewable tickets can be used to mitigatestale ACL entry. By not re-using principal identifiers, theconsequencesdanger oftheft. Renewable tickets have two "expiration times": the firstinadvertent access iswhen the current instanceremoved. 1.3. Glossary ofthe ticket expires, and the secondterms Below isthe latest permissible value for an individual expiration time. An application client must periodically (i.e. before it expires) presentarenewable ticket to the KDC, with the RENEW option set inlist of terms used throughout this document. Authentication Verifying theKDC request. The KDC will issueclaimed identity of anew ticket withprincipal. Authentication header A record containing anew session keyTicket and an Authenticator to be presented to alater expiration time. All other fieldsserver as part of theticket are left unmodified by the renewalauthentication process.WhenAuthentication path A sequence of intermediate realms transited in thelatest permissible expiration time arrives,authentication process when communicating from one realm to another. Authenticator A record containing information that can be shown to have been recently generated using theticket expires permanently. At each renewal,session key known only by theKDCclient and server. Authorization The process of determining whether a client mayconsultuse ahot-list to determine ifservice, which objects theticket had been reported stolen since its last renewal; it will refuseclient is allowed torenew such stolen tickets,access, andthustheusable lifetimetype ofstolen tickets is reduced. The RENEWABLE flag inaccess allowed for each. Capability A token that grants the bearer permission to access an object or service. In Kerberos, this might be a ticket whose use isnormally only inter- pretedrestricted by theticket-granting service (discussed below in section 3.3). It can usually be ignored by application servers. However, some particularly careful application servers may wish to disallow renewable tickets. If a renewable ticket is not renewed by its expiration time,contents of theKDC will not renewauthorization data field, but which lists no network addresses, together with the session key necessary to use the ticket. Kohl & Neuman [Page 9] RFC 1510 Kerberos September 1993 Ciphertext TheRENEWABLE flag is reset by default, butoutput of an encryption function. Encryption transforms plaintext into ciphertext. Client A process that makes use of a network service on behalf of a user. Note that in some cases a Server may itself be a client of some other server (e.g., a print server mayrequest itbeset by settinga client of a file server). Credentials A ticket plus theRENEWABLE optionsecret session key necessary to successfully use that ticket in an authentication exchange. KDC Key Distribution Center, a network service that supplies tickets and temporary session keys; or an instance of that service or theKRB_AS_REQ message. Ifhost on which it runs. The KDC services both initial ticket and ticket-granting ticket requests. The initial ticket portion isset, then the renew-till field insometimes referred to as the Authentication Server (or service). The ticket-granting ticketcontainsportion is sometimes referred to as thetime after whichticket-granting server (or service). Kerberos Aside from theticket may not be renewed. 2.4. Postdated tickets Applications may occasionally need to obtain tickets for use much later, e.g. a batch submission system would need tickets3-headed dog guarding Hades, the name given tobe valid atProject Athena's authentication service, thetimeprotocol used by that service, or thebatch job is ser- viced. However, it is dangerouscode used tohold valid tickets in a batch queue, since they will be on-line longer and more prone to theft. Postdated tickets provide a way to obtain these tickets fromimplement theKDC at job submission time, butauthentication service. Plaintext The input toleave them "dormant" until they are activated and validated by a further request ofan encryption function or theKDC. Ifoutput of aticket theft were reporteddecryption function. Decryption transforms ciphertext into plaintext. Principal A uniquely named client or server instance that participates inthe interim, the KDC would refuse to validate the ticket, and the thief would be foiled. Section 2.4. - 10 - Expires 15 Octobera network communication. Kohl & Neuman [Page 10] RFC 1510 Kerberos September 1993Version 5 - Revision 5.2Principal identifier TheMAY-POSTDATE flag in a ticket is normally only interpreted by the ticket-granting service. It can be ignored by application servers. This flag must be set inname used to uniquely identify each different principal. Seal To encipher aticket-granting ticketrecord containing several fields inorder to issuesuch apostdated ticket based onway that thepresented ticket. It is reset by default; it mayfields cannot berequestedindividually replaced without either knowledge of the encryption key or leaving evidence of tampering. Secret key An encryption key shared by aclient by settingprincipal and theALLOW-POSTDATE option inKDC, distributed outside theKRB_AS_REQ message. This flag does not allow a client to obtain a postdated ticket-granting ticket; post- dated ticket-granting tickets can only by obtained by requestingbounds of thepostdating insystem, with a long lifetime. In theKRB_AS_REQ message. The life (endtime-starttime)case of apostdated ticket will be the remaining life of the ticket-granting ticket at the time of the request, unlesshuman user's principal, theRENEWABLE optionsecret key isalso set, in which case it can be the full life (endtime-starttime) of the ticket-granting ticket. The KDC may limit how far in the futurederived from aticket may be postdated. The POSTDATED flag indicates thatpassword. Server A particular Principal which provides aticket has been postdated. The application server can check the authtime field in the ticketresource tosee when the original authentication occurred. Some services may choosenetwork clients. Service A resource provided toreject postdated tickets, or they may only accept them withinnetwork clients; often provided by more than one server (for example, remote file service). Session key A temporary encryption key used between two principals, with acertain period after the original authentication. Whenlifetime limited to theKDC issuesduration of aPOSTDATED ticket, it will also be marked as INVALID, so that the application client must presentsingle login "session". Sub-session key A temporary encryption key used between two principals, selected and exchanged by theticket toprincipals using theKDC to be validated before use. 2.5. Proxiablesession key, andproxy tickets At times it may be necessary for a principal to allowwith aservice to perform an operation on its behalf. The service must be ablelifetime limited totake ontheidentityduration ofthe client, but only foraparticular purpose.single association. Ticket Aprincipal can allowrecord that helps aserviceclient authenticate itself totake on the principal's identity foraparticular purpose by grantingserver; it contains the client's identity, aproxy. The PROXIABLE flag insession key, aticket is normally only inter- preted bytimestamp, and other information, all sealed using theticket-granting service.server's secret key. Itcan be ignored by application servers. When set, this flag tells the ticket- granting server that it is OKonly serves toissue a new ticket (but notauthenticate aticket-granting ticket)client when presented along with adifferent network address based on this ticket. Thisfresh Authenticator. Kohl & Neuman [Page 11] RFC 1510 Kerberos September 1993 2. Ticket flagisuses and requests Each Kerberos ticket contains a set of flags which are used to indicate various attributes of that ticket. Most flags may be requested bydefault. This flag allowsa clientto pass a proxy towhen the ticket is obtained; some are automatically turned on and off by a Kerberos server as required. The following sections explain what the various flags mean, and gives examples of reasons toperformuse such aremote request on its behalf, e.g.flag. 2.1. Initial and pre-authenticated tickets The INITIAL flag indicates that aprint ser- vice client can giveticket was issued using theprint serverAS protocol and not issued based on aproxyticket-granting ticket. Application servers that want toaccessrequire the knowledge of a client'sfiles onsecret key (e.g., aparticular file serverpasswordchanging program) can insist that this flag be set inorder to satisfy a print request. In orderany tickets they accept, and thus be assured that the client's key was recently presented tocomplicatetheuseapplication client. The PRE-AUTHENT and HW-AUTHENT flags provide addition information about the initial authentication, regardless ofstolen credentials, Kerberos tickets are usually valid from only those network addresses specifically included inwhether theticket[4]. For this __________________________ [4] It is permissible to requestcurrent ticket was issued directly (in which case INITIAL will also be set) orissue tickets with Section 2.5. - 11 - Expires 15 October 1993 Version 5 - Revision 5.2 reason, a client wishing to grant a proxy must requestissued on the basis of anewticket-granting ticketvalid for(in which case thenetwork address ofINITIAL flag is clear, but theservice to be grantedPRE-AUTHENT and HW-AUTHENT flags are carried forward from theproxy.ticket-granting ticket). 2.2. Invalid tickets ThePROXYINVALID flagis set inindicates that a ticketby the TGS when it issues a proxy ticket.is invalid. Application serversmay checkmust reject tickets which have this flagand require additional authentication from the agent presenting the proxyset. A postdated ticket will usually be issued inorder to provide an audit trail. 2.6. Forwardablethis form. Invalid ticketsAuthentication forwarding is an instance of the proxy case where the service is granted complete use of the client's identity. An example where it mightmust beused is when a user logs in to a remote system and wants authentica- tionvalidated by the KDC before use, by presenting them towork from that system as ifthelogin were local. The FORWARDABLE flagKDC in aticket is normally only interpreted byTGS request with theticket-granting service. It can be ignored by application servers.VALIDATE option specified. TheFORWARDABLE flagKDC will only validate tickets after their starttime hasan interpretation similar topassed. The validation is required so thatof the PROXIABLE flag, except ticket-grantingpostdated ticketsmay alsowhich have been stolen before their starttime can beissued with different network addresses. This flag is reset by default, but usersrendered permanently invalid (through a hot- list mechanism). 2.3. Renewable tickets Applications mayrequest that itdesire to hold tickets which can beset by setting the FORWARDABLE option in the AS request when they requestvalid for long periods of time. However, this can expose theirinitial ticket- granting ticket. This flag allowscredentials to potential theft forauthentication forwarding without requiringequally long periods, and those stolen credentials would be valid until theuser to enter a password again. Ifexpiration time of theflag is not set, then authentication forwarding is not permitted, butticket(s). Simply using shortlived tickets and obtaining new ones periodically would require thesame end resultclient to have long-term access to its secret key, an even greater risk. Renewable tickets canstillbeachieved ifused to mitigate theuser engages inconsequences of theft. Renewable tickets have two "expiration times": theAS exchange withfirst is when therequested network addressescurrent instance of the Kohl & Neuman [Page 12] RFC 1510 Kerberos September 1993 ticket expires, andsupplies a password. The FORWARDED flagthe second isset bytheTGS when alatest permissible value for an individual expiration time. An application clientpresentsmust periodically (i.e., before it expires) present a renewable ticket to the KDC, with theFORWARDABLE flag set and requests it beRENEW option setby specifyingin theFORWARDEDKDCoptionrequest. The KDC will issue a new ticket with a new session key andsupply- ingasetlater expiration time. All other fields ofaddresses forthenew ticket. It is also set in all tickets issued based on tickets with the FORWARDED flag set. Application servers may wish to process FORWARDED tickets differently than non-FORWARDED tickets. 2.7. Other KDC options Thereticket aretwo additional options which may be set in a client's request ofleft unmodified by theKDC. The RENEWABLE-OK option indi- cates thatrenewal process. When the latest permissible expiration time arrives, theclient will accept a renewableticketifexpires permanently. At each renewal, the KDC may consult a hot-list to determine if the ticketwithhad been reported stolen since its last renewal; it will refuse to renew such stolen tickets, and thus therequested life cannot otherwise be provided. Ifusable lifetime of stolen tickets is reduced. The RENEWABLE flag in a ticketwithis normally only interpreted by therequested life cannotticket-granting service (discussed below in section 3.3). It can usually beprovided, then the KDCignored by application servers. However, some particularly careful application servers mayissuewish to disallow renewable tickets. If a renewable ticketwith a renew-till equal __________________________ no network addresses specified, but we dois notrecommend it. Section 2.7. - 12 - Expires 15 October 1993 Version 5 - Revision 5.2 torenewed by its expiration time, the KDC will not renew therequested endtime.ticket. Thevalue of the renew-till fieldRENEWABLE flag is reset by default, but a client maystillrequest it beadjusted by site-determined limits or limits imposedset by setting theindividual principal or server. The ENC-TKT-IN-SKEYRENEWABLE option in the KRB_AS_REQ message. If it ishonored only byset, then theticket-granting service. It indicates thatrenew-till field in theto-be-issuedticketforcontains theend server is to be encrypted in the session key fromtime after which theadditional ticket-grantingticketprovided with the request. See section 3.3.3 for specific details. __________________________ [5] The password-changing request mustmay not behonored unlessrenewed. 2.4. Postdated tickets Applications may occasionally need to obtain tickets for use much later, e.g., a batch submission system would need tickets to be valid at therequester can providetime theold password (the user's current secret key). Otherwise,batch job is serviced. However, itwouldis dangerous to hold valid tickets in a batch queue, since they will bepossible for someoneon-line longer and more prone towalk uptheft. Postdated tickets provide a way toan unattended ses- sionobtain these tickets from the KDC at job submission time, but to leave them "dormant" until they are activated andchange another user's password. [6] To authenticatevalidated by auser logging on tofurther request of the KDC. If alocal sys- tem,ticket theft were reported in thecredentials obtainedinterim, the KDC would refuse to validate the ticket, and the thief would be foiled. The MAY-POSTDATE flag in a ticket is normally only interpreted by theAS exchange may firstticket-granting service. It can beusedignored by application servers. This flag must be set in aTGS exchangeticket-granting ticket in order toobtain credentials forissue alocal server. Those credentials must thenpostdated ticket based on the presented ticket. It is reset by default; it may beverifiedrequested by a client by setting thelocal server through successful comple- tion ofALLOW- POSTDATE option in theClient/Server exchange. Section 3.1. - 13 - Expires 15 October 1993 Version 5 - Revision 5.2 3. Message Exchanges The following sections describe the interactions between network clients and servers and the messages involved in those exchanges. 3.1. The Authentication Service Exchange Summary Message direction Message type Section 1. Client to KerberosKRB_AS_REQ5.4.1 2. Kerberos to client KRB_AS_REP or 5.4.2 KRB_ERROR 5.9.1 The Authentication Service (AS) Exchange between the client and the Kerberos Authentication Server is usually in- itiated bymessage. This flag does not allow a clientwhen it wishesto obtainauthentication credentials foragiven server but currently holds no credentials. The client's secret key is used for encryption and decryption. This exchange is typically used atpostdated ticket-granting ticket; postdated ticket-granting tickets can only by obtained by requesting the postdating in theini- tiationKRB_AS_REQ message. The life (endtime-starttime) of alogin session, to obtain credentials for a Ticket-Granting Server, whichpostdated ticket willsubsequentlybeused to obtain credentials for other servers (see section 3.3) without requiring further usethe remaining life of theclient's secret key. This exchangeticket- Kohl & Neuman [Page 13] RFC 1510 Kerberos September 1993 granting ticket at the time of the request, unless the RENEWABLE option is alsoused to request credentials for ser- vicesset, in whichmust notcase it can bemediated through the Ticket-Granting Service, but rather require a principal's secret key, such asthepassword-changing service[5]. This exchange does not by itself provide any assurancefull life (endtime- starttime) of the ticket-granting ticket. The KDC may limit how far in theidentity of the user[6].future a ticket may be postdated. Theexchange consists of two messages: KRB_AS_REQ fromPOSTDATED flag indicates that a ticket has been postdated. The application server can check theclientauthtime field in the ticket toKerberos, and KRB_AS_REP or KRB_ERROR in reply. The formats for these messages are described in sec- tions 5.4.1, 5.4.2, and 5.9.1. In the request, the client sends (in cleartext) its own identity and the identity ofsee when theserver for which it is requesting credentials. The response, KRB_AS_REP, containsoriginal authentication occurred. Some services may choose to reject postdated tickets, or they may only accept them within aticket forcertain period after theclient to present tooriginal authentication. When theserver, andKDC issues ases- sion key thatPOSTDATED ticket, it will also beshared bymarked as INVALID, so that the application clientandmust present theserver. The session key and additional information are encrypted inticket to theclient's secret key. The KRB_AS_REP message contains information which can be usedKDC todetect replays,be validated before use. 2.5. Proxiable andto associateproxy tickets At times itwith the messagemay be necessary for a principal towhich it replies. Various errors can occur; these are indicated byallow a service to perform anerror response (KRB_ERROR) instead of the KRB_AS_REP response. The error message is not encrypted.operation on its behalf. TheKRB_ERROR message also con- tains information which canservice must beusedable toassociate it withtake on themessageidentity of the client, but only for a particular purpose. A principal can allow a service towhichtake on the principal's identity for a particular purpose by granting itreplies.a proxy. Thelack of encryptionPROXIABLE flag in a ticket is normally only interpreted by theKRB_ERROR message precludesticket-granting service. It can be ignored by application servers. When set, this flag tells theability to detect replays or fabrications of such messages. Section 3.1. - 14 - Expires 15 October 1993 Version 5 - Revision 5.2 In the normal case the authenticationticket-granting serverdoes not know whether the clientthat it isactually the principal named in the request. It simply sendsOK to issue areply without knowing or caring whether they are the same.new ticket (but not a ticket-granting ticket) with a different network address based on this ticket. This flag isacceptable because nobody but the principal whose identity was given in theset by default. This flag allows a client to pass a proxy to a server to perform a remote requestwill be ableon its behalf, e.g., a print service client can give the print server a proxy touseaccess thereply. Its critical information is encryptedclient's files on a particular file server inthat principal's key. The ini- tial request supports an optional field that can be usedorder topass additional information that might be needed forsatisfy a print request. In order to complicate theinitial exchange. This field may be used for pre- authentication if desired, butuse of stolen credentials, Kerberos tickets are usually valid from only those network addresses specifically included in themechanismticket (It is permissible to request or issue tickets with no network addresses specified, but we do notcurrently specified. 3.1.1. Generation of KRB_AS_REQ message Therecommend it). For this reason, a clientmay specifywishing to grant anumberproxy must request a new ticket valid for the network address ofoptions intheini- tial request. Among these options are whether pre- authentication isservice to beperformed; whethergranted therequested ticketproxy. The PROXY flag isto be renewable, proxiable, or forwardable; whether it should be postdated or allow postdating of derivative tickets; and whether a renewable ticket will be acceptedset inlieu ofanon-renewable ticket if the requestedticketexpiration date cannot be satisfiedbya non- renewable ticket (due to configuration constraints; see sec- tion 4). See section A.1 for pseudocode. The client preparestheKRB_AS_REQ message and sendsTGS when ittoissues a proxy ticket. Application servers may check this flag and require additional authentication from theKDC. 3.1.2. Receipt of KRB_AS_REQ message If all goes well, processingagent presenting theKRB_AS_REQ message will resultproxy in order to provide an audit trail. Kohl & Neuman [Page 14] RFC 1510 Kerberos September 1993 2.6. Forwardable tickets Authentication forwarding is an instance of thecreationproxy case where the service is granted complete use ofa ticket fortheclientclient's identity. An example where it might be used is when a user logs in topresenta remote system and wants authentication to work from that system as if theserver.login were local. Theformat for theFORWARDABLE flag in a ticket isdescribed in section 5.3.1. The contents ofnormally only interpreted by theticket are determined as follows. 3.1.3. Generation of KRB_AS_REP messageticket-granting service. It can be ignored by application servers. Theauthentication server looks up the client and server principals named in the KRB_AS_REQ in its database, extracting their respective keys. If required, the server pre-authenticates the request, and if the pre-authentication check fails,FORWARDABLE flag has anerror message withinterpretation similar to that of thecode KDC_ERR_PREAUTH_FAILED is returned. If the server cannot accommodate the requested encryption type, an error message with code KDC_ERR_ETYPE_NOSUPP is returned. Otherwise it generates a "random" session key[7]. __________________________ [7] "Random" means that, among other things, it shouldPROXIABLE flag, except ticket-granting tickets may also beimpossible to guess the next session key based on knowledge of past session keys.issued with different network addresses. Thiscan only be achieved in a pseudo-random number generator if itflag isbased on cryptographic principles. It wouldreset by default, but users may request that it bemore Section 3.1.3. - 15 - Expires 15 October 1993 Version 5 - Revision 5.2 Ifset by setting therequested start time is absent or indicates a timeFORWARDABLE option in thepast, then the start time ofAS request when they request their initial ticket-granting ticket. This flag allows for authentication forwarding without requiring theticket is setuser tothe authentication server's current time. If it indicatesenter atime in the future, butpassword again. If thePOSTDATED option hasflag is notbeen specified,set, thenthe error KDC_ERR_CANNOT_POSTDATEauthentication forwarding isreturned. Otherwisenot permitted, but therequested start time is checked againstsame end result can still be achieved if thepolicy ofuser engages in thelocal realm (the administrator might decide to prohibit certain types or ranges of post- dated tickets), and if acceptable,AS exchange with theticket's start time is set asrequested network addresses andthe INVALIDsupplies a password. The FORWARDED flag is setinby thenew ticket. The postdatedTGS when a client presents a ticketmustwith the FORWARDABLE flag set and requests it bevalidated before useset bypresenting it tospecifying the FORWARDED KDCafter the start time has been reached. The expiration time of the ticket will beoption and supplying a setto the minimumof addresses for thefollowing: +The expiration time (endtime) requestednew ticket. It is also set in all tickets issued based on tickets with theKRB_AS_REQ message. +The ticket's start time plusFORWARDED flag set. Application servers may wish to process FORWARDED tickets differently than non-FORWARDED tickets. 2.7. Other KDC options There are two additional options which may be set in a client's request of themaximum allowable lifetime associated withKDC. The RENEWABLE-OK option indicates that the clientprincipal (the authentication server's database includeswill accept a renewable ticket if amaximumticketlifetime field in each principal's record; see section 4). +The ticket's start time plus the maximum allowable lifetime associatedwith theserver principal. +The ticket's start time plus the maximum lifetime set by the policy of the local realm.requested life cannot otherwise be provided. If a ticket with the requestedexpiration time minuslife cannot be provided, then thestart time (as determined above) is less thanKDC may issue asite-determined minimum lifetime, an error messagerenewable ticket withcode KDC_ERR_NEVER_VALID is returned. Ifa renew-till equal to the the requestedexpiration time forendtime. The value of theticket exceeds what was determined as above, and ifrenew-till field may still be adjusted by site-determined limits or limits imposed by the"RENEWABLE-OK"individual principal or server. The ENC-TKT-IN-SKEY optionwas requested, then the "RENEWABLE" flagisset inhonored only by thenew ticket, andticket-granting service. It indicates that therenew-till valueto-be-issued ticket for the end server isset as if the "RENEWABLE" option were requested (the field and option names are described fullyto be encrypted in the session key from the additional ticket-granting ticket provided with the request. See section5.4.1). __________________________ desirable to use a truly random number generator, such as one based on measurements of random physical phenomena. Section 3.1.3. - 16 - Expires 15 October3.3.3 for specific details. Kohl & Neuman [Page 15] RFC 1510 Kerberos September 1993Version 5 - Revision 5.2 If3. Message Exchanges The following sections describe theRENEWABLE option has been requestedinteractions between network clients and servers and the messages involved in those exchanges. 3.1. The Authentication Service Exchange Summary Message direction Message type Section 1. Client to Kerberos KRB_AS_REQ 5.4.1 2. Kerberos to client KRB_AS_REP orif5.4.2 KRB_ERROR 5.9.1 The Authentication Service (AS) Exchange between theRENEWABLE-OK option has been setclient and the Kerberos Authentication Server is usually initiated by arenewable ticketclient when it wishes to obtain authentication credentials for a given server but currently holds no credentials. The client's secret key is used for encryption and decryption. This exchange is typically used at the initiation of a login session, to obtain credentials for a Ticket- Granting Server, which will subsequently beissued, then the renew-till field is setused tothe minimum of: +Its requested value. +The start timeobtain credentials for other servers (see section 3.3) without requiring further use of theticket plusclient's secret key. This exchange is also used to request credentials for services which must not be mediated through theminimum ofTicket-Granting Service, but rather require a principal's secret key, such as thetwo maximum renewable lifetimes associated with the principals' database entries. +The start time ofpassword-changing service. (The password- changing request must not be honored unless theticket plusrequester can provide themaximum renewable lifetime setold password (the user's current secret key). Otherwise, it would be possible for someone to walk up to an unattended session and change another user's password.) This exchange does not bythe policy of the local realm. The flags fielditself provide any assurance of thenew ticket will have the follow- ing options set if they have been requested and ifthepol- icyidentity of the user. (To authenticate a user logging on to a localrealm allows: FORWARDABLE, MAY-POSTDATE, POSTDATED, PROXIABLE, RENEWABLE. Ifsystem, thenew ticket is post- dated (the start time iscredentials obtained in thefuture), its INVALID flag will alsoAS exchange may first beset. If allused in a TGS exchange to obtain credentials for a local server. Those credentials must then be verified by the local server through successful completion of theabove succeed,Client/Server exchange.) The exchange consists of two messages: KRB_AS_REQ from theserver formats aclient to Kerberos, and KRB_AS_REPmessage (see section 5.4.2), copying the addressesor KRB_ERROR in reply. The formats for these messages are described in sections 5.4.1, 5.4.2, and 5.9.1. In therequest into the caddr ofrequest, theresponse, placing any required pre-authentication data intoclient sends (in cleartext) its own identity and thepadataidentity of the server for which it is requesting credentials. The response,and encryptsKRB_AS_REP, contains a ticket for theciphertext part inclient to present to theclient'sserver, and a session keyusingthat will be shared by therequested encryption method,client andsends it totheclient. See section A.2 for pseudocode. 3.1.4. Generation of KRB_ERRORserver. The session key and additional information are encrypted in the client's secret key. The KRB_AS_REP messageSeveral errorscontains information which canoccur,be used to detect replays, andthe Authentication Server responds by returning an error message, KRB_ERROR,tothe client,Kohl & Neuman [Page 16] RFC 1510 Kerberos September 1993 associate it with theerror-code and e-text fields set to appropriate values. The errormessagecontents and detailsto which it replies. Various errors can occur; these aredescribed in Section 5.9.1. 3.1.5. Receiptindicated by an error response (KRB_ERROR) instead ofKRB_AS_REP message IfthereplyKRB_AS_REP response. The error messagetypeisKRB_AS_REP, then the client verifies that the cname and crealm fields in the cleartext portion of the reply match what it requested. If any padata fields are present, they maynot encrypted. The KRB_ERROR message also contains information which can be used toderiveassociate it with theproper secret keymessage todecrypt the message.which it replies. Theclient decryptslack of encryption in theencrypted partKRB_ERROR message precludes the ability to detect replays or fabrications of such messages. In theresponse using its secret key, verifies thatnormal case thenonce inauthentication server does not know whether theencrypted part matchesclient is actually thenonce it suppliedprincipal named inits request (to detect replays).the request. Italso verifies thatsimply sends a reply without knowing or caring whether they are thesname and srealm insame. This is acceptable because nobody but theresponse match thoseprincipal whose identity was given in therequest, and thatrequest will be able to use thehost address field is also correct. It then stores the ticket, session key, start and expiration times, and otherreply. Its critical informationfor later use.is encrypted in that principal's key. Thekey-expirationinitial request supports an optional fieldfrom the encrypted part ofthat can be used to pass additional information that might be needed for theresponseinitial exchange. This field may bechecked to notifyused for preauthentication if desired, but theusermechanism is not currently specified. 3.1.1. Generation ofimpending key expiration (theKRB_AS_REQ message The clientprogram could then suggest Section 3.1.5. - 17 - Expires 15 October 1993 Version 5 - Revision 5.2 remedial action, such asmay specify apassword change). See section A.3 for pseudocode. Proper decryptionnumber of options in theKRB_AS_REP messageinitial request. Among these options are whether preauthentication isnot suf- ficienttoverifybe performed; whether theidentityrequested ticket is to be renewable, proxiable, or forwardable; whether it should be postdated or allow postdating of derivative tickets; and whether a renewable ticket will be accepted in lieu of a non-renewable ticket if theuser;requested ticket expiration date cannot be satisfied by a nonrenewable ticket (due to configuration constraints; see section 4). See section A.1 for pseudocode. The client prepares theuserKRB_AS_REQ message andan attacker could cooperatesends it togenerate a KRB_AS_REP format message which decrypts properly but is not fromtheproperKDC. 3.1.2. Receipt of KRB_AS_REQ message If all goes well, processing thehost wishes to verifyKRB_AS_REQ message will result in theidentitycreation of a ticket for theuser, it must require the userclient to presentapplication credentials which can be verified using a securely-stored secret key. If those credentials can be verified, then the identity ofto theuser can be assured. 3.1.6. Receipt of KRB_ERROR message Ifserver. The format for thereply message typeticket isKRB_ERROR, thendescribed in section 5.3.1. The contents of theclient interprets it as an error and performs whatever application-specific tasksticket arenecessary to recover. 3.2. The Client/Server Authentication Exchange Summary Message direction Message type Section Client to Application server KRB_AP_REQ 5.5.1 [optional] Application server to client KRB_AP_REP or 5.5.2 KRB_ERROR 5.9.1determined as follows. 3.1.3. Generation of KRB_AS_REP message Theclient/serverauthentication(CS) exchange is used by network applications to authenticateserver looks up the clientto the serverandvice versa. The client must have already acquired credentials forserver principals named in the KRB_AS_REQ in its database, extracting their respective keys. If required, the serverusingpre-authenticates theAS or TGS exchange. 3.2.1. The KRB_AP_REQ message The KRB_AP_REQ contains authentication information which should be part ofrequest, and if thefirst message in an authenti- cated transaction. It contains a ticket,pre-authentication check fails, anauthenticator, and some additional bookkeeping information (see section 5.5.1 forerror message with theexact format). The ticket by itselfcode KDC_ERR_PREAUTH_FAILED isinsuf- ficient to authenticate a client, since tickets are passed acrossreturned. If thenetwork in cleartext[8], soserver cannot accommodate theauthenticatorrequested encryption type, an error message with code Kohl & Neuman [Page 17] RFC 1510 Kerberos September 1993 KDC_ERR_ETYPE_NOSUPP isused to prevent invalid replay of tickets by provingreturned. Otherwise it generates a "random" session key ("Random" means that, among other things, it should be impossible to guess theserver that the client knows thenext session key based on knowledge ofthe ticket and thus is entitled to use it. The KRB_AP_REQ message is referred to elsewhere as the "authentication header." __________________________ [8] Tickets contain both an encrypted and unencrypted portion, so cleartext here refers to the entire unit, whichpast session keys. This can only becopied from one message and replayedachieved inanother without anya pseudo-random number generator if it is based on cryptographicskill. Section 3.2.1. - 18 - Expires 15 October 1993 Version 5 - Revision 5.2 3.2.2. Generation ofprinciples. It would be more desirable to use aKRB_AP_REQ message Whentruly random number generator, such as one based on measurements of random physical phenomena.). If the requested start time is absent or indicates aclient wishestime in the past, then the start time of the ticket is set toinitiatethe authenticationto a server,server's current time. If itobtains (either throughindicates acredentials cache,time in theAS exchange,future, but the POSTDATED option has not been specified, then the error KDC_ERR_CANNOT_POSTDATE is returned. Otherwise the requested start time is checked against the policy of the local realm (the administrator might decide to prohibit certain types or ranges of postdated tickets), and if acceptable, theTGS exchange) a ticketticket's start time is set as requested andsession key forthedesired service.INVALID flag is set in the new ticket. Theclient may re-use any ticketspostdated ticket must be validated before use by presenting itholds until they expire.to the KDC after the start time has been reached. Theclient then constructs a new Authenticator fromexpiration time of the ticket will be set to thesystem time, its name, and optionally an application specific checksum, an initial sequence number to be used in KRB_SAFE or KRB_PRIV messages, and/or a session subkey to be usedminimum of the following: +The expiration time (endtime) requested innegotiations for a session key unique to this particular session. Authentica- tors may not be re-used and will be rejected if replayed to a server[9]. If a sequence number is to be included, it should be randomly chosen so that even after many messages have been exchanged it is not likely to collidethe KRB_AS_REQ message. +The ticket's start time plus the maximum allowable lifetime associated withother sequence numbers in use. The client may indicate a requirement of mutual authen- tication ortheuse ofclient principal (the authentication server's database includes asession-key basedmaximum ticketby setting the appropriate flag(s) in the ap-optionslifetime fieldof the mes- sage. The Authenticator is encryptedin each principal's record; see section 4). +The ticket's start time plus thesession key and combinedmaximum allowable lifetime associated with theticket to formserver principal. +The ticket's start time plus theKRB_AP_REQ message which is then sent tomaximum lifetime set by theend server along with any addi- tional application-specific information. See section A.9 for pseudocode. 3.2.3. Receiptpolicy ofKRB_AP_REQ message Authentication is based ontheserver's current time of day (clocks must be loosely synchronized),local realm. If theauthentica- tor, andrequested expiration time minus theticket. Several errors are possible. Ifstart time (as determined above) is less than a site-determined minimum lifetime, an erroroccurs, the servermessage with code KDC_ERR_NEVER_VALID isexpected to reply toreturned. If theclient with a KRB_ERROR message. This message may be encapsulated inrequested expiration time for theapplication protocolticket exceeds what was determined as above, and ifits "raw" form is not accept- able totheprotocol. The format of error messages is described in section 5.9.1. The algorithm for verifying authentication information is as follows. If"RENEWABLE-OK" option was requested, then themessage type"RENEWABLE" flag isnot KRB_AP_REQ, the server returns the KRB_AP_ERR_MSG_TYPE error. If the key version indicated by the Ticketset in theKRB_AP_REQ is not one the server can use (e.g., it indicates an old key,new ticket, and theserver no longer possesses a copy of the old key), the KRB_AP_ERR_BADKEYVER errorrenew-till value isreturned.set as if the "RENEWABLE" option were requested (the field and option names are described fully in section 5.4.1). If theUSE- __________________________ [9] Note that this can make applications based on un- reliable transports difficult to code correctly,RENEWABLE option has been requested or if thetransport might deliver duplicated messages. In such cases,RENEWABLE-OK option has been set and anew authenticator mustrenewable ticket is to begenerated for each retry. Section 3.2.3. - 19 - Expires 15 October 1993 Version 5 - Revision 5.2 SESSION-KEY flagissued, then the renew-till field is setin the ap-options field, it indi- catesto theserver thatminimum of: Kohl & Neuman [Page 18] RFC 1510 Kerberos September 1993 +Its requested value. +The start time of the ticketis encrypted in the ses- sion key fromplus theserver's ticket-granting ticket rather than its secret key[10]. Since it is possible forminimum of theserver to be registered in multiple realms,two maximum renewable lifetimes associated withdifferent keys in each,thesrealm field in the unencrypted portionprincipals' database entries. +The start time of the ticketinplus theKRB_AP_REQ is used to specify which secret keymaximum renewable lifetime set by theserver should use to decrypt that ticket.policy of the local realm. TheKRB_AP_ERR_NOKEY error code is returned ifflags field of theserver doesn'tnew ticket will have theproper key to decipherfollowing options set if they have been requested and if theticket. Thepolicy of the local realm allows: FORWARDABLE, MAY-POSTDATE, POSTDATED, PROXIABLE, RENEWABLE. If the new ticket isdecrypted usingpostdated (the start time is in theversionfuture), its INVALID flag will also be set. If all of theserver's key specified by the ticket. Ifabove succeed, thedecryption routines detectserver formats amodificationKRB_AS_REP message (see section 5.4.2), copying the addresses in the request into the caddr of theticket (each encryp- tion system must provide safeguards to detect modified ciphertext; see section 6),response, placing any required pre-authentication data into theKRB_AP_ERR_BAD_INTEGRITY error is returned (chances are good that different keys were used to encryptpadata of the response, anddecrypt). The authenticator is decrypted usingencrypts thesessionciphertext part in the client's keyextracted fromusing thedecrypted ticket. If decryption showsrequested encryption method, and sends it tohave been modified,theKRB_AP_ERR_BAD_INTEGRITY error is returned. The name and realmclient. See section A.2 for pseudocode. 3.1.4. Generation of KRB_ERROR message Several errors can occur, and theclient fromAuthentication Server responds by returning an error message, KRB_ERROR, to theticket are compared againstclient, with thesameerror-code and e-text fields set to appropriate values. The error message contents and details are described inthe authenticator.Section 5.9.1. 3.1.5. Receipt of KRB_AS_REP message Ifthey don't match,theKRB_AP_ERR_BADMATCH error is returned (they might not match, for example, ifreply message type is KRB_AS_REP, then thewrong session key was used to encryptclient verifies that theauthenticator). The addressescname and crealm fields in theticket (if any) are then searched for an address matching the operating-system reported addresscleartext portion of theclient. If noreply matchis found or the server insists on ticket addresses but none are present in the ticket, the KRB_AP_ERR_BADADDR error is returned.what it requested. If any padata fields are present, they may be used to derive thelocal (server) time andproper secret key to decrypt the message. The clienttime indecrypts theauthenticator differ by more thanencrypted part of theallowable clock skew (e.g., 5 minutes),response using its secret key, verifies that theKRB_AP_ERR_SKEW error is returned. Ifnonce in theserver name, along withencrypted part matches theclient name, timenonce it supplied in its request (to detect replays). It also verifies that the sname andmicrosecond fields fromsrealm in theAuthenticatorresponse matchany recently-seen such tuples, the KRB_AP_ERR_REPEAT error is returned[11]. The server must remember any authenticator presented withinthose in theallowable clock skew, sorequest, and thata replay attempt is guaranteed to fail. If a server loses track of any authenticator presented withintheallowable clock skew, __________________________ [10] Thishost address field isused for user-to-user authentication as described in [6]. [11] Note thatalso correct. It then stores therejection here is restricted to au- thenticatorsticket, session key, start and expiration times, and other information for later use. The key-expiration field from thesame principalencrypted part of the response may be checked to notify thesame server. Otheruser of impending key expiration (the clientprincipals communicating withprogram could then suggest remedial action, such as a password change). See section A.3 for pseudocode. Proper decryption of thesame server principal shouldKRB_AS_REP message is notbe have their authen- ticators rejected if the time and microsecond fields happensufficient tomatch some other client's authenticator. Section 3.2.3. - 20 - Expires 15 OctoberKohl & Neuman [Page 19] RFC 1510 Kerberos September 1993Version 5 - Revision 5.2 it must reject all requests untilverify theclock skew interval has passed. This assures that any lost or re-played authen- ticators will fall outsideidentity of theallowable clock skewuser; the user andcan no longer be successfully replayed (If this is not done,an attacker couldconceivably record the ticket and authentica- tor sent over the networkcooperate to generate aserver, then disable the client's host, pose asKRB_AS_REP format message which decrypts properly but is not from thedisabled host, and replayproper KDC. If theticket and authenticatorhost wishes tosubvert the authentication.). If a sequence number is provided inverify theauthenticator,identity of theserver savesuser, itfor later use in processing KRB_SAFE and/or KRB_PRIV messages. If a subkey is present,must require theserver either saves it for later use or uses it to help generate its own choice for a subkeyuser to present application credentials which can bereturned inverified using aKRB_AP_REP message. The server computessecurely-stored secret key. If those credentials can be verified, then theageidentity of theticket: local (server) time minus the start time inside the Ticket.user can be assured. 3.1.6. Receipt of KRB_ERROR message If thestart timereply message type islater thanKRB_ERROR, then thecurrent timeclient interprets it as an error and performs whatever application-specific tasks are necessary to recover. 3.2. The Client/Server Authentication Exchange Summary Message direction Message type Section Client to Application server KRB_AP_REQ 5.5.1 [optional] Application server to client KRB_AP_REP or 5.5.2 KRB_ERROR 5.9.1 The client/server authentication (CS) exchange is used bymore thannetwork applications to authenticate theallowable clock skewclient to the server and vice versa. The client must have already acquired credentials for the server using the AS orifTGS exchange. 3.2.1. The KRB_AP_REQ message The KRB_AP_REQ contains authentication information which should be part of theINVALID flag is setfirst message inthean authenticated transaction. It contains a ticket, an authenticator, and some additional bookkeeping information (see section 5.5.1 for theKRB_AP_ERR_TKT_NYV errorexact format). The ticket by itself isreturned. Oth- erwise, ifinsufficient to authenticate a client, since tickets are passed across thecurrent time is later than end time by more thannetwork in cleartext(Tickets contain both an encrypted and unencrypted portion, so cleartext here refers to theallowable clock skew,entire unit, which can be copied from one message and replayed in another without any cryptographic skill.), so theKRB_AP_ERR_TKT_EXPIRED errorauthenticator isreturned. If all these checks succeed without an error,used to prevent invalid replay of tickets by proving to the serveris assuredthat the clientpossessesknows thecredentialssession key of theprincipal named in theticket andthus, the client has been authenticatedthus is entitled to use it. The KRB_AP_REQ message is referred to elsewhere as theserver. See section A.10 for pseudocode. 3.2.4."authentication header." 3.2.2. Generation of aKRB_AP_REPKRB_AP_REQ messageTypically,When aclient's request will include both the authentication information and its initial request in the same message, and the server need not explicitly replyclient wishes tothe KRB_AP_REQ. However, if mutualinitiate authentication(not only authenticating the clienttothea server,but also the server toit obtains (either through a credentials cache, theclient) is being performed,AS exchange, or theKRB_AP_REQ message will have MUTUAL-REQUIRED set in its ap-options field, andKohl & Neuman [Page 20] RFC 1510 Kerberos September 1993 TGS exchange) aKRB_AP_REP message is required in response. As withticket and session key for theerror message, this messagedesired service. The client maybe encapsulated inre-use any tickets it holds until they expire. The client then constructs a new Authenticator from theapplication protocol if its "raw" form is not acceptable totheapplication's protocol. The timestampsystem time, its name, andmicrosecond fieldoptionally an application specific checksum, an initial sequence number to be used inthe reply mustKRB_SAFE or KRB_PRIV messages, and/or a session subkey to bethe client's timestamp and microsecond field (as providedused in negotiations for a session key unique to this particular session. Authenticators may not be re-used and will be rejected if replayed to a server (Note that this can make applications based on unreliable transports difficult to code correctly, if theauthenticator)[12]. __________________________ [12]transport might deliver duplicated messages. Inthe Kerberos version 4 protocol, the timestamp in the reply was the client's timestamp plus one. This is not necessary in version 5 because version 5 mes- sages are formatted insuch cases, away that it is not possi- ble to create the reply by judicious message surgery (even in encrypted form) without knowledge of the ap- propriate encryption keys. Section 3.2.4. - 21 - Expires 15 October 1993 Version 5 - Revision 5.2 If a sequence numbernew authenticator must be generated for each retry.). If a sequence number is to be included, it should beran- domlyrandomly chosenas described above for the authenticator. A subkeyso that even after many messages have been exchanged it is not likely to collide with other sequence numbers in use. The client maybe included ifindicate a requirement of mutual authentication or theserver desires to negotiateuse of adifferent subkey.session-key based ticket by setting the appropriate flag(s) in the ap-options field of the message. TheKRB_AP_REP messageAuthenticator is encrypted in the session keyextracted fromand combined with theticket.ticket to form the KRB_AP_REQ message which is then sent to the end server along with any additional application-specific information. See sectionA.11A.9 for pseudocode.3.2.5.3.2.3. Receipt ofKRB_AP_REP message If a KRB_AP_REPKRB_AP_REQ message Authentication isreturned,based on theclient usesserver's current time of day (clocks must be loosely synchronized), thesession key fromauthenticator, and thecredentials obtained forticket. Several errors are possible. If an error occurs, theserver[13]server is expected to reply todecrypt the message, and verifies thatthetimestamp and microsecond fields match thoseclient with a KRB_ERROR message. This message may be encapsulated in theAuthen- ticator it sentapplication protocol if its "raw" form is not acceptable to theserver.protocol. The format of error messages is described in section 5.9.1. The algorithm for verifying authentication information is as follows. Ifthey match, thentheclientmessage type isassured thatnot KRB_AP_REQ, the server returns the KRB_AP_ERR_MSG_TYPE error. If the key version indicated by the Ticket in the KRB_AP_REQ isgenuine. The sequence number and subkey (if present) are retained for later use. See section A.12 for pseudocode. 3.2.6. Using the encryption key After the KRB_AP_REQ/KRB_AP_REP exchange has occurred,not one theclient andservershare an encryption key whichcanbe used byuse (e.g., it indicates an old key, and theapplication. The "true session key" to be used for KRB_PRIV, KRB_SAFE, or other application-specific uses may be chosen byserver no longer possesses a copy of theapplication based onold key), thesubkeysKRB_AP_ERR_BADKEYVER error is returned. If the USE- SESSION-KEY flag is set in theKRB_AP_REP message andap-options field, it indicates to theauthenticator[14]. In some cases,server that the ticket is encrypted in theuse of thissession keywillfrom the server's ticket-granting ticket rather than its secret key (This is used for user-to-user authentication as described in [6]). Since it is possible for the server to beimplicitregistered in multiple realms, with different keys in each, theprotocol;srealm field inothersthemethodunencrypted portion ofuse must be chosen from a several alternatives. We leavetheprotocol negotiations of howticket in the KRB_AP_REQ is used to specify which secret key the server should use to decrypt that ticket. The KRB_AP_ERR_NOKEY Kohl & Neuman [Page 21] RFC 1510 Kerberos September 1993 error code is returned if the server doesn't have the proper key(e.g. selecting an encryption or check- sum type)to decipher theapplication programmer;ticket. The ticket is decrypted using theKerberos proto- col does not constrainversion of theimplementation options. With bothserver's key specified by theone-way and mutual authentication exchanges,ticket. If thepeers should take care notdecryption routines detect a modification of the ticket (each encryption system must provide safeguards tosend sensitive information to each other without proper assurances. In particular, applicationsdetect modified ciphertext; see section 6), the KRB_AP_ERR_BAD_INTEGRITY error is returned (chances are good thatrequire privacy or integrity should usedifferent keys were used to encrypt and decrypt). The authenticator is decrypted using theKRB_AP_REP or KRB_ERROR responsessession key extracted from theserver to client to assure both client and server of their peer's identity.decrypted ticket. Ifan application protocol requires privacy of its messages,decryption shows itcan useto have been modified, theKRB_PRIV message (section 3.5).KRB_AP_ERR_BAD_INTEGRITY error is returned. TheKRB_SAFE message (section 3.4) can be __________________________ [13] Note that for encryptingname and realm of theKRB_AP_REP message,client from thesub-session keyticket are compared against the same fields in the authenticator. If they don't match, the KRB_AP_ERR_BADMATCH error is returned (they might notused, evenmatch, for example, ifpresentthe wrong session key was used to encrypt the authenticator). The addresses in theAuthenticator. [14] Implementationsticket (if any) are then searched for an address matching the operating-system reported address of theprotocol may wish to pro- vide routines to choose subkeys basedclient. If no match is found or the server insists onsession keys and random numbersticket addresses but none are present in the ticket, the KRB_AP_ERR_BADADDR error is returned. If the local (server) time andto orchestrate a negotiated key to be returnedthe client time in theKRB_AP_REP message. Section 3.2.6. - 22 - Expires 15 October 1993 Versionauthenticator differ by more than the allowable clock skew (e.g., 5- Revision 5.2 used to assure integrity. 3.3. The Ticket-Granting Service (TGS) Exchange Summary Message direction Message type Section 1. Client to Kerberos KRB_TGS_REQ 5.4.1 2. Kerberos to client KRB_TGS_REP or 5.4.2 KRB_ERROR 5.9.1 The TGS exchange between a client andminutes), theKerberos Ticket-Granting ServerKRB_AP_ERR_SKEW error isinitiated by a client when it wishes to obtain authentication credentials for a given server (which might be registered in a remote realm), when it wishes to renew or validate an existing ticket, or when it wishes to obtain a proxy ticket. In the first case, the client must already have acquired a ticket forreturned. If theTicket- Granting Service usingserver name, along with theAS exchange (the ticket-granting ticket is usually obtained when aclientinitially authenti- cates toname, time and microsecond fields from thesystem,Authenticator match any recently-seen suchas when a user logs in). The mes- sage format fortuples, theTGS exchangeKRB_AP_ERR_REPEAT error isalmost identical toreturned (Note thatfortheAS exchange. The primary differencerejection here isthat encryp- tion and decryption inrestricted to authenticators from theTGS exchange doessame principal to the same server. Other client principals communicating with the same server principal should nottake place underbe have their authenticators rejected if the time and microsecond fields happen to match some other client'skey. Instead, the session key fromauthenticator.). The server must remember any authenticator presented within theticket-granting ticket or renewable ticket, or sub-session key from an Authenticator is used. Asallowable clock skew, so that a replay attempt is guaranteed to fail. If a server loses track of any authenticator presented within thecase forallowable clock skew, it must reject allapplication servers, expired tickets are not accepted byrequests until theTGS, so once a renewableclock skew interval has passed. This assures that any lost orticket-granting ticket expires, the client must use a separate exchange to obtain valid tickets. The TGS exchange consists of two messages: A request (KRB_TGS_REQ) fromre-played authenticators will fall outside theclient toallowable clock skew and can no longer be successfully replayed (If this is not done, an attacker could conceivably record theKerberos Ticket- Granting Server,ticket anda reply (KRB_TGS_REP or KRB_ERROR). The KRB_TGS_REQ message includes information authenticatingauthenticator sent over theclient plusnetwork to arequest for credentials. The authentica- tion information consists of the authentication header (KRB_AP_REQ) which includesserver, then disable the client'spreviously obtained ticket-granting, renewable, or invalid ticket. Inhost, pose as the disabled host, and replay theticket-grantingticket andproxy cases,authenticator to subvert therequest may include one or more of: a list of network addresses,authentication.). If acol- lection of typed authorization data to be sealedsequence number is provided in theticketauthenticator, the server saves it forauthorizationlater usebyin processing KRB_SAFE and/or KRB_PRIV messages. If a subkey is present, theapplication server, or additional tickets (theserver either saves it for later useof which are described later). The TGS reply (KRB_TGS_REP) contains the requested creden- tials, encryptedor uses it to help generate its own choice for a subkey to be returned in a KRB_AP_REP message. Kohl & Neuman [Page 22] RFC 1510 Kerberos September 1993 The server computes thesession key fromage of theticket-granting ticket or renewable ticket, or if present, inticket: local (server) time minus thesub- session key fromstart time inside theAuthenticator (part ofTicket. If theauthentica- tion header). The KRB_ERROR message contains anstart time is later than the current time by more than the allowable clock skew or if the INVALID flag is set in the ticket, the KRB_AP_ERR_TKT_NYV errorcode and text explaining what went wrong. The KRB_ERROR messageisnot encrypted. The KRB_TGS_REP message contains informa- tion which can be used to detect replays, and to associate Section 3.3. - 23 - Expires 15 October 1993 Version 5 - Revision 5.2 it withreturned. Otherwise, if themessage to which it replies. The KRB_ERROR mes- sage also contains information which can be used to associ- ate it withcurrent time is later than end time by more than themessage to which it replies, butallowable clock skew, thelackKRB_AP_ERR_TKT_EXPIRED error is returned. If all these checks succeed without an error, the server is assured that the client possesses the credentials ofencryptionthe principal named in theKRB_ERROR message precludesticket and thus, theabilityclient has been authenticated todetect replays or fabrications of such messages. 3.3.1.the server. See section A.10 for pseudocode. 3.2.4. Generation ofKRB_TGS_REQa KRB_AP_REP messageBefore sendingTypically, a client's requestto the ticket-granting ser- vice,will include both theclient must determineauthentication information and its initial request inwhich realmtheapplica- tion server is registered[15]. Ifsame message, and theclient doesserver need notalready possess a ticket-granting ticket forexplicitly reply to theappropriate realm, then one must be obtained. This is first attempted by requesting a ticket-granting ticket forKRB_AP_REQ. However, if mutual authentication (not only authenticating thedestination realm fromclient to the server, but also thelocal Kerberosserver(usingto theKRB_TGS_REQclient) is being performed, the KRB_AP_REQ messagerecursively). The Kerberos server may returnwill have MUTUAL-REQUIRED set in its ap-options field, and aTGT for the desired realmKRB_AP_REP message is required inwhich case one can proceed. Alter- natively,response. As with theKerberos servererror message, this message mayreturn a TGT for a realm whichbe encapsulated in the application protocol if its "raw" form is"closer"not acceptable to thedesired realm (further along the standard hierarchical path),application's protocol. The timestamp and microsecond field used inwhich case this stepthe reply must berepeated with a Kerberos server intherealm specifiedclient's timestamp and microsecond field (as provided in thereturned TGT. If neither are returned, thenauthenticator). [Note: In therequest must be retried with aKerberosserver for a realm higherversion 4 protocol, the timestamp in thehierarchy.reply was the client's timestamp plus one. Thisrequest will itself requireis not necessary in version 5 because version 5 messages are formatted in such aticket- granting ticket forway that it is not possible to create thehigher realm which must be obtainedreply byrecursively applying these directions. Once the client obtains a ticket-granting ticket forjudicious message surgery (even in encrypted form) without knowledge of the appropriaterealm,encryption keys.] If a sequence number is to be included, itdetermines which Kerberos servers serve that realm, and contacts one. The list mightshould beobtained through a configuration file or network service; as longrandomly chosen as described above for thesecret keys exchanged by realms are kept secret, only denial of service results from a false Kerberos server. As in the AS exchange, the clientauthenticator. A subkey mayspecify a number of options inbe included if theKRB_TGS_REQ message.server desires to negotiate a different subkey. Theclient prepares the KRB_TGS_REQ message, providing an authentication header as an element of the padata field, and including the same fields as usedKRB_AP_REP message is encrypted in theKRB_AS_REQ message along with several optional fields:session key extracted from theenc-authorization-data fieldticket. See section A.11 for__________________________ [15] This can be accomplished in several ways. It might be known beforehand (since the realm is partpseudocode. 3.2.5. Receipt ofthe principal identifier), or it might be stored inKRB_AP_REP message If anameserver. Presently, however, this informationKRB_AP_REP message isobtainedreturned, the client uses the session key froma configuration file. Iftherealm to be used iscredentials obtainedfrom a nameserver, there is a danger of being spoofed iffor thenameservice providingserver (Note that for encrypting therealm nameKRB_AP_REP message, the sub-session key is notauthenticated. This might result in the use of a realm which has been compromised, and would resultused, even if present inan attacker's ability to compromisetheau- thentication of the application serverAuthenticator.) to decrypt theclient. Section 3.3.1. - 24 - Expires 15 October 1993 Version 5 - Revision 5.2 application server usemessage, andadditional tickets required by some options. In preparing the authentication header,verifies that theclient can select a sub-session key under whichtimestamp and microsecond fields match those in theresponse fromAuthenticator it sent to theKerberos server will be encrypted[16].server. If they match, then thesub-session keyclient isnot specified, the session key from the ticket- granting ticket will be used. Ifassured that theenc-authorization-dataserver ispresent, it must be encrypted in the sub-session key, if present, from the authenticator portion of the authentica- tion header, or if not present in the session key from the ticket-granting ticket. Once prepared, the message is sent to a Kerberos servergenuine. The sequence number and subkey (if present) are retained forthe destination realm.later use. See sectionA.5A.12 for Kohl & Neuman [Page 23] RFC 1510 Kerberos September 1993 pseudocode.3.3.2. Receipt of KRB_TGS_REQ message The KRB_TGS_REQ message is processed in a manner simi- lar to3.2.6. Using theKRB_AS_REQ message, but there are many additional checks to be performed. First,encryption key After theKerberosKRB_AP_REQ/KRB_AP_REP exchange has occurred, the client and servermust determineshare an encryption key whichservercan be used by theaccompanying ticket isapplication. The "true session key" to be used for KRB_PRIV, KRB_SAFE, or other application-specific uses may be chosen by the application based on the subkeys in the KRB_AP_REP message andit must selecttheappropriate keyauthenticator (Implementations of the protocol may wish todecrypt it. Forprovide routines to choose subkeys based on session keys and random numbers and to orchestrate anormal KRB_TGS_REQ message, it willnegotiated key to beforreturned in theticket granting ser- vice, andKRB_AP_REP message.). In some cases, theTGS'suse of this session key will beused. Ifimplicit in theTGT was issued by another realm, thenprotocol; in others theappropriate inter-realm keymethod of use must beused. If the accompanying ticket is notchosen from aticket grant- ing ticket forseveral alternatives. We leave thecurrent realm, but is forprotocol negotiations of how to use the key (e.g., selecting anapplication server inencryption or checksum type) to thecurrent realm,application programmer; theRENEW, VALIDATE, or PROXY options are specified inKerberos protocol does not constrain therequest,implementation options. With both the one-way and mutual authentication exchanges, the peers should take care not to send sensitive information to each other without proper assurances. In particular, applications that require privacy or integrity should use the KRB_AP_REP or KRB_ERROR responses from the serverfor whichto client to assure both client and server of their peer's identity. If an application protocol requires privacy of its messages, it can use the KRB_PRIV message (section 3.5). The KRB_SAFE message (section 3.4) can be used to assure integrity. 3.3. The Ticket-Granting Service (TGS) Exchange Summary Message direction Message type Section 1. Client to Kerberos KRB_TGS_REQ 5.4.1 2. Kerberos to client KRB_TGS_REP or 5.4.2 KRB_ERROR 5.9.1 The TGS exchange between aticket is requested isclient and the Kerberos Ticket-Granting Server is initiated by a client when it wishes to obtain authentication credentials for a given servernamed(which might be registered inthe accompanyinga remote realm), when it wishes to renew or validate an existing ticket,thenor when it wishes to obtain a proxy ticket. In theKDC will decryptfirst case, the client must already have acquired a ticketinfor theauthentication headerTicket-Granting Service using thekey of the server for which it was issued. If noAS exchange (the ticket-granting ticketcan be found inis usually obtained when a client initially authenticates to thepadata field,system, such as when a user logs in). The message format for theKDC_ERR_PADATA_TYPE_NOSUPP errorTGS exchange isreturned. Once the accompanying ticket has been decrypted,almost identical to that for theuser-supplied checksumAS exchange. The primary difference is that encryption and decryption in theAuthenticator must be verified against the contents ofTGS Kohl & Neuman [Page 24] RFC 1510 Kerberos September 1993 exchange does not take place under therequest, andclient's key. Instead, themessage rejected ifsession key from thechecksums do not match (with an error code of KRB_AP_ERR_MODIFIED)ticket-granting ticket orif the checksum is not keyedrenewable ticket, ornot collision-proof (withsub-session key from anerror code of KRB_AP_ERR_INAPP_CKSUM). If the checksum typeAuthenticator isnot sup- ported, the KDC_ERR_SUMTYPE_NOSUPP errorused. As isreturned. Iftheauthorization-data are present, theycase for all application servers, expired tickets aredecrypted using the sub-session key fromnot accepted by theAuthenticator. __________________________ [16] IfTGS, so once a renewable or ticket-granting ticket expires, the clientselects a sub-session key, caremustbe takenuse a separate exchange toensure the randomnessobtain valid tickets. The TGS exchange consists ofthe selected sub- session key. One approach would be to generate a ran- dom number and XOR it with the session keytwo messages: A request (KRB_TGS_REQ) from theticket-granting ticket. Section 3.3.2. - 25 - Expires 15 October 1993 Version 5 - Revision 5.2 If any of the decryptions indicate failed integrity checks,client to theKRB_AP_ERR_BAD_INTEGRITY error is returned. 3.3.3. Generation of KRB_TGS_REP messageKerberos Ticket-Granting Server, and a reply (KRB_TGS_REP or KRB_ERROR). TheKRB_TGS_REPKRB_TGS_REQ messageshares its format withincludes information authenticating theKRB_AS_REP (KRB_KDC_REP), but with its type field set to KRB_TGS_REP. The detailed specification is in section 5.4.2. The response will includeclient plus aticketrequest forthe requested server.credentials. TheKerberos database is queried to retrieveauthentication information consists of therecord for the requested server (including the key withauthentication header (KRB_AP_REQ) which includes the client's previously obtained ticket- granting, renewable, or invalid ticket. In the ticket-granting ticketwill be encrypted). Ifand proxy cases, the requestis formay include one or more of: aticket granting ticket forlist of network addresses, aremote realm, and if no key is shared with the requested realm, then the Kerberos server will select the realm "closest"collection of typed authorization data tothe requested realm with which it does share a key, and use that realm instead. This is the only case where the response from the KDC willbe sealed in the ticket fora different server than that requestedauthorization use by theclient. By default, the address field, the client's name and realm, the list of transited realms, the timeapplication server, or additional tickets (the use ofinitial authentication, the expiration time, andwhich are described later). The TGS reply (KRB_TGS_REP) contains theauthorization data ofrequested credentials, encrypted in thenewly-issued ticket will be copiedsession key from the ticket-granting ticket(TGT)or renewableticket. If the transited field needs to be updated, but the transited type is not supported, the KDC_ERR_TRTYPE_NOSUPP error is returned. Ifticket, or if present, in therequest specifies an endtime, thensubsession key from theendtimeAuthenticator (part of thenew ticketauthentication header). The KRB_ERROR message contains an error code and text explaining what went wrong. The KRB_ERROR message issetnot encrypted. The KRB_TGS_REP message contains information which can be used tothe minimum of (a) that request, (b) the endtime from the TGT,detect replays, and(c) the starttime ofto associate it with theTGT plusmessage to which it replies. The KRB_ERROR message also contains information which can be used to associate it with theminimummessage to which it replies, but the lack of encryption in themaximum life forKRB_ERROR message precludes the ability to detect replays or fabrications of such messages. 3.3.1. Generation of KRB_TGS_REQ message Before sending a request to the ticket-granting service, the client must determine in which realm the application serverand the maximum life foris registered [Note: This can be accomplished in several ways. It might be known beforehand (since thelocalrealm(the maximum life foris part of therequestingprincipalwas already applied when the TGT was issued).identifier), or it might be stored in a nameserver. Presently, however, this information is obtained from a configuration file. If thenew ticket isrealm to be used is obtained from arenewal, then the endtime abovenameserver, there isreplaced by the minimuma danger of(a)being spoofed if thevalue ofnameservice providing therenew_till field ofrealm name is not authenticated. This might result in theticketuse of a realm which has been compromised, and(b) the starttime for the new ticket pluswould result in an attacker's ability to compromise thelife (endtime- starttime)authentication of theold ticket. Ifapplication server to theFORWARDED option has been requested, thenclient.]. If theresultingclient does not already possess a ticket-granting ticketwill containfor theaddresses specifiedappropriate realm, then one must be obtained. This is first attempted by requesting a ticket-granting ticket for theclient. This option will only be honored ifdestination realm from theFORWARDABLE flag is set inlocal Kerberos server (using theTGT.Kohl & Neuman [Page 25] RFC 1510 Kerberos September 1993 KRB_TGS_REQ message recursively). ThePROXY option is similar; the resulting ticket will contain the addresses specified by the client. It will be honored only ifKerberos server may return a TGT for thePROXIABLE flagdesired realm in which case one can proceed. Alternatively, the Kerberos server may return a TGTis set. The PROXY option will not be honored on requestsforadditional ticket-granting tickets. If the requested start time is absent or indicatesatime in the past, then the start time of the ticketrealm which isset"closer" to theauthentication server's current time. If it Section 3.3.3. - 26 - Expires 15 October 1993 Version 5 - Revision 5.2 indicatesdesired realm (further along the standard hierarchical path), in which case this step must be repeated with atimeKerberos server in thefuture, but the POSTDATED option has not beenrealm specifiedor the MAY-POSTDATE flag is not setin theTGT,returned TGT. If neither are returned, then theerror KDC_ERR_CANNOT_POSTDATE is returned. Otherwise, ifrequest must be retried with a Kerberos server for a realm higher in the hierarchy. This request will itself require a ticket-granting tickethas the MAY- POSTDATE flag set, thenfor theresulting ticket willhigher realm which must bepost- dated and the requested starttime is checked against the policy ofobtained by recursively applying these directions. Once thelocal realm. If acceptable,client obtains a ticket-granting ticket for theticket's start time is set as requested,appropriate realm, it determines which Kerberos servers serve that realm, andthe INVALID flag is set.contacts one. Thepostdated ticket mustlist might bevalidated before use by presenting it to the KDC after the starttime has been reached. How- ever, in no case may the starttime, endtime,obtained through a configuration file orrenew-till timenetwork service; as long as the secret keys exchanged by realms are kept secret, only denial of service results from anewly-issued postdated ticket extend beyondfalse Kerberos server. As in therenew-till timeAS exchange, the client may specify a number of options in theticket-granting ticket. IfKRB_TGS_REQ message. The client prepares theENC-TKT-IN-SKEY option has been specified andKRB_TGS_REQ message, providing anadditional ticket has been included inauthentication header as an element of therequest,padata field, and including theKDC will decryptsame fields as used in theadditional ticket usingKRB_AS_REQ message along with several optional fields: thekeyenc-authorization- data field fortheapplication serverto which the additional ticket was issueduse andverify that it is a ticket-granting ticket. If the name of the requested server is missing from the request,additional tickets required by some options. In preparing thename ofauthentication header, the clientin the additional ticket will be used. Otherwisecan select a sub- session key under which thename ofresponse from therequestedKerberos server will becompared to the name ofencrypted (If the clientinselects a sub-session key, care must be taken to ensure theadditional ticket and if dif- ferent,randomness of therequest willselected subsession key. One approach would berejected. If the request succeeds,to generate a random number and XOR it with the session key from theadditional ticket will be used to encryptticket-granting ticket.). If thenew ticket thatsub-session key isissued instead of usingnot specified, the session keyof the server for whichfrom thenewticket-granting ticket will beused[17].used. If thename of the serverenc-authorization-data is present, it must be encrypted in theticket that is presented tosub-session key, if present, from theKDC as partauthenticator portion of the authenticationheader isheader, or if notthat ofpresent in the session key from the ticket-grantingserver itself, andticket. Once prepared, the message is sent to a Kerberos server for the destination realm. See section A.5 for pseudocode. 3.3.2. Receipt of KRB_TGS_REQ message The KRB_TGS_REQ message isregisteredprocessed in a manner similar to therealm ofKRB_AS_REQ message, but there are many additional checks to be performed. First, theKDC, IfKerberos server must determine which server theRENEW optionaccompanying ticket isrequested, thenfor and it must select theKDCappropriate key to decrypt it. For a normal KRB_TGS_REQ message, it willverify that the RENEWABLE flag is set inbe for the Kohl & Neuman [Page 26] RFC 1510 Kerberos September 1993 ticket granting service, andthattherenew_till time is still inTGS's key will be used. If thefuture.TGT was issued by another realm, then the appropriate inter-realm key must be used. If theVALIDATE optionaccompanying ticket isrqeuested,not a ticket granting ticket for theKDC will check thatcurrent realm, but is for an application server in thestarttime has passedcurrent realm, the RENEW, VALIDATE, or PROXY options are specified in the request, and theINVALID flagserver for which a ticket isset. If the PROXY optionrequested isrequested,the server named in the accompanying ticket, then the KDC willcheck thatdecrypt thePROXIABLE flag is setticket in theticket.authentication header using the key of the server for which it was issued. If no ticket can be found in thetests succeed,padata field, theKDC will issue the appropriate new ticket. Whenever a requestKDC_ERR_PADATA_TYPE_NOSUPP error ismade to the ticket-granting server,returned. Once thepresented ticket(s) is(are) checked against a hot-list of tickets which haveaccompanying ticket has beencanceled. This hot-list mightdecrypted, the user-supplied checksum in the Authenticator must beimplemented by storing a rangeverified against the contents ofissue dates for "suspect tickets";the request, and the message rejected ifa presented ticket hadthe checksums do not match (with anauthtime in __________________________ [17] This allows easy implementation of user-to-user authentication [6], which uses ticket-granting ticket session keys in lieuerror code ofsecret server keys in situa- tions where such secret keys could be easily comprom- ised. Section 3.3.3. - 27 - Expires 15 October 1993 Version 5 - Revision 5.2 that range, it would be rejected. In this way, a stolen ticket-granting ticket or renewable ticket cannot be used to gain additional tickets (renewalsKRB_AP_ERR_MODIFIED) orotherwise) once the theft has been reported. Any normal ticket obtained before it was reported stolen will still be valid (because they require no interaction withif theKDC), but only until their normal expiration time. The ciphertext partchecksum is not keyed or not collision-proof (with an error code of KRB_AP_ERR_INAPP_CKSUM). If theresponse inchecksum type is not supported, theKRB_TGS_REP messageKDC_ERR_SUMTYPE_NOSUPP error isencrypted inreturned. If the authorization-data are present, they are decrypted using the sub-session key from theAuthen- ticator, if present, orAuthenticator. If any of thesession key key fromdecryptions indicate failed integrity checks, theticket-granting ticket. ItKRB_AP_ERR_BAD_INTEGRITY error isnot encrypted usingreturned. 3.3.3. Generation of KRB_TGS_REP message The KRB_TGS_REP message shares its format with theclient's secret key. Furthermore, the client's key's expiration date and the key version number fields are left out since these values are stored alongKRB_AS_REP (KRB_KDC_REP), but withthe client's database record, and that record is not neededits type field set tosatisfy a request based on a ticket-granting ticket. SeeKRB_TGS_REP. The detailed specification is in sectionA.65.4.2. The response will include a ticket forpseudocode. 3.3.3.1. Encoding the transited field If the identity oftheserver in the TGT thatrequested server. The Kerberos database ispresentedqueried to retrieve theKDC as part of the authentication header is that of the ticket-granting service, but the TGT was issued from another realm,record for theKDC will look uprequested server (including theinter-realmkeysharedwiththat realm and use that key to decryptwhich theticket.ticket will be encrypted). If the request is for a ticket granting ticket for a remote realm, and if no key isvalid,shared with the requested realm, then theKDC<Kerberos server willhonorselect therequest, subjectrealm "closest" to theconstraints outlined above inrequested realm with which it does share a key, and use that realm instead. This is thesection describingonly case where theAS exchange. The realm part ofresponse from theclient's identityKDC will betaken fromfor a different server than that requested by theticket-granting ticket. Theclient. By default, the address field, the client's name and realm, the list of transited realms, therealm that issuedtime of initial authentication, theticket- granting ticket will be added toexpiration time, and thetransited fieldauthorization data of the newly-issued tickettowill beissued. This is accomplished by reading the transited fieldcopied from the ticket-granting ticket(which(TGT) or renewable ticket. If the transited field needs to be updated, but the transited type istreated asnot supported, the KDC_ERR_TRTYPE_NOSUPP error is returned. Kohl & Neuman [Page 27] RFC 1510 Kerberos September 1993 If the request specifies anunordered setendtime, then the endtime ofrealm names), addingthe newrealmticket is set to theset, then constructing and writing out its encoded (shorthand) form (this may involve a rearrangementminimum ofthe existing encoding). Note(a) that request, (b) theticket-granting service does not addendtime from thenameTGT, and (c) the starttime ofits own realm. Instead, its responsibility is to addthenameTGT plus the minimum of theprevious realm. This prevents a mali- cious Kerberosmaximum life for the application serverfrom intentionally leaving out its own name (it could, however, omit other realms' names). The names of neitherand the maximum life for the local realmnor(the maximum life for theprincipal's realm are to be included inrequesting principal was already applied when thetransited field. They appear elsewhere inTGT was issued). If the new ticketand both are knownis tohave taken part in authenticating the principal. Since the endpoints are not included, both local and single-hop inter-realm authentication result inbe atransited field that is empty. Becauserenewal, then thename of each realm transitedendtime above isadded to Section 3.3.3.1. - 28 - Expires 15 October 1993 Version 5 - Revision 5.2 this field, it might potentially be very long. To decreasereplaced by thelengthminimum ofthis field, its contents are encoded. The initially supported encoding is optimized for(a) thenormal casevalue ofinter-realm communication: a hierarchical arrange- mentthe renew_till field ofrealms using either domain or X.500 style realm names. This encoding (called DOMAIN-X500-COMPRESS) is now described. Realm names inthetransited field are separated by a ",". The ",", "\", trailing "."s, and leading spaces (" ") are special characters,ticket andif they are part(b) the starttime for the new ticket plus the life (endtimestarttime) ofa realm name, they mustthe old ticket. If the FORWARDED option has been requested, then the resulting ticket will contain the addresses specified by the client. This option will only bequotedhonored if the FORWARDABLE flag is set in thetransited field by preced- ing them with a "\". A realm name ending with a "."TGT. The PROXY option isinterpreted as being prepended tosimilar; theprevious realm. For example, we can encode traversal of EDU, MIT.EDU, ATHENA.MIT.EDU, WASHINGTON.EDU, and CS.WASHINGTON.EDU as: "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.". Note thatresulting ticket will contain the addresses specified by the client. It will be honored only ifATHENA.MIT.EDU, or CS.WASHINGTON.EDU were end- points, that they wouldthe PROXIABLE flag in the TGT is set. The PROXY option will not beincluded in this field, and we would have: "EDU,MIT.,WASHINGTON.EDU" A realm name beginning withhonored on requests for additional ticket-granting tickets. If the requested start time is absent or indicates a"/"time in the past, then the start time of the ticket isinterpreted as being appendedset to theprevious realm[18].authentication server's current time. If itis to stand by itself, then it should be preceded byindicates aspace (" "). For example, we can encode traversal of /COM/HP/APOLLO, /COM/HP, /COM, and /COM/DEC as: "/COM,/HP,/APOLLO, /COM/DEC". Liketime in theexample above, if /COM/HP/APOLLO and /COM/DEC are endpoints, they they wouldfuture, but the POSTDATED option has notbe included in this field, and we would have: "/COM,/HP" A null subfield precedingbeen specified orfollowing a "," indicates that all realms betweentheprevious realm andMAY-POSTDATE flag is not set in thenext realm have been traversed[19]. Thus, "," means that all __________________________ [18] ForTGT, then thepurpose of appending,error KDC_ERR_CANNOT_POSTDATE is returned. Otherwise, if therealm precedingticket-granting ticket has thefirst listed realm is considered toMAYPOSTDATE flag set, then the resulting ticket will be postdated and thenull realm (""). [19] Forrequested starttime is checked against thepurposepolicy ofinterpreting null subfields,theclient's realm is considered to precede those inlocal realm. If acceptable, thetransited field,ticket's start time is set as requested, and theserver's realmINVALID flag iscon- sideredset. The postdated ticket must be validated before use by presenting it tofollow them. Section 3.3.3.1. - 29 - Expires 15 October 1993 Version 5 - Revision 5.2 realms along the path betweentheclient andKDC after theserver havestarttime has beentraversed. ",EDU, /COM," means that that all realms fromreached. However, in no case may theclient's realm up to EDU (instarttime, endtime, or renew- till time of adomain style hierar- chy) havenewly-issued postdated ticket extend beyond the renew-till time of the ticket-granting ticket. If the ENC-TKT-IN-SKEY option has beentraversed,specified andthat everything from /COM down to the server's realm inanX.500 styleadditional ticket hasalsobeentraversed. This could occur if the EDU realmincluded inone hierar- chy shares an inter-realmthe request, the KDC will decrypt the additional ticket using the keydirectly withfor the/COM realm in another hierarchy. 3.3.4. Receipt of KRB_TGS_REP message When the KRB_TGS_REP is received byserver to which theclient,additional ticket was issued and verify that it ispro- cessed ina ticket-granting ticket. If thesame manner asname of theKRB_AS_REP processing described above. The primary differencerequested server isthatmissing from thecipher- text part ofrequest, theresponse must be decrypted usingname of theses- sion key fromclient in theticket-grantingadditional ticketrather than the client's secret key. See section A.7 for pseudocode. 3.4. The KRB_SAFE Exchange The KRB_SAFE message maywill beused by clients requiringused. Otherwise theability to detect modificationsname ofmessages they exchange. It achieves this by including a keyed collision- proof checksumthe requested server will be compared to the name of theuser dataclient in the additional ticket andsome control informa- tion. The checksum is keyed with an encryption key (usuallyif different, thelast key negotiated via subkeys, orrequest will be rejected. If the request succeeds, the session keyif no negotiation has occured). 3.4.1. Generation of a KRB_SAFE message When an application wishes to send a KRB_SAFE message, it collects its data andfrom theappropriate control information and computes a checksum over them. The checksum algorithm shouldadditional ticket will besome sort of keyed one-way hash function (such as the RSA-MD5-DES checksum algorithm specified in section 6.4.5, orused to encrypt theDES MAC), generatednew ticket that is issued instead of using thesub-sessionkeyif present, or the session key. Different algorithms may be selected by changing the checksum type inof themessage. Unkeyed or non-collision-proof checksums are not suitable for this use. The control informationserver for which theKRB_SAFE message includes both a timestamp and a sequence number. The designernew ticket will be used (This allows easy implementation ofan application using the KRB_SAFE message must choose at least oneuser-to- user authentication [6], which uses ticket-granting ticket session keys in lieu ofthe two mechanisms. This choice shouldsecret server keys in situations where such secret Kohl & Neuman [Page 28] RFC 1510 Kerberos September 1993 keys could bebased oneasily compromised.). If theneedsname of theapplication protocol. Sequence numbers are useful when all messages sent will be received by one's peer. Connection stateserver in the ticket that ispresently requiredpresented tomaintainthesession key, so maintainingKDC as part of thenext sequence number shouldauthentication header is notpresent an additional prob- lem. Ifthat of theapplication protocolticket- granting server itself, and the server isexpected to tolerate Section 3.4.1. - 30 - Expires 15 October 1993 Version 5 - Revision 5.2 lost messages without them being resent,registered in theuserealm of thetimestamp isKDC, If theappropriate replay detection mechanism. Using timestampsRENEW option isalsorequested, then theappropriate mechanism for multi-cast protocols where all of one's peers share a common sub-session key, but some messagesKDC willbe sent to a subset of one's peers. After computing the checksum,verify that theclient then transmitsRENEWABLE flag is set in theinformationticket andchecksum tothat therecipientrenew_till time is still in themessage format specified in section 5.6.1. 3.4.2. Receipt of KRB_SAFE message When an application receives a KRB_SAFE message, it verifies it as follows.future. Ifany error occurs, an error code is reported for use bytheapplication. The messageVALIDATE option isfirst checked by verifying that the pro- tocol version and type fields matchrqeuested, thecurrent version and KRB_SAFE, respectively. A mismatch generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The application verifiesKDC will check that thechecksum used is a collision- proof keyed checksum,starttime has passed andif itthe INVALID flag isnot, a KRB_AP_ERR_INAPP_CKSUM errorset. If the PROXY option isgenerated. The recipient verifiesrequested, then the KDC will check that theoperating system's report ofPROXIABLE flag is set in thesender's address matchesticket. If thesender's address intests succeed, themessage, and (ifKDC will issue the appropriate new ticket. Whenever arecipient addressrequest isspecified ormade to therecipient requiresticket-granting server, the presented ticket(s) is(are) checked against a hot-list of tickets which have been canceled. This hot-list might be implemented by storing a range of issue dates for "suspect tickets"; if a presented ticket had anaddress)authtime in thatone ofrange, it would be rejected. In this way, a stolen ticket-granting ticket or renewable ticket cannot be used to gain additional tickets (renewals or otherwise) once therecipient's addresses appears astheft has been reported. Any normal ticket obtained before it was reported stolen will still be valid (because they require no interaction with therecipient's addressKDC), but only until their normal expiration time. The ciphertext part of the response in themessage. A failed match for either case generates a KRB_AP_ERR_BADADDR error. ThenKRB_TGS_REP message is encrypted in thetimestamp and usec and/orsub-session key from thesequence number fields are checked. If timestamp and usec are expected and notAuthenticator, if present, orthey are present but not current,theKRB_AP_ERR_SKEW errorsession key key from the ticket-granting ticket. It isgenerated. Ifnot encrypted using theserver name, along withclient's secret key. Furthermore, theclient name, timeclient's key's expiration date andmicrosecond fields from the Authenticator match any recently-seen such tuples,theKRB_AP_ERR_REPEAT error is generated. If an incorrect sequence number is included, or a sequencekey version numberis expected but not present,fields are left out since these values are stored along with theKRB_AP_ERR_BADORDER error is generated. If neither a timestampclient's database record, andusec or a sequence numberthat record ispresent,not needed to satisfy aKRB_AP_ERR_MODIFIED error is generated. Finally,request based on a ticket-granting ticket. See section A.6 for pseudocode. 3.3.3.1. Encoding thechecksum is computed overtransited field If thedata and control information, and if it doesn't matchidentity of thereceived checksum, a KRB_AP_ERR_MODIFIED errorserver in the TGT that isgenerated. If allpresented to thechecks succeed,KDC as part of theapplicationauthentication header isassuredthat of themessageticket-granting service, but the TGT wasgenerated by its peerissued from another realm, the KDC will look up the inter-realm key shared with that realm andwas not modi- fieduse that key to decrypt the ticket. If the ticket is valid, then the KDC will honor the request, subject to the constraints outlined above intransit. 3.5. The KRB_PRIV Exchangethe section describing the AS exchange. TheKRB_PRIV message mayrealm part of the client's identity will beused by clients requiring confidentiality andtaken from theability to detect modificationsticket-granting ticket. The name ofexchanged messages. It achieves this by encryptingtheSection 3.5. - 31 - Expires 15 October 1993 Version 5 - Revision 5.2 messages and adding control information. 3.5.1. Generationrealm that issued the ticket-granting ticket will be added to the transited field ofa KRB_PRIV message When an application wishesthe ticket tosend a KRB_PRIV message, it collects its data andbe issued. This is accomplished by reading theappropriate control information (specified in section 5.7.1) and encrypts them undertransited field from the ticket-granting ticket (which is treated as anencryption key (usuallyunordered set of realm names), adding thelast key negotiated via subkeys, ornew realm to thesession key if no negotiation has occured). As partset, Kohl & Neuman [Page 29] RFC 1510 Kerberos September 1993 then constructing and writing out its encoded (shorthand) form (this may involve a rearrangement of thecontrol information,existing encoding). Note that theclient must chooseticket-granting service does not add the name of its own realm. Instead, its responsibility is touse either a timestamp oradd the name of the previous realm. This prevents asequence number (or both); seemalicious Kerberos server from intentionally leaving out its own name (it could, however, omit other realms' names). The names of neither thediscussion in section 3.4.1 for guidelines on which to use. Afterlocal realm nor theuser data and control informationprincipal's realm areencrypted,to be included in theclient transmitstransited field. They appear elsewhere in theciphertextticket andsome "envelope" informationboth are known to have taken part in authenticating therecipient. 3.5.2. Receipt of KRB_PRIV message When an application receives a KRB_PRIV message, it verifies it as follows. If any error occurs, an error code is reported for use by the application. The message is first checked by verifying that the pro- tocol version and type fields match the current version and KRB_PRIV, respectively. A mismatch generates a KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The application then decryptsprincipal. Since theciphertextendpoints are not included, both local andprocesses the resultant plaintext. If decryption shows the data to have been modified,single-hop inter-realm authentication result in aKRB_AP_ERR_BAD_INTEGRITY error is gen- erated. The recipient verifiestransited field that is empty. Because theoperating system's reportname ofthe sender's address matches the sender's address in the message, and (if a recipient addresseach realm transited isspecified oradded to this field, it might potentially be very long. To decrease therecipient requires an address) that onelength ofthe recipient's addresses appears as the recipient's address in the message. A failed matchthis field, its contents are encoded. The initially supported encoding is optimized foreitherthe normal casegeneratesof inter-realm communication: aKRB_AP_ERR_BADADDR error. Then the timestamp and usec and/orhierarchical arrangement of realms using either domain or X.500 style realm names. This encoding (called DOMAIN-X500-COMPRESS) is now described. Realm names in thesequence number fieldstransited field arechecked. If timestampseparated by a ",". The ",", "\", trailing "."s, andusecleading spaces (" ") areexpectedspecial characters, andnot present, orif they arepresent but not current, the KRB_AP_ERR_SKEW error is generated. If the server name, along with the clientpart of a realm name,time and microsecond fields fromthey must be quoted in theAuthenticator match any recently-seen such tuples, the KRB_AP_ERR_REPEAT error is generated. If an incorrect sequence number is included, or a sequence number is expected but not present, the KRB_AP_ERR_BADORDER error is generated. If neither a time- stamp and usec ortransited field by preceding them with asequence number is present,"\". A realm name ending with aKRB_AP_ERR_MODIFIED error"." isgenerated. If all the checks succeed,interpreted as being prepended to theapplicationprevious realm. For example, we canassume the message was generated by its peer,encode traversal of EDU, MIT.EDU, ATHENA.MIT.EDU, WASHINGTON.EDU, andwas securely transmitted (without intruders able to see the unencrypted contents). Section 3.5.2. - 32 - Expires 15 October 1993 Version 5 - Revision 5.2 3.6. The KRB_CRED Exchange The KRB_CRED message mayCS.WASHINGTON.EDU as: "EDU,MIT.,ATHENA.,WASHINGTON.EDU,CS.". Note that if ATHENA.MIT.EDU, or CS.WASHINGTON.EDU were endpoints, that they would not beused by clients requiring the ability to send Kerberos credentials from one host to another. It achievesincluded in thisby sending the tickets together with encrypted data containing the session keysfield, andother information associatedwe would have: "EDU,MIT.,WASHINGTON.EDU" A realm name beginning withthe tickets. 3.6.1. Generation of a KRB_CRED message When an application wishes to send a KRB_CRED message it first (using the KRB_TGS exchange) obtains credentials to be sent to the remote host. It then constructsaKRB_CRED mes- sage using the ticket or tickets so obtained, placing the session key needed"/" is interpreted as being appended touse each ticket inthekey field ofprevious realm (For thecorresponding KrbCredInfo sequencepurpose of appending, theencrypted part ofrealm preceding the first listed realm is considered to be theKRB_CRED message. Other information associated with each ticket and obtained during the KRB_TGS exchangenull realm ("")). If it isalso placed in the corresponding KrbCredInfo sequence in the encrypted part of the KRB_CRED message. The current time and, if specifically requiredto stand bythe application the nonce, s-address, and r- address fields, are placed in the encrypted part of the KRB_CRED message which isitself, thenencrypted under an encryption key previosuly exchanged in the KRB_AP exchange (usually the last key negotiated via subkeys, or the session key if no negotiation has occured). 3.6.2. Receipt of KRB_CRED message When an application receives a KRB_CRED message,itverifies it. If any error occurs, an error code is reported for use by the application. The message is verifiedshould be preceded bychecking that the protocol versiona space (" "). For example, we can encode traversal of /COM/HP/APOLLO, /COM/HP, /COM, andtype fields match/COM/DEC as: "/COM,/HP,/APOLLO, /COM/DEC". Kohl & Neuman [Page 30] RFC 1510 Kerberos September 1993 Like thecurrent versionexample above, if /COM/HP/APOLLO andKRB_CRED, respectively./COM/DEC are endpoints, they they would not be included in this field, and we would have: "/COM,/HP" Amismatch generates a KRB_AP_ERR_BADVERSIONnull subfield preceding orKRB_AP_ERR_MSG_TYPE error. The application then decryptsfollowing a "," indicates that all realms between theciphertextprevious realm andprocesses the resultant plaintext. If decryption showsthedata tonext realm have beenmodified, a KRB_AP_ERR_BAD_INTEGRITY error is gen- erated. If present or required, the recipient verifies thattraversed (For theoperating system's reportpurpose of interpreting null subfields, thesender's address matches the sender's addressclient's realm is considered to precede those in themessage,transited field, andthat one oftherecipient's addresses appears asserver's realm is considered to follow them.). Thus, "," means that all realms along therecipient's address inpath between themessage. A failed match for either case generates a KRB_AP_ERR_BADADDR error. The timestampclient andusec fields (andthenonce field if required) are checked next. Ifserver have been traversed. ",EDU, /COM," means that that all realms from thetimestampclient's realm up to EDU (in a domain style hierarchy) have been traversed, andusec are not present, or they are present but not current,that everything from /COM down to theKRB_AP_ERR_SKEW error is generated. If allserver's realm in an X.500 style has also been traversed. This could occur if thechecks succeed,EDU realm in one hierarchy shares an inter-realm key directly with theapplication stores each/COM realm in another hierarchy. 3.3.4. Receipt of KRB_TGS_REP message When thenew tickets in its ticket cache together withKRB_TGS_REP is received by theSection 3.6.2. - 33 - Expires 15 October 1993 Version 5 - Revision 5.2 session key and other informationclient, it is processed in thecorresponding KrbCredInfo sequence fromsame manner as theencryptedKRB_AS_REP processing described above. The primary difference is that the ciphertext part of theKRB_CRED message. 4. The Kerberos Database The Kerberos serverresponse musthave access to a database contain- ing the principal identifiers and secret keys of principals tobeauthenticated[20]. 4.1. Database contents A database entry should contain at leastdecrypted using thefollowing fields: Field Value name Principal's identif- iersession keyPrincipal'sfrom the ticket-granting ticket rather than the client's secretkey p_kvno Principal's key version max_life Maximum lifetime for Tickets max_renewable_life Maximum total lifetimekey. See section A.7 forrenewable Ticketspseudocode. 3.4. Thename field is an encodingKRB_SAFE Exchange The KRB_SAFE message may be used by clients requiring the ability to detect modifications of messages they exchange. It achieves this by including a keyed collisionproof checksum of theprincipal's identifier.user data and some control information. Thekey field containschecksum is keyed with an encryptionkey. Thiskeyis(usually theprincipal's secret key. (Thelast keycan be encrypted before storage under a Kerberos "master key" to protect it in case the database is compromised butnegotiated via subkeys, or themastersession keyis not. In that case,if no negotiation has occured). 3.4.1. Generation of a KRB_SAFE message When anextra field must be addedapplication wishes toindicatesend a KRB_SAFE message, it collects its data and themas- ter key version used, see below.)appropriate control information and computes a checksum over them. Thep_kvno field ischecksum algorithm should be some sort of keyed one-way hash function (such as the RSA-MD5-DES checksum algorithm specified in section 6.4.5, or the DES MAC), generated using the sub-session keyversion number ofif present, or theprincipal's secretsession key.The max_life field containsDifferent algorithms may be selected by changing themaximum allowable lifetime (end- time - starttime) for any Ticket issued for this principal. The max_renewable_life field containschecksum type in themaximum allowable total lifetime for any renewable Ticket issuedmessage. Unkeyed or non-collision-proof checksums are not suitable for thisprincipal. (See section 3.1use. The control information for the KRB_SAFE message includes both adescriptionKohl & Neuman [Page 31] RFC 1510 Kerberos September 1993 timestamp and a sequence number. The designer ofhow these lifetimes are used in determiningan application using thelifetimeKRB_SAFE message must choose at least one ofa given Ticket.) A server may provide KDC service to several realms, as long asthedatabase representation provides a mechanism to distinguish between principal records with identifiers which differ only intwo mechanisms. This choice should be based on therealm name. __________________________ [20] The implementationneeds of theKerberos server need not combine the database and the server on the same machine; itapplication protocol. Sequence numbers are useful when all messages sent will be received by one's peer. Connection state isfeasiblepresently required tostoremaintain theprincipal database in, say, a network name service, as long assession key, so maintaining theentries stored therein are protected from disclosure to and modification by unauthorized parties. However, we recommend against such strategies, as they can make system management and threat analysis quite complex. Section 4.1. - 34 - Expires 15 October 1993 Version 5 - Revision 5.2 Whennext sequence number should not present anapplication server's key changes, ifadditional problem. If thechangeapplication protocol isroutine (i.e. notexpected to tolerate lost messages without them being resent, theresult of disclosureuse of theold key),timestamp is theold key should be retained byappropriate replay detection mechanism. Using timestamps is also theserver untilappropriate mechanism for multi-cast protocols where alltickets that had been issued using that key have expired. Becauseofthis, it is possible for several keys to be active forone's peers share asingle principal. Ciphertext encrypted incommon sub-session key, but some messages will be sent to aprincipal's key is always tagged with the versionsubset of one's peers. After computing thekey that was used for encryption,checksum, the client then transmits the information and checksum tohelpthe recipientfindin theproper key for decryption.message format specified in section 5.6.1. 3.4.2. Receipt of KRB_SAFE message Whenmore than one keyan application receives a KRB_SAFE message, it verifies it as follows. If any error occurs, an error code isactivereported fora particular prin- cipal, the principal will have more than one record inuse by theKerberos database.application. Thekeys and key version numbers will differ between the records (the rest ofmessage is first checked by verifying that the protocol version and type fieldsmay or may not bematch thesame). Whenever Kerberos issuescurrent version and KRB_SAFE, respectively. A mismatch generates aticket,KRB_AP_ERR_BADVERSION orresponds to a request for initial authentication, the most recent key (known byKRB_AP_ERR_MSG_TYPE error. The application verifies that theKerberos server) will bechecksum usedfor encryption. Thisisthe key with the highest key version number. 4.2. Additional fields Project Athena's KDC implementation uses additional fields in its database: Field Value K_kvno Kerberos' key version expiration Expiration date for entry attributes Bit field of attributes mod_date Timestamp of last modification mod_name Modifying principal's identifiera collisionproof keyed checksum, and if it is not, a KRB_AP_ERR_INAPP_CKSUM error is generated. TheK_kvno field indicatesrecipient verifies that thekey versionoperating system's report of theKerberos master key under whichsender's address matches theprincipal's secret keysender's address in the message, and (if a recipient address isencrypted. After an entry's expiration date has passed,specified or theKDC will returnrecipient requires anerror to any client attempting to gain tick- etsaddress) that one of the recipient's addresses appears asor fortheprincipal. (A database may want to main- tain two expiration dates: onerecipient's address in the message. A failed match for either case generates a KRB_AP_ERR_BADADDR error. Then theprincipal,timestamp andone forusec and/or theprincipal's current key. This allows password aging to work independently ofsequence number fields are checked. If timestamp and usec are expected and not present, or they are present but not current, theprincipal's expiration date. However, due toKRB_AP_ERR_SKEW error is generated. If thelimited space inserver name, along with theresponses,client name, time and microsecond fields from theKDC must combineAuthenticator match any recently-seen such tuples, thekey expiration and principal expiration date into a single value called "key_exp", whichKRB_AP_ERR_REPEAT error isused asgenerated. If an incorrect sequence number is included, or ahint tosequence number is expected but not present, theuser to take administrative action.) The attributes fieldKRB_AP_ERR_BADORDER error is generated. If neither abitfield used to governtimestamp and usec or a sequence number is present, a KRB_AP_ERR_MODIFIED error is generated. Kohl & Neuman [Page 32] RFC 1510 Kerberos September 1993 Finally, theoperations involvingchecksum is computed over theprincipal. This field might be useful in conjunction with user registration procedures, for site-specific policy implementations (Project Athena currently usesdata and control information, and if itfor their user registration process Section 4.2. - 35 - Expires 15 October 1993 Version 5 - Revision 5.2 controlled by the system-wide database service, Moira [7]),. or to identifydoesn't match the"string to key" conversion algorithm used forreceived checksum, aprincipal's key[21]. Other bits are used to indicate that certain ticket options should not be allowed in tickets encrypted under a principal's key (one bit each): Disallow issuing postdated tickets, disallow issuing forwardable tickets, disallow issuing tickets based on TGT authentica- tion, disallow issuing renewable tickets, disallow issuing proxiable tickets, and disallow issuing tickets for which the principalKRB_AP_ERR_MODIFIED error is generated. If all theserver. The mod_date field containschecks succeed, thetime of last modifica- tion ofapplication is assured that theentry,message was generated by its peer andthe mod_name field contains the name of the principal which lastwas not modifiedthe entry. 4.3. Frequently Changing Fields Some KDC implementationsin transit. 3.5. The KRB_PRIV Exchange The KRB_PRIV message maywishbe used by clients requiring confidentiality and the ability tomaintaindetect modifications of exchanged messages. It achieves this by encrypting thelast time thatmessages and adding control information. 3.5.1. Generation of arequest was made byKRB_PRIV message When an application wishes to send aparticular principal. Information that might be maintained includesKRB_PRIV message, it collects its data and thetime ofappropriate control information (specified in section 5.7.1) and encrypts them under an encryption key (usually the lastrequest,key negotiated via subkeys, or thetimesession key if no negotiation has occured). As part of thelast request for a ticket-granting ticket, the time ofcontrol information, thelastclient must choose to useofeither aticket-granting ticket,timestamp orother times. This information can then be returned toa sequence number (or both); see theuserdiscussion inthe last-req field (seesection5.2). Other frequently changing information that can be main- tained is the latest expiration time3.4.1 forany tickets that have been issued using each key. This field would be used to indicate how long old keys must remain validguidelines on which toallowuse. After thecontinued use of outstanding tickets. 4.4. Site Constants The KDC implementation should haveuser data and control information are encrypted, thefollowing confi- gurable constants or options, to allow an administrator to makeclient transmits the ciphertext andenforce policy decisions: + The minimum supported lifetime (usedsome "envelope" information todetermine whethertheKDC_ERR_NEVER_VALID error should be returned). This constant should reflect reasonable expectationsrecipient. 3.5.2. Receipt ofround-trip time toKRB_PRIV message When an application receives a KRB_PRIV message, it verifies it as follows. If any error occurs, an error code is reported for use by theKDC, encryption/decryption time, and processing timeapplication. The message is first checked by verifying that theclientprotocol version andtarget server,type fields match the current version andit should allow forKRB_PRIV, respectively. A mismatch generates aminimum "useful" lifetime. +KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. Themaximum allowable total (renewable) lifetime ofapplication then decrypts the ciphertext and processes the resultant plaintext. If decryption shows the data to have been modified, aticket (renew_till - starttime). +KRB_AP_ERR_BAD_INTEGRITY error is generated. Themaximum allowable lifetimerecipient verifies that the operating system's report of the sender's address matches the sender's address in the message, and (if aticket (endtime - starttime). __________________________ [21] Seerecipient address is specified or thediscussionrecipient requires an address) that one of thepadata fieldrecipient's addresses appears as the recipient's address insection 5.4.2the message. A failed match fordetails on why this can be useful. Section 4.4. - 36 - Expires 15 October 1993 Version 5 - Revision 5.2 + Whether to allow the issue of tickets with empty address fields (includingeither case generates a KRB_AP_ERR_BADADDR error. Then theability to specify that such tick- ets may only be issued iftimestamp and usec and/or therequest specifies some authorization_data). + Whether proxiable, forwardable, renewable or post-datable ticketssequence number fields areto be issued. 5. Message Specifications The following sections describe the exact contentschecked. If timestamp andencoding of protocol messagesusec are expected andobjects. The ASN.1 base definitionsnot present, or they arepresented in the first subsection. The remaining subsections specifypresent but not current, theprotocol objects (tickets and authenticators) and messages. Specification of encryp- tion and checksum techniques, andKRB_AP_ERR_SKEW error is generated. If thefields related to them, appear in section 6. 5.1. ASN.1 Distinguished Encoding Representation All uses of ASN.1 inserver name, along with Kohl & Neuman [Page 33] RFC 1510 Kerberosshall use the Dis- tinguished Encoding Representation of the data elements as described inSeptember 1993 theX.509 specification, section 8.7 [8]. 5.2. ASN.1 Base Definitions The following ASN.1 base definitions are used inclient name, time and microsecond fields from therest of this section. Note that sinceAuthenticator match any recently-seen such tuples, theunderscore char- acter (_)KRB_AP_ERR_REPEAT error is generated. If an incorrect sequence number is included, or a sequence number is expected but notpermitted in ASN.1 names,present, thehyphen (-)KRB_AP_ERR_BADORDER error isused in its place forgenerated. If neither a timestamp and usec or a sequence number is present, a KRB_AP_ERR_MODIFIED error is generated. If all thepurposes of ASN.1 names. Realm ::= GeneralString PrincipalName ::= SEQUENCE { name-type[0] INTEGER, name-string[1] SEQUENCE OF GeneralString } Kerberos realms are encoded as GeneralStrings. Realms shall not contain a character withchecks succeed, thecode 0 (the ASCII NUL). Most realms will usually consist of several components separatedapplication can assume the message was generated byperiods (.), inits peer, and was securely transmitted (without intruders able to see thestyle of Internet Domain Names, or separatedunencrypted contents). 3.6. The KRB_CRED Exchange The KRB_CRED message may be used byslashes (/) inclients requiring thestyle of X.500 names. Acceptable forms for realm names are specified in section 7. A PrincipalName is a typed sequence of com- ponents consisting ofability to send Kerberos credentials from one host to another. It achieves this by sending thefollowing sub-fields: name-type This field specifiestickets together with encrypted data containing thetypesession keys and other information associated with the tickets. 3.6.1. Generation ofname that fol- lows. Pre-defined values for this field are specified in section 7.2. The name-type should be treated asahint. IgnoringKRB_CRED message When an application wishes to send a KRB_CRED message it first (using thename type, no two names canKRB_TGS exchange) obtains credentials to be sent to thesame (i.e. at least one ofremote host. It then constructs a KRB_CRED message using thecomponents,ticket or tickets so obtained, placing therealm, must be different). Section 5.2. - 37 - Expires 15 October 1993 Version 5 - Revision 5.2 This constraint may be eliminatedsession key needed to use each ticket in thefuture. name-stringThiskey fieldencodes aof the corresponding KrbCredInfo sequence ofcomponents that form a name,the encrypted part of the the KRB_CRED message. Other information associated with eachcomponent encoded as a General- String. Taken together, a PrincipalNameticket anda Realm form a principal identifier. Most Princi- palNames will have only a few components (typi- cally one or two). KerberosTime ::= GeneralizedTime -- Specifying UTC time zone (Z) The timestamps usedobtained during the KRB_TGS exchange is also placed inKerberos are encoded as General- izedTimes. An encoding shall specifytheUTC time zone (Z) and shall not include any fractional portionscorresponding KrbCredInfo sequence in the encrypted part of theseconds. It further shall not include any separators. Example:KRB_CRED message. Theonly valid format for UTCcurrent time6 minutes, 27 seconds after 9 pm on 6 November 1985 is 19851106210627Z. HostAddress ::= SEQUENCE { addr-type[0] INTEGER, address[1] OCTET STRING } HostAddresses ::= SEQUENCE OF SEQUENCE { addr-type[0] INTEGER, address[1] OCTET STRING } The host adddress encodings consists of two fields: addr-type This field specifiesand, if specifically required by thetype of address that follows. Pre-defined values for this fieldapplication the nonce, s- address, and raddress fields, arespecifiedplaced insection 8.1. address This field encodes a single address of type addr- type. The two forms differ slightly. HostAddress contains exactly one address; HostAddresses contains a sequence of possibly many addresses. AuthorizationData ::= SEQUENCE OF SEQUENCE { ad-type[0] INTEGER, ad-data[1] OCTET STRING } ad-data This field contains authorization data to be interpreted according tothevalueencrypted part of theSection 5.2. - 38 - Expires 15 October 1993 Version 5 - Revision 5.2 corresponding ad-type field. ad-type This field specifies the format for the ad-data subfield. All negative values are reserved for local use. Non-negative values are reserved for registered use. APOptions ::= BIT STRING { reserved(0), use-session-key(1), mutual-required(2) } TicketFlags ::= BIT STRING { reserved(0), forwardable(1), forwarded(2), proxiable(3), proxy(4), may-postdate(5), postdated(6), invalid(7), renewable(8), initial(9), pre-authent(10), hw-authent(11) } KDCOptions ::= BIT STRING { reserved(0), forwardable(1), forwarded(2), proxiable(3), proxy(4), allow-postdate(5), postdated(6), unused7(7), renewable(8), unused9(9), unused10(10), unused11(11), renewable-ok(27), enc-tkt-in-skey(28), renew(30), validate(31) } LastReq ::= SEQUENCE OF SEQUENCE { lr-type[0] INTEGER, lr-value[1] KerberosTime } Section 5.2. - 39 - Expires 15 October 1993 Version 5 - Revision 5.2 lr-type This field indicates how the following lr-value fieldKRB_CRED message which isto be interpreted. Negative values indi- cate that the information pertains only tothen encrypted under an encryption key previosuly exchanged in theresponding server. Non-negative values pertain to all servers forKRB_AP exchange (usually therealm. Iflast key negotiated via subkeys, or thelr-type field is zero (0), thensession key if noinforma- tionnegotiation has occured). 3.6.2. Receipt of KRB_CRED message When an application receives a KRB_CRED message, it verifies it. If any error occurs, an error code isconveyedreported for use by thelr-value subfield. If the absolute value of the lr-type fieldapplication. The message isone (1), thenverified by checking that thelr-value subfield isprotocol version and type fields match thetime of last initial request forcurrent version and KRB_CRED, respectively. A mismatch generates aTGT. If it is two (2),KRB_AP_ERR_BADVERSION or KRB_AP_ERR_MSG_TYPE error. The application then decrypts thelr-value subfield isciphertext and processes thetime of last initial request.resultant plaintext. Ifit is three (3), then the lr-value subfield isdecryption shows thetime of issue for the newest ticket-granting ticket used. If itdata to have been modified, a KRB_AP_ERR_BAD_INTEGRITY error isfour (4), thengenerated. Kohl & Neuman [Page 34] RFC 1510 Kerberos September 1993 If present or required, thelr-value subfield isrecipient verifies that thetimeoperating system's report of thelast renewal.sender's address matches the sender's address in the message, and that one of the recipient's addresses appears as the recipient's address in the message. A failed match for either case generates a KRB_AP_ERR_BADADDR error. The timestamp and usec fields (and the nonce field if required) are checked next. Ifit is five (5), thenthelr-value subfieldtimestamp and usec are not present, or they are present but not current, the KRB_AP_ERR_SKEW error is generated. If all thetimechecks succeed, the application stores each oflast request (of any type). lr-value This field containsthetimenew tickets in its ticket cache together with the session key and other information in the corresponding KrbCredInfo sequence from the encrypted part of thelast request.KRB_CRED message. 4. ThetimeKerberos Database The Kerberos server mustbe interpreted accordinghave access to a database containing thecon- tentsprincipal identifiers and secret keys of principals to be authenticated (The implementation of theaccompanying lr-type subfield. See section 6 forKerberos server need not combine thedefinitions of Checksum, Check- sumType, EncryptedData, EncryptionKey, EncryptionType, and KeyType. 5.3. Ticketsdatabase andAuthenticators This section describestheformat and encryption param- eters for tickets and authenticators. When a ticket or authenticator is included in a protocol messageserver on the same machine; it istreated as an opaque object. 5.3.1. Tickets A ticket is a record that helps a client authenticatefeasible toa service. A Ticket containsstore the principal database in, say, a network name service, as long as the entries stored therein are protected from disclosure to and modification by unauthorized parties. However, we recommend against such strategies, as they can make system management and threat analysis quite complex.). 4.1. Database contents A database entry should contain at least the followinginformation: Ticket ::= [APPLICATION 1] SEQUENCE { tkt-vno[0] INTEGER, realm[1] Realm, sname[2] PrincipalName, enc-part[3] EncryptedData } -- Encrypted part of ticket EncTicketPart ::= [APPLICATION 3] SEQUENCE { flags[0] TicketFlags, key[1] EncryptionKey, crealm[2] Realm, cname[3] PrincipalName, Section 5.3.1. - 40 - Expires 15 October 1993 Version 5 - Revision 5.2 transited[4] TransitedEncoding, authtime[5] KerberosTime, starttime[6] KerberosTime OPTIONAL, endtime[7] KerberosTime, renew-till[8] KerberosTime OPTIONAL, caddr[9] HostAddresses OPTIONAL, authorization-data[10] AuthorizationData OPTIONAL } -- encoded Transited field TransitedEncoding ::= SEQUENCE { tr-type[0] INTEGER, -- must be registered contents[1] OCTET STRING }fields: Field Value name Principal's identifier key Principal's secret key p_kvno Principal's key version max_life Maximum lifetime for Tickets max_renewable_life Maximum total lifetime for renewable Tickets The name field is an encoding ofEncTicketPart is encrypted inthe principal's identifier. The keyshared by Kerberos andfield contains an encryption key. This key is theend server (the server'sprincipal's secretkey). See section 6 forkey. (The key can be encrypted before storage under a Kerberos "master key" to protect it in case theformat ofdatabase is compromised but theciphertext. tkt-vno Thismaster key is not. In that case, an extra fieldspecifiesmust be added to indicate the master key versionnumber forused, see below.) The p_kvno field is theticket format. This document describeskey version number5. realm Thisof the principal's secret key. The max_life fieldspecifiescontains therealm thatmaximum allowable lifetime (endtime - starttime) for any Ticket issueda ticket. It also serves to identifyfor this principal. The max_renewable_life Kohl & Neuman [Page 35] RFC 1510 Kerberos September 1993 field contains therealm partmaximum allowable total lifetime for any renewable Ticket issued for this principal. (See section 3.1 for a description of how these lifetimes are used in determining theserver's principal identifier. Sincelifetime of aKerberosgiven Ticket.) A servercanmay provide KDC service to several realms, as long as the database representation provides a mechanism to distinguish between principal records with identifiers which differ onlyissue tickets for servers within its realm,in thetwo will always be identi- cal. sname This field specifiesrealm name. When an application server's key changes, if thename partchange is routine (i.e., not the result of disclosure of theserver's identity. enc-part This field holdsold key), theencrypted encodingold key should be retained by the server until all tickets that had been issued using that key have expired. Because of this, it is possible for several keys to be active for a single principal. Ciphertext encrypted in a principal's key is always tagged with theEncTicketPart sequence. flags This field indicates whichversion ofvarious options were used or requested whentheticketkey that wasissued. Itused for encryption, to help the recipient find the proper key for decryption. When more than one key is active for abit-field, whereparticular principal, theselected options are indicated byprincipal will have more than one record in thebit being set (1),Kerberos database. The keys and key version numbers will differ between the records (the rest of theunselected options and reservedfieldsbeing reset (0). Bit 0 ismay or may not be the same). Whenever Kerberos issues a ticket, or responds to a request for initial authentication, the mostsignificant bit. The encoding ofrecent key (known by thebitsKerberos server) will be used for encryption. This isspecified in section 5.2. The flags are described in more detail above in section 2. The meanings oftheflags are: Bit(s) Name Description 0 RESERVED Reservedkey with the highest key version number. 4.2. Additional fields Project Athena's KDC implementation uses additional fields in its database: Field Value K_kvno Kerberos' key version expiration Expiration date forfuture expansionentry attributes Bit field ofthis field. Section 5.3.1. - 41 - Expires 15 October 1993 Version 5 - Revision 5.2 1 FORWARDABLEattributes mod_date Timestamp of last modification mod_name Modifying principal's identifier TheFORWARDABLE flag is normally only interpreted byK_kvno field indicates theTGS, and can be ignored by end servers. When set, this flag tellskey version of theticket-granting server that itKerberos master key under which the principal's secret key isOKencrypted. After an entry's expiration date has passed, the KDC will return an error toissue a new ticket- granting ticket with a different network address based onany client attempting to gain tickets as or for thepresented ticket. 2 FORWARDED When set, this flag indicates thatprincipal. (A database may want to maintain two expiration dates: one for theticket has either been forwarded or was issued based on authentication involving a forwarded ticket-granting ticket. 3 PROXIABLE The PROXIABLE flag is normally only interpreted by the TGS,principal, andcan be ignored by end servers. The PROXIABLE flag has an interpretation identicalone for the principal's current key. This allows password aging tothatwork independently of theFORWARDABLE flag, except thatprincipal's Kohl & Neuman [Page 36] RFC 1510 Kerberos September 1993 expiration date. However, due to thePROXIABLE flag tellslimited space in theticket-granting server that only non- ticket-granting tickets may be issued with different network addresses. 4 PROXY When set, this flag indicates thatresponses, the KDC must combine the key expiration and principal expiration date into aticketsingle value called "key_exp", which is used as aproxy. 5 MAY-POSTDATEhint to the user to take administrative action.) TheMAY-POSTDATE flagattributes field isnormally only interpreted bya bitfield used to govern theTGS, and canoperations involving the principal. This field might beignoreduseful in conjunction with user registration procedures, for site-specific policy implementations (Project Athena currently uses it for their user registration process controlled byend servers. This flag tellstheticket-granting server thatsystem-wide database service, Moira [7]), or to identify the "string to key" conversion algorithm used for apost- dated ticket may be issued basedprincipal's key. (See the discussion of the padata field in section 5.4.2 for details on why thisticket-granting ticket. 6 POSTDATED This flag indicates that this ticket has been postdated. The end-servicecancheck the authtime fieldbe useful.) Other bits are used tosee when the original authentication occurred. 7 INVALID This flag indicatesindicate thatacertain ticketis invalid, and it mustoptions should not bevalidated by the KDC before use. Application servers must rejectallowed in tickets encrypted under a principal's key (one bit each): Disallow issuing postdated tickets, disallow issuing forwardable tickets, disallow issuing tickets based on TGT authentication, disallow issuing renewable tickets, disallow issuing proxiable tickets, and disallow issuing tickets for whichhave this flag set. 8 RENEWABLE The RENEWABLE flagthe principal isnormally only interpreted bytheTGS,server. The mod_date field contains the time of last modification of the entry, andcan usually be ignored by end servers (some particu- larly careful serversthe mod_name field contains the name of the principal which last modified the entry. 4.3. Frequently Changing Fields Some KDC implementations may wish todisal- low renewable tickets). A renewable ticket can be used to obtain a replace- ment ticketmaintain the last time thatexpires atalater date. Section 5.3.1. - 42 - Expires 15 October 1993 Version 5 - Revision 5.2 9 INITIAL This flag indicates that this ticketrequest wasissued using the AS protocol, and not issued based onmade by aticket-granting ticket. 10 PRE-AUTHENT This flag indicatesparticular principal. Information thatduring initial authentication, the client was authenti- cated bymight be maintained includes theKDC before a ticket was issued. The strengthtime of thepre- authentication method is not indicated, but is acceptable tolast request, theKDC. 11 HW-AUTHENT This flag indicates thattime of theprotocol employedlast request forinitial authentication requireda ticket-granting ticket, the time of the last use ofhardware expected toa ticket-granting ticket, or other times. This information can then bepossessed solely by the named client. The hardware authentication method is selected byreturned to theKDC and the strength ofuser in themethodlast-req field (see section 5.2). Other frequently changing information that can be maintained isnot indicated. 12-31 RESERVED Reservedthe latest expiration time forfuture use. keyany tickets that have been issued using each key. This fieldexists in the ticket and the KDC response and iswould be used topass the session key from Kerberosindicate how long old keys must remain valid to allow theapplication server andcontinued use of outstanding tickets. 4.4. Site Constants The KDC implementation should have theclient.following configurable constants or options, to allow an administrator to make and enforce policy decisions: + Thefield's encoding is described in section 6.2. crealm This field containsminimum supported lifetime (used to determine whether thenameKDC_ERR_NEVER_VALID error should be returned). This constant should reflect reasonable expectations of round-trip time to therealm in whichKohl & Neuman [Page 37] RFC 1510 Kerberos September 1993 KDC, encryption/decryption time, and processing time by the clientis registeredandin which initial authentication took place. cname This field contains the name parttarget server, and it should allow for a minimum "useful" lifetime. + The maximum allowable total (renewable) lifetime of a ticket (renew_till - starttime). + The maximum allowable lifetime of a ticket (endtime - starttime). + Whether to allow theclient's principal identifier. transited This field lists the namesissue of tickets with empty address fields (including theKerberos realmsability to specify thattook part in authenticatingsuch tickets may only be issued if theuserrequest specifies some authorization_data). + Whether proxiable, forwardable, renewable or post-datable tickets are towhom this ticket wasbe issued.It does not specify the order in which the realms were transited. See section 3.3.3.1 for details on how this field encodes the traversed realms. authtime This field indicates the time of initial authenti- cation for the named principal. It is5. Message Specifications The following sections describe thetimeexact contents and encoding ofissue for the original ticket on which this ticket is based. It is includedprotocol messages and objects. The ASN.1 base definitions are presented in theticket to provide additional information tofirst subsection. The remaining subsections specify theend service,protocol objects (tickets andto provide the necessary information for implementa- tionauthenticators) and messages. Specification ofa `hot list' service atencryption and checksum techniques, and theKDC. An end service that is particularly paranoid could refuse Section 5.3.1. - 43 - Expires 15 October 1993 Version 5 - Revision 5.2fields related toaccept tickets for which the initial authenti- cation occurred "too far"them, appear inthe past. This field is also returned as partsection 6. 5.1. ASN.1 Distinguished Encoding Representation All uses of ASN.1 in Kerberos shall use theresponse from the KDC. When returned as partDistinguished Encoding Representation of theresponse to initial authentication (KRB_AS_REP), this is the current time on the Ker- beros server[22]. starttime This fielddata elements as described in theticket specifies the time after which the ticket is valid. Together with endtime, this field specifiesX.509 specification, section 8.7 [8]. 5.2. ASN.1 Base Definitions The following ASN.1 base definitions are used in theliferest of this section. Note that since theticket. If itunderscore character (_) isabsent fromnot permitted in ASN.1 names, theticket,hyphen (-) is used in itsvalue should be treated as that of the authtime field. endtime This field contains the time after which the ticket will not be honored (its expiration time). Note that individual services mayplacetheir own limits onfor thelifepurposes ofa ticket and may reject tickets which haveASN.1 names. Realm ::= GeneralString PrincipalName ::= SEQUENCE { name-type[0] INTEGER, name-string[1] SEQUENCE OF GeneralString } Kerberos realms are encoded as GeneralStrings. Realms shall notyet expired. As such, this is really an upper bound on the expiration time forcontain a character with theticket. renew-tillThis field is only presentcode 0 (the ASCII NUL). Most realms will usually consist of several components separated by periods (.), intickets that havetheRENEWABLE flag setstyle of Internet Domain Names, or separated by slashes (/) in Kohl & Neuman [Page 38] RFC 1510 Kerberos September 1993 theflags field. It indicates the maximum endtime that may be includedstyle of X.500 names. Acceptable forms for realm names are specified in section 7. A PrincipalName is arenewal. It can be thoughttyped sequence of components consisting ofas the abso- lute expiration time fortheticket, including all renewals. caddrfollowing sub-fields: name-type This field specifies the type of name that follows. Pre-defined values for this field are specified in section 7.2. The name-type should be treated as aticket contains zero (if omitted) or more (if present) host addresses. These are the addresses from whichhint. Ignoring theticket can be used. If there arename type, noaddresses, the tickettwo names can beused from any location. The decision bytheKDC to issuesame (i.e., at least one of the components, orbytheend server to accept zero-address tickets is a policy decision and is left to the Kerberos and end-service administrators; theyrealm, must be different). This constraint mayrefuse to issue or accept such tickets. The sug- gested and default policy, however, isbe eliminated in the future. name-string This field encodes a sequence of components thatsuch ticketsform a name, each component encoded as a General String. Taken together, a PrincipalName and a Realm form a principal identifier. Most PrincipalNames will have onlybe issueda few components (typically one oraccepted when addi- tional information that can betwo). KerberosTime ::= GeneralizedTime -- Specifying UTC time zone (Z) The timestamps usedto restrictin Kerberos are encoded as GeneralizedTimes. An encoding shall specify theuseUTC time zone (Z) and shall not include any fractional portions of theticket is included in the authorization_data field. Such a ticket is a __________________________ [22]seconds. Itis NOT recommended that thisfurther shall not include any separators. Example: The only valid format for UTC timevalue be used to adjust the workstation's clock since6 minutes, 27 seconds after 9 pm on 6 November 1985 is 19851106210627Z. HostAddress ::= SEQUENCE { addr-type[0] INTEGER, address[1] OCTET STRING } HostAddresses ::= SEQUENCE OF SEQUENCE { addr-type[0] INTEGER, address[1] OCTET STRING } The host adddress encodings consists of two fields: addr-type This field specifies theworkstation cannot reliably determinetype of address thatsuch a KRB_AS_REP actu- ally came from the proper KDC in a timely manner. Section 5.3.1. - 44 - Expires 15 October 1993 Version 5 - Revision 5.2 capability. Network addressesfollows. Pre-defined values for this field areincludedspecified inthe ticket to make it harder for an attacker to use stolen credentials. Because the session key is not sent over the network in cleartext, credentials can't be stolen simply by listening to the network; an attacker has to gain access to the session key (perhaps through operating system security breaches or a careless user's unattended session) to make use of stolen tickets. It is important to note that the networksection 8.1. addressfrom which a connection is received cannot be reliably determined. Even if it could be, an attacker who has compromised the client's worksta- tion could use the credentials from there. Including the network addresses only makes it more difficult, not impossible, for an attacker to walk off with stolen credentials and then use them fromThis field encodes a"safe" location. authorization-datasingle address of type addr-type. Theauthorization-datatwo forms differ slightly. HostAddress contains exactly one Kohl & Neuman [Page 39] RFC 1510 Kerberos September 1993 address; HostAddresses contains a sequence of possibly many addresses. AuthorizationData ::= SEQUENCE OF SEQUENCE { ad-type[0] INTEGER, ad-data[1] OCTET STRING } ad-data This fieldis used to passcontains authorization datafrom the principal on whose behalf a ticket was issuedtothe application ser- vice. If no authorization data is included, this field willbeleft out. The data in this field are specificinterpreted according to theend service. It is expected that the field will contain the namesvalue ofservice specific objects, andtherights to those objects. The format for thiscorresponding ad-type field. ad-type This fieldis described in section 5.2. Although Kerberos is not concerned withspecifies the formatof the contents offor thesubfields, it does carry type information (ad-type). By usingad-data subfield. All negative values are reserved for local use. Non-negative values are reserved for registered use. APOptions ::= BIT STRING { reserved(0), use-session-key(1), mutual-required(2) } TicketFlags ::= BIT STRING { reserved(0), forwardable(1), forwarded(2), proxiable(3), proxy(4), may-postdate(5), postdated(6), invalid(7), renewable(8), initial(9), pre-authent(10), hw-authent(11) } KDCOptions ::= BIT STRING { reserved(0), forwardable(1), forwarded(2), proxiable(3), proxy(4), allow-postdate(5), postdated(6), Kohl & Neuman [Page 40] RFC 1510 Kerberos September 1993 unused7(7), renewable(8), unused9(9), unused10(10), unused11(11), renewable-ok(27), enc-tkt-in-skey(28), renew(30), validate(31) } LastReq ::= SEQUENCE OF SEQUENCE { lr-type[0] INTEGER, lr-value[1] KerberosTime } lr-type This field indicates how theauthorization_data field, a principal is able to issue a proxy thatfollowing lr-value field isvalid for a specific purpose. For example, a client wishing to print a file can obtain a file server proxyto bepassedinterpreted. Negative values indicate that the information pertains only to theBy specifying the name of the file inNon-negative values pertain to all servers for theauthorization_data field,realm. If thefile server knows thatlr-type field is zero (0), then no information is conveyed by theprint server can only uselr-value subfield. If theclient's rights when accessingabsolute value of theparticular file to be printed. Itlr-type field isinteresting to note that ifonespecifies(1), then theauthorization-data fieldlr-value subfield is the time of last initial request for aproxy and leavesTGT. If it is two (2), then thehost addresses blank,lr-value subfield is theresulting ticket and session key can be treated as a capability. See [9] for some suggested usestime ofthis field. The authorization-data field is optional and does Section 5.3.1. - 45 - Expires 15 October 1993 Version 5 - Revision 5.2 not have to be included in a ticket. 5.3.2. Authenticators An authenticatorlast initial request. If it isa record sent with a ticket to a server to certifythree (3), then theclient's knowledgelr-value subfield is the time of issue for theencryption key innewest ticket-granting ticket used. If it is four (4), then theticket, to helplr-value subfield is theserver detect replays, and to help choose a "true session key" to use withtime of theparticular session. The encodinglast renewal. If it isencrypted in the ticket's session key shared byfive (5), then theclient andlr-value subfield is theserver: -- Unencrypted authenticator Authenticator ::= [APPLICATION 2] SEQUENCE { authenticator-vno[0] INTEGER, crealm[1] Realm, cname[2] PrincipalName, cksum[3] Checksum OPTIONAL, cusec[4] INTEGER, ctime[5] KerberosTime, subkey[6] EncryptionKey OPTIONAL, seq-number[7] INTEGER OPTIONAL, authorization-data[8] AuthorizationData OPTIONAL } authenticator-vnotime of last request (of any type). lr-value This fieldspecifiescontains theversion number fortime of theformatlast request. The time must be interpreted according to the contents of theauthenticator. This document speci- fies version 5. crealmaccompanying lr-type subfield. See section 6 for the definitions of Checksum, ChecksumType, EncryptedData, EncryptionKey, EncryptionType, andcname These fields areKeyType. Kohl & Neuman [Page 41] RFC 1510 Kerberos September 1993 5.3. Tickets and Authenticators This section describes thesame as those describedformat and encryption parameters forthetickets and authenticators. When a ticket or authenticator is included insectiona protocol message it is treated as an opaque object. 5.3.1.cksum This field containsTickets A ticket is achecksum of the the applica- tion datarecord thataccompanies the KRB_AP_REQ. cusec This field contains the microsecond part of the client's timestamp. Its value (before encryption) ranges from 0 to 999999. It often appears along with ctime. The two fields are used togetherhelps a client authenticate tospecifyareasonably accurate timestamp. ctime This fieldservice. A Ticket contains thecurrent time on the client's host. subkey Thisfollowing information: Ticket ::= [APPLICATION 1] SEQUENCE { tkt-vno[0] INTEGER, realm[1] Realm, sname[2] PrincipalName, enc-part[3] EncryptedData } -- Encrypted part of ticket EncTicketPart ::= [APPLICATION 3] SEQUENCE { flags[0] TicketFlags, key[1] EncryptionKey, crealm[2] Realm, cname[3] PrincipalName, transited[4] TransitedEncoding, authtime[5] KerberosTime, starttime[6] KerberosTime OPTIONAL, endtime[7] KerberosTime, renew-till[8] KerberosTime OPTIONAL, caddr[9] HostAddresses OPTIONAL, authorization-data[10] AuthorizationData OPTIONAL } -- encoded Transited fieldcontains the client's choice for an encryption key which is toTransitedEncoding ::= SEQUENCE { tr-type[0] INTEGER, -- must beused to protect this specific application session. Unless an Section 5.3.2. - 46 - Expires 15 October 1993 Version 5 - Revision 5.2 application specifies otherwise, if this fieldregistered contents[1] OCTET STRING } The encoding of EncTicketPart isleft outencrypted in thesessionkeyfrom the ticket will be used. seq-numberThis optional field includes the initial sequence number to be usedshared by Kerberos and theKRB_PRIV or KRB_SAFE mes- sages when sequence numbers are used to detect replays (It may also be used by application specific messages). When included inend server (the server's secret key). See section 6 for theauthen- ticator thisformat of the ciphertext. tkt-vno This field specifies theinitial sequenceversion number formessages fromtheclientticket format. This document describes version number 5. realm This field specifies the realm that issued a ticket. It also serves to identify theserver. When included in the AP-REP message, the initial sequence number is that for messages fromrealm part of the server's principal identifier. Since a Kerberos serverto the client. When used in KRB_PRIV or KRB_SAFE messages, it is incremented by one after each message is sent. For sequence numbers to adequately supportcan only issue tickets for servers within its realm, thedetection of replays they should be non-repeating, even across connection boundaries. The initial sequence number shouldtwo will Kohl & Neuman [Page 42] RFC 1510 Kerberos September 1993 always berandom and uniformly distributed acrossidentical. sname This field specifies thefull spacename part ofpossible sequence numbers, so that it cannot be guessed by an attacker and so that it andthesuccessive sequence numbers do not repeat other sequences. authorization-dataserver's identity. enc-part This fieldisholds thesame as described forencrypted encoding of the EncTicketPart sequence. flags This field indicates which of various options were used or requested when the ticketin section 5.3.1.was issued. It isoptional and will only appear when additional restrictions are to be placed on the use ofaticket, beyond those car- ried inbit-field, where theticket itself. 5.4. Specifications forselected options are indicated by theASbit being set (1), andTGS exchanges This section specifies the format of the messages used in exchange betweentheclientunselected options and reserved fields being reset (0). Bit 0 is theKerberos server.most significant bit. Theformatencoding ofpossible error messages appearsthe bits is specified in section5.9.1. 5.4.1. KRB_KDC_REQ definition5.2. TheKRB_KDC_REQ message has no typeflags are described in more detail above in section 2. The meanings ofits own. Instead, its type is onethe flags are: Bit(s) Name Description 0 RESERVED Reserved for future expansion ofKRB_AS_REQ or KRB_TGS_REQ depending on whetherthis field. 1 FORWARDABLE The FORWARDABLE flag is normally only interpreted by therequestTGS, and can be ignored by end servers. When set, this flag tells the ticket-granting server that it isfor an initialOK to issue a new ticket- granting ticketor an additionalwith a different network address based on the presented ticket.In either case,2 FORWARDED When set, this flag indicates that themessageticket has either been forwarded or was issued based on authentication involving a forwarded ticket-granting ticket. 3 PROXIABLE The PROXIABLE flag issent fromnormally only interpreted by theclientTGS, and can be ignored by end servers. The PROXIABLE flag has an interpretation identical to that of theAuthentication Server to request credentials for a service. The message fields are: AS-REQ ::= [APPLICATION 10] KDC-REQ TGS-REQ ::= [APPLICATION 12] KDC-REQ Section 5.4.1. - 47 - Expires 15 OctoberFORWARDABLE flag, except that the PROXIABLE flag tells the ticket-granting server that only non- ticket-granting tickets may be issued with different network addresses. Kohl & Neuman [Page 43] RFC 1510 Kerberos September 1993Version4 PROXY When set, this flag indicates that a ticket is a proxy. 5- Revision 5.2 KDC-REQ ::= SEQUENCE { pvno[1] INTEGER, msg-type[2] INTEGER, padata[3] SEQUENCE OF PA-DATA OPTIONAL, req-body[4] KDC-REQ-BODY } PA-DATA ::= SEQUENCE { padata-type[1] INTEGER, padata-value[2] OCTET STRING, -- might be encoded AP-REQ } KDC-REQ-BODY ::= SEQUENCE { kdc-options[0] KDCOptions, cname[1] PrincipalName OPTIONAL, -- UsedMAY-POSTDATE The MAY-POSTDATE flag is normally onlyin AS-REQ realm[2] Realm, -- Server's realm -- Also client's in AS-REQ sname[3] PrincipalName OPTIONAL, from[4] KerberosTime OPTIONAL, till[5] KerberosTime, rtime[6] KerberosTime OPTIONAL, nonce[7] INTEGER, etype[8] SEQUENCE OF INTEGER, -- EncryptionType, -- in preference order addresses[9] HostAddresses OPTIONAL, enc-authorization-data[10] EncryptedData OPTIONAL, -- Encrypted AuthorizationData encoding additional-tickets[11] SEQUENCE OF Ticket OPTIONAL } The fields in this message are: pvno This field is included in each message, and speci- fiesinterpreted by theprotocol version number. This document specifies protocol version 5. msg-typeTGS, and can be ignored by end servers. Thisfield indicatesflag tells thetype ofticket-granting server that aprotocol mes- sage. It will almost alwayspost- dated ticket may be issued based on this ticket-granting ticket. 6 POSTDATED This flag indicates that this ticket has been postdated. The end-service can check thesame asauthtime field to see when theapplication identifier associated withoriginal authentication occurred. 7 INVALID This flag indicates that amessage. Itticket isincluded to make the identifier more readily accessible to the application. Forinvalid, and it must be validated by theKDC-REQ message,KDC before use. Application servers must reject tickets which have thistype will be KRB_AS_REQ or KRB_TGS_REQ. padataflag set. 8 RENEWABLE Thepadata (pre-authentication data) field con- tains a sequence of authentication information which mayRENEWABLE flag is normally only interpreted by the TGS, and can usually beneeded before credentialsignored by end servers (some particularly careful servers may wish to disallow renewable tickets). A renewable ticket can be used to obtain a replacement ticket that expires at a later date. 9 INITIAL This flag indicates that this ticket was issuedor decrypted. Inusing thecase of requests for additional tickets (KRB_TGS_REQ), this field will Section 5.4.1. - 48 - Expires 15 October 1993 Version 5 - Revision 5.2 include an element with padata-type of PA-TGS-REQAS protocol, anddata of an authentication header (ticket- grantingnot issued based on a ticket-granting ticket. 10 PRE-AUTHENT This flag indicates that during initial authentication, the client was authenticated by the KDC before a ticketand authenticator).was issued. Thechecksum instrength of theauthenticator (which must be collision- proof)preauthentication method is not indicated, but is acceptable tobe computed overtheKDC-REQ-BODY encoding. In most requestsKDC. 11 HW-AUTHENT This flag indicates that the protocol employed for initialauthenti- cation (KRB_AS_REQ) and most replies (KDC-REP),authentication required thepadata field willuse of hardware expected to beleft out. This field may also contain information neededpossessed solely bycertain extensions tothe named Kohl & Neuman [Page 44] RFC 1510 Kerberosprotocol. For example, it might be used to initially verifySeptember 1993 client. The hardware authentication method is selected by theidentityKDC and the strength ofa client before any responsethe method isreturned.not indicated. 12-31 RESERVED Reserved for future use. key Thisis accomplished with a padatafieldwith padata-type equal to PA-ENC-TIMESTAMPexists in the ticket andpadata-value defined as follows: padata-type ::= PA-ENC-TIMESTAMP padata-value ::= EncryptedData -- PA-ENC-TS-ENC PA-ENC-TS-ENC ::= SEQUENCE { patimestamp[0] KerberosTime, -- client's time pausec[1] INTEGER OPTIONAL } with patimestamp containingtheclient's timeKDC response andpausec containingis used to pass themicroseconds which may be omitted if a client will not generate more than one request per second. The ciphertext (padata- value) consists ofsession key from Kerberos to thePA-ENC-TS-ENC sequence, encrypted usingapplication server and theclient's secret key.client. Thepadatafield's encoding is described in section 6.2. crealm This fieldcan also contain information needed to help the KDC orcontains theclient selectname of thekey needed for generating or decryptingrealm in which theresponse.client is registered and in which initial authentication took place. cname Thisformfield contains the name part of thepadata is useful for supportingclient's principal identifier. transited This field lists theuse of certain "smartcards" with Kerberos. The detailsnames ofsuch extensions are beyondthescope ofKerberos realms that took part in authenticating the user to whom thisspecification.ticket was issued. It does not specify the order in which the realms were transited. See[10]section 3.3.3.1 foradditional uses ofdetails on how thisfield. padata-type The padata-type element of the padatafieldindi- cates the way that the padata-value element is to be interpreted. Negative values of padata-type are reserved for unregistered use; non-negative values are used for a registered interpretation ofencodes theelement type. req-bodytraversed realms. authtime This fieldis a placeholder delimitingindicates theextenttime of initial authentication for theremaining fields. If a checksumnamed principal. It isto be calculated overtherequest, it is calculated over an encodingtime of issue for theKDC-REQ-BODY sequenceoriginal ticket on which this ticket isSection 5.4.1. - 49 - Expires 15 October 1993 Version 5 - Revision 5.2 enclosed within the req-body field. kdc-options This field appearsbased. It is included in theKRB_AS_REQ and KRB_TGS_REQ requeststicket to provide additional information to theKDCend service, andindicates the flags that the client wants set on the tickets as well as other information that istomodifyprovide thebehaviornecessary information for implementation of a `hot list' service at the KDC.Where appropriate, the name of an option may be the same as the flagAn end service that isset by that option. Although in most case,particularly paranoid could refuse to accept tickets for which thebitinitial authentication occurred "too far" in theoptionspast. This fieldwill beis also returned as part of thesameresponse from the KDC. When returned asthat inpart of theflags field,response to initial authentication (KRB_AS_REP), this isnot guaranteed, so itthe current time on the Kerberos server (It isnot acceptableNOT recommended that this time value be used tosimply copyadjust theoptions field toworkstation's clock since theflags field. There are various checksworkstation cannot reliably determine thatmust be made before honoring an option anyway. The kdc_options field issuch abit-field, whereKRB_AS_REP actually came from theselected options are indicated byproper KDC in a timely manner.). starttime This field in thebit being set (1), andticket specifies theunselected options and reserved fields being reset (0). The encoding oftime after which thebitsticket isspecified in section 5.2. The options are described in more detail above in section 2. The meanings ofvalid. Together with endtime, this field specifies theoptions are: Bit(s)Name Description 0 RESERVED Reserved for future expansionlife ofthis field. 1 FORWARDABLE The FORWARDABLE option indicates thattheticket to be issuedticket. If it isto haveabsent from the ticket, itsforwardable flag set. It may onlyvalue should beset on the initial request, or in a sub- sequent request iftreated as that of theticket-granting ticket onKohl & Neuman [Page 45] RFC 1510 Kerberos September 1993 authtime field. endtime This field contains the time after whichit is based is also for- wardable. 2 FORWARDED The FORWARDED option is only specified in a request totheticket-granting server andticket willonlynot be honoredif(its expiration time). Note that individual services may place their own limits on theticket-grantinglife of a ticketin the request has its FORWARDABLE bit set. This option indicates thatand may reject tickets which have not yet expired. As such, this isa request for forwarding. The address(es) ofreally an upper bound on thehost from whichexpiration time for theresulting ticketticket. renew-till This field isto be valid are includedonly present inthe addresses field of the request. Section 5.4.1. - 50 - Expires 15 October 1993 Version 5 - Revision 5.2 3 PROXIABLE The PROXIABLE option indicatestickets thatthe ticket to be issued is tohaveits prox- iablethe RENEWABLE flagset. It may only beseton the initial request, orina subsequent request iftheticket-granting ticket on which it is based is also proxiable. 4 PROXY The PROXY optionflags field. It indicates the maximum endtime thatthis is a request for a proxy. This option will onlymay behonored if the ticket-granting ticketincluded inthe request has its PROXIABLE bit set. The address(es)a renewal. It can be thought of as the absolute expiration time for the ticket, including all renewals. caddr This field in a ticket contains zero (if omitted) or more (if present) host addresses. These are the addresses from which theresultingticketis tocan bevalidused. If there areincluded inno addresses, theaddresses field of the request. 5 ALLOW-POSTDATEticket can be used from any location. TheALLOW-POSTDATE option indicates thatdecision by theticketKDC tobe issuedissue or by the end server to accept zero- address tickets is a policy decision and is left tohave its MAY-POSTDATE flag set. It may only be set ontheinitial request,Kerberos and end-service administrators; they may refuse to issue orin a sub- sequent request if the ticket-granting ticket on which it is based also has its MAY-POSTDATE flag set. 6 POSTDATEDaccept such tickets. ThePOSTDATED option indicates that thissuggested and default policy, however, isa request for a postdated ticket. This optionthat such tickets will only behonored if the ticket-granting ticket on which it is based has its MAY-POSTDATE flag set. The resulting ticket will also have its INVALID flag set, andissued or accepted when additional information thatflag maycan bereset by a subsequent requestused to restrict theKDC afteruse of thestarttimeticket is included in the authorization_data field. Such a tickethas been reached. 7 UNUSED This optionispresently unused. 8 RENEWABLE The RENEWABLE option indicates thata capability. Network addresses are included in the ticket tobe issued ismake it harder for an attacker tohave its RENEWABLE flag set. It may only be set on the initial request, or when the ticket-granting ticket on whichuse stolen credentials. Because therequest is based is also renewable. If this optionsession key isrequested, thennot sent over thertime fieldnetwork in cleartext, credentials can't be stolen simply by listening to therequest containsnetwork; an attacker has to gain access to thedesired absolute expiration time for the ticket. 9-26 RESERVED Reserved for future use. Section 5.4.1. - 51 - Expires 15 October 1993 Version 5 - Revision 5.2 27 RENEWABLE-OK The RENEWABLE-OK option indicatessession key (perhaps through operating system security breaches or a careless user's unattended session) to make use of stolen tickets. It is important to note that the network address from which arenewable ticket willconnection is received cannot beacceptablereliably determined. Even ifa ticket withit could be, an attacker who has compromised therequested life cannot otherwise be provided. If a ticket withclient's workstation could use therequested life cannot be provided,credentials from there. Including the network addresses only makes it more difficult, not impossible, for an attacker to walk off with stolen credentials and then use them from a "safe" location. Kohl & Neuman [Page 46] RFC 1510 Kerberos September 1993 authorization-data The authorization-data field is used to pass authorization data from the principal on whose behalf arenewableticketmay bewas issuedwith a renew-till equalto thethe requested endtime. The value of the renew-tillapplication service. If no authorization data is included, this fieldmay stillwill belimited by local limits, or limits selected by the individual principal or server. 28 ENC-TKT-IN-SKEYThis option is used only byleft out. The data in this field are specific to theticket- grantingend service.The ENC-TKT-IN-SKEY option indicatesIt is expected that theticket forfield will contain theend server isnames of service specific objects, and the rights tobe encryptedthose objects. The format for this field is described in section 5.2. Although Kerberos is not concerned with thesession key fromformat of theadditional ticket- granting ticket provided. 29 RESERVED Reserved for future use. 30 RENEW This option is used only bycontents of theticket- granting service. The RENEW option indicates thatsubfields, it does carry type information (ad-type). By using thepresent requestauthorization_data field, a principal isforable to issue arenewal. The ticket providedproxy that isencrypted in the secret keyvalid forthe server on which it is valid. This option will only be honored if the ticketa specific purpose. For example, a client wishing tobe renewed has its RENEWABLE flag set and if the time in its renew- till field has not passed. The ticketprint a file can obtain a file server proxy to berenewed ispassedinto thepadata field as partprint server. By specifying the name of theauthentication header. 31 VALIDATE This option is used only byfile in theticket- granting service. The VALIDATE option indicatesauthorization_data field, the file server knows that therequest is to vali- date a postdated ticket. It willprint server can onlybe honored if the ticket presented is postdated, presently has its INVALID flag set, and would be otherwise usable at this time. A ticket cannot be vali- dated before its starttime. The ticket presented for validation is encrypted inuse thekey ofclient's rights when accessing theserver for which it is valid andparticular file to be printed. It ispassed ininteresting to note that if one specifies thepadataauthorization-data fieldas partofthe authentication header. cnamea proxy andsname These fields areleaves thesame as those described forhost addresses blank, the resulting ticketin section 5.3.1. sname may onlyand session key can beSection 5.4.1. - 52 - Expires 15 October 1993 Version 5 - Revision 5.2 absent when the ENC-TKT-IN-SKEY option is speci- fied. If absent, the name of the server is taken from the name of the client in the ticket passedtreated asadditional-tickets. enc-authorization-dataa capability. See [9] for some suggested uses of this field. Theenc-authorization-data, if present (and it can onlyauthorization-data field is optional and does not have to bepresentincluded inthe TGS_REQ form),a ticket. 5.3.2. Authenticators An authenticator isan encod- ing ofa record sent with a ticket to a server to certify thedesired authorization-data encrypted underclient's knowledge of thesub-sessionencryption keyif presentin theAuthenticator, or alternatively fromticket, to help the server detect replays, and to help choose a "true sessionkeykey" to use with the particular session. The encoding is encrypted in theticket-granting ticket, both fromticket's session key shared by thepadata field inclient and theKRB_AP_REQ. realmserver: -- Unencrypted authenticator Authenticator ::= [APPLICATION 2] SEQUENCE { authenticator-vno[0] INTEGER, crealm[1] Realm, cname[2] PrincipalName, cksum[3] Checksum OPTIONAL, cusec[4] INTEGER, ctime[5] KerberosTime, subkey[6] EncryptionKey OPTIONAL, seq-number[7] INTEGER OPTIONAL, Kohl & Neuman [Page 47] RFC 1510 Kerberos September 1993 authorization-data[8] AuthorizationData OPTIONAL } authenticator-vno This field specifies therealm partversion number for the format of theserver's principal identifier. Inauthenticator. This document specifies version 5. crealm and cname These fields are theAS exchange, this is alsosame as those described for therealm partticket in section 5.3.1. cksum This field contains a checksum of theclient's principal identifier. fromthe application data that accompanies the KRB_AP_REQ. cusec This fieldis included incontains theKRB_AS_REQ and KRB_TGS_REQ ticket requests whenmicrosecond part of therequested ticket isclient's timestamp. Its value (before encryption) ranges from 0 tobe postdated.999999. Itspecifiesoften appears along with ctime. The two fields are used together to specify a reasonably accurate timestamp. ctime This field contains thedesired startcurrent timeforon therequested ticket. tillclient's host. subkey This field contains theexpiration date requested by the client in a ticket request. rtime Thisclient's choice for an encryption key which is to be used to protect this specific application session. Unless an application specifies otherwise, if this field is left out therequested renew-till time sentsession key froma client totheKDC in aticketrequest. It is optional. noncewill be used. seq-number This optional fieldis part ofincludes theKDC request and response. It it intended to hold a randominitial sequence numbergeneratedto be used by theclient. If the same number isKRB_PRIV or KRB_SAFE messages when sequence numbers are used to detect replays (It may also be used by application specific messages). When included in theencrypted responseauthenticator this field specifies the initial sequence number for messages from theKDC, it provides evidence thatclient to theresponse is fresh and has not been replayed by an attacker. Nonces must never be re-used. Ideally, it should be gen- erated randomly, but ifserver. When included in thecorrect time is known, it may suffice[23]. __________________________ [23] Note, however, that ifAP-REP message, thetimeinitial sequence number isused as the nonce, one must make surethat for messages from theworkstation time is monotonically increasing. Ifserver to thetimeclient. When used in KRB_PRIV or KRB_SAFE messages, it isever reset backwards, thereincremented by one after each message isa small, but finite, probability that a nonce willsent. For sequence numbers to adequately support the detection of replays they should bereused. Section 5.4.1. - 53 - Expires 15 October 1993 Version 5 - Revision 5.2 etype This field specifiesnon-repeating, even across connection boundaries. The initial sequence number should be random and uniformly distributed across thedesired encryption algo- rithm tofull space of possible sequence numbers, so that it cannot beused inguessed by an attacker and so that it and theresponse. addressessuccessive sequence numbers do not repeat other sequences. Kohl & Neuman [Page 48] RFC 1510 Kerberos September 1993 authorization-data This field isincluded intheinitial request for tickets, and optionally included in requestssame as described foradditional tickets from the ticket-granting server. It specifies the addresses from whichtherequestedticket in section 5.3.1. It isto be valid. Normally it includes the addresses for the client's host. If a proxy is requested, this fieldoptional and willcontain other addresses. The contents of this fieldonly appear when additional restrictions areusually copied by the KDC intoto be placed on thecaddr fielduse ofthe resulting ticket. additional-tickets Additional tickets may be optionally included inarequest toticket, beyond those carried in theticket-granting server. Ifticket itself. 5.4. Specifications for theENC-TKT-IN-SKEY option has been specified, thenAS and TGS exchanges This section specifies thesession key fromformat of theadditional ticket will bemessages used inplace of the server's key to encryptexchange between thenew ticket. If more than one option which requires additional tickets has been specified, thenclient and theadditional tickets are used in the order specified by the orderingKerberos server. The format ofthe options bits (see kdc-options, above).possible error messages appears in section 5.9.1. 5.4.1. KRB_KDC_REQ definition Theapplication code will be either ten (10)KRB_KDC_REQ message has no type of its own. Instead, its type is one of KRB_AS_REQ ortwelve (12)KRB_TGS_REQ depending on whether the request is for an initial ticket(AS-REQ)orforan additionalticket (TGS-REQ). The optional fields (addresses, authorization-data and additional-tickets) are only included if necessary to per- form the operation specified in the kdc-options field. It should be noted that in KRB_TGS_REQ, the protocol version number appears twice and two different message types appear: the KRB_TGS_REQ message contains these fields as does the authentication header (KRB_AP_REQ) that is passed inticket. In either case, thepadata field. 5.4.2. KRB_KDC_REP definition The KRB_KDC_REPmessageformatisused for the replysent from theKDC for either an initial (AS)client to the Authentication Server to requestor a subse- quent (TGS) request. There is no message typecredentials forKRB_KDC_REP. Instead, the type will be either KRB_AS_REP or KRB_TGS_REP.a service. Thekey used to encrypt the ciphertext part of the reply depends on themessagetype. For KRB_AS_REP, the ciphertext is encryptedfields are: AS-REQ ::= [APPLICATION 10] KDC-REQ TGS-REQ ::= [APPLICATION 12] KDC-REQ KDC-REQ ::= SEQUENCE { pvno[1] INTEGER, msg-type[2] INTEGER, padata[3] SEQUENCE OF PA-DATA OPTIONAL, req-body[4] KDC-REQ-BODY } PA-DATA ::= SEQUENCE { padata-type[1] INTEGER, padata-value[2] OCTET STRING, -- might be encoded AP-REQ } KDC-REQ-BODY ::= SEQUENCE { kdc-options[0] KDCOptions, cname[1] PrincipalName OPTIONAL, -- Used only inthe client's secret key, and theAS-REQ realm[2] Realm, -- Server's realm -- Also client'skey version number is included in the key version number for the encrypted data. For KRB_TGS_REP, the Section 5.4.2. - 54 - Expires 15 October 1993 Version 5 - Revision 5.2 ciphertext is encrypted in the sub-session key from the Authenticator, or if absent, the session key from the ticket-granting ticket used in the request. In that case, no version number will be presentinthe EncryptedData sequence. The KRB_KDC_REP message contains the following fields: AS-REP ::= [APPLICATION 11] KDC-REP TGS-REP ::= [APPLICATION 13] KDC-REP KDC-REP ::= SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, padata[2] SEQUENCE OF PA-DATA OPTIONAL, crealm[3] Realm, cname[4] PrincipalName, ticket[5] Ticket, enc-part[6] EncryptedData } EncASRepPart ::= [APPLICATION 25[25]] EncKDCRepPart EncTGSRepPart ::= [APPLICATION 26] EncKDCRepPart EncKDCRepPart ::= SEQUENCE { key[0] EncryptionKey, last-req[1] LastReq, nonce[2] INTEGER, key-expiration[3] KerberosTimeAS-REQ sname[3] PrincipalName OPTIONAL,flags[4] TicketFlags, authtime[5] KerberosTime, starttime[6]from[4] KerberosTime OPTIONAL,endtime[7]till[5] KerberosTime,renew-till[8]rtime[6] KerberosTime OPTIONAL,srealm[9] Realm, sname[10] PrincipalName, caddr[11]nonce[7] INTEGER, Kohl & Neuman [Page 49] RFC 1510 Kerberos September 1993 etype[8] SEQUENCE OF INTEGER, -- EncryptionType, -- in preference order addresses[9] HostAddresses OPTIONAL, enc-authorization-data[10] EncryptedData OPTIONAL, -- Encrypted AuthorizationData encoding additional-tickets[11] SEQUENCE OF Ticket OPTIONAL }pvno and msg-type TheseThe fieldsare described aboveinsection 5.4.1. msg-type is either KRB_AS_REP or KRB_TGS_REP. padatathis message are: pvno This field isdescribed in detailincluded insection 5.4.1. One possible use for thiseach message, and specifies the protocol version number. This document specifies protocol version 5. msg-type This fieldis to encode an alternate "mix-in" string to be used __________________________ [25] An application code inindicates theencrypted parttype of amessage provides an additional check thatprotocol message. It will almost always be themessage was decrypted properly. Section 5.4.2. - 55 - Expires 15 October 1993 Version 5 - Revision 5.2same as the application identifier associated with astring-to-key algorithm (such as is described in section 6.3.2). This abilitymessage. It isuse- ful to ease transitions if a realm name needsincluded tochange (e.g. when a company is acquired); in such a case all existing password-derived entries in the KDC database would be flagged as needing a special mix-in string untilmake thenext password change. crealm, cname, srealm and sname These fields areidentifier more readily accessible to thesame as those described forapplication. For theticket in section 5.3.1. ticketKDC-REQ message, this type will be KRB_AS_REQ or KRB_TGS_REQ. padata Thenewly-issued ticket, from section 5.3.1. enc-part Thispadata (pre-authentication data) fieldiscontains aplace holder for the ciphertext and relatedof authentication informationthat formswhich may be needed before credentials can be issued or decrypted. In theencrypted part of a message. The descriptioncase ofthe encrypted partrequests for additional tickets (KRB_TGS_REQ), this field will include an element with padata-type ofthe message follows each appear- ancePA-TGS-REQ and data ofthis field.an authentication header (ticket-granting ticket and authenticator). Theencrypted part is encoded as describedchecksum insection 6.1. key This fieldthe authenticator (which must be collisionproof) is to be computed over thesame as describedKDC-REQ-BODY encoding. In most requests for initial authentication (KRB_AS_REQ) and most replies (KDC-REP), theticket in section 5.3.1. last-reqpadata field will be left out. This fieldis returnedmay also contain information needed by certain extensions to theKDC and specifiesKerberos protocol. For example, it might be used to initially verify thetime(s)identity ofthe last request byaprincipal. Depending on what informationclient before any response isavailable, this might be the last time that a request forreturned. This is accomplished with aticket-granting ticket was made, orpadata field with padata-type equal to PA-ENC-TIMESTAMP and padata-value defined as follows: padata-type ::= PA-ENC-TIMESTAMP padata-value ::= EncryptedData -- PA-ENC-TS-ENC PA-ENC-TS-ENC ::= SEQUENCE { patimestamp[0] KerberosTime, -- client's time pausec[1] INTEGER OPTIONAL } Kohl & Neuman [Page 50] RFC 1510 Kerberos September 1993 with patimestamp containing thelastclient's timethatand pausec containing the microseconds which may be omitted if a client will not generate more than one requestbased on a ticket-granting ticket was successful. It also might cover all servers for a realm, or justper second. The ciphertext (padata-value) consists of theparticular server. Some implementations may display thisPA-ENC-TS-ENC sequence, encrypted using the client's secret key. The padata field can also contain information needed to help theuser to aid in discovering unauthorized use of one's identity. It is similar in spirit toKDC or thelast login time displayed when logging into timesharing systems. nonceclient select the key needed for generating or decrypting the response. Thisfieldform of the padata isdescribed above in section 5.4.1. key-expirationuseful for supporting the use of certain "smartcards" with Kerberos. Thekey-expiration field is partdetails of such extensions are beyond theresponse fromscope of this specification. See [10] for additional uses of this field. padata-type The padata-type element of theKDC and specifiespadata field indicates thetimeway that theclient's secret keypadata-value element isduetoexpire. The expira- tion mightbethe resultinterpreted. Negative values ofpassword aging or an account expiration. This field will usually be Section 5.4.2. - 56 - Expires 15 October 1993 Version 5 - Revision 5.2 left outpadata-type are reserved for unregistered use; non-negative values are used for a registered interpretation of theTGS reply since the response to the TGS requestelement type. req-body This field isencrypted inasession key and no client information need be retrieved fromplaceholder delimiting theKDC database. Itextent of the remaining fields. If a checksum isupto be calculated over theapplication client (usuallyrequest, it is calculated over an encoding of thelogin program) to take appropriate action (such as notifyingKDC- REQ-BODY sequence which is enclosed within theuser) ifreq-body field. kdc-options This field appears in theexpira- tion time is imminent. flags, authtime, starttime, endtime, renew-tillKRB_AS_REQ andcaddr These fields are duplicates of those found inKRB_TGS_REQ requests to theencrypted portion ofKDC and indicates theattached ticket (see sec- tion 5.3.1), provided soflags that the clientmay verify they matchwants set on theintended request andtickets as well as other information that is toassist in proper ticket caching. Ifmodify themessage isbehavior oftype KRB_TGS_REP, the caddr field will only be filled in iftherequest was for a proxy or forwarded ticket, or ifKDC. Where appropriate, theuser is substituting a subsetname of an option may be theaddresses from the ticket granting ticket. Ifsame as theclient-requested addresses are not present or not used, thenflag that is set by that option. Although in most case, theaddresses containedbit in theticketoptions field will be the same asthose includedthat in theticket-granting ticket. 5.5. Client/Server (CS) message specifications This section specifies the format of the messages used for the authentication of the clientflags field, this is not guaranteed, so it is not acceptable to simply copy theapplication server. 5.5.1. KRB_AP_REQ definition The KRB_AP_REQ message contains the Kerberos protocol version number, the message type KRB_AP_REQ, anoptions field toindicate any options in use, and the ticket and authenticator themselves. The KRB_AP_REQ message is often referred to asthe"authentication header". AP-REQ ::= [APPLICATION 14] SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, ap-options[2] APOptions, ticket[3] Ticket, authenticator[4] EncryptedData } APOptions ::= BIT STRING { reserved(0), use-session-key(1), mutual-required(2) } Section 5.5.1. - 57 - Expires 15 October 1993 Version 5 - Revision 5.2 pvno and msg-type These fieldsflags field. There aredescribed above in section 5.4.1. msg-type is KRB_AP_REQ. ap-optionsThisvarious checks that must be made before honoring an option anyway. The kdc_options fieldappears in the application request (KRB_AP_REQ) and affects the way the request is processed. Itis a bit-field, where the selected options are indicated by the bit being set (1), and the unselected options and reserved fields being reset (0). The encoding of the bits is specified in section 5.2. The options are described in more detail above in section 2. The meanings of the options are:Bit(s)NameKohl & Neuman [Page 51] RFC 1510 Kerberos September 1993 Bit(s) Name Description 0 RESERVED Reserved for future expansion of this field. 1USE-SESSION-KEYThe USE-SESSION-KEYFORWARDABLE The FORWARDABLE option indicates that the ticketthe clientto be issued ispresentingto have its forwardable flag set. It may only be set on the initial request, or in aserversubsequent request if the ticket- granting ticket on which it isencryptedbased is also forwardable. 2 FORWARDED The FORWARDED option is only specified in a request to thesession key from the server'sticket-grantingticket. When this option is not speci- fied,server and will only be honored if the ticket-granting ticketis encryptedin theserver's secret key. 2 MUTUAL-REQUIREDThe MUTUAL-REQUIREDrequest has its FORWARDABLE bit set. This optiontells the server that the client requires mutual authentication, andindicates thatit must respond with a KRB_AP_REP message. 3-31 RESERVED Reserved for future use. ticket This fieldthis is aticket authenticating the client to the server. authenticator This containsrequest for forwarding. The address(es) of theauthenticator,host from whichincludestheclient's choice of a subkey. Its encodingresulting ticket isdescribedto be valid are included insection 5.3.2. 5.5.2. KRB_AP_REP definition The KRB_AP_REP message containstheKerberos protocol version number,addresses field of themessage type, and an encrypted time- stamp.request. 3 PROXIABLE ThemessagePROXIABLE option indicates that the ticket to be issued issent in in responsetoan applicationhave its proxiable flag set. It may only be set on the initial request, or in a subsequent request(KRB_AP_REQ) whereif themutual authenticationticket- granting ticket on which it is based is also proxiable. 4 PROXY The PROXY optionhas been selectedindicates that this is a request for a proxy. This option will only be honored if the ticket- granting ticket in theap-options field. __________________________ Section 5.5.2. - 58 - Expires 15 October 1993 Version 5 - Revision 5.2 AP-REP ::= [APPLICATION 15] SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, enc-part[2] EncryptedData } EncAPRepPart ::= [APPLICATION 27[27]] SEQUENCE { ctime[0] KerberosTime, cusec[1] INTEGER, subkey[2] EncryptionKey OPTIONAL, seq-number[3] INTEGER OPTIONAL }request has its PROXIABLE bit set. Theencoded EncAPRepPartaddress(es) of the host from which the resulting ticket isencryptedto be valid are included in theshared session keyaddresses field of theticket.request. 5 ALLOW-POSTDATE Theoptional subkey field canALLOW-POSTDATE option indicates that the ticket to beused in an application-arranged negotiationissued is tochoose a per associa- tion session key. pvno and msg-type These fields are described abovehave its MAY-POSTDATE flag set. It may only be set on the initial request, or insection 5.4.1. msg-typea subsequent request if Kohl & Neuman [Page 52] RFC 1510 Kerberos September 1993 the ticket-granting ticket on which it isKRB_AP_REP. enc-part This fieldbased also has its MAY-POSTDATE flag set. 6 POSTDATED The POSTDATED option indicates that this isdescribed above in section 5.4.2. ctimea request for a postdated ticket. Thisfield containsoption will only be honored if thecurrent timeticket-granting ticket on which it is based has its MAY- POSTDATE flag set. The resulting ticket will also have its INVALID flag set, and that flag may be reset by a subsequent request to theclient's host. cusec This field containsKDC after themicrosecond part ofstarttime in theclient's timestamp. subkeyticket has been reached. 7 UNUSED Thisfield contains an encryption key whichoption is presently unused. 8 RENEWABLE The RENEWABLE option indicates that the ticket to beusedissued is toprotect this specific application ses- sion. See section 3.2.6 for specificshave its RENEWABLE flag set. It may only be set onhow this fieldthe initial request, or when the ticket-granting ticket on which the request isused to negotiate a key. Unless an application specifies otherwise, ifbased is also renewable. If thisfieldoption isleft out,requested, then thesub-session key fromrtime field in theauthentica- tor, or if also left out,request contains thesession key fromdesired absolute expiration time for the ticket. 9-26 RESERVED Reserved for future use. 27 RENEWABLE-OK The RENEWABLE-OK option indicates that a renewable ticket will beused. 5.5.3. Error message reply If an error occurs while processing the application __________________________ [27] An application code in the encrypted part ofacceptable if amessage provides an additional check thatticket with themessage was decrypted properly. Section 5.5.3. - 59 - Expires 15 October 1993 Version 5 - Revision 5.2 request,requested life cannot otherwise be provided. If a ticket with theKRB_ERROR message willrequested life cannot besent in response. See section 5.9.1 forprovided, then a renewable ticket may be issued with a renew-till equal to theformat oftheerror message.requested endtime. Thecname and crealm fieldsvalue of the renew-till field may still beleft out iflimited by local limits, or limits selected by theserver cannot determine their appropriate values fromindividual principal or server. 28 ENC-TKT-IN-SKEY This option is used only by thecorresponding KRB_AP_REQ message. Ifticket-granting service. The ENC- TKT-IN-SKEY option indicates that theauthenticator was decipherable,ticket for thectime and cusec fields will containend server is to be Kohl & Neuman [Page 53] RFC 1510 Kerberos September 1993 encrypted in thevaluessession key fromit. 5.6. KRB_SAFE message specification This section specifiestheformat of a message that can beadditional ticket-granting ticket provided. 29 RESERVED Reserved for future use. 30 RENEW This option is used only byeither side (client or server) of an application to send a tamper-proof message to its peer. It presumes that a session key has previously been exchanged (for exam- ple, by usingtheKRB_AP_REQ/KRB_AP_REP messages). 5.6.1. KRB_SAFE definitionticket-granting service. TheKRB_SAFE message contains user data along with a collision-proof checksum keyed withRENEW option indicates that thesession key.present request is for a renewal. Themessage fields are: KRB-SAFE ::= [APPLICATION 20] SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, safe-body[2] KRB-SAFE-BODY, cksum[3] Checksum } KRB-SAFE-BODY ::= SEQUENCE { user-data[0] OCTET STRING, timestamp[1] KerberosTime OPTIONAL, usec[2] INTEGER OPTIONAL, seq-number[3] INTEGER OPTIONAL, s-address[4] HostAddress, r-address[5] HostAddress OPTIONAL } pvno and msg-type These fields are described above in section 5.4.1. msg-type is KRB_SAFE. safe-body This fieldticket provided isa placeholder forencrypted in thebody ofsecret key for theKRB-SAFE message. Itserver on which it is valid. This option will only be honored if the ticket to beencoded separatelyrenewed has its RENEWABLE flag set andthen haveif thechecksum computed over it, for usetime inthe cksum field. cksum Thisits renew till fieldcontains the checksum of the applica- tion data. Checksum details are described in sec- tion 6.4.has not passed. Thechecksumticket to be renewed iscomputed overpassed in theSection 5.6.1. - 60 - Expires 15 October 1993 Version 5 - Revision 5.2 encodingpadata field as part of theKRB-SAFE-BODY sequence. user-dataauthentication header. 31 VALIDATE Thisfieldoption ispart ofused only by theKRB_SAFE and KRB_PRIV messagesticket-granting service. The VALIDATE option indicates that the request is to validate a postdated ticket. It will only be honored if the ticket presented is postdated, presently has its INVALID flag set, andcontainwould be otherwise usable at this time. A ticket cannot be validated before its starttime. The ticket presented for validation is encrypted in theapplication specific data thatkey of the server for which it is valid and isbeingpassedfrom the sender toin thereci- pient. timestamp Thispadata fieldisas part of theKRB_SAFEauthentication header. cname andKRB_PRIV messages. Its contentssname These fields are thecurrent timesame asknown by the sender ofthose described for themessage. By checkingticket in section 5.3.1. sname may only be absent when thetimestamp,ENC-TKT-IN-SKEY option is specified. If absent, therecipientname of themessageserver isable to make sure thattaken from the name of the client in the ticket passed as additional-tickets. enc-authorization-data The enc-authorization-data, if present (and itwas recently generated, and is not a replay. usec This fieldcan only be present in the TGS_REQ form), ispartan encoding of theKRB_SAFE and KRB_PRIV headers. It containsdesired authorization-data encrypted under themicrosecond part ofsub- session key if present in thetimestamp. seq-number ThisAuthenticator, or alternatively from the session key in the ticket-granting ticket, both from the padata fieldis described aboveinsection 5.3.2. s-addressthe KRB_AP_REQ. Kohl & Neuman [Page 54] RFC 1510 Kerberos September 1993 realm This field specifies theaddress in use byrealm part of thesenderserver's principal identifier. In the AS exchange, this is also the realm part of themessage. r-addressclient's principal identifier. from This fieldspecifies the addressis included inuse bytherecipient ofKRB_AS_REQ and KRB_TGS_REQ ticket requests when themessage. It mayrequested ticket is to beomittedpostdated. It specifies the desired start time forsome uses (such as broadcast protocols), buttherecipient may arbitrarily reject such messages.requested ticket. till This fieldalong with s-address can be used to help detect messages which have been incorrectly or maliciously delivered tocontains thewrong recipient. 5.7. KRB_PRIV message specificationexpiration date requested by the client in a ticket request. rtime Thissection specifiesfield is theformat ofrequested renew-till time sent from amessage that can be used by either side (client or server) of an applicationclient tosecurely and privately sendthe KDC in amessage to its peer.ticket request. Itpresumes thatis optional. nonce This field is part of the KDC request and response. It it intended to hold asession key has previously been exchanged (for example,random number generated byusingtheKRB_AP_REQ/KRB_AP_REP messages). 5.7.1. KRB_PRIV definition The KRB_PRIV message contains user data encrypted inclient. If theSession Key. The message fields are: __________________________ [29] An application codesame number is included in the encryptedpart of a messageresponse from the KDC, it providesan additional checkevidence that themessage Section 5.7.1. - 61 - Expires 15 October 1993 Version 5 - Revision 5.2 KRB-PRIV ::= [APPLICATION 21] SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, enc-part[3] EncryptedData } EncKrbPrivPart ::= [APPLICATION 28[29]] SEQUENCE { user-data[0] OCTET STRING, timestamp[1] KerberosTime OPTIONAL, usec[2] INTEGER OPTIONAL, seq-number[3] INTEGER OPTIONAL, s-address[4] HostAddress, -- sender's addr r-address[5] HostAddress OPTIONAL -- recip's addr } pvno and msg-type These fields are described above in section 5.4.1. msg-typeresponse isKRB_PRIV. enc-part This field holdsfresh and has not been replayed by anencoding ofattacker. Nonces must never be re-used. Ideally, it should be gen erated randomly, but if theEncKrbPrivPart sequence encrypted undercorrect time is known, it may suffice (Note, however, that if thesession key[30]. This encrypted encodingtime is usedfor the enc-part field ofas theKRB-PRIV message. See section 6 fornonce, one must make sure that theformat ofworkstation time is monotonically increasing. If theciphertext. user-data, timestamp, usec, s-address and r-address These fields are described above in section 5.6.1. seq-number This fieldtime isdescribed above in section 5.3.2. 5.8. KRB_CRED message specificationever reset backwards, there is a small, but finite, probability that a nonce will be reused.). etype Thissectionfield specifies theformat of a message that candesired encryption algorithm to be usedto send Kerberos credentials from one principal to another. It is presented here to encourage a common __________________________ was decrypted properly. [30] If supported byin theencryption methodresponse. addresses This field is included inuse, an initialization vector may be passed totheencryption procedure,initial request for tickets, and optionally included inorder to achieve proper cipher chaining. The initialization vector might comerequests for additional tickets from thelast block ofticket-granting server. It specifies theciphertextaddresses from which theprevious KRB_PRIV mes- sage, but itrequested ticket isthe application's choice whether or nottouse such an initialization vector. If left out,be valid. Normally it includes thedefault initialization vectoraddresses for theencryption algo- rithm will be used. Section 5.8. - 62 - Expires 15 October 1993 Version 5 - Revision 5.2 mechanism to be used by applications when forwarding tickets or providing proxies to subordinate servers. It presumes thatclient's host. If asession key has already been exchanged perhapsproxy is requested, this field will contain other addresses. The contents of this field are usually copied byusingtheKRB_AP_REQ/KRB_AP_REP messages. 5.8.1. KRB_CRED definition The KRB_CRED message contains a sequenceKDC into the caddr field of the resulting ticket. additional-tickets Additional ticketstomay besent and information neededoptionally included in a request tousethetickets, includingticket-granting server. If the ENC-TKT-IN- SKEY option has been specified, then the session key fromeach. The information needed to usethetickets is encryped under an encryption key previously exchanged. The message fields are: KRB-CRED ::= [APPLICATION 22] SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, -- KRB_CRED tickets[2] SEQUENCE OF Ticket, enc-part[3] EncryptedData } EncKrbCredPart ::= [APPLICATION 29] SEQUENCE { ticket-info[0] SEQUENCE OF KrbCredInfo, nonce[1] INTEGER OPTIONAL, timestamp[2] KerberosTime OPTIONAL, usec[3] INTEGER OPTIONAL, s-address[4] HostAddress OPTIONAL, r-address[5] HostAddress OPTIONAL } KrbCredInfo ::= SEQUENCE { key[0] EncryptionKey, prealm[1] Realm OPTIONAL, pname[2] PrincipalName OPTIONAL, flags[3] TicketFlags OPTIONAL, authtime[4] KerberosTime OPTIONAL, starttime[5] KerberosTime OPTIONAL, endtime[6] KerberosTime OPTIONAL renew-till[7] KerberosTime OPTIONAL, srealm[8] Realm OPTIONAL, sname[9] PrincipalName OPTIONAL, caddr[10] HostAddresses OPTIONAL } pvno and msg-type These fields are described aboveadditional ticket will be used insection 5.4.1. msg-type is KRB_CRED. tickets These areplace of thetickets obtained fromserver's key to encrypt theKDC Section 5.8.1. - 63 - Expires 15 October 1993 Version 5 - Revision 5.2 specifically for use bynew ticket. If more than one option which requires additional tickets has been specified, then theintended recipient. Successiveadditional tickets arepaired with the correspond- ing KrbCredInfo sequence fromused in theenc-part oforder specified by theKRB-CRED message. enc-part This field holds an encodingordering of theEncKrbCredPart sequence encrypted under the session key shared between the sender andoptions bits (see kdc-options, above). Kohl & Neuman [Page 55] RFC 1510 Kerberos September 1993 The application code will be either ten (10) or twelve (12) depending on whether theintended recipient. This encrypted encodingrequest isusedforthe enc-part field of the KRB-CRED message. See section 6an initial ticket (AS-REQ) or for an additional ticket (TGS-REQ). The optional fields (addresses, authorization-data and additional- tickets) are only included if necessary to perform theformat ofoperation specified in theciphertext. nonce If practical, an application may require the inclusion of a nonce generated by the recipient ofkdc-options field. It should be noted that in KRB_TGS_REQ, themessage. Ifprotocol version number appears twice and two different message types appear: thesame value is includedKRB_TGS_REQ message contains these fields as does thenonce in the message, it provides evidenceauthentication header (KRB_AP_REQ) that is passed in the padata field. 5.4.2. KRB_KDC_REP definition The KRB_KDC_REP message format isfresh and has not been replayed by an attacker. A nonce must never be re-used; it should be generated randomly byused for therecipient ofreply from the KDC for either an initial (AS) request or a subsequent (TGS) request. There is no messageand providedtype for KRB_KDC_REP. Instead, the type will be either KRB_AS_REP or KRB_TGS_REP. The key used to encrypt thesenderciphertext part of themes- sage in an application specific manner. timestamp and usec These fields specify the time thatreply depends on theKRB-CREDmessagewas generated. The time is used to pro- vide assurance thattype. For KRB_AS_REP, themessageciphertext isfresh. s-address and r-address These fields are described aboveencrypted insection 5.6.1. They are used optionally to provide additional assurance oftheintegrity ofclient's secret key, and theKRB-CRED mes- sage.client's keyThis field existsversion number is included in thecorresponding ticket passed bykey version number for theKRB-CRED message andencrypted data. For KRB_TGS_REP, the ciphertext isused to passencrypted in the sub-session key from the Authenticator, or if absent, the session key from thesender toticket-granting ticket used in theintended recipient. The field's encoding is describedrequest. In that case, no version number will be present insection 6.2. The following fields are optional. If present, they can be associated with the credentials in the remote ticket file. If left out, then it is assumed that the recipient ofthecredentials already knows their value. prealm and pnameEncryptedData sequence. Thename and realm ofKRB_KDC_REP message contains thedelegated principal identity. Section 5.8.1. - 64 - Expires 15 Octoberfollowing fields: AS-REP ::= [APPLICATION 11] KDC-REP TGS-REP ::= [APPLICATION 13] KDC-REP KDC-REP ::= SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, padata[2] SEQUENCE OF PA-DATA OPTIONAL, crealm[3] Realm, cname[4] PrincipalName, ticket[5] Ticket, enc-part[6] EncryptedData } EncASRepPart ::= [APPLICATION 25[25]] EncKDCRepPart EncTGSRepPart ::= [APPLICATION 26] EncKDCRepPart EncKDCRepPart ::= SEQUENCE { key[0] EncryptionKey, last-req[1] LastReq, Kohl & Neuman [Page 56] RFC 1510 Kerberos September 1993Version 5 - Revision 5.2 flags, authtime, starttime, endtime, renew-till, srealm, sname, and caddr These fields contain the values of the correspond- ing fields fromnonce[2] INTEGER, key-expiration[3] KerberosTime OPTIONAL, flags[4] TicketFlags, authtime[5] KerberosTime, starttime[6] KerberosTime OPTIONAL, endtime[7] KerberosTime, renew-till[8] KerberosTime OPTIONAL, srealm[9] Realm, sname[10] PrincipalName, caddr[11] HostAddresses OPTIONAL } NOTE: In EncASRepPart, theticket foundapplication code in theticket field. Descriptionsencrypted part of a message provides an additional check that the message was decrypted properly. pvno and msg-type These fields areidentical to the descriptionsdescribed above inthe KDC-REP message. 5.9. Error message specificationsection 5.4.1. msg-type is either KRB_AS_REP or KRB_TGS_REP. padata This field is described in detail in sectionspecifies the format5.4.1. One possible use forthe KRB_ERROR message. The fields included in the message are intendedthis field is toreturn as much information as possible aboutencode anerror. Italternate "mix-in" string to be used with a string-to-key algorithm (such as isnot expected thatdescribed in section 6.3.2). This ability is useful to ease transitions if a realm name needs to change (e.g., when a company is acquired); in such a case all existing password-derived entries in theinformation required byKDC database would be flagged as needing a special mix-in string until the next password change. crealm, cname, srealm and sname These fieldswill be availableare the same as those described forall types of errors. Iftheappropriate informationticket in section 5.3.1. ticket The newly-issued ticket, from section 5.3.1. enc-part This field isnot available whena place holder for themessage is composed,ciphertext and related information that forms thecorresponding field will be left outencrypted part ofthea message.Note that sinceThe description of the encrypted part of theKRB_ERRORmessage follows each appearance of this field. The encrypted part isnot protected by any encryption, itencoded as described in section 6.1. key This field isquite possiblethe same as described foran intruder to synthesize or modify such a message. In particular, this means thattheclient should not use any fieldsticket in section 5.3.1. last-req This field is returned by the KDC and specifies the time(s) of the last request by a principal. Depending on what information is available, thismes- sagemight be the last time that a request forsecurity-critical purposes, such as settingasys- tem clockticket-granting ticket was made, orgeneratingthe last time that afresh authenticator. The message can be useful, however,request based on a ticket-granting ticket Kohl & Neuman [Page 57] RFC 1510 Kerberos September 1993 was successful. It also might cover all servers foradvisingauser on the reason for some failure. 5.9.1. KRB_ERROR definition The KRB_ERROR message consists ofrealm, or just thefollowing fields: KRB-ERROR ::= [APPLICATION 30] SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, ctime[2] KerberosTime OPTIONAL, cusec[3] INTEGER OPTIONAL, stime[4] KerberosTime, susec[5] INTEGER, error-code[6] INTEGER, crealm[7] Realm OPTIONAL, cname[8] PrincipalName OPTIONAL, realm[9] Realm, -- Correct realm sname[10] PrincipalName, -- Correct name e-text[11] GeneralString OPTIONAL, e-data[12] OCTET STRING OPTIONAL } pvno and msg-type These fields are described aboveparticular server. Some implementations may display this information to the user to aid insection 5.4.1. msg-typediscovering unauthorized use of one's identity. It isKRB_ERROR. Section 5.9.1. - 65 - Expires 15 October 1993 Version 5 - Revision 5.2 ctimesimilar in spirit to the last login time displayed when logging into timesharing systems. nonce This field is described above in section 5.4.1.cusec Thiskey-expiration The key-expiration field isdescribed above in section 5.5.2. stime This field containspart of the response from the KDC and specifies thecurrenttimeonthat theserver. Itclient's secret key is due to expire. The expiration might be the result oftype KerberosTime. susecpassword aging or an account expiration. This fieldcontains the microsecond partwill usually be left out of theserver's timestamp. Its value ranges from 0TGS reply since the response to999. It appears along with stime. The two fields are usedthe TGS request is encrypted inconjunction to specifyareasonably accurate timestamp. error-codeThis field contains the error code returned by Kerberos orsession key and no client information need be retrieved from theserver when a request fails. To interpretKDC database. It is up to thevalue of this field seeapplication client (usually thelist of error codes in section 8. Implementations are encouragedlogin program) toprovide for national language sup- port intake appropriate action (such as notifying thedisplay of error messages. crealm, cname, srealmuser) if the expira tion time is imminent. flags, authtime, starttime, endtime, renew-till andsnamecaddr These fields aredescribed aboveduplicates of those found in the encrypted portion of the attached ticket (see section5.3.1. e-text This field contains additional text to help explain5.3.1), provided so theerror code associated withclient may verify they match thefailedintended request(for example, it might include a principal name which was unknown). e-data Thisand to assist in proper ticket caching. If the message is of type KRB_TGS_REP, the caddr fieldcontains additional data aboutwill only be filled in if theerrorrequest was foruse bya proxy or forwarded ticket, or if theapplication to help it recoveruser is substituting a subset of the addresses fromor handletheerror.ticket granting ticket. If theerror- code is KDC_ERR_PREAUTH_REQUIRED,client- requested addresses are not present or not used, then thee-data fieldaddresses contained in the ticket willcontain an encoding of a sequencebe the same as those included in the ticket-granting ticket. 5.5. Client/Server (CS) message specifications This section specifies the format ofpadata fields, each corresponding to an acceptable pre-authentication method and optionally contain- ing datathe messages used for themethod: METHOD-DATA ::= SEQUENCEauthentication ofPA-DATA Iftheerror-code is KRB_AP_ERR_METHOD, thenclient to thee-data field will containapplication server. 5.5.1. KRB_AP_REQ definition The KRB_AP_REQ message contains the Kerberos protocol version number, the message type KRB_AP_REQ, anencoding ofoptions field to indicate any options in use, and thefol- lowing sequence: METHOD-DATAticket and authenticator themselves. The KRB_AP_REQ message is often referred to as the "authentication header". AP-REQ ::= [APPLICATION 14] SEQUENCE {method-type[0]pvno[0] INTEGER,Section 5.9.1. - 66 - Expires 15 Octobermsg-type[1] INTEGER, Kohl & Neuman [Page 58] RFC 1510 Kerberos September 1993Version 5 - Revision 5.2 method-data[1] OCTETap-options[2] APOptions, ticket[3] Ticket, authenticator[4] EncryptedData } APOptions ::= BIT STRINGOPTIONAL{ reserved(0), use-session-key(1), mutual-required(2) }method-type will indicate the required alternate method; method-data will contain any required additional information. 6. Encryptionpvno andChecksum Specifications The Kerberos protocolsmsg-type These fields are described above inthis document are designed to use stream encryption ciphers, which can be simulated using commonly available block encryption ciphers, such as the Data Encryption Standard [11],section 5.4.1. msg-type is KRB_AP_REQ. ap-options This field appears inconjunction with block chainingthe application request (KRB_AP_REQ) andchecksum methods [12]. Encryptionaffects the way the request isused to proveprocessed. It is a bit-field, where theidentities ofselected options are indicated by thenetwork entities par- ticipating in message exchanges.bit being set (1), and the unselected options and reserved fields being reset (0). TheKey Distribution Center for each realmencoding of the bits istrusted by all principals registered in that realm to store a secret keyspecified inconfi- dence. Proofsection 5.2. The meanings ofknowledgethe options are: Bit(s) Name Description 0 RESERVED Reserved for future expansion of thissecret keyfield. 1 USE-SESSION-KEYThe USE-SESSION-KEY option indicates that the ticket the client isusedpresenting toverify the authenticity ofaprincipal. The KDC uses the principal's secret key (inserver is encrypted in theAS exchange) or a sharedsession key(infrom theTGS exchange) to encrypt responses to ticket requests;server's ticket-granting ticket. When this option is not specified, theability to obtainticket is encrypted in the server's secretkey or session key implies the knowledge of the appropriate keys and the identity ofkey. 2 MUTUAL-REQUIREDThe MUTUAL-REQUIRED option tells theKDC. The ability of a principal to decryptserver that theKDC responseclient requires mutual authentication, andpresentthat it must respond with aTicket andKRB_AP_REP message. 3-31 RESERVED Reserved for future use. ticket This field is aproperly formed Authenticator (generated with the session key fromticket authenticating theKDC response)client toa service verifiestheidentity ofserver. authenticator This contains theprincipal; likewiseauthenticator, which includes theabilityclient's choice of a subkey. Its encoding is described in section 5.3.2. Kohl & Neuman [Page 59] RFC 1510 Kerberos September 1993 5.5.2. KRB_AP_REP definition The KRB_AP_REP message contains theservice to extract the session key fromKerberos protocol version number, theTicketmessage type, andprove its knowledge thereofan encrypted timestamp. The message is sent in inaresponseverifies the identity ofto an application request (KRB_AP_REQ) where theservice. The Kerberos protocols generally assume thatmutual authentication option has been selected in theencryption used is secure from cryptanalysis; however,ap-options field. AP-REP ::= [APPLICATION 15] SEQUENCE { pvno[0] INTEGER, msg-type[1] INTEGER, enc-part[2] EncryptedData } EncAPRepPart ::= [APPLICATION 27] SEQUENCE { ctime[0] KerberosTime, cusec[1] INTEGER, subkey[2] EncryptionKey OPTIONAL, seq-number[3] INTEGER OPTIONAL } NOTE: insome cases,EncAPRepPart, theorder of fieldsapplication code in the encryptedportionspart ofmessages are arranged to minimizea message provides an additional check that theeffects of poorly chosen keys. Itmessage was decrypted properly. The encoded EncAPRepPart isstill important to choose good keys. If keys are derived from user-typed passwords, those passwords need to be well chosen to make brute force attacks more dif- ficult. Poorly chosen keys still make easy targets for intruders. The following sections specify the encryption and checksum mechanisms currently defined for Kerberos. The encodings, chaining, and padding requirements for each are described. For encryption methods, it is often desirable to place random information (often referred to as a confounder) atencrypted in thestartshared session key of themessage.ticket. Therequirements foroptional subkey field can be used in an application-arranged negotiation to choose acon- founderper association session key. pvno and msg-type These fields arespecified with each encryption mechanism. Section 6. - 67 - Expires 15 October 1993 Version 5 - Revision 5.2 Some encryption systems use a block-chaining method to improvedescribed above in section 5.4.1. msg-type is KRB_AP_REP. enc-part This field is described above in section 5.4.2. ctime This field contains the current time on thesecurity characteristics ofclient's host. cusec This field contains theciphertext. However, these chaining methods often don't provide an integrity check upon decryption. Such systems (such as DES in CBC mode) must be augmented with a checksummicrosecond part of theplain- textclient's timestamp. subkey This field contains an encryption key whichcanis to beverified at decryption andused todetect any tampering or damage. Such checksums should be good at detecting burst errors in the input. If any damage is detected, the decryption routineprotect this specific application session. See section 3.2.6 for specifics on how this field isexpectedused toreturnnegotiate a key. Unless anerror indicating the failure of an integrity check. Each encryption type is expected to provide and verify an appropriate checksum. The specification of each encryption method sets out its checksum requirements. Finally, where a keyapplication specifies otherwise, if this field isto be derived from a user's password, an algorithm for convertingleft out, thepassword to asub-session keyoffrom theappropriate type is included. It is desirable forauthenticator, or if also left out, thestring tosession keyfunction tofrom the ticket will beone-way, and forused. Kohl & Neuman [Page 60] RFC 1510 Kerberos September 1993 5.5.3. Error message reply If an error occurs while processing themap- ping toapplication request, the KRB_ERROR message will bedifferent in different realms. This is important because users who are registeredsent inmore than one realm will often useresponse. See section 5.9.1 for thesame password in each,format of the error message. The cname andit is desirable that an attacker compromisingcrealm fields may be left out if theKerberosserverin one realm not obtain or derivecannot determine their appropriate values from theuser's key in another. For an discussion ofcorresponding KRB_AP_REQ message. If theintegrity characteristics ofauthenticator was decipherable, thecandidate encryptionctime andchecksum methods considered for Kerberos, thecusec fields will contain thereader is referred to [13]. 6.1. Encryption Specifications The following ASN.1 definition describes all encrypted messages. The enc-part field which appears invalues from it. 5.6. KRB_SAFE message specification This section specifies theunen- crypted partformat ofmessages in section 5 isasequence consist- ingmessage that can be used by either side (client or server) of anencryption type, an optional key version number, andapplication to send a tamper- proof message to its peer. It presumes that a session key has previously been exchanged (for example, by using theciphertext. EncryptedDataKRB_AP_REQ/KRB_AP_REP messages). 5.6.1. KRB_SAFE definition The KRB_SAFE message contains user data along with a collision-proof checksum keyed with the session key. The message fields are: KRB-SAFE ::= [APPLICATION 20] SEQUENCE {etype[0]pvno[0] INTEGER,-- EncryptionType kvno[1]msg-type[1] INTEGER, safe-body[2] KRB-SAFE-BODY, cksum[3] Checksum } KRB-SAFE-BODY ::= SEQUENCE { user-data[0] OCTET STRING, timestamp[1] KerberosTime OPTIONAL, usec[2] INTEGER OPTIONAL,cipher[2] OCTET STRING -- ciphertextseq-number[3] INTEGER OPTIONAL, s-address[4] HostAddress, r-address[5] HostAddress OPTIONAL }etypepvno and msg-type These fields are described above in section 5.4.1. msg-type is KRB_SAFE. safe-body This fieldidentifies which encryption algorithm was usedis a placeholder for the body of the KRB-SAFE message. It is toencipherbe encoded separately and then have thecipher. Detailed specif- icationschecksum computed over it, forselected encryption types appear lateruse inthis section. kvnothe cksum field. cksum This field contains theversion numberchecksum of thekey under which data is encrypted. It is only presentapplication data. Checksum details are described inmessages encrypted under long lasting keys, such as principals' secret keys. Section 6.1. - 68 - Expires 15 Octobersection 6.4. The Kohl & Neuman [Page 61] RFC 1510 Kerberos September 1993Version 5 - Revision 5.2 cipherchecksum is computed over the encoding of the KRB-SAFE-BODY sequence. user-data This fieldcontainsis part of theenciphered text, encoded as an OCTET STRING. The cipher fieldKRB_SAFE and KRB_PRIV messages and contain the application specific data that isgenerated by applyingbeing passed from thespecified encryption algorithmsender todata composedthe recipient. timestamp This field is part of themessage