com.tivoli.pd.jazn.LRAdemo
Class LRTestDemo

java.lang.Object
  extended bycom.tivoli.pd.jazn.LRAdemo.LRTestDemo

public class LRTestDemo
extends java.lang.Object

This class is the engine of the LRADemo program. It executes the following tasks:

  1. Constructs the enviornment, server, objects, etc. in while the demo will run.
  2. Runs the demo program with various options: timing, credential cache on/off, etc.
  3. Tears down the envionment that was setup in step #1.

For this Demo it is assumed that the user has a Distinguishing name as follows: dn=user_LRADemo,ou=austin,o=ibm,c=us Note that a suffix of c=us is configured on the ldap server then a country object was defined (c=us), an organizational object (o=ibm), and then an organizational unit object(ou=austin). This default suffix can be changed by using the configuration panel's Default Suffix entry to fit whatever suffix the user has set up for his PDUsers or the ldap server can be configured as described to use the default.


Constructor Summary
LRTestDemo(LRAuthzDemo2 LRADemo)
           Configures a local and remote server..this results in properties files for each server.
 
Method Summary
 void runDemo(int reps, boolean disableCache, boolean meas_avg_time, boolean newPDPrincipal, boolean newPDAuthContext, java.lang.String localAppProp, java.lang.String remoteAppProp)
          This method runs the LRADemo
 void tearDown(LRAuthzDemo2 LRADemo)
          This method deletes all the objects, users, ACLs, POPs, and user created by the constructor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRTestDemo

public LRTestDemo(LRAuthzDemo2 LRADemo)
           throws tamdemoException
  1. Configures a local and remote server..this results in properties files for each server.
  2. Creates a PDContext from using local server's url and initializes PDAdmin operations (PDAdmin)
  3. Creates a PDUser using the name of the remote application. This user will be used for both local and remote access decisions.
  4. Creates group(s) depending on input criteria and adds the user to each group. This results in a more complex credential for the user. Note that the PDPrincipal which contains the credential will grow substantially as the groups are increased.
  5. Create object space and two objects
  6. Create ACL and POP and attach to object space
  7. Create Authzrule and attach to only the first object

Parameters:
LRADemo - Class that defines various public methods for fetching the configuration parameters entered on the LRAuthzDemo2 Frame. See doc on LRAuthzDemo2 for the public methods and what they provide.
Method Detail

tearDown

public void tearDown(LRAuthzDemo2 LRADemo)
This method deletes all the objects, users, ACLs, POPs, and user created by the constructor.

Parameters:
LRADemo - instance of LRAuthzDemo2. Parameters entered in the initial configuration dialog are access through this class's methods.

runDemo

public void runDemo(int reps,
                    boolean disableCache,
                    boolean meas_avg_time,
                    boolean newPDPrincipal,
                    boolean newPDAuthContext,
                    java.lang.String localAppProp,
                    java.lang.String remoteAppProp)
This method runs the LRADemo

The main activities that take place are:

  1. Modifies the properties files for both local and remote servers to reflect credential cache setting.
  2. Creates a PDAuthorizationContext from local and remote servers. operations (PDAdmin)
  3. Creates Permissions, four in all, one set of two for the local servers testing of the two objects, and another set for the remote server's use.
  4. Creates PDPrincipals, one for local and one for remote.
  5. Excutes the following the number of times pass in by repetition parameter
    • Test access to objects by user (local server). Both decisions should pass since Authzrules are not processed in local mode.
    • Test access to objects by user (remote server). Expect the first decision to fail since the rule says there should only be one request action not two. Second rule should pass since there is no AuthzRule on that object.
    • Allocates new PDPrincipals if parm set
    • Allocates new PDAuthorizationContext if parm newPDAuthContext true, will also by default allocate new PDPrincipals and PDPermissions since there is a new context.

Parameters:
reps - Number of times to execute access decisions
disableCache - Disable the credential cache
meas_avg_time - measure times for access decisions and PDPrincipal creation.
newPDPrincipal - create new PDPrincipals each time through the loop
newPDAuthContext - create new PDAuthorizationContexts for each iteration.
localAppProp - local apps properties file spec minus the "file:" prefix
remoteAppProp - remote apps properties file spec minus the "file:" prefix