Sun Java System Access Manager 7 2005Q4 Developer's Guide

Running the LoginModule Sample Program

This sections provides instructions for running the login module on Solaris and on Windows platforms.

ProcedureTo Run the LoginModule on Solaris

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

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

  2. Click Identity Management, and in the Identity Management view select your organization.

  3. From the View menu, select Services.

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

  5. SelectLoginModuleSample to add it to the list of highlighted modules in Organization Authentication Modules.

    Make sure LDAP module is also selected. If not selected, you will not be able to login to Access Manager Console. You can use Control + mouse click to add additional modules.

  6. Click Save.

  7. Log out.

  8. Enter the following URL:

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

    If you choose to use an organization other than the default, be sure to specify that in the URL using the org parameter.

ProcedureTo Run the Login Module on Windows 2000

  1. Set the following environment variables. These variables will be used to run the make command. You can also set these variables in the Makefile.

    This Makefile is in the same directory as the Login Module Sample program files: AccessManager-base\samples\authentication\spi\providers

    JAVA_HOME: Set this variable to your installation of JDK. The JDK should be version 1.3.1_06 or higher.

    BASE: Set this variable to base-directory

    CLASSPATH: Set this variable to refer to am_services.jar which can be found in the base-directory\lib directory. Include jaas.jar in your classpath if you are using JDK version less than JDK1.4

    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 base-directory\samples\authentication\spi\providers directory, run the make command.

ProcedureTo Deploy the Login Module

  1. Copy LoginModuleSample.jar from JAR_DIR to AccessManager-base\web-src\services\WEB-INF\lib

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

  3. Update server.xml with the new classpath and server.xml locations:

    • Sun Java System Web Server : <WS-install-dir>\https-<WS-instance-name>\config\server.xml

    • Sun Java System Application Server: <AS-install-dir>\domain<appserver domain><appserver_instance>\config\server.xml

      Example:<AS-install-dir>\domain\domain1\server1\config\server.xml

  4. Copy LoginModuleSample.xml from base-directory \samples\authentication\spi\providers to base-directory\web-src\services\config\auth\default.

  5. Restart the web container

    Web Server: <WS-home-dir>\https-<WS-instance-name>\restart

    Application Server: AppServer-home-dir>\domains\<domain name><server_instance>\bin\restartserv