Cisco IOS software currently supports three versions of the Terminal Access Controller Access Control System (TACACS) security protocol, each one of which is a separate and unique protocol:
- TACACS+--A recent protocol providing detailed accounting information and flexible administrative control over authentication and authorization processes. TACACS+ is facilitated through AAA and can be enabled only through AAA commands. There is a draft RFC detailing this protocol.
- TACACS--An older access protocol, incompatible with the newer TACACS+ protocol, that is now deprecated by Cisco. It provides password checking and authentication, and notification of user actions for security and accounting purposes.
- Extended TACACS--An extension to the older TACACS protocol, supplying additional functionality to TACACS. Extended TACACS provides information about protocol translator and router use. This information is used in UNIX auditing trails and accounting files. Extended TACACS is incompatible with TACACS+ and is also deprecated.
This chapter discusses how to enable and configure TACACS+. For information about the deprecated protocols TACACS or Extended TACACS, refer to the "Configuring TACACS and Extended TACACS" chapter.
For a complete description of the authorization commands used in this chapter, refer to the "TACACS, Extended TACACS, and TACACS+ Commands" chapter in the Security Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online.
TACACS+ is a security application that provides centralized validation of users attempting to gain access to a router or network access server. TACACS+ services are maintained in a database on a TACACS+ daemon running, typically, on a UNIX or Windows NT workstation. You must have access to and must configure a TACACS+ server before the configured TACACS+ features on your network access server are available.
TACACS+ provides for separate and modular authentication, authorization, and accounting facilities. TACACS+ allows for a single access control server (the TACACS+ daemon) to provide each service--authentication, authorization, and accounting--independently. Each service can be tied into its own database to take advantage of other services available on that server or on the network, depending on the capabilities of the daemon.
The goal of TACACS+ is to provide a methodology for managing multiple network access points from a single management service. The Cisco family of access servers and routers and the Cisco IOS user interface (for both routers and access servers) can be network access servers.
Network access points enable traditional "dumb" terminals, terminal emulators, workstations, personal computers (PCs), and routers in conjunction with suitable adapters (for example, modems or ISDN adapters) to communicate using protocols such as Point-to-Point Protocol (PPP), Serial Line Internet Protocol (SLIP), Compressed SLIP (CSLIP), or AppleTalk Remote Access (ARA) Protocol. In other words, a network access server provides connections to a single user, to a network or subnetwork, and to interconnected networks. The entities connected to the network through a network access server are called network access clients; for example, a PC running PPP over a voice-grade circuit is a network access client. TACACS+, administered through the AAA security services, can provide the following services:
- Authentication--Provides complete control of authentication through login and password dialog, challenge and response, messaging support.
- The authentication facility provides the ability to conduct an arbitrary dialog with the user (for example, after a login and password are provided, to challenge a user with a number of questions, like home address, mother's maiden name, service type, and social security number. In addition, the TACACS+ authentication service supports sending messages to user screens. For example, a message could notify users that their passwords must be changed because of the company's password aging policy.
- Authorization--Provides fine-grained control over user capabilities for the duration of the user's session, including but not limited to setting autocommands, access control, session duration, or protocol support. You can also enforce restrictions on what commands a user may execute with the TACACS+ authorization feature.
- Accounting--Collects and sends information used for billing, auditing, and reporting to the TACACS+ daemon. Network managers can use the accounting facility to track user activity for a security audit or to provide information for user billing. Accounting records include user identities, start and stop times, executed commands (such as PPP), number of packets, and number of bytes.
The TACACS+ protocol provides authentication between the network access server and the TACACS+ daemon, and it ensures confidentiality because all protocol exchanges between a network access server and a TACACS+ daemon are encrypted.
You need a system running TACACS+ daemon software to use the TACACS+ functionality on your network access server.
Cisco makes the TACACS+ protocol specification available as a draft RFC for those customers interested in developing their own TACACS+ software.
Note TACACS+, in conjunction with AAA, is a separate and distinct protocol from the earlier TACACS or Extended TACACS, which are now deprecated. After AAA has been enabled, many of the original TACACS and extended TACACS commands can no longer be configured. For more information about TACACS or Extended TACACS, refer to the "Configuring TACACS and Extended TACACS" chapter.
When a user attempts a simple ASCII login by authenticating to a network access server using TACACS+, the following process typically occurs:
- When the connection is established, the network access server will contact the TACACS+ daemon to obtain a username prompt, which is then displayed to the user. The user enters a username and the network access server then contacts the TACACS+ daemon to obtain a password prompt. The network access server displays the password prompt to the user, the user enters a password, and the password is then sent to the TACACS+ daemon.
Note TACACS+ allows an arbitrary conversation to be held between the daemon and the user until the daemon receives enough information to authenticate the user. This is usually done by prompting for a username and password combination, but may include other items, such as mother's maiden name, all under the control of the TACACS+ daemon.
- The network access server will eventually receive one of the following responses from the TACACS+ daemon:
- ACCEPT--The user is authenticated and service may begin. If the network access server is configured to requite authorization, authorization will begin at this time.
- REJECT--The user has failed to authenticate. The user may be denied further access, or will be prompted to retry the login sequence depending on the TACACS+ daemon.
- ERROR--An error occurred at some time during authentication. This can be either at the daemon or in the network connection between the daemon and the network access server. If an ERROR response is received, the network access server will typically try to use an alternative method for authenticating the user.
- CONTINUE--The user is prompted for additional authentication information.
- A PAP login is similar to an ASCII login, except that the username and password arrive at the network access server in a PAP protocol packet instead of being typed in by the user, so the user is not prompted. PPP CHAP logins are also similar in principle.
Following authentication, the user will also be required to undergo an additional authorization phase, if authorization has been enabled on the network access server. Users must first successfully complete TACACS+ authentication before proceeding to TACACS+ authorization.
- If TACACS+ authorization is required, the TACACS+ daemon is again contacted and it returns an ACCEPT or REJECT authorization response. If an ACCEPT response is returned, the response will contain data in the form of attributes that are used to direct the EXEC or NETWORK session for that user, determining services that the user can access.
Services include the following:
- Telnet, rlogin, Point-to-Point Protocol (PPP), Serial Line Internet Protocol (SLIP), or EXEC services
- Connection parameters, including the host or client IP address, access list, and user timeouts
To configure your router to support TACACS+, you must perform the following tasks:
- Use the aaa new-model global configuration command to enable AAA. AAA must be configured if you plan to use TACACS+. For more information about using the aaa new-model command, refer to the "AAA Overview" chapter.
- Use the tacacs-server host command to specify the IP address of one or more TACACS+ daemons. Use the tacacs-server key command to specify an encryption key that will be used to encrypt all exchanges between the network access server and the TACACS+ daemon. This same key must also be configured on the TACACS+ daemon.
- Use the aaa authentication global configuration command to define method lists that use TACACS+ for authentication. For more information about using the aaa authentication command, refer to the "Configuring Authentication" chapter.
- Use line and interface commands to apply the defined method lists to various interfaces. For more information, refer to the "Configuring Authentication" chapter.
- If needed, use the aaa authorization global command to configure authorization for the network access server. Unlike authentication, which can be configured per line or per interface, authorization is configured globally for the entire network access server. For more information about using the aaa authorization command, refer to the "Configuring Authorization" chapter.
- If needed, use the aaa accounting command to enable accounting for TACACS+ connections. For more information about using the aaa accounting command, refer to the "Configuring Accounting" chapter in the Security Configuration Guide.
To configure TACACS+. perform the tasks in the following sections:
For TACACS+ configuration examples using the commands in this chapter, refer to the "TACACS+ Configuration Examples" section located at the end of the this chapter.
The tacacs-server host command enables you to specify the names of the IP host or hosts maintaining a TACACS+ server. Because the TACACS+ software searches for the hosts in the order specified, this feature can be useful for setting up a list of preferred daemons.
To specify a TACACS+ host, perform the following tasks in global configuration mode:
| Task
| Command
|
|---|
| Specify a TACACS+ host.
| tacacs-server host name [single-connection] [port integer] [timeout integer] [key string]
|
Using the tacacs-server host command, you can also configure the following options:
- Use the single-connection keyword to specify single-connection (only valid with CiscoSecure Release 1.0.1 or later). Rather than have the router open and close a TCP connection to the daemon each time it must communicate, the single-connection option maintains a single open connection between the router and the daemon. This is more efficient because it allows the daemon to handle a higher number of TACACS operations.
Note The daemon must support single-connection mode for this to be effective, otherwise the connection between the network access server and the daemon will lock up or you will receive spurious errors.
- Use the port integer argument to specify the TCP port number to be used when making connections to the TACACS+ daemon. The default port number is 49.
- Use the timeout integer argument to specify the period of time (in seconds) the router will wait for a response from the daemon before it times out and declares an error.
Note Specifying the timeout value with the
tacacs-server host command overrides the default timeout value set with the
tacacs-server timeout command for this server only.
- Use the key string argument to specify an encryption key for encrypting and decrypting all traffic between the network access server and the TACACS+ daemon.
Note Specifying the encryption key with the
tacacs-server host command overrides the default key set by the global configuration
tacacs-server key command for this server only.
Because some of the parameters of the tacacs-server host command override global settings made by the tacacs-server timeout and tacacs-server key commands, you can use this command to enhance security on your network by uniquely configuring individual TACACS+ connections.
To set the TACACS+ authentication key and encryption key, perform the following task in global configuration mode:
| Task
| Command
|
|---|
| Set the encryption key to match that used on the TACACS+ daemon.
| tacacs-server key key
|
Note You must configure the same key on the TACACS+ daemon for encryption to be successful.
After you have identified the TACACS+ daemon and defined an associated TACACS+ encryption key, you need to define method lists for TACACS+ authentication. Because TACACS+ authentication is operated via AAA, you need to issue the aaa authentication command, specifying TACACS+ as the authentication method. For more information, refer to the "Configuring Authentication" chapter.
AAA authorization enables you to set parameters that restrict a user's network access. Authorization via TACACS+ may be applied to commands, network connections, and EXEC sessions. Because TACACS+ authorization is facilitated through AAA, you need to issue the aaa authorization command, specifying TACACS+ as the authorization method. For more information, refer to the "Configuring Authorization" chapter in the Security Configuration Guide.
AAA accounting enables you to track the services users are accessing as well as the amount of network resources they are consuming. Because TACACS+ accounting is facilitated through AAA, you need to issue the aaa accounting command, specifying TACACS+ as the accounting method. For more information, refer to the "Configuring Accounting" chapter.
The network access server implements TACACS+ authorization and accounting functions by transmitting and receiving TACACS+ attribute-value (AV) pairs for each user session. For a list of supported TACACS+ AV pairs, refer to the "TACACS+ AV Pairs" appendix.
TACACS+ configuration examples in this section include the following:
TACACS+ Authentication Examples
The following example configures TACACS+ as the security protocol to be used for PPP authentication.
aaa new-model
aaa authentication ppp test tacacs+ local
tacacs-server host 10.1.2.3
tacacs-server key goaway
interface serial 0
ppp authentication chap pap test
In this example:
- The aaa new-model command enables the AAA security services.
- The aaa authentication command defines a method list, "test," to be used on serial interfaces running PPP. The keyword tacacs+ means that authentication will be done through TACACS+. If TACACS+ returns an ERROR of some sort during authentication, the keyword local indicates that authentication will be attempted using the local database on the network access server.
- The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 10.1.2.3. The tacacs-server key command defines the shared encryption key to be "goaway."
- The interface command selects the line, and the ppp authentication command applies the test method list to this line.
The following example configures TACACS+ as the security protocol to be used for PPP authentication but instead of the method list "test," the method list, "default," is used.
aaa new-model
aaa authentication ppp default if-needed tacacs+ local
tacacs-server host 10.1.2.3
tacacs-server key goaway
interface serial 0
ppp authentication default
In this example:
- The aaa new-model command enables the AAA security services.
- The aaa authentication command defines a method list, "default," to be used on serial interfaces running PPP. The keyword default means that PPP authentication is applied by default to all interfaces. The if-needed keyword means that if the user has already authenticated by going through the ASCII login procedure, then PPP authentication is not necessary and can be skipped. If authentication is needed, the keyword tacacs+ means that authentication will be done through TACACS+. If TACACS+ returns an ERROR of some sort during authentication, the keyword local indicates that authentication will be attempted using the local database on the network access server.
- The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 10.1.2.3. The tacacs-server key command defines the shared encryption key to be "goaway."
- The interface command selects the line, and the ppp authentication command applies the default method list to this line.
The following example creates the same authentication algorithm for PAP but calls the method list "MIS-access" instead of "default":
aaa new-model
aaa authentication pap MIS-access if-needed tacacs+ local
tacacs-server host 10.1.2.3
tacacs-server key goaway
interface serial 0
ppp authentication pap MIS-access
In this example:
- The aaa new-model command enables the AAA security services.
- The aaa authentication command defines a method list, "MIS-access," to be used on serial interfaces running PPP. The method list, "MIS-access," means that PPP authentication is applied to all interfaces. The if-needed keyword means that if the user has already authenticated by going through the ASCII login procedure, then PPP authentication is not necessary and can be skipped. If authentication is needed, the keyword tacacs+ means that authentication will be done through TACACS+. If TACACS+ returns an ERROR of some sort during authentication, the keyword local indicates that authentication will be attempted using the local database on the network access server.
- The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 10.1.2.3. The tacacs-server key command defines the shared encryption key to be "goaway."
- The interface command selects the line, and the ppp authentication command applies the default method list to this line.
The following example shows the configuration for a TACACS+ daemon with an IP address of 10.2.3.4 and an encryption key of "foobar."
aaa new-model
aaa authentication login default tacacs+ local
tacacs-server host 10.2.3.4
tacacs-server key foobar
In this example:
- The aaa new-model command enables the AAA security services.
- The aaa authentication command defines the default method method list. Incoming ASCII logins on all interfaces (by default) will use TACACS+ for authentication. If no TACACS+ server responds, then the network access server will use the information contained in the local username database for authentication.
- The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 10.2.3.4. The tacacs-server key command defines the shared encryption key to be "foobar."
TACACS+ Authorization Examples
The following example configures TACACS+ as the security protocol to be used for PPP authentication using the default method list, and configures network authorization via TACACS+.
aaa new-model
aaa authentication ppp default if-needed tacacs+ local
aaa authorization network tacacs+
tacacs-server host 10.1.2.3
tacacs-server key goaway
interface serial 0
ppp authentication default
In this example:
- The aaa new-model command enables the AAA security services.
- The aaa authentication command defines a method list, "default," to be used on serial interfaces running PPP. The keyword default means that PPP authentication is applied by default to all interfaces. The if-needed keyword means that if the user has already authenticated by going through the ASCII login procedure, then PPP authentication is not necessary and can be skipped. If authentication is needed, the keyword tacacs+ means that authentication will be done through TACACS+. If TACACS+ returns an ERROR of some sort during authentication, the keyword local indicates that authentication will be attempted using the local database on the network access server.
- The aaa authorization command configures network authorization via TACACS+. Unlike authentication lists, this authorization list always applies to all incoming network connections made to the network access server.
- The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 10.1.2.3. The tacacs-server key command defines the shared encryption key to be "goaway."
- The interface command selects the line, and the ppp authentication command applies the default method list to this line.
TACACS+ Accounting Examples
The following example configures TACACS+ as the security protocol to be used for PPP authentication using the default method list, and configures accounting via TACACS+.
aaa new-model
aaa authentication ppp default if-needed tacacs+ local
aaa accounting network stop-only tacacs+
tacacs-server host 10.1.2.3
tacacs-server key goaway
interface serial 0
ppp authentication default
In this example:
- The aaa new-model command enables the AAA security services.
- The aaa authentication command defines a method list, "default," to be used on serial interfaces running PPP. The keyword default means that PPP authentication is applied by default to all interfaces. The if-needed keyword means that if the user has already authenticated by going through the ASCII login procedure, then PPP authentication is not necessary and can be skipped. If authentication is needed, the keyword tacacs+ means that authentication will be done through TACACS+. If TACACS+ returns an ERROR of some sort during authentication, the keyword local indicates that authentication will be attempted using the local database on the network access server.
- The aaa accounting command configures network accounting via TACACS+. In this example, accounting records describing the session that just terminated will be sent to the TACACS+ daemon whenever a network connection terminates.
- The tacacs-server host command identifies the TACACS+ daemon as having an IP address of 10.1.2.3. The tacacs-server key command defines the shared encryption key to be "goaway."
- The interface command selects the line, and the ppp authentication command applies the default method list to this line.
TACACS+ Daemon Configuration Examples
The following example shows a sample configuration of the TACACS+ daemon. The precise syntax used by your TACACS+ daemon may be different than that included in this example.
user = mci_customer1 {
chap = cleartext "some chap password"
service = ppp protocol = ip {
inacl#1="permit ip any any precedence immediate"
inacl#2="deny igrp 0.0.1.2 255.255.0.0 any"
}
}