| ClearBox Server v2.3 General Server Extension User's Guide |
Configuring SQL QueriesThis article describes the syntax of SQL queries that are used by ClearBox Server to authenticate a user, to select an authorization list items, accounting or state server queries. The actual SQL dialect depends on the database source used. You may use the following special keys in a query string to substitute them by user name, realm and other values from the request packet:
RADIUS Attributes OptionsBesides these special keys, you may insert attributes from the authentication/accounting
request packet into the query: For example, {Framed-IP-Address} is substituted by Framed-IP-Address attribute value from the request packet. If $ is placed before attribute name, its numeric value is used. Suppose there's Framed-Protocol=PPP in the access request, then {Framed-Protocol} is replaced by PPP, while {$Framed-Protocol} is replaced by 1. If an attribute is not found in the request, it may be replaced by a default value specified after ? sign: {$Service-Type?2} is replaced with 2 if Service-Type is not found. Besides, attributes may be specified by their numeric equivalents: {?Service-Type} is the same as {$6}. Vendor-Specific attributes are written in the form 26:vendor ID:vendor type. MS-CHAP-Domain, for instance, may be represented both as {MS-CHAP-Domain} and {26:311:10}, where 311 is Microsoft vendor ID. Sample query: INSERT INTO Accounting(User, Duration, IPAddress) VALUES('$u', {Session-Time}, '{Framed-IP-Address?0.0.0.0}') Tagged attributes. If an attribute is tagged, i.e. describes a tunnel, the attribute name string can be appended by the tag value which is used to provide a means of grouping attributes in the same packet which refer to the same tunnel. Valid values for this field are 1 through 31, inclusive. If the tag zero (0), it is ignored (unused). For example, {Tunnel-Private-Group-ID:1} will be replaced by the actual attribute value with '1' tag value. Cisco Specific Attributes OptionsClearBox uses special syntax for specifyingCisco-AV-Pair attributes in SQL queries. This attribute value has the form "actual attribute-name=actual value". For example, Cisco-AV-Pair = "vpdn:ip-addresses=10.1.1.1". This value itself contains an attribute name "ip-addresses", the service specificator "vpdn" and the value "10.1.1.1". In order to make ClearBox log this value correctly, you should specify {Cisco-AV-Pair:vpdn:ip-addresses}. Other Cisco attributes have the similar syntax. For example, the attribute h323-call-type may have the value "h323-call-type=Telephony". ClearBox handles such attributes automatically, so when it meets {h323-call-type} in the SQL query string, it cuts off the "h323-call-type=" part, logging the value "Telephony". © 2001-2004 XPerience Technologies. www.xperiencetech.com |
| Browser Based Help. Published by chm2web software. |