7.1.49. Any other attribute defined in your dictionary Previous topic Parent topic Child topic Next topic

Checking of all other attributes passes only if the corresponding attribute exists in the request and matches the value specified for the check item.
Radiator allows check items to be specified either as an exact match or as a Perl regular expression (regexp). Radiator regards check items whose value is surrounded with slashes (‘/’) as a regular expression. Anything else is regarded as an exact match.
  • Exact match
    The check item will pass only if there is an exact match. The comparison is case sensitive. Radiator will look for an exact match if the value to be matched is not surrounded by slashes.
    NAS-IP-Address = 203.63.200.5
    Calling-Station-Id = 121284
  • Alternation
    Specify multiple permitted values, separated by vertical bars (‘|’). The check item will pass if at least one of the permitted values is an exact match.
    Calling-Station-Id = 121284|122882
  • Perl Regular expression
    If the check item is surrounded by slashes (‘/’), it is regarded as a Perl regular expression, and Perl is used to test whether the value of the attribute in the request matches the regexp. The expression modifiers ‘i’ (case insensitive) and ‘x’ (ignore white space in the pattern) are also permitted.
    Perl regular expressions give you an enormous amount of power to control the conditions under which a user can log in. The first example below only matches if the user logs in from the phone numbers 95980981, 95980982, 95980983 or 95980984. The second example only matches of they log into a port number with one digit (i.e. ports 1-9).
    Calling-Station-Id = /9598098(1|2|3|4)/
    NAS-Port = /^\d$/
    Tip
    Perl regexps are very powerful, but they also take some getting used to. You should use them carefully, and test to make sure they really do what you want. Consult some Perl manuals or a Perl guru for tips on writing regexps.
    Tip
    You can use the ‘i’ and ‘x’ pattern modifiers to get case-insensitive or extended expressions like this, to match a Class attribute set to "myclass" without regard to case.
    Class = /myclass/i
    Tip
    You can set up “negative” matches (i.e. that only match if the check is not equal to some string) by using Perl negative lookahead assertions in a regexp. For example, this check item will match all Service-Types except for Framed-User:
    Service-Type = /^(?!Framed-User)/
    Tip
    You can match a string that contains unprintable characters by using a character class negation. For example to match a user name that contains any character not in a-z, A-Z or 0-9:
    User-Name = /[^a-zA-Z0-9]/