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

ProcedureTo Run the Sample Program PolicyCreator.java

  1. Compile the sample code.

    See Compiling the Policy Code Samples above.

  2. Set the environment variable LD_LIBRARY_PATH.

    On Solaris add /usr/lib/mps/secv1 to LD_LIBRARY_PATH.

    On Linux add /opt/sun/private/lib to LD_LIBRARY_PATH .

  3. Use the administration console to create the following objects in your root realm:

    • A subrealm named realm1

    • A user nameduser1

    • A group named group1

    • A role named role1

    See Managing Directory Objects in Sun Java System Access Manager 7 2005Q4 Administration Guide for information about creating directory objects.

  4. Set the following properties in the PolicyEvaluation.properties file:

    pe.realmname

    DN of the root realm.

    pe.username

    UserId to authenticate as.

    pe.password

    Password to use to authenticate.

  5. Run the gmake command.

    gmake createPolicies .

    Use the administration console to verify that the policies policy1 and refpolicy1 are added to Access Manager.