Академический Документы
Профессиональный Документы
Культура Документы
Overview
After completing this module, you will be able to:
Identify the syntax and uses for default policy expressions.
Explain the policy binding evaluation process and determine appropriate bind points for policies
within the default policy engine.
Configure and invoke pattern sets with string matching in the default policy engine.
Extract and transform data from one type to another with typecasting in the default policy engine.
Understanding Policies
The NetScaler system uses policies to evaluate specified conditions and to define
actions to be taken if conditions are met
The actions defined are specific to the feature for which the policy is created
The order and flow of policy evaluation depends on the feature set and policyexpression type
Policy-Process-Evaluation-Flow
Actions
An action:
Is bound to or activated by policies
Cannot depend on results of other actions
Is applied at the end of the policy evaluation process
Is owned by individual NetScaler features
Pattern Sets
A pattern set is an array of indexed patterns that you configure on the NetScaler
system
Pattern sets are used for string matching during advanced policy evaluation
Pattern Sets
You want to determine whether the URL suffix (target text) contains any of the
image file extensions. Without using pattern sets, you would have to define a
complex expression, as follows:
HTTP.REQ.URL.SUFFIX.CONTAINS("svg") HTTP.REQ.URL.SUFFIX.CONTAINS("bmp")
HTTP.REQ.URL.SUFFIX.HTTP.REQ.URL.SUFFIX.CONTAINS("gif")
HTTP.REQ.URL.SUFFIX.CONTAINS("tiff") HTTP.REQ.URL.SUFFIX. CONTAINS(jpg)
Pattern Sets
When a compound expression includes hundreds of sub expressions, the above
process isresource intensive. A better alternative is an expression that invokes a
pattern set.