This file explains how to compile, deploy and configure the Authentication User ID Generation SPI Sample.
In the following sections, the PRODUCT_DIR setting depends on which platform you’re using:
Solaris Sparc/x86: PRODUCT_DIR = <install_root>/SUNWam
Linux: PRODUCT_DIR = <install_root>/sun/identity
The sample is located in the following directory:
Set the following environment variables.
These variables will be used to run the gmake command. You can also set these variables in the Makefile which is located in the following directory:
JAVA_HOME: Set this variable to your installation of JDK. The JDK should be version 1.3.1_06 or higher.
CLASSPATH: Set this variable to refer to am_services.jar which can be found in the <PRODUCT_DIR>/lib directory. Include jaas.jar in your classpath if you are using JDK version less than JDK1.4.
BASE_DIR: Set this variable to the directory where the Access Manager is installed.
BASE_CLASS_DIR: Set this variable to the directory where all the Sample compiled classes are located.
JAR_DIR: Set this variable to the directory where the JAR files of the Sample compiled classes will be created.
In the directory AccessManager-base /samples/authentication/spi/genuid, run the gmake command:
Copy UserIDGeneratorSample.jar from JAR_DIR to AccessManager-base/lib.
in the Web Container from which this sample has to run, update the classpath with UserIDGeneratorSample.jar.
On Sun ONE Web Server, go to server instance configurationdirectory:
On Sun ONE Application Server, in the directory <AS-home-dir>/domain/domain1/server1/config/ update server.xml with the new classpath.
For all other containers, consult the documentation that came with the product.
Restart web container.<WS-home-dir>/https-<WS-instance-name>/start
The Authentication User ID Generation Sample can be configured at the Organization level, and then used or invoked by the out-of-box Membership/Self- registration authentication module.
Log in to Access Manager console as amAdmin. Use the following URL:
Click the Identity Management tab, and select your organization.
From the View menu, select Services.
In the navigation frame, under Authentication, click Core.
Add the following to the Pluggable User Name Generator Class attribute: com.iplanet.am.samples.authentication.spi.genuid. UserIDGeneratorSample
Click Save to save the changes.
This module is the one which invokes the UserIDGenerator SPI implementation class. By default, only the Membership/Self-registration authentication module calls this SPI implementation.
Make sure that you have registered and enabled the Membership authentication module, and that you have created a template for the organization.
Enter the following URL:
If you choose to use an organization other than the default, be sure to specify that in the URL using the org parameter. Example: org=orgName
Click New User.
You should be able to register any existing username or user ID.
The UserIDGeneratorSample will be executed. You will be presented with the generated User IDs choice menu to choose any one username or user ID.
In the <install-root>\samples\authentication\spi\genuid directory, run the make command.
Copy UserIDGeneratorSample.jar from JAR_DIR to <install-root>\\lib
In the Web Container from which this sample has to run, update the classpath with UserIDGeneratorSample.jar.
Restart Access Manager.
Configuring the program on Windows 2000 is similar to configuring the program on Solaris. See Configuring the Authentication Post Processing SPI.