Conditions
Overview
Conditions define matching criteria for policy rules. They can be simple attribute matches or complex AND/OR logic trees.
Library URL |
|
Dictionary URL |
|
Condition Types
| Type | Description | Children |
|---|---|---|
ConditionAttributes |
Single attribute match |
No |
ConditionReference |
Reference library condition |
No |
ConditionAndBlock |
All children must match |
Yes |
ConditionOrBlock |
Any child must match |
Yes |
ConditionNotBlock |
Negate child condition |
Yes (1) |
List Library Conditions
dsource d000 dev/network
curl -sk -u "${ISE_API_USER}:${ISE_API_PASS}" \
"https://${ISE_PAN_IP}/api/v1/policy/network-access/condition" \
-H "Accept: application/json" | jq '.response[] | {name, id, conditionType}'
Create Library Condition
Simple Condition
curl -sk -u "${ISE_AUTH}" \
"https://${ISE_PAN_IP}/api/v1/policy/network-access/condition" \
-H "Content-Type: application/json" \
-X POST -d '{
"name": "EAP-TLS Authentication",
"description": "Matches EAP-TLS authentication method",
"conditionType": "ConditionAttributes",
"attributeName": "Network Access:EapAuthentication",
"operator": "equals",
"attributeValue": "EAP-TLS"
}'
Compound Condition
curl -sk -u "${ISE_AUTH}" \
"https://${ISE_PAN_IP}/api/v1/policy/network-access/condition" \
-H "Content-Type: application/json" \
-X POST -d '{
"name": "Linux EAP-TLS Workstation",
"description": "Linux workstation with EAP-TLS auth",
"conditionType": "ConditionAndBlock",
"children": [
{
"conditionType": "ConditionAttributes",
"attributeName": "IdentityGroup:Name",
"operator": "equals",
"attributeValue": "Endpoint Identity Groups:Linux-Workstations"
},
{
"conditionType": "ConditionAttributes",
"attributeName": "Network Access:EapAuthentication",
"operator": "equals",
"attributeValue": "EAP-TLS"
}
]
}'
Operators
| Operator | Description | Example |
|---|---|---|
equals |
Exact match |
|
notEquals |
Not equal |
|
contains |
String contains |
|
startsWith |
String starts with |
|
endsWith |
String ends with |
|
matches |
Regex match |
|
greaterThan |
Numeric > |
|
lessThan |
Numeric < |
|
ipEquals |
IP address match |
|
ipNotEquals |
IP not match |
|
ipGreaterThan |
IP range > |
|
ipLessThan |
IP range < |
|
Dictionary Attributes
Common Dictionaries
| Dictionary | Common Attributes | Example Values |
|---|---|---|
Radius |
Service-Type, NAS-Port-Type, Calling-Station-Id |
|
Network Access |
EapAuthentication, AuthenticationMethod, Protocol |
|
IdentityGroup |
Name |
|
Device |
Device Type, Location, Name |
|
CERTIFICATE |
Subject - Common Name, Issuer - Common Name |
|
AD |
ExternalGroups, AD-User-Resolved |
|
Using Conditions in Rules
Reference library condition:
{
"rule": {
"name": "My Rule",
"condition": {
"conditionType": "ConditionReference",
"id": "condition-uuid-from-library"
}
}
}
Inline condition:
{
"rule": {
"name": "My Rule",
"condition": {
"conditionType": "ConditionAttributes",
"attributeName": "Network Access:EapAuthentication",
"operator": "equals",
"attributeValue": "EAP-TLS"
}
}
}