Sun ONE Directory Server 5.2 Plug-In API Programming Guide |
ContentsPurpose of This Guide
Prerequisites
Typographical Conventions
Default Paths and Filenames
Downloading Directory Server Tools
Suggested Reading
Chapter 1 Before You StartWhen to Implement a Server Plug-In
Enhancing Server Capabilities
How Plug-Ins Interact With the Server
Maintaining Plug-Ins
Sun Professional Services
Example Uses
Where to Go From Here
Prepare Your Development Environment
Learn About Plug-In Development
Upgrade Existing Plug-Ins
Try a Sample Plug-In
Find Details
Chapter 2 What's NewDeprecated and Changed Features
Handling Deprecation
New Features
Registering Plug-Ins
Function Parameters
Data Types
Plug-In Types
Access Control
Attributes
Controls
Entries
Error Codes
Extended Operations
Filters
Internal Operations
Logging
Parameter Block Arguments
Password Handling
SASL Binds
Plug-In API Version 3
Plug-In Types
Plug-In Configuration Entries
Use of NSPR 4.x
Attributes
Backends
Controls
Data Structures
Distinguished Names (DNs)
Entries
Filters
Internal Operations
Memory Management
Modification Structures
Object Extensions
Operations
Parameter Block Arguments
Relative Distinguished Names (RDNs)
UTF8 Encoding
Values
Value Sets
Virtual Attributes
Chapter 3 Getting Started With Directory Server Plug-InsAn Example Plug-In
Find the Code
Writing Directory Server Plug-Ins
Review the Plug-In
Build It
Plug It In
Include the Header File for the Plug-In API
Building Directory Server Plug-Ins
Write Your Plug-In Functions
Use Appropriate Return Codes
Write an Initialization Function
Set Configuration Information Through the Parameter Block
Set Pointers to Functions Through the Parameter Block
Where to Find Examples
Include the Header File for the Plug-In API
Plugging Libraries into Directory Server
Link the Plug-In as a Shared Object or Dynamic Link Library
Where to Find Examples
Create a Configuration Entry for Your Plug-In
Logging Plug-In Messages
Modify the Directory Server Configuration
Restart Directory Server
Three Levels of Message Severity
Set Appropriate Log Level in the Directory Server Configuration
Find Messages in the Log
Chapter 4 Working with EntriesCreating Entries
New Entries
Converting To and From LDIF Representations
Copies of Entries
Getting Entry Attributes and Attribute Values
Adding and Removing Attribute Values
Verifying Schema Compliance for an Entry
Handling Entry Distinguished Names (DNs)
Chapter 5 Extending Client Request HandlingPre-Operation and Post-Operation Plug-Ins
Pre-Operation Plug-Ins
Extending the Bind Operation
Post-Operation Plug-Ins
Registration Identifiers
Finding Examples
Setting Up an Example Suffix
Extending the Search Operation
Logging the Authentication Method
Registering the Plug-In
Generating a Bind Log Message
Logging Who Requests a Search
Extending the Compare Operation
Breaking Down a Search Filter
Extending the Add Operation
Prepending a String to an Attribute
Extending the Modify Operation
Logging the Entry to Add
Extending the Rename Operation
Extending the Delete Operation
Intercepting Information Sent to the Client
Chapter 6 Handling AuthenticationHow Authentication Works
Support for Standard Methods
How a Plug-In Can Modify Authentication
Identifying Clients During the Bind
Bind Processing in Directory Server
Bypassing Authentication
Developing a Simple Authentication Plug-In
Using Custom SASL Mechanisms
Finding the Example
Developing a SASL Authentication Plug-In
Seeing It Work
Finding Examples
Registering the SASL Mechanism
Developing the Client
Trying It Out
Chapter 7 Performing Internal Operations
Finding the Example
Before Using the Example
Using Internal Operations
When to Use Internal Operations
Internal Add
Caveats
Internal Modify
Internal Rename (Modify RDN)
Internal Search
Internal Delete
Chapter 8 Writing Entry Store and Entry Fetch Plug-InsCalling Entry Store and Entry Fetch Plug-Ins
An LDIF String, Not a Parameter Block
Writing a Plug-In to Encrypt Entries
On Windows Platforms
Finding the Examples
Trying It Out
Chapter 9 Writing Extended Operation Plug-InsCalling Extended Operation Plug-Ins
Implementing an Extended Operation Plug-In
Finding the Examples
An Example Plug-In
Developing the Client
Trying It Out
Chapter 10 Writing Matching Rule Plug-InsHow Matching Rule Plug-Ins Work
What a Matching Rule Is
An Example Matching Rule Plug-in
Requesting a Matching Rule
What a Matching Rule Plug-In Does
Matching Rule Plug-In Configuration Entry
Handling Extensible Match Filters
Registering Matching Rule Plug-Ins
Filter Matching Function
Indexing Entries According to a Matching Rule
Filter Index Function
Filter Factory Function
Filter Object Destructor
How Directory Server Handles the Index
Enabling Sorting According to a Matching Rule
Indexer Function
Indexer Factory Function
Indexer Object Destructor
Handling an Unknown Matching Rule
Internal List of Correspondences
OIDs Not in the Internal List
Chapter 11 Writing Password Storage Scheme Plug-InsCalling Password Storage Scheme Plug-Ins
Two Types
Writing a Password Storage Scheme Plug-In
Pre-Installed Schemes
Affects Password Attribute Values
Invoked for Add and Modify Requests
Invoked for Bind Requests
Part of a Password Policy
Encoding a Password
Comparing a Password
Registering the Plug-In
Creating a Configuration Entry
Trying It Out