ReadUserFile

The ReadUserFile plug-in reads user profiles for Check-Items and Reply Attributes from a standard RADIUS user file (as originally defined by Livingston RADIUS 1.16). For information on formatting the user file, see the User File Format section.

Plug-in Type

Authentication and Accounting

Example

locate-user-profile Method-Type = ReadUserFile Method-Next = local
ReadUserFile-Filename = users.classic

Syntax

MethodInstanceName Method-Type = ReadUserFile [ Control Properties ]
ReadUserFile-Filename = dynamic filename
[ ReadUserFile-SearchKey = dynamic string ]
[ ReadUserFile-Map = mapping text ]
[ ReadUserFile-NoDefaults = dynamic boolean ]
[ ReadUserFile-SkipBadEntries = dynamic boolean ]
[ ReadUserFile-ColumnOneMode = dynamic boolean ]
[ ReadUserFile-NewUser = dynamic boolean ]

Usage Notes

The advantage of the user file format is that attributes associated with a user profile map directly into the NavisRadius check and reply variable groups based on where they appear in the user profile. This can often eliminate the need for read maps. A user file is also very convenient for storing service templates (named configurations). When NavisRadius is started, all user data is read into memory unless the name of the user file contains a reference to a NavisRadius variable.

Method Properties

ReadUserFile-Filename (Required)

ReadUserFile-Filename specifies the name of the file containing the user profiles. (When using NavisRadius to replace standard RADIUS implementations this file is typically named users.) For more information on the format of a user file, see the section on User File Format.

Example

ReadUserFile-Filename = users.classic

ReadUserFile-SearchKey (Optional)

ReadUserFile-SearchKey specifies a dynamic string to use for selecting the profile in the user file. The first matching entry is selected.

Default

${packet.Base-User-Name}

Examples

ReadUserFile-SearchKey = ${request.Calling-Station-Id}

ReadUserFile-SearchKey = ${packet.user-Realm}

ReadUserFile-Map (Optional)

ReadUserFile-Map specifies the mapping of data from a user profile found in a user file to NavisRadius variables. Multiple ReadUserFile-Map properties are allowed in a method definition. To include mapping information from a file, place an '@' character followed by the name of the file as the value of the property.

If the ReadUserFile-Map property is not specified then attributes in the check area of the user profile (the logical first line of the profile) are placed into the NavisRadius check variable group, and attributes in the reply area of the profile are placed into the NavisRadius reply variable group. In both cases, the name of the attribute in a selected user entry is used for the name of the NavisRadius variable. For example the Check-Item NAS-Port-Type is placed into the NavisRadius variable: ${check.NAS-Port-Type}.

If a variable already exists in either the check or reply variable group and no map instructions are provided, the existing variable remains unchanged. The new attribute is ignored. There is also an attribute called key which contains the search key, as modified by the DEFAULT processing of the entry, which was found in the user file. This attribute can also be mapped into a variable.

Default

Note: The default maps only apply when no mapping properties are defined. If any mapping property is defined, then the default map is cancelled and all map instructions must be provided.

${check.*} = ${check.*};

${reply.*} = ${reply.*};

Examples

ReadUserFile-Map = @UserProfileMap

ReadUserFile-Map = "${check.Password} = ${check.Password};"

ReadUserFile-Map = "${check.Auth-Type} = ${check.Authentication-Type};"

ReadUserFile-Map = "${reply.*} = ${reply.*};"

ReadUserFile-Map = "${user.Base-User-Name[replace]} = ${key};"

ReadUserFile-NoDefaults (Optional)

ReadUserFile-NoDefaults specifies how the plug-in method should handle default profiles. Normally default profiles are returned if an exact match cannot be made with the key provided. This property is optional. If the property is not specified then FALSE is assumed.

Default

FALSE

Example

ReadUserFile-NoDefaults = TRUE

ReadUserFile-SkipBadEntries (Optional)

ReadUserFile-SkipBadEntries specifies whether malformed user profiles in the file should be skipped or prevent the file from being loaded. This property is optional. If this property is not specified then FALSE is assumed, and if malformed profiles are found the file will not be loaded .

Default

FALSE

Example

ReadUserFile-SkipBadEntries = True

ReadUserFile-ColumnOneMode (Optional)

If ReadUserFile-ColumnOneMode is set to True, the format of a profile in the user file is based on white space in column one. For more information on the format of a user file, see the section on User File Format. This property is optional. If this property is not specified then FALSE is assumed.

Default

FALSE

Example

ReadUserFile-ColumnOneMode = TRUE

ReadUserFile-NewUser (Optional)

ReadUserFile-NewUser specifies whether the read is for a new user. Setting this value to TRUE clears out the reply, check, and user variable groups. To add variables to the existing variables in the reply, check, and user variable groups, either set this property to FALSE or do not include it in the method properties.

Default

FALSE

Example

ReadUserFile-NewUser = TRUE