This is the first subtask for creating data rules. In this subtask, you create the data rule, specify the data element keypath, define the operations, and set the permission action.
Procedure
|
1. |
Enter the admin command to access the System Admin EXEC mode.
Example:
RP/0/RP0/CPU0:ios# admin
|
|
2. |
Enter the config command to access the System Admin config mode.
Example:
sysadmin-vm:0_RP0# config
|
|
3. |
Enter the aaa authorization datarules datarule data_rule_number command to create a data rule.
Example:
sysadmin-vm:0_RP0#(config)# aaa authorization datarules datarule 1100
This command specifies a numeric value as the data rule number. You can enter a 32-bit integer.
Do not use numbers between 1 to 1000 because they are reserved by Cisco.
This command creates a new data rule and enters the data rule configuration mode. In the example, data rule 1100 is created.
Note
The system creates data rule 1 by default when the root-system user is created. This data rule provides accept permission to read, write, and execute operations for all the configuration data. As a result, the root user has no restrictions unless data rule 1 is modified.
|
|
4. |
Enter the keypath keypath command to specify the key path of the data element.
Example:
sysadmin-vm:0_RP0#(config-datarule-1100)# keypath /aaa/disaster-recovery
The key path is an expression defining the location of the data element. Entering an asterisk (*) as the keypath makes the command rule apply to all the configuration data.
|
|
5. |
Enter the ops operation command to specify the operation for which permission is set.
Example:
sysadmin-vm:0_RP0#(config-datarule-1100)# ops rw
Use these letters to identify various operations:
|
|
6. |
Enter the action {accept | accept_log | reject} command to specify whether users may perform the operation.
Example:
sysadmin-vm:0_RP0#(config-datarule-1100)# action reject
This command specifies whether to permit or deny users to perform the operation:
-
accept: permit users to perform the operation.
-
accept_log: permit users to perform the operation and log every access attempt.
-
reject: restrict users from performing the operation.
|
What to do next
Apply the data rule to a user group. For details, see Apply data rule to user group.