<AuthBy RADIUS>
.<AuthBy SQLRADIUS>
runs the
HostSelect
query to determine the details of the
target RADIUS server until either an acknowledgment is received from the
target or Num-Hosts is exceeded. This permits fallback radius servers to
be configured.goodies/*.sql
scripts. These tables work with the
default HostSelect
allowing the selection of a target
host primary and secondary based on Realm.HostSelect
fails to select any
rows, <AuthBy SQLRADIUS>
attempts to proxy
according any <Host xxxxxx>
clauses contained
within the <AuthBy SQLRADIUS>
clause. For more
information, see Section 3.43. <Host xxxxxx> within <AuthBy RADIUS>.
This permits unknown realms to be proxied to a catchall target
server.<AuthBy SQLRADIUS>
understands the same
parameters as <AuthBy RADIUS>
. For more
information, see Section 3.42. <AuthBy RADIUS>. It supports also
all the common SQL configuration parameters. For more information about
the SQL configuration parameters, see Section 3.8. SQL configuration.HostSelect
returns no
more rows, or the number of times exceeds
NumHost
s.HostSelect
returns no rows, and if <AuthBy SQLRADIUS>
contains <Host xxxxxx>
clauses, then the
request is proxied according to the <Host>
clauses in order, the same as with <AuthBy
RADIUS>
. This is a useful catchall for unknown realms, and
could be used to proxy to a GoRemote (GRIC) server or
similar.HostSelect
is expected to return at
least the target host name/address and the shared secret in that order.
Optionally, you can also fetch a number of other columns to control the
proxying process, including RetryCount
, target ports
and such. The columns fetched by HostSelect
are used
to determine the following <AuthBy RADIUS>
Host
parameters in this order. Any column that is NULL is ignored.Secret
AuthPort
AcctPort
Retries
RetryTimeout
UseOldAscendPasswords
ServerHasBrokenPortNumbers
ServerHasBrokenAddresses
IgnoreReplySignature
0
to 4
inclusive that indicates what
sort of reply to send to the NAS in the event that proxying fails. You
can use this to determine how to handle the failure of a downstream
RADIUS server. The integers mean the following replies:0
: ACCEPT1
: REJECT2
: IGNORE3
: CHALLENGEFailureBackoffTime
MaxFailedRequests
MaxFailedGraceTime
HostSelect
can contain any of the special characters. For more information, see Section 3.3. Special formatters. Also,
%0
is replaced by the current host counter for this
request. The counter starts with the value of
StartHost
which defaults to 1
. You
can therefore use %0
to select a different column each
time HostSelect
is run. %1
is
replaced with SQL quoted realm.HostSelect select HOST%0, SECRET, AUTHPORT, ACCTPORT,\ RETRIES, RETRYTIMEOUT, USEOLDASCENDPASSWORDS, \ SERVERHASBROKENPORTNUMBERS,SERVERHASBROKENADDRESSES, \ IGNOREREPLYSIGNATURE, FAILUREPOLICY from RADSQLRADIUS \ where TARGETNAME=%1
goodies/*.sql
. Note that this
allows for up to 2 target hosts per Realm, primary and secondary, and that
the Realm to match goes in the TARGETNAME column.<AuthBy SQLRADIUS>
contains:HostSelect select HOST%0, SECRET, AUTHPORT, ACCTPORT, RETRIES,\ RETRYTIMEOUT, USEOLDASCENDPASSWORDS, \ SERVERHASBROKENPORTNUMBERS, SERVERHASBROKENADDRESSES, \ IGNOREREPLYSIGNATURE, FAILUREPOLICY from RADSQLRADIUS where TARGETNAME=? HostSelectParam %1 NumHosts 1
<AuthBy
SQLRADIUS>
containing:HostSelect select R.HOST%0, R.SECRET, R.AUTHPORT, \ R.ACCTPORT, R.RETRIES, R.RETRYTIMEOUT, \ R.USEOLDASCENDPASSWORDS, R.SERVERHASBROKENPORTNUMBERS, \ R.SERVERHASBROKENADDRESSES, R.IGNOREREPLYSIGNATURE, \ R.FAILUREPOLICY from RADSQLRADIUS R, RADSQLRADIUSINDIRECT I \ where I.SOURCENAME=? and I.TARGETNAME=R.TARGETNAME HostSelectParam %{Called-Station-Id} NumHosts 2
HostSelect.
%1
is replaced with
unquoted realm. For more information, see Section 3.8.1. SQL bind variables.HostSelectParam
:# Use bound parameters to improve performance in SQL HostSelect select HOST%0, SECRET, AUTHPORT, ACCTPORT, RETRIES,\ RETRYTIMEOUT, USEOLDASCENDPASSWORDS, \ SERVERHASBROKENPORTNUMBERS, SERVERHASBROKENADDRESSES, \ IGNOREREPLYSIGNATURE, FAILUREPOLICY from RADSQLRADIUS where TARGETNAME=? HostSelectParam %1 NumHosts 1
HostSelect
and
the parameters used to define the Host. If
HostColumnDef
is not specified, the mapping is the
default as described in Section 3.56.1. HostSelect.HostColumnDef
is:HostColumnDef n,paramspec
n
is the column number of the fields as returned by
HostSelect
(starting at 0
), and
paramspec
may be one of the following:Host
FailurePolicy
StripFromRequest
,
RewriteUsername
, and
AddToRequest
are usableHostSelect
returns five fields. The first defines the Host name or address, the
second is the shared secret for that host, the third is the maximum retry
count, and the fourth is the failure policy. The last is a comma-separated
list of reply items that is added to the reply.HostSelect select HOST%0, SECRET, RETRIES, FAILUREPOLICY, ADDTOREQUEST \ from RADSQLRADIUS where TARGETNAME=? HostSelectParam %1 HostColumnDef 0, Host HostColumnDef 1, Secret HostColumnDef 2, Retries HostColumnDef 3, failurePolicy HostColumnDef 4, AddToRequest
FailurePolicy
defined, and
NoReplyHook
is defined, then
NoReplyHook
is run before the automatic replies are
sent.