org.globus.wsrf.impl.security.util
Class PDPUtils

java.lang.Object
  extended byorg.globus.wsrf.impl.security.util.PDPUtils

public class PDPUtils
extends java.lang.Object

Collection of utility methods used by PDP based services


Field Summary
(package private) static org.apache.commons.logging.Log logger
           
 
Constructor Summary
PDPUtils()
           
 
Method Summary
static ServiceAuthorizationChain getContainerAuthzChain(java.lang.String authzChain, java.lang.String id)
           
static ServiceAuthorizationChain getServiceAuthzChain(PDPConfig config, java.lang.String id)
           
static ServiceAuthorizationChain getServiceAuthzChain(java.lang.String authzChain, java.lang.String servicePath)
           
static java.util.HashMap loadTrustedTargets(java.lang.String fileName)
          loads a map of trusted targets from a file in order to later be used by setTrustedTargets(javax.xml.rpc.Stub, java.util.HashMap).
static void setTrustedTargets(javax.xml.rpc.Stub stub, java.util.HashMap trustedTargets)
          sets a map of trusted targets (subject DN string should be both key and value of the map).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static org.apache.commons.logging.Log logger
Constructor Detail

PDPUtils

public PDPUtils()
Method Detail

setTrustedTargets

public static void setTrustedTargets(javax.xml.rpc.Stub stub,
                                     java.util.HashMap trustedTargets)
sets a map of trusted targets (subject DN string should be both key and value of the map). The map can be constructed from a configuration file using the loadTrustedTargets(java.lang.String) method.

Parameters:
stub - proxy object used to invoke the service
trustedTargets - (String, String) map of Subject DNs

loadTrustedTargets

public static java.util.HashMap loadTrustedTargets(java.lang.String fileName)
                                            throws java.lang.Exception
loads a map of trusted targets from a file in order to later be used by setTrustedTargets(javax.xml.rpc.Stub, java.util.HashMap). The map is a (String, String) tuple of keyed Subject DNs

Parameters:
fileName - file name containing a list of dn (one per row)
Returns:
map of Subject DNs
Throws:
java.lang.Exception

getServiceAuthzChain

public static ServiceAuthorizationChain getServiceAuthzChain(PDPConfig config,
                                                             java.lang.String id)
                                                      throws ConfigException
Throws:
ConfigException

getServiceAuthzChain

public static ServiceAuthorizationChain getServiceAuthzChain(java.lang.String authzChain,
                                                             java.lang.String servicePath)
                                                      throws ConfigException
Throws:
ConfigException

getContainerAuthzChain

public static ServiceAuthorizationChain getContainerAuthzChain(java.lang.String authzChain,
                                                               java.lang.String id)
                                                        throws ConfigException
Throws:
ConfigException