Access Manager provide Policy code samples to perform the following tasks:
Add a new service which has a policy schema to Access Manager
Develop and add custom developed subjects, referrals, and conditions to Access Manager
Develop and run Policy evaluation programs
Construct policies programmatically and add them to the policy store
Create policies using amadmin command
All the files you need to run the policy code samples are located in the following directories:
AccessManager-base/samples/policy
AccessManager-base/identity
Each of the following sections describes a sequence of steps you must take when using various means to run a policy evaluation program or to create policies. Each step in a sequence is linked to detailed instructions further down in this chapter.
Use this sequence to runs a policy evaluation program for the iPlanetAMWebAgentService service.
This sequence runs the evaluation program for iPlanetAMWebAgentService and the sample subject, condition, and referral implementations.
Compile the Policy code samples.
Develop custom subjects, conditions, and referrals.
Develop and run a Policy evaluation program.
This sequence runs the evaluation program for the SampleWebService.
Compile the Policy code samples.
Add a Policy-enabled service to Access Manager.
Create policies for the new service.
Develop and run a Policy evaluation program.
This sequence runs the evaluation program forSampleWebService and the sample subject, condition, and referral implementations.
Compile the Policy code samples.
Add a Policy-enabled service to Access Manager.
Develop custom subjects, conditions, and referrals.
Create policies for the new service.
Develop and run a Policy evaluation program.
Use amadmin to create policies for the service. See Creating Policies in Sun Java System Access Manager 7 2005Q4 Administration Guide for detailed instructions.
This sequences creates policies for SampleWebService.
This sequence constructs policies and adds them to the policy store.