Netscape logo Plug-In Programmer's Guide
Netscape Directory Server

Index      DocHome      Next     

Contents


Preface

What You Should Already Know

Using Directory Server Plug-In APIs

Document Conventions

Where to Find Directory Server Information

Part 1 Introduction to Directory Server Plug-Ins

Chapter 1   An Overview of Directory Server Plug-Ins

What Are Directory Server Plug-Ins?

How Directory Server Plug-Ins Work

Calling Directory Server Plug-In Functions

The Directory Server Architecture

Types of Directory Server Plug-Ins

Chapter 2   Writing and Compiling Plug-Ins

Writing a Plug-In Function

Including the API Header File

Passing Data with Parameter Blocks

Working with Parameter Blocks

Getting Data from the Parameter Block

Setting Data in the Parameter Block

Calling Front-End Functions

Plug-in Return Values

Writing Plug-in Initialization Functions

Initialization Functions for Windows Platforms

Specifying Directory Server Compatibility

Specifying Information About the Plug-In

Registering Your Plug-In Functions

Returning a Value to the Directory Server

Example of an Initialization Function

Compiling a Directory Server Plug-In

Chapter 3   Configuring Plug-Ins

Creating a Plug-In Configuration File

Plug-In Dependencies

Specific Plug-in Dependencies

Plug-In Type Dependencies

Specifying the Order of Plug-In Directives

Summary of Plug-In Directives

Loading the Plug-In Configuration File

Passing Extra Arguments to Plug-Ins

Setting the Log Level of the Server

Chapter 4   A Quick Example

An Example Pre-Operation Plug-In

Writing the Plug-In Example

Compiling the Plug-In Example

Registering the Plug-In Example

Running the Plug-In Example

Part 2 Basic Plug-In Programming Techniques

Chapter 5   Front-End API Functions

Logging Messages

Adding Notes to Access Log Entries

Sending Data to the Client

Determining if an Operation Was Abandoned

Working with Entries, Attributes, and Values

Creating a New Entry

Converting Between Entries and Strings

Getting and Setting the DN of an Entry

Verifying Compliance with the Schema

Getting the Attributes and Values of an Entry

Iterating Through the Attributes in an Entry

Finding a Specific Attribute in an Entry

Adding and Removing Values

Working with DNs and RDNs

Determining if a DN is the Root DN

Working with DN Suffixes

Server Suffixes

Getting the Parent DN of a DN

Normalizing a DN

Working with Search Filters

Determining if an Entry Matches a Filter

Getting the Filter Type

Getting the Search Criteria

Converting a String to a Filter

Creating Complex Filters by Combining Filters

Checking Passwords

Chapter 6   Writing Pre/Post-Operation Plug-Ins

How Pre/Post-Operation Plug-Ins Work

Types Pre-Operation and Post-Operation Functions

Types of Pre-Operation Functions

Types of Post-Operation Functions

Registering Pre/Post-Operation Functions

Chapter 7   Defining Functions for LDAP Operations

Specifying Start and Close Functions

Processing an LDAP Bind Operation

Defining Functions for the Bind Operation

Getting and Setting Parameters for the Bind Operation

Processing an LDAP Unbind Operation

Processing an LDAP Search Operation

Getting the List of Candidates

Iterating Through Candidates

Processing an LDAP Compare Operation

Processing an LDAP Add Operation

Processing an LDAP Modify Operation

Processing an LDAP Modify RDN Operation

Processing an LDAP Delete Operation

Processing an LDAP Abandon Operation

Chapter 8   Defining Functions for Authentication

Understanding Authentication Methods

How the Directory Server Identifies Clients

How the Authentication Process Works

Writing Your Own Authentication Plug-in

Writing a Pre-Operation Bind Plug-in

Defining Your Authentication Function

Getting and Checking the Bind Parameters

Getting the Entry and Checking the Credentials

What to Do If Authentication Fails

What to Do If Authentication Succeeds

Registering the SASL Mechanism

Example of a Pre-Operation Bind Plug-In

Example of a Pre-Operation Bind Function

Example of an Initialization Function

Registering the Plug-In

Using SASL with an LDAP Client

Part 3 Advanced Programming Techniques

Chapter 9   Writing Entry Store/Fetch Plug-Ins

How Entry Store/Fetch Plug-Ins Work

Writing Entry Store/Fetch Functions

Registering Entry Store/Fetch Functions

Chapter 10   Writing Extended Operation Plug-Ins

How Extended Operation Plug-Ins Work

Writing Extended Operation Functions

Registering Extended Operation Functions

Specifying Start and Close Functions

Chapter 11   Writing Matching Rule Plug-Ins

Understanding Matching Rules

Extensible Match Filters

Extensible Match Filters in the Directory Server

Understanding Matching Rule Plug-Ins

Functions Defined in Matching Rule Plug-Ins

How Matching Rules Are Identified

How the Server Associates Plug-Ins with OIDs

Finding a Plug-In for Indexing

Finding a Plug-In for Searching

How the Server Uses Parameter Blocks

Indexing Based on Matching Rules

How the Server Sets Up the Index

How the Server Updates the Index

Writing the Indexer Factory Function

Getting and Setting Parameters in Indexer Factory Functions

Writing the Indexer Function

Getting and Setting Parameters in Indexer Functions

Handling Extensible Match Filters

How the Server Handles the Filter

Query Operators in Matching Rules

Writing a Filter Factory Function

Getting and Setting Parameters in Filter Factory Functions

Writing a Filter Index Function

Getting and Setting Parameters in Filter Index Functions

Writing a Filter Matching Function

Handling Sorting by Matching Rules

Writing a Destructor Function

Writing an Initialization Function

Registering Matching Rule Functions

Specifying Start and Close Functions

Chapter 12   Using the Custom Distribution Logic

About Distributing Flat Namespaces

Creating a Distribution Function

Adding the Distribution Function to Your Directory

Adding Multiple Databases to a Single Suffix

Using the Console

From the Command-Line

Adding Distribution Logic to a Suffix

Using the Console

From the Command-Line

Using the Distribution Logic Examples

Custom Distribution Checklist

Chapter 13   Using Data Interoperability Plug-Ins

Installing Directory Server

Understanding Deployment Configuration

Installing Two Instances of Directory Server

Enabling the DIOP Feature in Directory Server

Using the DIOP Feature

Sample DIOP Plug-In

Debugging the Plug-In

Plug-In API Reference

Preserving the Default Behavior of the Server

Bypassing Access Control Checks

Part 4 Reference

Chapter 14   Data Type and Structure Reference

Summary of Data Types and Structures

Chapter 15   Function Reference

Distribution Routines

Functions for Access Control

Functions for Internal Operations and Plug-In Callback

Functions for Setting Internal Operation Flags

Functions for Handling Attributes

Functions for Managing Backend Operations

Functions for Dealing with Controls

Functions for Syntax Plug-In

Functions for Managing Memory

Functions for Managing DNs

Functions for Managing Entries

Functions Related to Entry Flags

Functions for Dealing with Filters

Functions Specific to Extended Operation

Functions Specific to Bind Methods

Functions for Thread-Safe LDAP Connections

Functions for Logging

Functions for Handling Matching Rules

Functions for LDAPMod Manipulation

Functions for Monitoring Operations

Functions for Managing Parameter Block

Functions for Handling Passwords

Functions for Managing RDN

Functions for Managing Roles

Functions for Managing DNs

Functions for Sending Entries and Results to the Client

Functions Related to UTF-8

Functions for Handling Values

Functions for Handling Valueset

Functions Specific to Virtual Attribute Service

Functions for Managing Locks and Synchronization

Functions for Managing Computed Attributes

Functions for Manipulating Bits

Functions for Registering Object Extensions

Functions Related to Data Interoperability

Functions for Registering Additional Plug-Ins

Chapter 16   Parameter Block Reference

Parameters for Registering Plug-In Functions

Pre-Operation/Data Validation Plug-Ins

Post-Operation/Data Notification Plug-Ins

Matching Rule Plug-Ins

Entry Plug-Ins

Parameters Accessible to All Plug-Ins

Information About the Database

Information About the Connection

Information About the Operation

Information About Extended Operations

Information About the Transaction

Information About Access Control Lists

Notes in the Access Log

Information About the Plug-In

Types of Plug-Ins

Version Information

Information About Command-Line Arguments

Information About Attributes

Attribute Names

Attribute Flags

Attribute Comparisons

Information About Targets

Parameters for the Bind Function

Parameters for the Search Function

Parameters Passed to the Search Function

Parameters for Executing the Search

Parameters for the Search Results

Parameters that Return Data Types

Parameters that Convert Strings to Entries

Parameters for the Add Function

Parameters for the Compare Function

Parameters for the Delete Function

Parameters for the Modify Function

Parameters for the Modify RDN Function

Parameters for the Abandon Function

Parameters for the Matching Rule Function

Query Operators in Extensible Match Filters

Parameters for LDBM Backend Pre- and Post-Operation Functions

Pre-Operation Plug-Ins

Post-Operation Plug-Ins

Parameters for the Database

Information About the Database

Information About Operations

Information About Backend State Change

Parameters for LDAP Functions

Parameters for LDAP Operations

Parameters for LDAP Control

Parameters for Generating LDIF Strings

Parameters for Error Logging

Parameters for Filters

Parameters for Comparison Filters

Parameters for Filter Operations

Parameters for Password Storage

Password Storage Plug-Ins

Parameters for Password Storage

Parameters for Resource Limits

Parameter for Binder-Based Resource Limits

Status Codes for Resource Limits

Parameters for the Virtual Attribute Service

Glossary

Index



Index      DocHome      Next     

© 2001 Sun Microsystems, Inc. Portions copyright 1999, 2002-2003 Netscape Communications Corporation. All rights reserved.
Read the Full Copyright and Thrid-Party Acknowledgments.


Last Updated October 30, 2003