Sun Java System Access Manager 7.1 Developer's Guide

Generating an Authentication User ID

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

ProcedureTo Compile the UserIDGeneratorSample on Solaris Sparc/x86, Linux

The sample is located in the following directory:

AccessManager-base/samples/authentication/spi/genuid

  1. 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:

    AccessManager-base/samples/authentication/spi/genuid

    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.

  2. In the directory AccessManager-base /samples/authentication/spi/genuid, run the gmake command:

ProcedureTo Deploy the UserIDGeneratorSample Program

  1. Copy UserIDGeneratorSample.jar from JAR_DIR to AccessManager-base/lib.

  2. 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:

      <WS-home-dir>/https-<WS-instance-name>/config/

    • 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.

  3. Restart web container.<WS-home-dir>/https-<WS-instance-name>/start

    <AS-home-dir>/domains/domain1/server1/bin/start

Configuring the UserIDGeneratorSample Program

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.

ProcedureTo Configure UserIDGeneratorSample for an Organization

  1. Log in to Access Manager console as amAdmin. Use the following URL:

    http://host.domain:port/Console-Deploy-URI

  2. Click the Identity Management tab, and select your organization.

  3. From the View menu, select Services.

  4. In the navigation frame, under Authentication, click Core.

  5. Add the following to the Pluggable User Name Generator Class attribute: com.iplanet.am.samples.authentication.spi.genuid. UserIDGeneratorSample

  6. Click Save to save the changes.

  7. Log out.

ProcedureTo Access an Authentication Module for an Organization

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.

  1. Make sure that you have registered and enabled the Membership authentication module, and that you have created a template for the organization.

  2. Enter the following URL:

    http://host.domain:port/Service-Deploy-URI/UI/Login?module=Membership

    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

  3. 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.

Compiling the UserIDGeneratorSample Program on Windows 2000

In the <install-root>\samples\authentication\spi\genuid directory, run the make command.

ProcedureTo deploy the UserIDGeneratorSample Program

  1. Copy UserIDGeneratorSample.jar from JAR_DIR to <install-root>\\lib

  2. In the Web Container from which this sample has to run, update the classpath with UserIDGeneratorSample.jar.

  3. Restart Access Manager.

    <install-root>\bin\amserver start

To Configure the UserIDGeneratorSample Program

Configuring the program on Windows 2000 is similar to configuring the program on Solaris. See Configuring the Authentication Post Processing SPI.