Sample user mapping plug-in (Java programming language)
The sample Java™ plug-in retrieves user mapping entries from an LDAP server. To use the plug-in in your environment, modify the sample plug-in to match the settings that your LDAP server uses.
The files for the plug-in are in the sqllib/samples/federated/umplugin/ldap/ directory. The following table describes each file. Before you modify the files, copy them to an empty working directory. Then work with the copies.
| File name | Description |
|---|---|
| README.txt | This file contains a condensed version of the instructions and documentation for testing and using the sample plug-in. |
| UserMappingCryptoLDAP.java | This Java class contains the code that implements the security measures for encrypting, decrypting, encoding, and decoding the user mappings that are retrieved from the LDAP server. You must modify this file so that it works with your LDAP server. |
| UserMappingSetupLDAP.java | This Java class creates the configuration file that stores LDAP connection information and other configuration parameters, including: IP address or host name, SSL or non-SSL, user ID, and password. |
| UserMappingRepositoryLDAP.java | This Java class contains the code for connecting, disconnecting, and fetching user mappings from the LDAP server. The code for this file uses the schema that is defined in the schema.ldif file. If you change the schema, you must also change a section in this file. |
| UserMappingLookupLDAP.java | This Java class contains the code to perform an LDAP lookup test. Use this file to test your plug-in outside of the federated server. Then test the plug-in on the federated server. |
| schema.ldif | This file is loaded into the LDAP server to define the schema. The LDIF file contains objects and attributes that are added to the LDAP server. |
| entry.ldif | The entry.ldif file adds user entries to the LDAP server. The user entries use the objects and attributes from the schema.ldif file to store the user mappings. |