Sun Java System Access Manager 7.1 Developer's Guide

ProcedureTo Add a Sample Implementation to the Policy Framework

  1. Use dscfg to back up iPlanetAMPolicy and iPlanetAMPolicyConfig services.


    # cd DirectoryServer-base/ds6/bin 
    # ./dscfg export 
    -s "ou=iPlanetAMPolicyService,ou=services,root_suffix" output_file
    # ./dscfg export
    -s "ou=iPlanetAMPolicyConfigService,ou=services,root_suffix" output_file
     
    
  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.

    On HP-UX, add /opt/sun/private/lib to SHLIB_PATH.

  3. Run the following commands:


    # cd AccessManager-base/samples/policy
          AccessManager-base/bin/amadmin
    --runasdn "uid=amAdmin,ou=People,default_org,root_suffix
    --password password
    --schema amPolicy_mod.xml
          AccessManager-base/bin/amadmin
    --runasdn "uid=amAdmin,ou=People,default_org,root_suffix
    --password password 
    --data amPolicyConfig_mod.xml
  4. Change the properties files of the iPlanetAMPolicy and iPlanetAMPolicyConfig services to add messages related to the new implementations.


    # cd AccessManager-base/locale
          cp amPolicy.properties amPolicy.properties.orig
          cp amPolicy_en.properties amPolicy_en.properties.orig
          cp amPolicyConfig.properties amPolicyConfig.properties.orig
          cp amPolicyConfig_en.properties amPolicyConfig_en.properties.orig
          cat <BASE_DIR>/samples/policy/amPolicy.properties  >> 
              <BASE_DIR>/locale/amPolicy.properties
          cat <BASE_DIR>/samples/policy/amPolicy_en.properties >>  
              <BASE_DIR>/locale/amPolicy_en.properties
          cat <BASE_DIR>/samples/policy/amPolicyConfig.properties  >> 
              <BASE_DIR>/locale/amPolicyConfig.properties
          cat <BASE_DIR>/samples/policy/amPolicyConfig_en.properties >> 
              <BASE_DIR>/locale/amPolicyConfig_en.properties
  5. Deploy the sample plug-ins.

    Copy SampleSubject.class , SampleCondition.class, SampleResponseProvider.class, SampleReferral.class from the /samples/policy directory to AccessManager-base/lib .

  6. Restart the Access Manager server.

    The sample subject, condition, response provider, and referral implementations are now available for policy definitions through the administration console or amadmin tool.