gov.lanl.RAD.Impl
Class PolicyHolderEnforcer

java.lang.Object
  |
  +--gov.lanl.RAD.Impl.PolicyHolderEnforcer

public class PolicyHolderEnforcer
extends java.lang.Object

Maintains policies corresponding to policynames. It obtains the policies attached to an operation and the one attached to the specific resourceName Also contains logic to decide whether policies are satisfied by user attributes

Version:
$Id: PolicyHolderEnforcer.java,v 1.11 2002/05/01 22:54:47 dwforslund Exp $
Author:
Srikanth Kotha $Author: dwforslund $

Field Summary
 java.util.Hashtable Policies
          Hashtable containing the Policies attached to a resource Name
 
Constructor Summary
PolicyHolderEnforcer(java.lang.String policyFile)
          creates a new Hashtable to store policyname-policy pairs
 
Method Summary
 boolean access_allowed(java.util.Vector rights, java.lang.String resource_names, java.lang.String operation, java.lang.String policyName)
           
static void main(java.lang.String[] argv)
          used to test PolicyHolderEnforcer
 void readPolicies(java.lang.String fileName)
          Reads policyname-policy pairs from input file name and stores them in Hashtable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Policies

public java.util.Hashtable Policies
Hashtable containing the Policies attached to a resource Name

Constructor Detail

PolicyHolderEnforcer

public PolicyHolderEnforcer(java.lang.String policyFile)
creates a new Hashtable to store policyname-policy pairs

Method Detail

readPolicies

public void readPolicies(java.lang.String fileName)
Reads policyname-policy pairs from input file name and stores them in Hashtable

Parameters:
fileName - file containing policyname-policy pairs in XML format

access_allowed

public boolean access_allowed(java.util.Vector rights,
                              java.lang.String resource_names,
                              java.lang.String operation,
                              java.lang.String policyName)
Parameters:
rights - Vector containing effective rights of the user
resource_names - resource for which access decision is to be made
operation - states what the resource is going to be used for
policyName - determines which policy should be checked
Returns:
access decision

main

public static void main(java.lang.String[] argv)
used to test PolicyHolderEnforcer



Copyright © 2000 University of California. All Rights Reserved.