<AuthBy REST>
allows you to handle
authentication and accounting requests by using HTTP REST API
backends.goodies/rest.cfg
for an example
configuration.%0
is the current username<AuthBy REST> # Format result for user 'mik/em' is # https://api.example.org/mi%2Fkem%40example.org/auth URL https://api.example.org/user/%{URIEncodeUTF8:%0}%%40example.org/auth FormatURLThe current username in
%0
is
encoded with URIEncodeUTF8
formatter.
%%
is simply formatted to a single %
.
For more about Radiator special formatters, see Section 3.3. Special formatters.<AuthBy REST>
understands also the same
parameters as <AuthBy xxxxxx>
. For more
information, see Section 3.32. <AuthBy xxxxxx>.RestAuthRequestDef
parameters, one for each
parameter sent to the server. The general format is:RestAuthRequestDef authparam,attributename[,type[,formatted]]
authparam
is the REST parameter nameattributename
defines the value for authparam.
The value may be fetched from the current request, be a value that is
subject to special formatting, or a literal valuetype
consists of the word “literal” or the word
“request”. If type is empty or “request”, the value is fetched from
the current request. If type is "literal", it is added to the HTTP
request as it is.formatted
indicates that the value specified with
attributename
is to be subject to special character
processing before being used.type
and
formatted
fields are optional. If they are not specified,
type defaults to "request" and formatted defaults to not
enabled.RestAuthRequestDef request_type, authentication, literal RestAuthRequestDef server_name, %h, literal, formatted RestAuthRequestDef username, User-Name
RestAcctRequestDef
parameters, one for each parameter
sent to the server. The general format is:RestAcctRequestDef acctparam,attributename[,type[,formatted]]
acctparam
is the REST parameter nameattributename
defines the value for acctparam.
The value may be fetched from the current request, be a value that is
subject to special formatting, or a literal valuetype
consists of the word “literal” or the word
“request”. If type is empty or “request”, the value is fetched from
the current request. If type is "literal", it is added to the HTTP
request as it is.formatted
indicates that the value specified with
attributename
is to be subject to special character
processing before being used.type
and
formatted
fields are optional. If they are not specified,
type defaults to "request" and formatted defaults to not
enabled.RestAcctRequestDef request_type, accounting, literal RestAcctRequestDef server_name, %h, literal, formatted RestAcctRequestDef username, User-Name RestAcctRequestDef acct_sess_id, Acct-Session-Id RestAcctRequestDef acct_status_type, Acct-Status-Type
<AuthBy REST>
to return with
result REJECT to trigger an Access-Reject when a REST request times out.
This parameter is not set by default.NoReplyReject
is enabled, the reject reason is set to
'REST request timeout'.PasswordAttr
or EncryptedPasswordAttr
parameter and checks the
password internally. This optional parameter causes the server to check
the password instead. This is useful with servers that implement
proprietary encryption algorithms in their passwords, or do not provide
access to password attribute.ServerChecksPassword
is specified, Radiator sends the
plaintext password with "password" REST API parameter to the server and
the password checking is performed by the server only. This is done in
addition to any parameters added by RestAuthRequestDef
.ServerChecksPassword
:# Send plaintext password to server to check ServerChecksPassword
ServerChecksPassword
is compatible
with PAP, EAP-TTLS/PAP, and other authentication methods that provide a
plain text password. ServerChecksPassword
does not
work with CHAP, MSCHAP, and most EAP methods since these do not provide a
password Radiator can use with an LDAP bind
operation.
RestAuthReplytDef
parameters, one for each parameter sent to the server. The general format
is:RestAuthReplyDef replyparam,attributename[,type[,formatted]]
replyparam
is the REST parameter nameattributename
is the name of the attribute that
is used as the check, reply or other item. The special attributename
‘GENERIC
’ indicates that the replyparam value is a
list of comma separated attribute=value
pairs.type
indicates whether replyparam is a check,
reply or other item. Possible values are “check” or “reply” for check
and reply items. If type is “request” the value is saved in the
current request, from where it can be later collected with a special
formatting macro like: %{attributename}.formatted
indicates that the value specified with
attributename
is to be subject to special character
processing before being used.type
and
formatted
fields are optional. If they are not specified,
type defaults to empty and formatted defaults to not
enabled.# How to handle reply for REST authentication request RestAuthReplyDef nas_id,NAS-Identifier,check RestAuthReplyDef client_mac,Calling-Station-Id,check RestAuthReplyDef sess_timeout,Session-Timeout,reply
PasswordAttr
,
EncryptedPasswordAttr
and ServerChecksPassword
.EncryptedPasswordAttr
, it will be used instead of
PasswordAttr
, and PasswordAttr
is ignored. You must specify either PasswordAttr
or
EncryptedPasswordAttr
or
ServerChecksPassword
.# HTTP server sends password hash with pw-hash parameter EncryptedPassword pw-hash
EncryptedPasswordAttr
, it will be used instead of
PasswordAttr
, and PasswordAttr
is ignored. You must specify either PasswordAttr
or
EncryptedPasswordAttr
or
ServerChecksPassword
.# HTTP server sends plaintext password with pw parameter PasswordAttr pw
Acct-Status-Type
attribute values that will be processed
in Accounting requests. The value is a comma-separated list of valid
Acct-Status-Type
attribute values including,
Start
, Stop
, Alive
,
Modem-Start
, Modem-Stop
,
Cancel
, Accounting-On
and
Accounting-Off
. See your dictionary for a full
list.HandleAcctStatusTypes
is specified and
an Accounting request has an Acct-Status-Type
not
mentioned in HandleAcctStatusTypes
, then the request
will be ACCEPTed but not otherwise processed by the enclosing clause. The
default is to handle all Acct-Status-Type
values.# Only process Start and Stop requests, ACCEPT and acknowledge everything else HandleAcctStatusTypes Start,Stop