Creating and Configuring Authentication Plugins

A description of how to configure a plugin in the c8-server.conf file.

Authentication plugins are compiled .dll files (on Microsoft Windows) or .so files (on UNIX-like operating systems). Sybase CEP Server calls the methods in these libraries when it authenticates a user. For instructions on creating your own authentication plugins, see the Sybase CEP Integration Guide .

Once the plugin library is created, configure the plugin in the c8-server.conf file by creating a section for it in the "SybaseC8/Security/AccessControl/Authentication" section of the file. Here is an example authentication plugin entry:

<section name="C8/Security">
...
<section name="AccessControl">
 ...
 <section name="Authentication">
    <section name="Plugin">
       <preference name="LibraryName"
                  value="c8authplugin_demo_lib"/>
       <preference name="InitializeFunction"
                   value="c8authplugin_demo_initialize"/>
       <preference name="AuthenticateFunction"
                   value="c8authplugin_demo_authenticate"/>
       <preference name="ShutdownFunction" 
                     value="c8authplugin_demo_shutdown"/>
    </section>
 ...

Include the following information in your plugin configuration:

  1. Set the "LibraryName" preference to the name of the library containing your authentication plugin.

    Do not include the .dll or .so extension in the name, as Sybase CEP Server automatically adds this extension. If you are configuring the plugin on a UNIX-like operating system, also omit the lib prefix, which is also automatically added by Sybase CEP Server.

  2. Set the "InitializeFunction" preference to the initialize function for the plugin.
  3. Set the "AuthenticateFunction" preference to the authenticate function for the plugin.
  4. Set the "ShutdownFunction" preference to the shut down function for the plugin.

The configuration file section that contains the authentication plugin entry must also define any parameters that you want to pass to the plugin functions, using the following syntax:

<preference name="
parameter-name
" value="
parameter-value
"/>

For example:

<preference name="MyPreference" value="MyParameterValue"/>