Policy Elements
You know from Chapter 2 that ACS 5.x is based on a rule-based policy model. You also know that the rules are called policies and they consist of conditions and results, which are called policy elements. In this section and the next, you will learn more about policy elements and how to create them, the different types of policies, and the flow of a request through different processes in ACS.
Before creating policies, you must create policy elements, which are the building blocks of policies. Policy elements are divided into two types: session conditions and authorization and permissions.
Session conditions are conditions used to apply policies to requests. Some conditions are available by default, whereas others can be created by you. The following conditions are available by default:
- Request/Protocol Attributes: These attributes are derived from the authentication request itself.
- Identity Attributes: Identity attributes are derived from the user definition in the internal identity store or external repositories such as LDAP and Active Directory. The attributes need to be mapped in the external database configuration before they become available in the policies. See Chapter 5 for more on external databases and attribute mapping.
- Identity Groups: You can map every user and host to an identity group. This group association can be used in policies as a condition.
- Network Device Groups(NDGs): Each device is associated with an NDG. This association can be used as a condition in the policies.
The following conditions can be created by you:
- Date and Time Conditions: You can create conditions that define specific time intervals across days of the week. These conditions take into account the current date and time and return a true or false result indicating whether the condition is met.
- Custom Conditions: You can create conditions based on attributes of various identity and protocol dictionaries which are available in ACS. These conditions allow you to apply policies based on the authentication and authorization requests received from AAA clients.
-
Network Conditions: You can create conditions based on the following to restrict access:
- End Station Filters: These are based on end stations that initiate and terminate the connection. End stations may be identified by IP Address, MAC Address, or Caller Line Identification (CLI) and Dialed Number Identification Service (DNIS) fields obtained from the request.
- Network Device Filters: Based on the AAA client that processes the request. A network device can be identified by IP address, the name of the device that is defined in the network device repository or the network device group (NDG).
-
Device Port Filters: Network device definition might be supplemented by the device port that the end station is connected to.
These filters or conditions can be included in policy conditions. This set of definitions is matched against those presented in the request. The operator that you use in the condition can either be match (in which case the value presented must match at least one entry within the network condition) or no matches (in which case it should not match any entry in the set of objects present in the filter).
Authorization and permissions are the results applied to a request that matches a condition in a policy. You can define the following types of results:
- Authorization Profiles: You can define a set of attributes and values that is returned to the device in Access-Accept responses for network access requests. These profiles can contain common data such as VLAN information, reauthentication timer, or any RADIUS attribute.
- Shell Profiles: You can define a set of permissions that is applied to a user requesting administrative access of a device. Some of these permissions include privilege level, auto command, and custom TACACS+ attributes.
- Command Sets: You can define a list of commands that a user can execute on a device during an administrative session.
- Downloadable ACLs: You can define downloadable ACLs that can be sent to a device with an Access-Accept message.
If you have worked on previous ACS versions (4.x or 3.x), you must have noticed that many of the policy elements were available earlier in the Group Setup. The difference in ACS 5.x is that these conditions and results are now defined globally and can be used in multiple rules. Group-based configuration required configuring the conditions and results in each group even if they were similar.
Figure 4-13 shows a typical simplified flow of a request through ACS. Note the different places where policy elements are used. At this stage, do not worry about the different policies shown in the figure because they will be covered later in the chapter.
Figure 4-13 Flow of a Request Through ACS 5.x
The following sections look at creating the different policy elements.
Session Conditions: Date and Time
To create a Date and Time session condition, follow these steps:
- Step 1. Select Policy Elements > Session Conditions > Date and Time.
Step 2. Click Create.
The Date and Time Properties page appears as shown in Figure 4-14.
Figure 4-14 Creating Date and Time Condition
- Step 3. Enter a name. For this example, use Work-week.
- Step 4. (optional) Enter a description.
- Step 5. Define start and end times for this element. During the period defined, the element can be used by policies. You can select Start Immediately and No End Date for the element to be active always or select a specific date and time during which this element will be active. This is useful when you want to provide some access or privilege for only a certain duration. For our example, select the Start Immediately and No End Date options.
- Step 6. Select the days and time during which this element will return a positive reply for access request. Each square in the grid is equal to one hour. Select a grid square to make the corresponding time active. For this example, select 7:00 to 18:00 hours, Monday to Friday as shown in Figure 4-14.
- Step 7. Click Submit.
The policy element you created will restrict access to 7:00–18:00 hours on Monday through Friday, when applied to a policy.
Session Conditions: Custom
To create a custom session condition, follow these steps:
- Step 1. Select Policy Elements > Session Conditions > Custom.
Step 2. Click Create.
The Custom Condition Properties page appears. This page is shown in Figure 4-15.
Figure 4-15 Creating a Custom Session Condition
- Step 3. Enter a name. For our example, use Protocol.
- Step 4. (optional) Enter a description.
- Step 5. Select Dictionary from the drop-down list. Different Protocol and Identity dictionaries are available in the drop-down list. For our example, select RADIUS-IETF.
- Step 6. Click Select next to the Attribute text box and select an attribute. For our example, select Framed-Protocol.
- Step 7. Click Submit.
The custom condition that you just created will match the Framed-Protocol attribute in a RADIUS request when applied to a policy.
Session Conditions: End Station Filters
To create an end station filter, follow these steps:
- Step 1. Select Policy Elements > Session Conditions > Network Conditions > End Station Filters.
Step 2. Click Create.
The End Station Filter Properties page appears as shown in Figure 4-16.
Figure 4-16 Creating an End Station Filter
- Step 3. Enter a Name. For this example, use Host List 1.
- Step 4. (optional) Enter a description.
- Step 5. End stations can be filtered by IP address, MAC address, or Calling Line ID (CLI)/Dialed Number Identification Service (DNIS). The filter values are added under the respective tabs. For this example, select the IP Address tab.
- Step 6. Click Create.
- A dialog box opens where you can enter an IP address or a range of addresses. For this example, select IP Range(s) and enter 192.168.1.0 in the IP text box and 24 in the Mask text box. Click Ok.
- 192.168.1.0/24 is now listed in the Network Devices table.
- Note that the options in the dialog box will change depending on the tab selected.
- Step 7. Click Submit.
The filter you created will match any host in the 192.168.1.0/24 when applied to a policy.
Session Conditions: Device Filters
To create a device filter, follow these steps:
- Step 1. Select Policy Elements > Session Conditions > Network Conditions > Device Filters.
Step 2. Click Create.
The Device Filter Properties page appears as shown in Figure 4-17.
Figure 4-17 Creating Device Filters
- Step 3. Enter a name. For this example, use Core Routers.
- Step 4. You can enter the IP addresses of devices, the names of devices already in the ACS repository, or a network device group under the respective tabs. For this example, select the Network Device Group tab.
- Step 5. Click Create.
- A dialog box appears where the NDG can be selected. Click Select next to the NDG Type text box and select the Routers group that you created earlier. Then click on Select next to the NDG Value text box and select the Core Routers group that you created earlier. Click Ok.
- The Core Routers NDG is now listed in the Network Devices table.
- Note that the options in the dialog box will change depending on the tab selected.
- Step 6. Click Submit.
The device filter you created will match any device in the Core Routers NDG when applied to a policy.
Session Conditions: Device Port Filters
The steps to create a device port filter are similar to the one you followed to create device filters. The only difference is the addition of a Port text box in the dialog box where you select or enter device information. Figure 4-18 shows the Device Port Filter properties page where the Core Routers NDG is added with port 23.
Figure 4-18 Creating Device Port Filters