HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
8 Defining functions for authentication.....................................................................69
8.1 Understanding authentication methods....................................................................................69
8.2 How the Directory Server identifies clients...............................................................................69
8.3 How the authentication process works......................................................................................69
8.4 Writing your own authentication plug-in..................................................................................71
8.5 Writing a preoperation bind plug-in..........................................................................................71
8.5.1 Defining your authentication function..............................................................................72
8.5.1.1 Getting and checking the bind parameters................................................................73
8.5.1.2 Getting the entry and checking the credentials.........................................................73
8.5.1.3 What to do if authentication fails..............................................................................74
8.5.1.4 What to do if authentication succeeds.......................................................................74
8.5.2 Registering the SASL mechanism......................................................................................75
8.5.3 Example of a preoperation bind plug-in............................................................................75
8.5.3.1 Example of a preoperation bind function..................................................................75
8.5.3.2 Example of an initialization function ........................................................................77
8.5.3.3 Registering the plug-in..............................................................................................78
8.6 Using SASL with an LDAP client..............................................................................................78
9 Writing entry store/fetch plug-ins..........................................................................81
9.1 How entry store/fetch plug-ins work.........................................................................................81
9.2 Writing entry store/fetch functions............................................................................................81
9.3 Registering entry store/fetch functions......................................................................................82
10 Writing extended operation plug-ins...................................................................83
10.1 How extended operation plug-ins work..................................................................................83
10.2 Writing extended operation functions.....................................................................................83
10.3 Registering extended operation functions...............................................................................84
10.4 Specifying start and close functions.........................................................................................85
11 Writing matching rule plug-ins.............................................................................87
11.1 Understanding matching rules................................................................................................87
11.1.1 Extensible match filters....................................................................................................87
11.1.2 Extensible match filters in the Directory Server..............................................................87
11.2 Understanding matching rule plug-ins...................................................................................88
11.2.1 Functions defined in matching rule plug-ins...................................................................88
11.2.2 How matching rules are identified..................................................................................88
11.2.3 How the server associates plug-ins with OIDs................................................................89
11.2.3.1 Finding a plug-in for indexing ................................................................................89
11.2.3.2 Finding a plug-in for searching...............................................................................89
11.2.4 How the server uses parameter blocks............................................................................90
11.3 Indexing based on matching rules...........................................................................................90
11.3.1 How the server sets up the index.....................................................................................90
11.3.2 How the server updates the index...................................................................................90
11.3.3 Writing the indexer factory function................................................................................91
11.3.4 Getting and setting parameters in indexer factory functions..........................................91
11.3.5 Writing the indexer function............................................................................................92
11.3.6 Getting and setting parameters in indexer functions......................................................93
11.4 Handling extensible match filters............................................................................................93
11.4.1 How the server handles the filter.....................................................................................93
11.4.2 Query operators in matching rules..................................................................................94
11.4.3 Writing a filter factory function.......................................................................................95
11.4.4 Getting and setting parameters in filter factory functions...............................................95
Table of Contents 5