Blue Coat Systems Time Clock Proxy SG Manuale Utente

Pagina di 314
Chapter 3:
Condition Reference
condition is an expression that yields true or false when evaluated. Conditions can appear in:
Policy rules.
Section and layer headers, as guards; for example, 
[Rule] group=(“bankabc\hr” || “cn=humanresources,ou=groups,o=westernnational”)
define condition
define domain condition
, and
 define prefix
 
condition
 definition 
blocks.
Condition Syntax 
A condition has the following form: 
trigger=pattern-expression 
trigger is the name of a condition variable. It can be simple, such as 
url
, or it can contain sub-object 
specifiers and modifiers, as in 
url.path.case_sensitive
 or 
request.header.Cookie
.
A trigger 
cannot contain white space.
pattern expression can be either: 
A simple pattern, which is matched against the trigger value.
A Boolean combination of simple patterns, or a parenthesized, comma-separated list of simple 
patterns. 
A pattern expression can be any of the following:
String: A string argument must be quoted if it contains whitespace or other special characters. An 
example condition expression is 
category=”self help”
.
Single argument: Conditions such as 
live=
 take only a single argument, in this case,
 yes 
or
 no
.
Boolean expressions: Conditions such as 
server_url.scheme=
 can list one or more arguments 
together with Boolean operators; for example, 
server_url.scheme=!http
.
Integer or range of integers: Numeric conditions can use Boolean expressions and double periods 
(
..
), meaning an inclusive numeric range. Numeric ranges cannot use whitespace. The 
minute=
 
condition is used to show examples of ranges:
minute=10..40—
From 10 minutes to 40 minutes after the hour.
minute=10..—
From 10 minutes after the hour to the end of the hour.
minute=..40—
From the beginning of the hour to 40 minutes after the hour.
minute=40..10
—From 40 minutes after the hour, to 10 minutes after the next hour.
Regular expressions: Some header-related conditions and two URL-related conditions take regular 
expressions. For more information about writing regular expressions, refer to Appendix E: “Using 
Regular Expressions,” in the Blue Coat ProxySG Configuration and Management Guide.
The following is Backus-Naur Form (BNF) grammar: