interface(name = "...", prog = "ascfile [options] file...", flags = Ascii + Short-Attr, sendattr = "str", ...),
The 'Ascii' and 'Short-Attr' flags are required for any interface that uses this module.
The module only uses the 'str' attribute from requests sent to it; the sendattr ACL is specified for efficiency only.
All files specified on the comand line after the options are read into
memory at startup. Note however that all are read into the same data
structure, so the files are effectively concatenated.
A record consists of a key, followed by whitespace, followed by a series of A/V items, each separated by a comma or whitespace; the record is ended by a newline (-s flag) or when an empty line is encountered (without -s).
Multiple records having the same key are effectively concatenated.
An A/V item can either be a bare value or a full A/V pair. A bare value will get the attribute 'int' if the value seems numeric, 'ip' if the value is an IP address, and 'str' otherwise, to form complete pairs.
Strings that contain whitespace or commas must be quoted in double quotes.
Double quotes within quoted strings can be escaped by prepending a backslash.
All other characters and escape sequences in quoted strings are sent as-is and
are treated by OpenRADIUS according to the ASCII interface specification; see
the module interface, paragraph 3.2.
If you want to compare items, and possibly use another key upon a mismatch, you can add a rule to do that in the behaviour file. Otherwise, you should rewrite eg. a series of DEFAULT items, each with a check item like Service-Type = Login, Framed, etc., as keyed on the service type instead.
This module could have been written to deal with check items the way you're used to - but I feel that the type of logic that is needed there shouldn't be placed outside the behaviour file. And in most cases, the files will be oriented on a single key anyway, so they can be easily rewritten.
If you'd really need to have two keys, a users-type of file isn't the best solution anyway, as you'd get n x m entries that will probably all be quite similar. Better split the information across two tables. But if you absolutely cannot, you can merge your check items all into the key, like steve:23555443:3, and call the module from the behaviour file like this: Ascfile(str=User-Name . ":" . Calling-Station-Id . ":" . Service-Type)
After answering each request, the module checks if any of the files are
newer than when they were last read, and if so, it rereads all.
(Not implemented yet; just kill the module when you change any of its
files - OpenRADIUS will restart it automatically).