This parameter specifies the SQL query that is used to fetch
client details from the SQL database specified by
DBSource. The database can store all the same
parameters that are used to configure a
<Client> clause. For more information, see
Section 3.14. <Client xxxxxx>. The recommend
configuration with Radiator 4.24 and later is to use
ClientColumnDef with
GetClientQuery. For more information about
ClientColumDef, see
Section 3.16.2. ClientColumnDef.
The default
GetClientQuery works with the sample database schemas
provided in the goodies/ of your Radiator
distribution. GetClientQuery defaults
to:
select NASIDENTIFIER,SECRET,IGNOREACCTSIGNATURE,DUPINTERVAL,
DEFAULTREALM,NASTYPE,SNMPCOMMUNITY,LIVINGSTONOFFS,
LIVINGSTONHOLE,FRAMEDGROUPBASEADDRESS,
FRAMEDGROUPMAXPORTSPERCLASSC,REWRITEUSERNAME,
NOIGNOREDUPLICATES,PREHANDLERHOOK from RADCLIENTLIST
Your
database table must include at least the first and second fields, which
are the NAS name or IP address or MAC address and the shared secret. All
the other fields are optional.
When
ClientColumnDef is not configured, the other
fields must occur in the given order. When they occur, they are used to
initialise the Client parameter of the same name as
shown above. The FRAMEDGROUPBASEADDRESS column may
contain multiple comma-separated base addresses. The
PREHANDLERHOOK column can contain either the text of
a hook or a hook filename in the form
‘file:/path/to/hook’. You can customise the
GetClientQuery select clause to have additional
fields. If they are present in the result of
GetClientQuery, they are used as described below.
Field number 0 as the first field, so for example
Identifier, field 14 has an index of 14, but is the
15th entry in the returned array.
Identifier field as field 14
DefaultReply as field 15
FramedGroup as field 16
StripFromReply as field 17
AllowInReply as field 18
AddToReply as field 19
AddToReplyIfNotExist as field 20
DynamicReply as field 21
AddToRequest as field 22
StripFromRequest as field 23
AddToRequestIfNotExist as field 24
ClientHook as field 25
UseContentsForDuplicateDetection as field
26
- A comma-separated list of flag names as field 27. Each
comma-separated name in the field is used to set a Client flag type
parameter. For example, if field 27 has the value
"
IgnoreAcctSignature,UseOldAscendPasswords,StatusServerShowClientDetails",
it sets the IgnoreAcctSignature,
UseOldAscendPasswords, and
StatusServerShowClientDetails flag parameters in
the resulting Client.
TACACSPLUSKey as field 28
Here is an example that fetches the required information and
DefaultRealm:
# Our custom client table only has NAS identifier,
# shared secret and default realm in it:
GetClientQuery select NAME,SECRET,NULL,NULL,DREALM from CLIENTS
Here
is the same example with
ClientColumnDef:
# We do not need to pad with NULL columns
GetClientQuery select NAME,SECRET,DREALM from CLIENTS
ClientColumnDef 0, Name
ClientColumnDef 1, Secret
ClientColumnDef 2, DefaultRealm