idnits 2.17.1 draft-grant-tacacs-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-18) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. (A line matching the expected section header was found, but with an unexpected indentation: ' 1. Introduction' ) ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack an Authors' Addresses Section. ** There are 86 instances of too long lines in the document, the longest one being 5 characters in excess of 72. ** The abstract seems to contain references ([2], [3], [4], [5], [6], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 195: '...lude this option MUST be prepared to i...' RFC 2119 keyword, line 253: '...ket in a session MUST have the sequenc...' RFC 2119 keyword, line 317: '...ds which are unused MUST have a length...' RFC 2119 keyword, line 320: '...ed length fields SHOULD have values of...' RFC 2119 keyword, line 322: '...s in a TACACS+ packet MUST NOT be null...' (44 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 200 has weird spacing: '...2 byte heade...' == Line 201 has weird spacing: '... The header...' == Line 500 has weird spacing: '...hat the user ...' == Line 502 has weird spacing: '... of the next ...' == Line 528 has weird spacing: '...ce that is r...' == (5 more instances...) == Unrecognized Status in 'Category: DRAFT', assuming Proposed Standard (Expected one of 'Standards Track', 'Full Standard', 'Draft Standard', 'Proposed Standard', 'Best Current Practice', 'Informational', 'Experimental', 'Informational', 'Historic'.) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? '2' on line 1593 looks like a reference -- Missing reference section? '6' on line 1606 looks like a reference -- Missing reference section? '3' on line 1596 looks like a reference -- Missing reference section? '4' on line 1599 looks like a reference -- Missing reference section? '5' on line 1602 looks like a reference -- Missing reference section? '1' on line 1591 looks like a reference Summary: 13 errors (**), 0 flaws (~~), 7 warnings (==), 8 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group D. Carrel, Lol Grant 3 INTERNET-DRAFT Cisco Systems, 4 draft-grant-tacacs-01.txt October, 1996 6 Category: DRAFT 8 The TACACS+ Protocol 9 Version 1.77 11 Status of This Memo 13 This memo provides information for the Internet community. This memo 14 does not specify an Internet standard of any kind. Distribution of 15 this memo is unlimited. 17 This document is an Internet-Draft. Internet-Drafts are working 18 documents of the Internet Engineering Task Force (IETF), its areas, 19 and its working groups. Note that other groups may also distribute 20 working documents as Internet-Drafts. 22 Internet-Drafts are draft documents valid for a maximum of six months 23 and may be updated, replaced, or obsoleted by other documents at any 24 time. It is inappropriate to use Internet- Drafts as reference 25 material or to cite them other than as ``work in progress.'' 27 To learn the current status of any Internet-Draft, please check the 28 ``1id-abstracts.txt'' listing contained in the Internet- Drafts 29 Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), 30 munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or 31 ftp.isi.edu (US West Coast). 33 Abstract 35 TACACS+ provides access control for routers, network access servers 36 and other networked computing devices via one or more centralized 37 servers. TACACS+ provides separate authentication, authorization and 38 accounting services. This document describes the protocol that is 39 used by TACACS+. 41 1. Introduction 43 The TACACS+ protocol is the latest generation of TACACS. TACACS is a 44 simple UDP based access control protocol originally developed by BBN 45 for the MILNET. Cisco has enhanced (extended) TACACS several times, 46 and Cisco's implementation, based on the original TACACS, is referred 47 to as XTACACS. The TACACS protocol is described in [2]. 49 TACACS+ improves on TACACS and XTACACS by separating the functions of 50 Authentication, Authorization and Accounting and by encrypting all 51 traffic between the NAS and the daemon. It allows for arbitrary 52 length and content authentication exchanges which will allow any 53 authentication mechanism to be utilized with TACACS+ clients. It is 54 extensible to provide for site customization and future development 55 features, and it uses TCP to ensure reliable delivery. The protocol 56 allows the TACACS+ client to request very fine grained access control 57 and allows the daemon to respond to each component of that request. 59 The separation of authentication, authorization and accounting is a 60 fundamental component of the design of TACACS+. The distinction 61 between them is very important so this document will address each one 62 separately. It is important to note that TACACS+ provides for all 63 three, but an implementation or configuration is not required to 64 employ all three. Each one serves a unique purpose that alone is use- 65 ful, and together can be quite powerful. A very important benefit to 66 separating authentication from authorization is that authorization 67 (and per-user profiles) can be a dynamic process. Instead of a one- 68 shot user profile, TACACS+ can be integrated with other negotiations, 69 such as a PPP negotiation, for far greater flexibility. The account- 70 ing portion can serve to provide security auditing or accounting/ 71 billing services. 73 TACACS+ uses TCP for its transport. The daemon should listen at port 74 49 which is the "LOGIN" port assigned for the TACACS protocol. This 75 port is reserved in the assigned numbers RFC for both UDP and TCP. 76 Current TACACS and extended TACACS implementations use port 49. 78 2. Technical Definitions 80 This section provides a few basic definitions that are applicable to 81 this document. 83 Authentication 85 Authentication is the action of determining who a user (or entity) 86 is. Authentication can take many forms. Traditional authentication 87 utilizes a name and a fixed password. Most computers work this way, 88 and TACACS+ can also work this way. However, fixed passwords have 89 limitations, mainly in the area of security. Many modern authentica- 90 tion mechanisms utilize "one-time" passwords or a challenge-response 91 query. TACACS+ is designed to support all of these, and should be 92 powerful enough to handle any future mechanisms. Authentication gen- 93 erally takes place when the user first logs in to a machine or 94 requests a service of it. 96 Authentication is not mandatory, it is a site configured option. Some 97 sites do not require it. Others require it only for certain services 98 (see authorization below). Authentication may also take place when a 99 user attempts to gain extra privileges, and must identify themselves 100 as someone who possesses the required information (passwords, etc.) 101 for those privileges. 103 Authorization 105 It is important to distinguish Authorization from Authentication. 106 Authorization is the action of determining what a user is allowed to 107 do. Generally authentication precedes authorization, but again, this 108 is not required. An authorization request may indicate that the user 109 is not authenticated (we don't know who they are). In this case it is 110 up to the authorization agent to determine if an unauthenticated user 111 is allowed the services in question. 113 In TACACS+, authorization does not merely provide yes or no answers, 114 but it may also customize the service for the particular user. Exam- 115 ples of when authorization would be performed are: When a user first 116 logs in and wants to start a shell, or when a user starts PPP and 117 wants to use IP over PPP with a particular IP address. The TACACS+ 118 daemon might respond to these requests by allowing the service, but 119 placing a time restriction on the login shell, or by requiring IP 120 access lists on the PPP connection. For a list of authorization 121 attributes, see the authorization section below. 123 Accounting 125 Accounting is typically the third action after authentication and 126 authorization. But again, neither authentication nor authorization 127 are required. Accounting is the action of recording what a user is 128 doing, and/or has done. Accounting in TACACS+ can serve two purposes: 129 It may be used to account for services used, such as in a billing 130 environment. It may also be used as an auditing tool for security 131 services. To this end, TACACS+ supports three types of accounting 132 records. Start records indicate that a service is about to begin. 133 Stop records indicate that a service has just terminated, and Update 134 records are intermediate notices that indicate that a service is 135 still being performed. TACACS+ accounting records contain all the 136 information used in the authorization records, and also contain 137 accounting specific information such as start and stop times (when 138 appropriate) and resource usage information. A list of accounting 139 attributes is defined in the accounting section. 141 Session 143 The concept of a session is used throughout this document. A TACACS+ 144 session is a single authentication sequence, a single authorization 145 exchange, or a single accounting exchange. 147 The session concept is important because a session identifier is used 148 as a part of the encryption, and it is used by both ends to distin- 149 guish between packets belonging to multiple sessions. 151 Multiple sessions may be supported simultaneously and/or consecu- 152 tively on a single TCP connection if both the daemon and client sup- 153 port this. If multiple sessions are not being multiplexed over a 154 single tcp connection, a new connection should be opened for each 155 TACACS+ session and closed at the end of that session. For accounting 156 and authorization, this implies just a single pair of packets 157 exchanged over the connection (the request and its reply). For 158 authentication, a single session may involve an arbitrary number of 159 packets being exchanged. 161 The session is an operational concept that is maintained between the 162 TACACS+ client and daemon. It does not necessarily correspond to a 163 given user or user action. 165 NAS 167 A NAS is a Network Access Server. This is any device that provides 168 access services. Nowadays, a NAS is typically more than just a termi- 169 nal server. Terminal servers usually provide a character mode front 170 end and then allow the user to telnet or rlogin to another host. A 171 NAS may also support protocol based access services and may support 172 PPP, ARAP, LAT, XREMOTE, and others. 174 MUST 176 This word means that the definition is an absolute requirement of the 177 specification. 179 MUST NOT 181 This phrase means that the definition is an absolute prohibition of 182 the specification. 184 SHOULD 186 This word, or the adjective "recommended", means that there may exist 187 valid reasons in particular circumstances to ignore this item, but 188 the full implications should be understood and carefully weighed 189 before choosing a different course. 191 MAY 193 This word, or the adjective "optional", means that this item is one 194 of an allowed set of alternatives. An implementation which does not 195 include this option MUST be prepared to interoperate with another 196 implementation which does include the option. 198 3. The TACACS+ packet header 200 All TACACS+ packets always begin with the following 12 byte header. 201 The header is always cleartext and describes the remainder of the 202 packet: 204 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 206 +----------------+----------------+----------------+----------------+ 207 |major | minor | | | | 208 |version| version| type | seq_no | flags | 209 +----------------+----------------+----------------+----------------+ 210 | | 211 | session_id | 212 +----------------+----------------+----------------+----------------+ 213 | | 214 | length | 215 +----------------+----------------+----------------+----------------+ 217 major_version 219 This is the major TACACS+ version number. 221 TAC_PLUS_MAJOR_VER := 0xc 223 minor_version 225 The minor TACACS+ version number. This is intended to allow revisions 226 to the TACACS+ protocol while maintaining backwards compatibility. 228 Minor version 1 is currently defined for some commands. It may only 229 be used for commands that explicitly call for it in this document. 230 All other requests must use the default value. 232 TAC_PLUS_MINOR_VER_DEFAULT := 0x0 234 TAC_PLUS_MINOR_VER_ONE := 0x1 235 See the compatibility section at the end of the document. 237 When a daemon receives a packet with a minor_version that it does not 238 support, it should return an ERROR status with the minor_version set 239 to the closest supported value. 241 type 242 This is the packet type. Legal values are: 244 TAC_PLUS_AUTHEN := 0x01 (Authentication) 246 TAC_PLUS_AUTHOR := 0x02 (Authorization) 248 TAC_PLUS_ACCT := 0x03 (Accounting) 250 seq_no 252 This is the sequence number of the current packet for the current 253 session. The first TACACS+ packet in a session MUST have the sequence 254 number 1 and each subsequent packet will increment the sequence 255 number by one. Thus clients only send packets containing odd sequence 256 numbers, and TACACS+ daemons only send packets containing even 257 sequence numbers. 259 The sequence number must never wrap i.e. if the sequence number 2^8-1 260 is ever reached, that session must terminate and be restarted with a 261 sequence number of 1. 263 flags 265 This field contains various bitmapped flags. 267 The unencrypted flag bit says whether encryption is being used on the 268 body of the TACACS+ packet (the entire portion after the header). 270 TAC_PLUS_UNENCRYPTED_FLAG := 0x01 272 If this flag is set, the packet is not encrypted. If this flag is 273 cleared, the packet is encrypted. 275 Unencrypted packets are intended for testing, and are not recommended 276 for normal use. 278 The single-connection flag: 280 TAC_PLUS_SINGLE_CONNECT_FLAG := 0x04 281 If a NAS sets this flag, this indicates that it supports multiplexing 282 TACACS+ sessions over a single tcp connection. The flag need only be 283 examined on the first two packets for any given connection since the 284 single-connect status of a connection, once established, should not 285 be changed. The connection must instead be closed and a new connec- 286 tion opened, if required. 288 If the daemon sets this flag in the first reply packet in response to 289 the first packet from a NAS, this indicates its willingness to sup- 290 port single-connection over the current connection. The daemon may 291 set this flag even if the NAS does not set it, but the NAS is under 292 no obligation to honor it. 294 session_id 296 The Id for this TACACS+ session. The session id should be randomly 297 chosen. This field does not change for the duration of the TACACS+ 298 session. (If this value is not a cryptographically strong random 299 number, it will compromise the protocol's security. [6]) 301 length 303 The total length of the TACACS+ packet body (not including the 304 header). This value is in network byte order. Packets are never pad- 305 ded beyond this length. 307 4. The TACACS+ packet body 309 The TACACS+ body types are defined in the packet header. The 310 remainder of this document will address the contents of the different 311 TACACS+ bodies. The following general rules apply to all TACACS+ body 312 types: 314 - The entire body is protected by the encryption mechanism indicated 315 in the header. 317 - Any variable length data fields which are unused MUST have a length 318 value equal to zero. 320 - Unused fixed length fields SHOULD have values of zero. 322 - All data and message fields in a TACACS+ packet MUST NOT be null 323 terminated. 325 - All length values are unsigned and in network byte order. 327 - There should be no padding in any of the fields or at the end of a 328 packet. 330 5. Body Encryption 332 The body of TACACS+ packets may be encrypted. The following sections 333 describe the encryption mechanisms that are supported. Only one 334 encryption mechanism SHOULD be used within a single session. 336 When the encryption mechanism relies on a secret key, it is referring 337 to a shared secret value that is known to both the client and the 338 daemon. This document does not discuss the management and storage of 339 those keys. It is an implementation detail of the daemon and client, 340 as to whether they will maintain only one key, or a different key for 341 each client or daemon with which they communicate. For security rea- 342 sons, the latter options should be available, but it is a site depen- 343 dent decision as to whether the use of separate keys is appropriate. 345 The encrypted flag field may be set as follows: 347 TAC_PLUS_UNENCRYPTED_FLAG == 0x0 349 In this case, the packet body is encrypted by XOR-ing it byte-wise 350 with a pseudo random pad. 352 ENCRYPTED {data} == data ^ pseudo_pad 354 The pad is generated by concatenating a series of MD5 hashes (each 16 355 bytes long) and truncating it to the length of the input data. 357 Whenever used in this document, MD5 refers to the "RSA Data Security, 358 Inc. MD5 Message-Digest Algorithm" as specified in [3]. 360 pseudo_pad = {MD5_1 [,MD5_2 [ ... ,MD5_n]]} truncated to len(data) 362 The first MD5 hash is generated by concatenating the session_id, the 363 secret key, the version number and the sequence number and then run- 364 ning MD5 over that stream. All of those input values are available in 365 the packet header, except for the secret key which is a shared secret 366 between the TACACS+ client and daemon. 368 The version number is the one byte combination of the major and minor 369 version numbers. 371 The session id is used in the byte order in which it appears in the 372 TACACS+ header. (i.e. in network byte order, not host byte order). 374 Subsequent hashes are generated by using the same input stream, but 375 concatenating the previous hash value at the end of the input stream. 377 MD5_1 = MD5{session_id, key, version, seq_no} 379 MD5_2 = MD5{session_id, key, version, seq_no, MD5_1} 381 .... 383 MD5_n = MD5{session_id, key, version, seq_no, MD5_n-1} 385 TAC_PLUS_UNENCRYPTED_FLAG == 0x1 387 In this case, the entire packet body is in cleartext. Encryption and 388 decryption are null operations. This method should only be used for 389 debugging. It does not provide data protection or authentication and 390 is highly susceptible to packet spoofing. Implementing this encryp- 391 tion method is optional. 393 NOTE: implementations should take care not to skip decryption simply 394 because an incoming packet indicates that it is not encrypted. 396 After a packet body is decrypted, the lengths of the component values 397 in the packet should be summed and checked against the cleartext 398 datalength value from the header. Any packets which fail this check 399 should be discarded and an error signalled. Commonly such failures 400 may be expected to be seen when there are mismatched keys between the 401 NAS and the TACACS+ server. 403 If an error must be declared but the type of the incoming packet can- 404 not be determined, a packet with the identical cleartext header but 405 with a sequence number incremented by one and the length set to zero 406 may be returned to indicate an error. 408 6. Body types 410 All further discussions of TACACS+ packet bodies assumes that any 411 encryption/decryption has already been performed. From here on, we 412 are only concerned with the cleartext data. 414 There are several constant fields in many of the following bodies. A 415 few merit mention here as they apply to most packet bodies. 417 The user is the username or user id that is authenticated or being 418 authenticated. 420 The port is an ascii description of the port on which the user is 421 connected. 423 The rem_addr is a "best effort" description of the remote location 424 from which the user has connected to the client. In many cases, the 425 remote address will not be available or will be unreliable at best, 426 but it may be useful when included. 428 The user_msg is always the ASCII input from the user. 430 The server_msg is always used to hold a message that is intended to 431 be presented to the user. In some contexts it may be optional as to 432 whether to actually present it. 434 The data field has several uses but is not used in all packets. 436 6.1. Authentication 438 TACACS+ authentication has three packet types: START, CONTINUE and 439 REPLY. START and CONTINUE are always sent by the client and REPLY is 440 always sent by the daemon. 442 Authentication begins with the client sending a START message to the 443 daemon. The START message describes the type of authentication to be 444 performed, and may contain the username and some authentication data. 445 The START packet is only ever sent as the first message in a TACACS+ 446 authentication session, or as the packet immediately following a res- 447 tart. (A restart may be requested by the daemon in a REPLY packet). A 448 START packet always has seq_no equal to 1. 450 In response to a START packet, the daemon sends a REPLY. The REPLY 451 message indicates whether the authentication is finished, or whether 452 it should continue. If the REPLY indicates that authentication should 453 continue, then it will also indicate what new information is 454 requested. The client will get that information and return it in a 455 CONTINUE message. 457 The daemon MUST always send a REPLY to both the START and the CON- 458 TINUE messages, the only exception being if the client indicates an 459 abort in the CONTINUE, in which case the session is immediately 460 aborted. 462 Thus, there are zero or more pairs of packets where the client sends 463 a CONTINUE and the daemon sends a REPLY. 465 The authentication START packet body 467 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 469 +----------------+----------------+----------------+----------------+ 470 | action | priv_lvl | authen_type | service | 471 +----------------+----------------+----------------+----------------+ 472 | user len | port len | rem_addr len | data len | 473 +----------------+----------------+----------------+----------------+ 474 | user ... 475 +----------------+----------------+----------------+----------------+ 476 | port ... 477 +----------------+----------------+----------------+----------------+ 478 | rem_addr ... 479 +----------------+----------------+----------------+----------------+ 480 | data... 481 +----------------+----------------+----------------+----------------+ 483 Packet fields are as follows: 485 action 487 This describes the authentication action to be performed. Legal 488 values are: 490 TAC_PLUS_AUTHEN_LOGIN := 0x01 492 TAC_PLUS_AUTHEN_CHPASS := 0x02 494 TAC_PLUS_AUTHEN_SENDPASS := 0x03 (deprecated) 496 TAC_PLUS_AUTHEN_SENDAUTH := 0x04 498 priv_lvl 500 This indicates the privilege level that the user is authenticating 501 as. Privilege levels are ordered values from 0 to 15 with each level 502 representing a privilege level that is a superset of the next lower 503 value. If a NAS client uses a different privilege level scheme, then 504 mapping must be provided. Pre-defined values are: 506 TAC_PLUS_PRIV_LVL_MAX := 0x0f 508 TAC_PLUS_PRIV_LVL_ROOT := 0x0f 510 TAC_PLUS_PRIV_LVL_USER := 0x01 512 TAC_PLUS_PRIV_LVL_MIN := 0x00 514 authen_type 516 The type of authentication that is being performed. Legal values are: 518 TAC_PLUS_AUTHEN_TYPE_ASCII := 0x01 520 TAC_PLUS_AUTHEN_TYPE_PAP := 0x02 522 TAC_PLUS_AUTHEN_TYPE_CHAP := 0x03 524 TAC_PLUS_AUTHEN_TYPE_ARAP := 0x04 526 service 528 This is the service that is requesting the authentication. Legal 529 values are: 531 TAC_PLUS_AUTHEN_SVC_NONE := 0x00 533 TAC_PLUS_AUTHEN_SVC_LOGIN := 0x01 535 TAC_PLUS_AUTHEN_SVC_ENABLE := 0x02 537 TAC_PLUS_AUTHEN_SVC_PPP := 0x03 539 TAC_PLUS_AUTHEN_SVC_ARAP := 0x04 541 TAC_PLUS_AUTHEN_SVC_PT := 0x05 543 TAC_PLUS_AUTHEN_SVC_RCMD := 0x06 545 TAC_PLUS_AUTHEN_SVC_X25 := 0x07 547 TAC_PLUS_AUTHEN_SVC_NASI := 0x08 549 TAC_PLUS_AUTHEN_SVC_FWPROXY := 0x09 551 The ENABLE service refers to a service requesting authentication in order 552 to grant the user different privileges. This is comparable to the Unix 553 "su(1)" command. A service value of NONE should only be used when none of 554 the other service values are appropriate. 556 user 558 The username. It is optional in this packet. 560 port 562 The ASCII name of the client port on which the authentication is tak- 563 ing place. The value of this field is client specific. (For example, 564 Cisco uses "tty10" to denote the tenth tty line and "Async10" to 565 denote the tenth async interface). 567 rem_addr 569 An ASCII string that describes the user's remote location. This field 570 is optional (since the information may not be available). It is 571 intended to hold a network address if the user is connected via a 572 network, a caller ID is the user is connected via ISDN or a POTS, or 573 any other remote location information that is available. This field 574 value is client specified. 576 data 578 This field is used to send data appropriate for the action and 579 authen_type. It is described in more detail below. 581 7. The authentication REPLY packet body 583 The TACACS+ daemon sends only one type of authentication packet (a 584 REPLY packet) to the client. The REPLY packet body looks as follows: 586 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 588 +----------------+----------------+----------------+----------------+ 589 | status | flags | server_msg len | 590 +----------------+----------------+----------------+----------------+ 591 | data len | server_msg ... 592 +----------------+----------------+----------------+----------------+ 593 | data ... 594 +----------------+----------------+ 596 status 598 The current status of the authentication. Legal values are: 600 TAC_PLUS_AUTHEN_STATUS_PASS := 0x01 602 TAC_PLUS_AUTHEN_STATUS_FAIL := 0x02 604 TAC_PLUS_AUTHEN_STATUS_GETDATA := 0x03 606 TAC_PLUS_AUTHEN_STATUS_GETUSER := 0x04 608 TAC_PLUS_AUTHEN_STATUS_GETPASS := 0x05 610 TAC_PLUS_AUTHEN_STATUS_RESTART := 0x06 612 TAC_PLUS_AUTHEN_STATUS_ERROR := 0x07 614 TAC_PLUS_AUTHEN_STATUS_FOLLOW := 0x21 616 flags 618 Bitmapped flags that modify the action to be taken. The following 619 values are defined: 621 TAC_PLUS_REPLY_FLAG_NOECHO := 0x01 623 server_msg 625 A message to be displayed to the user. This field is optional. If it 626 exists, it is intended to be presented to the user. 628 data 630 This field holds data that is a part of the authentication exchange 631 and is intended for the NAS, not the user. Valid uses of this field 632 are described below. 634 8. The authentication CONTINUE packet body 636 This packet is sent from the NAS to the daemon following the receipt 637 of a REPLY packet. 639 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 641 +----------------+----------------+----------------+----------------+ 642 | user_msg len | data len | 643 +----------------+----------------+----------------+----------------+ 644 | flags | user_msg ... 645 +----------------+----------------+----------------+----------------+ 646 | data ... 647 +----------------+ 649 user_msg 651 This field is the string that the user entered, or the NAS provided 652 on behalf of the user, in response to the server_msg from a REPLY 653 packet. 655 data 657 This field carries information that is specific to the action and the 658 authen_type for this session. Valid uses of this field are described 659 below. 661 flags 663 This holds the bitmapped flags that modify the action to be taken. 664 The following values are defined: 666 TAC_PLUS_CONTINUE_FLAG_ABORT := 0x01 668 9. The authentication process 670 The flavor of the authentication is determined by the action and the 671 authen_type fields in the START packet. First we should discuss some 672 general fields that apply to all flavors of authentication exchanges. 673 The user and data fields in the START packet are defined below for 674 each flavor. 676 The priv_lvl, service, port and rem_addr in the START packet are all 677 provided to help identify the conditions on the NAS. In the CONTINUE 678 packet, the user_msg and data fields are defined below for each fla- 679 vor. For all REPLY packets, the server_msg may contain a message to 680 be displayed to the user, but the data field usage varies and is 681 described below. 683 The descriptions below first describe "normal" authentication where, 684 in response to a START packet, the daemon either sends a request for 685 more information (GETDATA, GETUSER or GETPASS) or a termination (PASS 686 or FAIL). The actions and meanings when the daemon sends a RESTART, 687 ERROR or FOLLOW are common and are described further below. 689 When the REPLY status equals TAC_PLUS_AUTHEN_STATUS_GETDATA, 690 TAC_PLUS_AUTHEN_STATUS_GETUSER or TAC_PLUS_AUTHEN_STATUS_GETPASS, 691 then authentication continues and the server_msg may be used by the 692 client to prompt the user for more information. The client MUST then 693 return a CONTINUE packet containing the requested information in the 694 user_msg field. 696 TAC_PLUS_AUTHEN_STATUS_GETDATA is the generic request for more infor- 697 mation. All three cause the same action to be performed, but in the 698 case of TAC_PLUS_AUTHEN_STATUS_GETUSER, the client can know that the 699 information that the user responds with is a username, and for 700 TAC_PLUS_AUTHEN_STATUS_GETPASS, that the user response represents a 701 password. 703 If the TAC_PLUS_REPLY_FLAG_NOECHO flag is set in the REPLY, then the 704 user response should not be echoed as it is entered. The data field 705 is only used in the REPLY where explicitly defined below. 707 9.0.1. Enable Requests 709 action = TAC_PLUS_AUTHEN_LOGIN 711 priv_lvl = implementation dependent 713 authen_type = not used 715 service = TAC_PLUS_AUTHEN_SVC_ENABLE 717 This is an ENABLE request, used to change the current running 718 privilege level of a principal. The exchange MAY consist of multiple 719 messages while the daemon collects the information it requires in 720 order to allow changing the principal's privilege level. This 721 exchange is very similar to an Inbound ASCII login (which see). 723 In order to readily distinguish enable requests from other types of 724 request, the value of the service field MUST be set to 725 TAC_PLUS_AUTHEN_SVC_ENABLE when requesting an ENABLE. It MUST NOT be 726 set to this value when requesting any other operation. 728 9.0.2. Inbound ASCII Login 730 action = TAC_PLUS_AUTHEN_LOGIN 732 authen_type = TAC_PLUS_AUTHEN_TYPE_ASCII 734 This is a standard ASCII authentication. The START packet may contain 735 the username, but need not do so. The data fields in both the START 736 and CONTINUE packets are not used for ASCII logins. There is a single 737 START followed by zero or more pairs of REPLYs and CONTINUEs, fol- 738 lowed by a terminating REPLY (PASS or FAIL). 740 9.0.3. Inbound PAP Login 742 action = TAC_PLUS_AUTHEN_LOGIN 744 authen_type = TAC_PLUS_AUTHEN_TYPE_PAP 745 minor_version = 0x1 747 The entire exchange MUST consist of a single START packet and a sin- 748 gle REPLY. The START packet MUST contain a username and the data 749 field MUST contain the PAP ASCII password. A PAP authentication only 750 consists of a username and password [4]. The REPLY from the daemon 751 MUST be either a PASS or FAIL. 753 9.0.4. Inbound CHAP login 755 action = TAC_PLUS_AUTHEN_LOGIN 757 authen_type = TAC_PLUS_AUTHEN_TYPE_CHAP 759 minor_version = 0x1 761 The entire exchange MUST consist of a single START packet and a sin- 762 gle REPLY. The START packet MUST contain the username in the user 763 field and the data field will be a concatenation of the PPP id, the 764 challenge and the response. 766 The length of the challenge value can be determined from the length 767 of the data field minus the length of the id (always 1 octet) and the 768 length of the response field (always 16 octets). 770 To perform the authentication, the daemon will run MD5 over the id, 771 the user's secret and the challenge, as defined in the PPP Authenti- 772 cation RFC [4] and then compare that value with the response. The 773 REPLY from the daemon MUST be a PASS or FAIL. 775 9.0.5. Inbound ARAP login 777 action = TAC_PLUS_AUTHEN_LOGIN 779 authen_type = TAC_PLUS_AUTHEN_TYPE_ARAP 781 minor_version = 0x1 783 The entire exchange MUST consist of a single START packet and a sin- 784 gle REPLY. The START packet MUST contain the username in the user 785 field and the data field will be a concatenation of the NAS's chal- 786 lenge to the remote peer (8 octets) the remote peer's challenge to 787 the NAS (8 octets) and the remote peer's response to the NAS's chal- 788 lenge (8 octets). 790 The daemon must run DES encryption over both the challenges using the 791 user's secret as the DES key, as described in the ARAP specification 792 [5]. For a successful authentication, the encrypted NAS challenge 793 MUST be identical to the peer's response. The REPLY from the daemon 794 MUST be a PASS or FAIL. The encrypted peer challenge (8 octets) is 795 returned in the data field of a REPLY packet if the status is set to 796 PASS. 798 9.0.6. Outbound PAP request 800 action = TAC_PLUS_AUTHEN_SENDAUTH 802 authen_type = TAC_PLUS_AUTHEN_TYPE_PAP 804 minor_version = 0x1 806 This is used when the NAS needs to provide PAP authentication creden- 807 tials to the remote PPP peer. The entire exchange MUST consist of a 808 single START packet and a single REPLY. The START packet contains a 809 username in the user field. A REPLY with status set to PASS MUST con- 810 tain a cleartext password in the data field. Caution is urged when 811 using this. By sending a cleartext password to the NAS, that password 812 will then be passed to the remote PPP peer. It should be ensured that 813 the provided password can never be used to authenticate back to the 814 NAS. Use of this is discouraged, but supported for complete intero- 815 perability with the PPP protocol. 817 9.0.7. Outbound CHAP request 819 action = TAC_PLUS_AUTHEN_SENDAUTH 821 authen_type = TAC_PLUS_AUTHEN_TYPE_CHAP 823 minor_version = 0x1 825 This is used when the NAS needs to provide CHAP authentication 826 credentials to the remote PPP peer. The entire exchange MUST consist 827 of a single START packet and a single REPLY. The START packet MUST 828 contain the username in the user field and the data field will be a 829 concatenation of the PPP id and the challenge. 831 The length of the challenge value can be determined from the length 832 of the data field minus the length of the id (always 1 octet). The 833 daemon will run MD5 over the id, the user's secret and the challenge, 834 as defined in the PPP Authentication RFC [4]. 836 The REPLY from the daemon MUST be a PASS or FAIL. If the status is 837 PASS, then the data field MUST contain the 16 octet MD5 output 839 9.0.8. Outbound ASCII and ARAP request 841 action = TAC_PLUS_AUTHEN_SENDAUTH 843 authen_type = TAC_PLUS_AUTHEN_TYPE_ASCII 845 authen_type = TAC_PLUS_AUTHEN_TYPE_ARAP 847 This is an error. This action is not supported for ASCII logins and 848 in not needed for ARAP since ARAP authentication is already a two way 849 protocol. 851 9.0.9. ASCII change password request 853 action = TAC_PLUS_AUTHEN_CHPASS 855 authen_type = TAC_PLUS_AUTHEN_TYPE_ASCII 857 This exchange consists of multiple messages while the daemon collects 858 the information it requires in order to change the user's password. 859 It is very similar to an ASCII login. The status value 860 TAC_PLUS_AUTHEN_STATUS_GETPASS MUST only be used when requesting the 861 "new" password. It MAY be sent multiple times. When requesting the 862 "old" password, the status value MUST be set to 863 TAC_PLUS_AUTHEN_STATUS_GETDATA. 865 9.0.10. PPP change password request 867 action = TAC_PLUS_AUTHEN_CHPASS 869 authen_type = TAC_PLUS_AUTHEN_TYPE_PAP 871 authen_type = TAC_PLUS_AUTHEN_TYPE_CHAP 873 This is never valid. The PPP protocol does not support password 874 changing. 876 9.0.11. ARAP change password request 878 action = TAC_PLUS_AUTHEN_CHPASS 880 authen_type = TAC_PLUS_AUTHEN_TYPE_ARAP 882 This exchange consists of a single START packet and a single REPLY. 883 The START packet MUST contain the username and the data field con- 884 tains both the old and the new passwords encrypted (**FORMAT NOT 885 KNOWN AT THIS TIME **). The reply is a PASS or FAIL and the data 886 field is unused. 888 10. Aborting a session 890 The client may prematurely terminate a session by setting the 891 TAC_PLUS_CONTINUE_FLAG_ABORT flag in the CONTINUE message. If this 892 flag is set, the data portion of the message may contain an ASCII 893 message explaining the reason for the abort. The session is ter- 894 minated and no REPLY message is sent. 896 There are three other possible return status values that can be used 897 in a REPLY packet. These can be sent regardless of the action or 898 authen_type. Each of these indicates that the TACACS+ authentication 899 session should be terminated. In each case, the server_msg may con- 900 tain a message to be displayed to the user. 902 When the status equals TAC_PLUS_AUTHEN_STATUS_FOLLOW the packet indi- 903 cates that the TACACS+ daemon requests that authentication should be 904 performed with an alternate daemon. The data field MUST contain ASCII 905 text describing one or more daemons. A daemon description appears 906 like this: 908 [@@][@] 910 The protocol and key are optional. The protocol can describe an 911 alternate way of performing the authentication, other than TACACS+. 912 If the protocol is not present, then TACACS+ is assumed. 914 Protocols are ASCII numbers corresponding to the methods listed in 915 the authen_method field of authorization packets (defined below). The 916 host is specified as either a fully qualified domain name, or an 917 ASCII numeric IP address specified as octets separated by dots (`.'). 919 If a key is supplied, the client MAY use the key in order to authen- 920 ticate to that host. If more than one host is specified, they MUST be 921 separated by an ASCII (0x0D). 923 Use of the hosts in a TAC_PLUS_AUTHEN_STATUS_FOLLOW packet is at the 924 discretion of the TACACS+ client. It may choose to use any one, all 925 or none of these hosts. If it chooses to use none, then it MUST treat 926 the authentication as if the return status was 927 TAC_PLUS_AUTHEN_STATUS_FAIL. 929 While the order of hosts in this packet indicates a preference, but 930 the client is not obliged to use that ordering. 932 If the status equals TAC_PLUS_AUTHEN_STATUS_ERROR, then the host is 933 indicating that it is experiencing an unrecoverable error and the 934 authentication should proceed as if that host could not be contacted. 935 The data field may contain a message to be printed on an administra- 936 tive console or log. 938 If the status equals TAC_PLUS_AUTHEN_STATUS_RESTART, then the authen- 939 tication sequence should be restarted with a new START packet from 940 the client. This REPLY packet indicates that the current authen_type 941 value (as specified in the START packet) is not acceptable for this 942 session, but that others may be. 944 The TAC_PLUS_AUTHEN_STATUS_RESTART REPLY packet may contain a list of 945 valid authen_type values in the data portion of the packet. The 946 authen_type values are a single byte in length so the data_len value 947 indicates the number of authen_type values included. This packet is 948 only currently intended for PPP authentication when multiple authen- 949 tication mechanisms are available and can be negotiated between the 950 client and the remote peer. This also requires future PPP authentica- 951 tion extensions which have not yet been passed through the IETF. If a 952 client chooses not to accept the TAC_PLUS_AUTHEN_STATUS_RESTART 953 packet, then it should be TREATED as if the status was 954 TAC_PLUS_AUTHEN_STATUS_FAIL. 956 11. Authorization 958 TACACS+ authorization is an extensible way of providing remote 959 authorization services. An authorization session is defined as a 960 single pair of messages, a REQUEST followed by a RESPONSE. 962 The authorization REQUEST message contains a fixed set of fields that 963 describe the authenticity of the user or process, and a variable set 964 of arguments that describes the services and options for which 965 authorization is requested. 967 The RESPONSE contains a variable set of response arguments 968 (attribute-value pairs) which can restrict or modify the clients 969 actions. 971 The arguments in both a REQUEST and a RESPONSE can be specified as 972 either mandatory or optional. An optional argument is one that may or 973 may not be used, modified or even understood by the recipient. 975 A mandatory argument MUST be both understood and used. This allows 976 for extending the attribute list while providing secure backwards 977 compatibility. 979 11.1. The authorization REQUEST packet body 981 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 983 +----------------+----------------+----------------+----------------+ 984 | authen_method | priv_lvl | authen_type | authen_service | 985 +----------------+----------------+----------------+----------------+ 986 | user len | port len | rem_addr len | arg_cnt | 987 +----------------+----------------+----------------+----------------+ 988 | arg 1 len | arg 2 len | ... | arg N len | 989 +----------------+----------------+----------------+----------------+ 990 | user ... 991 +----------------+----------------+----------------+----------------+ 992 | port ... 993 +----------------+----------------+----------------+----------------+ 994 | rem_addr ... 995 +----------------+----------------+----------------+----------------+ 996 | arg 1 ... 997 +----------------+----------------+----------------+----------------+ 998 | arg 2 ... 999 +----------------+----------------+----------------+----------------+ 1000 | ... 1001 +----------------+----------------+----------------+----------------+ 1002 | arg N ... 1003 +----------------+----------------+----------------+----------------+ 1005 authen_method 1007 This indicates the authentication method used by the client to 1008 acquire the user information. 1010 TAC_PLUS_AUTHEN_METH_NOT_SET := 0x00 1011 TAC_PLUS_AUTHEN_METH_NONE := 0x01 1013 TAC_PLUS_AUTHEN_METH_KRB5 := 0x02 1015 TAC_PLUS_AUTHEN_METH_LINE := 0x03 1017 TAC_PLUS_AUTHEN_METH_ENABLE := 0x04 1019 TAC_PLUS_AUTHEN_METH_LOCAL := 0x05 1021 TAC_PLUS_AUTHEN_METH_TACACSPLUS := 0x06 1023 TAC_PLUS_AUTHEN_METH_GUEST := 0x08 1025 TAC_PLUS_AUTHEN_METH_RADIUS := 0x10 1027 TAC_PLUS_AUTHEN_METH_KRB4 := 0x11 1029 TAC_PLUS_AUTHEN_METH_RCMD := 0x20 1031 KRB5 and KRB4 are kerberos version 5 and 4. LINE refers to a fixed 1032 password associated with the line used to gain access. LOCAL is a NAS 1033 local user database. ENABLE is a command that authenticates in order 1034 to grant new privileges. TACACSPLUS is, of course, TACACS+. GUEST is 1035 an unqualified guest authentication, such as an ARAP guest login. 1036 RADIUS is the Radius authentication protocol. RCMD refers to authen- 1037 tication provided via the R-command protocols from Berkeley Unix. 1038 (One should be aware of the security limitations to R-command authen- 1039 tication.) 1041 priv_lvl 1043 This field matches the priv_lvl field in the authentication section 1044 above. It indicates the users current privilege level. 1046 authen_type 1048 This field matches the authen_type field in the authentication sec- 1049 tion above. It indicates the type of authentication that was per- 1050 formed. 1052 authen_service 1054 This field matches the service field in the authentication section 1055 above. It indicates the service through which the user authenticated. 1057 user 1059 This field contains the user's account name. 1061 port 1063 This field matches the port field in the authentication section 1064 above. 1066 rem_addr 1068 This field matches the rem_addr field in the authentication section 1069 above. 1071 arg_cnt 1073 The number of authorization arguments to follow 1075 arg 1077 An attribute-value pair that describes the command to be performed. 1078 (see below) 1080 The authorization arguments in both the REQUEST and the RESPONSE are 1081 attribute-value pairs. The attribute and the value are in a single 1082 ascii string and are separated by either a "=" (0X3D) or a "*" 1083 (0X2A). The equals sign indicates a mandatory argument. The asterisk 1084 indicates an optional one. 1086 Optional arguments are ones that may be disregarded by either client 1087 or daemon. Mandatory arguments require that the receiving side under- 1088 stands the attribute and will act on it. If the client receives a 1089 mandatory argument that it cannot oblige or does not understand, it 1090 MUST consider the authorization to have failed. It is legal to send 1091 an attribute-value pair with a NULL (zero length) value. 1093 Attribute-value strings are not NULL terminated, rather their length 1094 value indicates their end. The maximum length of an attribute-value 1095 string is 255 characters. The following attributes are defined: 1097 12. Table 1: Attribute-value Pairs 1099 service 1101 The primary service. Specifying a service attribute indicates that 1102 this is a request for authorization or accounting of that service. 1103 Current values are "slip", "ppp", "arap", "shell", "tty-daemon", 1104 "connection", "system" and "firewall". This attribute MUST always be 1105 included. 1107 protocol 1109 a protocol that is a subset of a service. An example would be any PPP 1110 NCP. Currently known values are "lcp", "ip", "ipx", "atalk", "vines", 1111 "lat", "xremote", "tn3270", "telnet", "rlogin", "pad", "vpdn", "ftp", 1112 "http", "deccp", "osicp" and "unknown". 1114 cmd 1116 a shell (exec) command. This indicates the command name for a shell 1117 command that is to be run. This attribute MUST be specified if ser- 1118 vice equals "shell". A NULL value indicates that the shell itself is 1119 being referred to. 1121 cmd-arg 1123 an argument to a shell (exec) command. This indicates an argument for 1124 the shell command that is to be run. Multiple cmd-arg attributes may 1125 be specified, and they are order dependent. 1127 acl 1129 ASCII number representing a connection access list. Used only when 1130 service=shell and cmd=NULL 1132 inacl 1134 ASCII identifier for an interface input access list. 1136 outacl 1138 ASCII identifier for an interface output access list. 1140 zonelist 1142 A numeric zonelist value. (Applicable to AppleTalk only). 1144 addr 1146 a network address 1148 addr-pool 1150 The identifier of an address pool from which the NAS should assign an 1151 address. 1153 routing 1155 A boolean. Specifies whether routing information is to be propagated 1156 to, and accepted from this interface. 1158 route 1160 Indicates a route that is to be applied to this interface. Values 1161 MUST be of the form " []". If a 1162 is not specified, the resulting route should be via 1163 the requesting peer. 1165 timeout 1167 an absolute timer for the connection (in minutes). A value of zero 1168 indicates no timeout. 1170 idletime 1172 an idle-timeout for the connection (in minutes). A value of zero 1173 indicates no timeout. 1175 autocmd 1177 an auto-command to run. Used only when service=shell and cmd=NULL 1179 noescape 1181 Boolean. Prevents user from using an escape character. Used only when 1182 service=shell and cmd=NULL 1184 nohangup 1186 Boolean. Do no disconnect after an automatic command. Used only when 1187 service=shell and cmd=NULL 1189 priv_lvl 1191 privilege level to be assigned. 1193 remote_user 1195 remote userid (authen_method must have the value 1196 TAC_PLUS_AUTHEN_METH_RCMD) 1198 remote_host 1200 remote host (authen_method must have the value 1201 TAC_PLUS_AUTHEN_METH_RCMD) 1203 callback-dialstring 1205 Indicates that callback should be done. Value is NULL, or a dial- 1206 string. A NULL value indicates that the service MAY choose to get the 1207 dialstring through other means. 1209 callback-line 1211 The line number to use for a callback. 1213 callback-rotary 1215 The rotary number to use for a callback. 1217 nocallback-verify 1219 Do not require authentication after callback. 1221 For all boolean attributes, valid values are "true" or "false". A 1223 value of NULL means an attribute with a zero length string for its value 1224 i.e. cmd=NULL is actually transmitted as the string of 4 characters 1225 "cmd=". 1227 If a host is specified in a cmd-arg or addr, it is recommended that it 1228 be specified as a numeric address so as to avoid any ambiguities. 1230 In the case of rcmd authorizations, the authen_method will be set to 1231 TAC_PLUS_AUTHEN_METH_RCMD and the remote_user and remote_host attributes 1232 will provide the remote user and host information to enable rhost style 1233 authorization. The response may request that a privilege level be set 1234 for the user. 1236 The protocol attribute is intended for use with PPP. When service equals 1237 "ppp" and protocol equals "lcp", the message describes the PPP link 1238 layer service. For other values of protocol, this describes a PPP NCP 1239 (network layer service). A single PPP session can support multiple NCPs. 1241 The attributes addr, inacl, outacl, route and routing may be used for 1242 all network protocol types that are supported. Their format and meaning 1243 is determined by the values of the service or protocol attributes. Not 1244 all are necessarily implemented for any given network protocol. 1246 12.1. The authorization RESPONSE packet body 1248 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1250 +----------------+----------------+----------------+----------------+ 1251 | status | arg_cnt | server_msg len | 1252 +----------------+----------------+----------------+----------------+ 1253 + data len | arg 1 len | arg 2 len | 1254 +----------------+----------------+----------------+----------------+ 1255 | ... | arg N len | server_msg ... 1256 +----------------+----------------+----------------+----------------+ 1257 | data ... 1258 +----------------+----------------+----------------+----------------+ 1259 | arg 1 ... 1260 +----------------+----------------+----------------+----------------+ 1261 | arg 2 ... 1262 +----------------+----------------+----------------+----------------+ 1263 | ... 1264 +----------------+----------------+----------------+----------------+ 1265 | arg N ... 1266 +----------------+----------------+----------------+----------------+ 1268 status 1269 This field indicates the authorization status 1271 TAC_PLUS_AUTHOR_STATUS_PASS_ADD := 0x01 1273 TAC_PLUS_AUTHOR_STATUS_PASS_REPL := 0x02 1275 TAC_PLUS_AUTHOR_STATUS_FAIL := 0x10 1277 TAC_PLUS_AUTHOR_STATUS_ERROR := 0x11 1278 TAC_PLUS_AUTHOR_STATUS_FOLLOW := 0x21 1280 server_msg 1282 This is an ASCII string that may be presented to the user. The decision 1283 to present this message is client specific. 1285 data 1287 This is an ASCII string that may be presented on an administrative 1288 display, console or log. The decision to present this message is client 1289 specific. 1291 arg_cnt 1293 The number of authorization arguments to follow. 1295 arg 1297 An attribute-value pair that describes the command to be performed. (see 1298 below) 1300 If the status equals TAC_PLUS_AUTHOR_STATUS_FAIL, then the appropriate 1301 action is to deny the user action. 1303 If the status equals TAC_PLUS_AUTHOR_STATUS_PASS_ADD, then the 1304 arguments specified in the request are authorized and the arguments in 1305 the response are to be used IN ADDITION to those arguments. 1307 If the status equals TAC_PLUS_AUTHOR_STATUS_PASS_REPL then the 1308 arguments in the request are to be completely replaced by the 1309 arguments in the response. 1311 If the intended action is to approve the authorization with no 1312 modifications, then the status should be set to 1313 TAC_PLUS_AUTHOR_STATUS_PASS_ADD and the arg_cnt should be set to 1314 0. 1316 A status of TAC_PLUS_AUTHOR_STATUS_ERROR indicates an error occurred 1317 on the daemon. 1319 When the status equals TAC_PLUS_AUTHOR_STATUS_FOLLOW, then the arg_cnt 1320 MUST be 0. In that case, the actions to be taken and the contents of 1321 the data field are identical to the TAC_PLUS_AUTHEN_STATUS_FOLLOW 1322 status for Authentication. 1324 None of the arg values have any relevance if an ERROR is set. 1326 13. Accounting 1328 TACACS+ accounting is very similar to authorization. The packet for- 1329 mat is also similar. There is a fixed portion and an extensible por- 1330 tion. The extensible portion uses all the same attribute-value pairs 1331 that authorization uses, and adds several more. 1333 13.1. The account REQUEST packet body 1335 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1337 +----------------+----------------+----------------+----------------+ 1338 | flags | authen_method | priv_lvl | authen_type | 1339 +----------------+----------------+----------------+----------------+ 1340 | authen_service | user len | port len | rem_addr len | 1341 +----------------+----------------+----------------+----------------+ 1342 | arg_cnt | arg 1 len | arg 2 len | ... | 1343 +----------------+----------------+----------------+----------------+ 1344 | arg N len | user ... 1345 +----------------+----------------+----------------+----------------+ 1346 | port ... 1347 +----------------+----------------+----------------+----------------+ 1348 | rem_addr ... 1349 +----------------+----------------+----------------+----------------+ 1350 | arg 1 ... 1351 +----------------+----------------+----------------+----------------+ 1352 | arg 2 ... 1353 +----------------+----------------+----------------+----------------+ 1354 | ... 1355 +----------------+----------------+----------------+----------------+ 1356 | arg N ... 1357 +----------------+----------------+----------------+----------------+ 1359 flags 1361 This holds bitmapped flags. 1363 TAC_PLUS_ACCT_FLAG_MORE := 0x01 (deprecated) 1365 TAC_PLUS_ACCT_FLAG_START := 0x02 1367 TAC_PLUS_ACCT_FLAG_STOP := 0x04 1369 TAC_PLUS_ACCT_FLAG_WATCHDOG := 0x08 1371 All other fields are defined in the authorization and authentication 1372 sections above and have the same semantics. 1374 The following new attributes are defined for TACACS+ accounting only. 1375 When these attribute-value pairs are included in the argument list, 1376 they should precede any attribute-value pairs that are defined in the 1377 authorization section above. 1379 Table 2: Accounting Attribute-value Pairs 1381 task_id 1383 Start and stop records for the same event MUST have matching (unique) 1384 task_id's 1386 start_time 1388 The time the action started (in seconds since the epoch, 12:00am Jan 1389 1 1970). 1391 stop_time 1393 The time the action stopped (in seconds since the epoch.) 1395 elapsed_time 1397 The elapsed time in seconds for the action. Useful when the device 1398 does not keep real time. 1400 timezone 1402 The timezone abbreviation for all timestamps included in this packet. 1404 event 1406 Used only when "service=system". Current values are "net_acct", 1407 "cmd_acct", "conn_acct", "shell_acct" "sys_acct" and "clock_change". 1408 These indicate system level changes. The flags field SHOULD indicate 1409 whether the service started or stopped. 1411 reason 1413 Accompanies an event attribute. It describes why the event occurred. 1415 bytes 1417 The number of bytes transferred by this action 1419 bytes_in 1421 The number of input bytes transferred by this action 1423 bytes_out 1425 The number of output bytes transferred by this action 1427 paks 1429 The number of packets transferred by this action. 1431 paks_in 1433 The number of input packets transferred by this action. 1435 paks_out 1437 The number of output packets transferred by this action. 1439 status 1441 The numeric status value associated with the action. This is a signed 1442 four (4) byte word in network byte order. 0 is defined as success. 1443 Negative numbers indicate errors. Positive numbers indicate non-error 1444 failures. The exact status values may be defined by the client. 1446 err_msg 1448 An ascii string describing the status of the action. 1450 NOTE: All numeric values in an attribute-value string are provided as 1451 decimal ASCII numbers. 1453 13.2. The accounting REPLY packet body 1455 The response to an accounting message is used to indicate that the 1456 accounting function on the daemon has completed and securely commit- 1457 ted the record. This provides the client the best possible guarantee 1458 that the data is indeed logged. 1460 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1462 +----------------+----------------+----------------+----------------+ 1463 | server_msg len | data len | 1464 +----------------+----------------+----------------+----------------+ 1465 | status | server_msg ... 1466 +----------------+----------------+----------------+----------------+ 1467 | data ... 1468 +----------------+ 1470 status 1472 This is the return status. Values are: 1473 TAC_PLUS_ACCT_STATUS_SUCCESS := 0x01 1475 TAC_PLUS_ACCT_STATUS_ERROR := 0x02 1477 TAC_PLUS_ACCT_STATUS_FOLLOW := 0x21 1479 server_msg 1481 This is an ASCII string that may be presented to the user. The deci- 1482 sion to present this message is client specific. 1484 data 1486 This is an ASCII string that may be presented on an administrative 1487 display, console or log. The decision to present this message is 1488 client specific. 1490 When the status equals TAC_PLUS_ACCT_STATUS_FOLLOW, then the actions 1491 to be taken and the contents of the data field are identical to the 1492 TAC_PLUS_AUTHEN_STATUS_FOLLOW status for Authentication. 1494 The daemon MUST terminate the session after sending a REPLY. 1496 The TAC_PLUS_ACCT_FLAG_START flag indicates that this is a start 1497 accounting message. Start messages should only be sent once when a 1498 task is started. The TAC_PLUS_ACCT_FLAG_STOP indicates that this is a 1499 stop record and that the task has terminated. The 1500 TAC_PLUS_ACCT_FLAG_WATCHDOG flag means that this is an update record. 1501 Update records are sent at the client's discretion when the task is 1502 still running. 1504 The START and STOP flags are mutually exclusive. When the WATCHDOG 1505 flag is set along with the START flag, it indicates that the update 1506 record is a duplicate of the original START record. If the START flag 1507 is not set, then this indicates a minimal record indicating only that 1508 task is still running. The STOP flag MUST NOT be set in conjunction 1509 with the WATCHDOG flag. 1511 14. Compatibility between Minor Versions 0 and 1 1513 Whenever a TACACS+ daemon receives a packet with a minor_version that 1514 it does not support, it should return an ERROR status with the 1515 minor_version set to the supported value closest to the requested 1516 value. 1518 The changes between minor_version 0 and 1 all deal with the way that 1519 CHAP, ARAP and PAP authentications are handled. 1521 In minor_version 0, CHAP, ARAP and outbound PAP authentications were 1522 performed by the NAS sending a SENDPASS packet to the daemon. The 1523 SENDPASS requested a copy of the user's plaintext password so that 1524 the NAS could complete the authentication. The CHAP hashing and ARAP 1525 encryption were all performed on the NAS. Inbound PAP performed a 1526 normal LOGIN, sending the username in the START packet and then wait- 1527 ing for a GETPASS and sending the password in a CONTINUE packet. 1529 In minor_version 1, CHAP, ARAP and inbound PAP use LOGIN to perform 1530 inbound authentication and the exchanges use the data field so that 1531 the NAS only sends a single START packet and expects to receive a 1532 PASS or FAIL. SENDPASS has been deprecated and SENDAUTH introduced, 1533 so that the NAS can request authentication credentials for authenti- 1534 cating to a remote peer. SENDAUTH is only used for PPP when perform- 1535 ing outbound authentication. 1537 NOTE: Only those requests which have changed from their minor_version 1538 0 implementation (i.e. ARAP, CHAP and PAP) should use the new 1539 minor_version number of 1. All other requests (whose implementation 1540 has not changed) MUST continue to use the same minor_version number 1541 of 0 that they have always used. 1543 If a daemon or NAS implementation desires to provide support for 1544 minor_number 0 TACACS+ hosts, it MUST pay attention to the 1545 minor_version in the TACACS+ header (as it should anyway) and be 1546 prepared to support the SENDPASS operation. 1548 The removal of SENDPASS was prompted by security concerns, and imple- 1549 mentors should think very carefully about how they wish to provide 1550 this service. On a NAS, the minor_version 0 compatibility can be lay- 1551 ered such that higher layers only need to understand the 1552 minor_version 1 methodology, with the compatibility layer translating 1553 requests appropriately when contacting an older daemon. 1555 On a TACACS+ server, when detecting minor_number 0, the daemon should 1556 allow for PAP authentications that do not send the password in the 1557 data field, but instead expect to read the PAP password from a subse- 1558 quent CONTINUE packet. 1560 If the daemon supports SENDPASS, then it should be prepared to handle 1561 such requests for CHAP and ARAP and even PAP, when outbound authenti- 1562 cation takes place. 1564 15. Notes to Implementors 1566 For those interested in integrating one-time password support into 1567 TACACS+ daemons, there are some subtleties to consider. TACACS+ is 1568 designed to make this straightforward, but two cases require some 1569 extra care. 1571 One-time password support with ARAP and PPP's CHAP authentication 1572 protocols is NOT straightforward, but there are work arounds. The 1573 problem lies in the nature of ARAP and CHAP authentication. Both 1574 employ a challenge-response protocol that requires a copy of the 1575 cleartext password to be stored at both ends. Unfortunately, due to 1576 their cryptographic nature, one-time password systems can rarely pro- 1577 vide the cleartext version of the next password. 1579 A simple workaround is to have the user enter their username as a 1580 combination of the username and the one-time password, separated by a 1581 special character, and a fixed password can be used in the password 1582 field. The fixed password can be assigned on a per user basis or as a 1583 single site-wide password. 1585 For the separator character, Cisco Systems has been using the `*' 1586 (asterisk) character. After some deliberation, it was decided that it 1587 was the least likely character to be found in a username. 1589 16. References 1591 [1] D. Carrel, L. Grant, "The TACACS+ API Definition" 1593 [2] C. Finseth, RFC 1492, "An Access Control Protocol, Sometimes 1594 Called TACACS", July 1993. 1596 [3] R. Rivest, RFC 1321, "The MD5 Message-Digest Algorithm", April 1597 1992. 1599 [4] B. Lloyd, W. Simpson, RFC 1334, "PPP Authentication Protocols", 1600 October 1992. 1602 [5] Apple Computer Corp. AppleTalk Remote Access Protocol (ARAP) 1603 Version 2.0 External Reference Specification. Preliminary docu- 1604 ment (no date available). 1606 [6] D. Eastlake, S. Crocker, J. Schiller, RFC 1750, "Randomness 1607 Recommendations for Security", December 1994. 1609 Table of Contents 1611 Introduction ................................................... 1 1613 Technical Definitions .......................................... 2 1615 The TACACS+ packet header ...................................... 5 1617 The TACACS+ packet body ........................................ 7 1619 Body Encryption ................................................ 8 1621 Body types ..................................................... 9 1623 Authentication ................................................. 10 1625 Enable Requests ................................................ 17 1627 Inbound ASCII Login ............................................ 17 1629 Inbound PAP Login .............................................. 17 1631 Inbound CHAP login ............................................. 18 1633 Inbound ARAP login ............................................. 18 1635 Outbound PAP request ........................................... 19 1637 Outbound CHAP request .......................................... 19 1639 Outbound ASCII and ARAP request ................................ 20 1641 ASCII change password request .................................. 20 1643 PPP change password request .................................... 20 1645 ARAP change password request ................................... 21 1647 Authorization .................................................. 22 1649 The authorization REQUEST packet body .......................... 23 1650 Table 1: Attribute-value Pairs ................................. 25 1652 The authorization RESPONSE packet body ......................... 29 1654 Accounting ..................................................... 31 1656 The account REQUEST packet body ................................ 31 1658 The accounting REPLY packet body ............................... 33 1660 Compatibility between Minor Versions 0 and 1 ................... 35 1662 Notes to Implementors .......................................... 36 1664 References ..................................................... 38