Sun Java System Access Manager 7.1 Developer's Guide

ProcedureTo Run the Sample on Solaris Sparc x86 or Linux:

  1. In the Makefile, set the following variables:

    BASE: Enter the path to the directory where Access manager is installed.

    JAVA_HOME: Enter the path to the directory where Java compiler is installed

    CONFIG: Enter the entry specified in the login configuration file. This entry will be used to do the user authentication

  2. Copy AMConfig.properties from Access Manager server installation machine location <CONFIG_DIR> to the client machine where the sample will be run.

  3. On the client machine, be sure the following are in your classpath:

    • am_services.jar

    • jaas.jar

    • jss3.jar

    • AMConfig.properties

      Include jaas.jar in your classpath if you are using a JDK version less than JDK1.4

  4. A sample configuration file purejaassample.config is provided for testing this sample.

    The file contains only one entry named Sample. Sample is the name to be entered for CONFIG in the Makefile:


    Sample {
     PureJAASSampleLoginModule required ORG_NAME="dc=iplanet,dc=com"
    			INDEX_NAME="LDAP" debug=true;
     };                     

    The entry specifies that the LoginModule to be used to do the user authentication is the PureJAASSampleLoginModule and that this SampleLoginModule must succeed in order for authentication to be considered successful. It passes options with ORG_NAME as the organization name and INDEX_NAME as the Access Manager authentication module to which this sample must authenticate.

    If you must use a different login configuration, modify the Makefile. For example, change the following:

    -Djava.security.auth.login.config=purejaassample.config

    to this:

    -Djava.security.auth.login.config=your_jaas_config_file.config
    
  5. To compile, run the gmake command.

  6. To run the sample program run the gmake run command.