LDAP Authentication Header (.aut) File
The LDAP authentication header file is located in the same directory that contains the Steel-Belted Radius Carrier daemon. The header file must have the extension .aut and is usually called ldapauth.aut.
An LDAP authentication header file consists of several sections, where each section may contain multiple entries. Section names are enclosed in square brackets, for example [Bootstrap]. Each entry in the section appears on one line, and is of the form
parameter = value. A section ends at the next section, or at the end of the file. Everything to the right of a semicolon (;) is ignored until the end of that line.LDAP Authentication Variable Names
When Steel-Belted Radius Carrier extracts RADIUS attribute values from the incoming Access-Request and adds them to the Variable Table, the name that it gives to each variable is the same as the name of the corresponding attribute, for example User-Name or Calling-Station-ID. You may refer to the variable by this name in any subsequent entry in the .aut header file. This convention means that RADIUS attribute names are treated as reserved keywords. However, the .aut header file syntax also permits you to assign the value of an incoming RADIUS attribute to any variable.
When the LDAP Search request returns LDAP attribute values, they are added to the Variable Table. Steel-Belted Radius Carrier gives each variable the name of the corresponding LDAP attribute. In the schema illustrated above, this would produce variable names such as User-Secret and Last-Name. For the names to use in your own .aut header file, consult your LDAP database schema. Like RADIUS attribute names, LDAP attribute names are treated as reserved keywords. However, the .aut header file syntax permits you to assign the value of a returned LDAP attribute to any variable.
[Bootstrap] Section
The [Bootstrap] section (Table 132) of the LDAP authentication header file specifies information that Steel-Belted Radius Carrier uses to load and start the LDAP Authentication plug-in.
After you edit ldapauth.aut and restart Steel-Belted Radius Carrier, the InitializationString value that you entered in the [Bootstrap] section of ldapauth.aut appears in the Authentication Methods list displayed in the Authentication Policies>Order of Methods panel in SBR Administrator. You can then enable, disable, or prioritize this method like any other entry in the list.
You can configure more than one LDAP authentication method. Each requires its own .aut file in the same directory as ldapauth.aut. The [Bootstrap] section of each .aut file must provide a LibraryName of ldapauth.so. The InitializationString in each .aut file must be unique, so that you can distinguish between authentication methods in the Authentication Policies panel.
[Attributes/name] Sections
LDAP database entries may have many attributes, many of which may be irrelevant to the authentication process. An LDAP Search returns all of the attributes associated with an LDAP entry. Therefore, when specifying an LDAP Search for authentication purposes, you may want to provide a list of specific LDAP attributes relevant to Steel-Belted Radius Carrier. Only these attributes are placed in the Variable Table.
Each [Attributes/
name] section in the LDAP authentication header file lists LDAP attributes relevant to a specific LDAP Search request. The syntax is:[Attributes/name]attributeattributeM.where
attributeis the name of an LDAP attribute andnameis an arbitrary name for the section. You must type theattributenames exactly as they appear in your LDAP database schema. Use one line per attribute. For example:[Attributes/InterestingAttributes]User-SecretRADIUS-ProfileInactivity-TimeoutAn [Attributes/
name] section is associated with a Search request by referencing it from within a [Search/name] section using the Attributes parameter. For example:[Search/DoLdapSearch]Attributes = InterestingAttributesIf the Attributes parameter is omitted from a [Search/
name] section, Steel-Belted Radius Carrier retains all of the attributes associated with the LDAP entry. Of these attributes, Steel-Belted Radius Carrier uses only those referenced in the .aut header file; all others stay in the Variable Table until the authentication transaction is complete and the table is discarded.For BindName authentication, you must ensure that the [Attributes/
name] section lists the attribute in which the user's password is stored and that your [Response] section assigns the value of this attribute to the outgoing %Password parameter. Steel-Belted Radius Carrier completes authentication by comparing the returned %Password value with the password that arrived in the Access-Request. For example:[Attributes/InterestingAttributes]User-SecretRADIUS-ProfileInactivity-Timeout[Response]%Password = User-Secret%Profile = RADIUS-ProfileVendor-Specific-NAS-Attribute = Inactivity-Timeout[Response] Section
During an authentication transaction, the [Response] section is the last section in the LDAP authentication header file to be processed. At this point in processing, all Bind and Search requests to the LDAP database have been completed.
The [Response] section tells Steel-Belted Radius Carrier what to do with the information that it has retrieved from the incoming Access-Request and from the LDAP database. The goal at this point is for Steel-Belted Radius Carrier to complete authentication and issue an Access-Response to the RADIUS client.
The [Response] section syntax (Table 133) is:
[Response]attribute = variableattribute = variableMwhere
attributeis the name of a RADIUS attribute or other special item needed to complete authentication, andvariableis the name of a variable in the Variable Table. The end result of the [Response] syntax is that the value in the variable is assigned to the attribute.An IP pool can be returned for any attribute of the appropriate type. If the returned string appears to be an IP address (that is, in the format, a.b.c.d), it is considered an IP address; otherwise, it is considered a address pool, from which an IP address is allocated.
attributemay be the name of a RADIUS attribute, or it may be one of the following keywords, which identify various special items associated with Steel-Belted Radius Carrier. Each of these keywords begins with the percent sign (%) to distinguish it clearly from the RADIUS attributes.
[Search/name] Sections
Each [Search/
name] section (Table 134) in the LDAP authentication header file specifies the complete details of one LDAP Search request. You can use the same Search request on various databases, because the details of the database connection are specified separately.For BindName authentication, you must ensure that each [Search/
name] section searches for a database entry that matches the incoming username and retrieves from it an attribute containing that user's password. Steel-Belted Radius Carrier must compare this password to the one it received in the incoming Access-Request packet.A [Search/
name] section may retrieve other LDAP attributes as well; however, if you are authenticating with BindName, the user's password is a minimum requirement. Use the Attributes parameter to specify the list of items you want returned.[Search/DoLDAPSearch]Base = ou=Special Users, o=bigco.comScope = 1Filter = uid=<User-Name>Attributes = InterestingAttributesTimeout = 20%DN = dn[Attributes/InterestingAttributes]User-SecretRADIUS-ProfileInactivity-Timeout[Response]%Password = User-Secret%Profile = RADIUS-ProfileVendor-Specific-NAS-Attribute = Inactivity-Timeout
The Search parameter can be used in one [Search/
name] section after another to create a serial chain of Search requests. Every Search in the chain is tried. If any Search fails to return data, the Access-Request is rejected.An example of a two-part chained Search follows:
[Settings]Search = DoLdapSearch[Search/DoLdapSearch]Base = ...Filter = ...Search = GetMoreLdapInfo[Search/GetMoreLdapInfo]Base = ...Scope = ...Filter = ...Search sequencing is flexible. You can proceed to a new search even if the current search returns no data by using the OnNotFound parameter. You can override search results using the $reject and $accept keywords. The following is an example of flexible searching:
[Search/DoSearch2]Base = o=xyz.comScope = 2Filter = uid=<User-Name>Attributes = AttrListTimeout = 20%DN = dnOnFound = DoSearch8OnNotFound = DoSearch9[Search/DoSearch8]Base = o=xyz.comScope = 2Filter = uid=<User-Name>Attributes = AttrListTimeout = 20%DN = dnOnFound = DoSearch9OnNotFound = DoSearch9[Search/DoSearch9]Base = o=xyz.comScope = 2Filter = uid=<User-Name>Attributes = AttrListTimeout = 20%DN = dnOnNotFound = $accept[Request] Section
The [Request] section (Table 135) of the LDAP authentication header file indicates which RADIUS attribute values Steel-Belted Radius Carrier extracts from the incoming Access-Request. Steel-Belted Radius Carrier places these values in the Variable Table before moving on to the LDAP Bind and Search requests indicated in the file.
[Request]attribute = variableattribute = variableMwhere
attributeis the name of a RADIUS attribute or other special item associated with the incoming Access-Request, andvariableis the name of a variable in the Variable Table. The end result of the [Request] syntax is that the value in the incoming attribute is assigned to this variable.
attributemay be the name of a RADIUS attribute, or it may be one of the following keywords, which identify various special items also associated with the connection request. Each of these keywords begins with the percent sign (%) to strongly distinguish it from the RADIUS attributes.
variablemay be omitted from any [Request] entry. If so, the value in the incomingattributeis assigned to a variable namedattribute.[Request]attribute=In the following [Request] section example, the nasid variable receives the value of the NAS-Identifier attribute from the request packet, the Service-Type variable receives the value of the Service-Type attribute, and the %NASAddress variable receives the NAS address in dotted notation.
[Request]NAS-Identifier = nasidService-Type =%NASAddress =[Defaults] Section
The [Defaults] section of the LDAP authentication header file lets you add entries to the variable table before the request is processed. You can reference these variables in your query, even if they are not supplied in the request. Any variable not listed in the [Defaults] section is initialized to a null value.
The format of each [Defaults] entry is:
variable = valuewhere
variableis the name of a variable andvalueis the value you want to assign to it. For example:[Defaults]Default-User=SStudent[Search/Radius]Base = ou=people,dc=funk,dc=comFilter = uid=<Default-User>Scope = 2Attributes = RadiusAttrsTimeout = 20%DN = dnIn this example, the Default-User variable is not created during request processing by the LDAP plug-in. Instead, the Default-User variable is inserted into the variable table by the entry in the [Defaults] section, and then substituted into the Filter setting in the [Search/Radius] section.
You can use the [Defaults] section to specify values for any variable, including temporary variables and those that represent RADIUS attributes or LDAP attributes. This way, if the Access-Request packet and LDAP database do not provide Steel-Belted Radius Carrier with all of the values that it needs to respond to an Access-Request, in each case it has an acceptable alternative value that can be used instead.
You can store multiple values for any variable; if that variable is mapped to a RADIUS attribute, all values are returned in the RADIUS response. Multiple entries set within this section are considered multiple values of the same variable.
Variable values are not additive between this section and each search. Therefore, if a search returns one or more values, all current values are replaced.
NOTE: The [Defaults] section is the only section in the header file that lets you assign static values to variables.
[Server/name] Sections
Several sections of the LDAP authentication header file work together to configure the connection between the Steel-Belted Radius Carrier server and the LDAP database server(s) that are being used to provide external database authentication. The sections are [Server], [Server/name], and [Settings].
Each [Server/name] section of the LDAP authentication header file contains configuration information about a single LDAP server. You must provide a [Server/name] section for each server named in the [Server] section. For example:
[Server]s1=s2=[Server/s1]Host = ldap_1Port = 389M[Server/s2]Host = 130.4.67.1LastResort = 1MTable 136 lists the settings that may be present in a [Server/
name] section:
For Bind authentication, you must specify a Bind template in the
[Settings]section of the LDAP authentication header file.The Bind template must follow conventional LDAP syntax. It may be as simple or as complex as LDAP syntax permits, with multiple attribute/value assertions in boolean combination. It may also include replacement variables from the Variable Table.
Each replacement variable consists of the variable name enclosed in angle brackets (<>). Upon execution of the LDAP Bind request, the value of the variable replaces the variable name.
For example, a Bind template that uses the User-Name attribute from the RADIUS request might look like this:
For BindName authentication, the BindName parameter specifies the distinguished name (DN) to be used in the Bind request that connects to the LDAP server. The [Server/
name] section lets you specify a unique BindName for a specific server. Use the[Settings]section to specify a default BindName to use for all servers.For Bind authentication, omit all Bind, BindName and BindPassword parameters and use the Bind parameter in the
[Settings]section.See [Settings] Section.
For BindName authentication, you must provide a BindPassword. The BindPassword specifies the password to be used in the Bind request that connects to the LDAP server. The [Server/
name] section lets you specify a unique BindPassword for a specific server. Use the[Settings]section to specify a default BindPassword to use for all servers.For Bind authentication, omit the BindName and BindPassword parameters. Use the Bind parameter instead.
Specifies the path of the certificate database for use with SSL. This path must not end in a filename. The certificate database must be the cert7.db and key3.db files used by Netscape Communicator 4.x or later.
Specifies the number of seconds to wait when attempting to establish the connection to the database before timing out. This value is passed to the client database engine, which may or may not implement the feature.
If the server is down when performing a Bind or a Search, setting this parameter to 1 triggers a reconnection attempt before rejecting the request. Therefore, requests are not rejected due to inactivity timeouts.
This setting applies to a particular server. To apply it for all servers, place it in the
[Settings]section.You may identify a "last resort" LDAP server by providing a LastResort parameter in one of these [Server/name] sections, and setting its value to 1. If an LDAP query against some other server results in "no record found," the authentication server tries the last resort server before accepting or rejecting the user.
You might use the LastResort parameter to identify your master accounts database. This enables Steel-Belted Radius Carrier to cover the case in which a user account is newly added but has not yet been propagated to all the LDAP databases.
Specifies the version of LDAP protocol, if needed to override the default given in the
[Settings]section.Specifies the maximum number of instances of a single LDAP request that may be executing at one time.
NOTE: A setting of MaxConcurrent = 1 is sufficient for all but the most demanding environments. Increase this value slowly and conservatively. For more information, see "Overlapped Execution of SQL Statements" in Chapter 18, Configuring SQL Authentication of the Steel-Belted Radius Carrier Administration and Configuration Guide.
Specifies the maximum number of seconds to wait after successive failures to reconnect after a failure of the database connection.
WaitReconnect specifies the time to wait after failure of the database connection. This value is doubled on each failed attempt to reconnect, up to a maximum of MaxWaitReconnect.
Specifies the password string, which can include variables, used to specify a Bind prior to any search within a request. If this parameter is not specified, the packet's password is used.
The TCP port of the LDAP server, or 0 to use the standard port.
Specifies the number of seconds to wait for the execution of an LDAP request to complete before timing out. This value is passed to the database engine, which may or may not implement the feature.
The value of this parameter is a string, name. The name specifies an LDAP Search request by referencing a [Search/name] section elsewhere in the same .aut file.
Specifies the number of seconds to wait after a failure of the database connection before trying to connect again.
[Server] Section
The [Server] section of the LDAP authentication header file lists the LDAP servers that may be used to perform authentication. You can specify more than one server in the [Server] section for load-balancing or backup. When more than one server is specified, Steel-Belted Radius Carrier authenticates against these databases in a round-robin fashion.
[Server]ServerName=TargetNumberServerName=TargetNumberMwhere
ServerNameis the name of a header file section that contains configuration information for that server, andTargetNumberis an activation target number, a number that controls when this server is activated for backup purposes.TargetNumberis optional and may be left blank. For example:[Server]s1 =s2 =[Server/s1].. ;Connection details for server s1.[Server/s2].. ;Connection details for server s2.A Steel-Belted Radius Carrier server maintains connectivity with its LDAP servers according to the following rules:
- The priority of the server by order. The first entry in the [Server] section has the highest priority.
- By activation target number. The rule for the activation target is that if the number of LDAP servers that Steel-Belted Radius Carrier is connected to is less than the activation target, Steel-Belted Radius Carrier connects to the server and includes it in the round-robin list. While the number of active servers is equal to or greater that the activation target, Steel-Belted Radius Carrier does not use that server in the round-robin list. An activation target of 0 indicates that, in the current configuration, this machine is never used.
[Settings] Section
The [Settings] section (Table 137) of the LDAP authentication header file forms a basis for all Bind and Search requests to the LDAP database server(s).
Search sequencing is flexible. You can override search results using the $reject and $accept keywords.
You can proceed to a new search even if the current search returns no data by using the OnNotFound parameter.
For examples of using flexible searching, see [Server/name] Sections.
The parameters in the [Settings] section apply to all LDAP servers listed in the header file. The following parameters are usually present. If any of these parameters is not provided in the [Settings] section, the parameter assumes a system default value.
The values set in [Settings] for some parameters, such as ConnectTimeout, MaxConcurrent, or WaitReconnect, provide defaults that apply to all servers. These default values can be overridden for a particular server by entering the same parameter with a different value in a [Server/
name] section.
[Failure] Section
The [Failure] section of the LDAP authentication header file (Table 138) can be used to determine the result of the authentication process (accept or reject) when connectivity to all of the configured LDAP databases has failed. For example:
[Failure]Accept = 1Profile = XYZFullName = Mr Stanley Smith
NOTE: The Profile option and the Alias option cannot be used together. Read the following descriptions and choose the one that suits your needs.