Dell PowerConnect W Clearpass 100 Software 3.9 Deployment Guide - Page 122
Calculating Attribute Value Expressions, Example: Using Request Attributes in a Value Expression
View all Dell PowerConnect W Clearpass 100 Software manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 122 highlights
2. Click the Add Attribute tab. 3. Select the Reply-Message attribute from the drop-down list. Any attribute can be used for this example, because the attribute will never be included in the response. 4. Select Enter condition expression... from the Condition drop-down list and enter the following code in the Expression text field: return GetUserTraffic(86400) > 10485760 && AccessReject(); 5. Click the Add Attribute tab. 6. Click the Save Changes button to apply the new settings to the role. The GetUserTraffic() function ( "GetUserTraffic()" in the Reference chapter) returns the total traffic for the user's sessions in the past 24 hours (86,400 seconds). If this is greater than 10 MB (10,485,760 bytes), the AccessReject() function causes the user's access request to be rejected. Otherwise, the entire expression will evaluate to false, and the user will be authorized. Note that the attribute will not be included in the response, as the condition expression was evaluated to false. Calculating Attribute Value Expressions A PHP expression can also be used to calculate the value that the RADIUS server should return for a particular attribute. To use this feature, use one of these two possible syntaxes when entering the value for an attribute: