Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation  Back up to About Overview 
  
[+] Expand All
[-] Collapse All

Data Accessor Overview

Data accessors are plug-in modules, similar to the LDAP and SQL authentication plug-ins. Because they do not implement authentication methods, data accessors are called generic plug-ins. You configure data accessors with initialization files having the .gen filename extension.

When Steel-Belted Radius Carrier starts, it processes all the .gen files in its /radiusdir directory. Each .gen file defines a separate instance of a data accessor plug-in. Settings in the initialization file specify the name of the shared object file (.so or .dll) to load and a name string to identify the plug-in instance. Many .gen files may refer to a single shared object file, but the name string must be unique for each plug-in instance.

The .gen file specifies the connection settings and query strings for the SQL database or LDAP repository. These settings are similar or identical to those in the corresponding SQL and LDAP .aut files. The .gen file also specifies type declarations used when passing data between scripts and the plug-ins.

Scripts use the DataAccessor API to communication with data accessors. The DataAccessor API exposes five methods:

  • new DataAccessor()—Creates a new DataAccessor object bound to a single data accessor plug-in instance.
  • SetInputVariable()—Sets a request data value in the data accessor’s input variable container.
  • GetOutputVariable()—Gets a response data value from the data accessor’s output variable container.
  • Clear()—Deletes all data values in the data accessor’s input and output variable containers.
  • Execute()—Performs a single operation on the external data source.

For more information about the DataAccessor API, see DataAccessor Object.

The .gen file hides the details of the external data connection from your scripts. The DataAccessor API appears the same way to your scripts whether you are connecting to a SQL database or an LDAP repository.

Note: LDAP scripting does not support DataAccessors(). Trying to execute a DataAccessor() from an LDAP script causes a runtime exception.

Modified: 2017-03-07