issrg.simplePERMIS
Class SimplePERMISPolicyFinder

java.lang.Object
  extended by issrg.pba.rbac.PolicyFinder
      extended by issrg.simplePERMIS.SimplePERMISPolicyFinder
Direct Known Subclasses:
ManagedSimplePERMISPolicyFinder, SimpleDISRAPandParser

public class SimplePERMISPolicyFinder
extends PolicyFinder

This class implements the PolicyFinder interface, and provides loading a policy from a plain text XML file.

Author:
Romain & Gansen, sfl

Field Summary
 
Fields inherited from class issrg.pba.rbac.PolicyFinder
accessPolicy, allocationPolicy, authzTokenRepository, filepath, msodPolicySet, parsedPolicy, policyOID, satLevel, sawsServer, soa, sv, tokenParser
 
Constructor Summary
SimplePERMISPolicyFinder(java.io.File file)
          Deprecated. 
SimplePERMISPolicyFinder(java.io.File file, java.security.Principal soa)
          Creates a new instance of SimplePERMISPolicyFinder based on the specified file and the given Source of Authority.
SimplePERMISPolicyFinder(java.io.File file, java.security.Principal soa, int satLevel)
          Constructs a new instance of a SimplePERMISPolicyFinder based on the given file, the policy writer and the level of logging required for SAWS.
SimplePERMISPolicyFinder(java.lang.String xmlPolicy, java.security.Principal soa)
          Creates a new instance of SimplePERMISPolicyFinder based on the specified policy and the given Source of Authority.
SimplePERMISPolicyFinder(java.lang.String xmlPolicy, java.security.Principal soa, int satLevel)
          Creates a new instance of SimplePERMISPolicyFinder based on the specified policy and the given Source of Authority.
 
Method Summary
protected  void initFromString(java.lang.String xmlPolicy, int satLevel)
          Helper method to create the SimplePERMISPolicyFinder from a string object containing the policy.
 
Methods inherited from class issrg.pba.rbac.PolicyFinder
getAccessPolicy, getAllocationPolicy, getfilepath, getMSoDPolicy, getParsedPolicy, getPolicyOID, getRepository, getSATLevel, getSAWSServer, getSOA, getSV, removeSystemTag, SAWSCloseLog, setSV
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePERMISPolicyFinder

public SimplePERMISPolicyFinder(java.lang.String xmlPolicy,
                                java.security.Principal soa)
                         throws PbaException
Creates a new instance of SimplePERMISPolicyFinder based on the specified policy and the given Source of Authority.

Parameters:
xmlPolicy - a string containing the XML policy
soa - a Principal representing the Source of Authority for this policy
Throws:
PbaException

SimplePERMISPolicyFinder

public SimplePERMISPolicyFinder(java.lang.String xmlPolicy,
                                java.security.Principal soa,
                                int satLevel)
                         throws PbaException
Creates a new instance of SimplePERMISPolicyFinder based on the specified policy and the given Source of Authority.

Parameters:
xmlPolicy - a string containing the XML policy
soa - a Principal representing the Source of Authority for this policy
satLevel - the logging level required for SAWS logging
Throws:
PbaException

SimplePERMISPolicyFinder

@Deprecated
public SimplePERMISPolicyFinder(java.io.File file)
                         throws java.io.IOException,
                                PbaException
Deprecated. 

Creates a new instance of SimplePERMISPolicyFinder based on the specified file. In this case a default source of authority will be used.

Parameters:
file - A File object from which the policy will be read.
Throws:
java.io.IOException - when the file could not be read
PbaException - when the policy could not be parsed

SimplePERMISPolicyFinder

public SimplePERMISPolicyFinder(java.io.File file,
                                java.security.Principal soa)
                         throws java.io.IOException,
                                PbaException
Creates a new instance of SimplePERMISPolicyFinder based on the specified file and the given Source of Authority.

Parameters:
file - A File object from which the policy will be read.
soa - a Principal representing the Source of Authority
Throws:
java.io.IOException - when the file could not be read
PbaException - when the policy could not be parsed

SimplePERMISPolicyFinder

public SimplePERMISPolicyFinder(java.io.File file,
                                java.security.Principal soa,
                                int satLevel)
                         throws java.io.IOException,
                                PbaException
Constructs a new instance of a SimplePERMISPolicyFinder based on the given file, the policy writer and the level of logging required for SAWS.

Parameters:
file - contains the policy
soa - a Principal representing the policy writer
satLevel - the level of logging required for SAWS. Should be one of the constants specified in SAWSLogLevelConstant.
Throws:
java.io.IOException - when the file could not be read
PbaException - when the policy could not be parsed
See Also:
SAWSLogLevelConstant
Method Detail

initFromString

protected void initFromString(java.lang.String xmlPolicy,
                              int satLevel)
                       throws PbaException
Helper method to create the SimplePERMISPolicyFinder from a string object containing the policy.

Parameters:
xmlPolicy - a string containing the policy
satLevel - the desired level for logging to SAWS.
Throws:
PbaException - when the policy could not be parsed
java.lang.Throwable - when something goes wrong