org.globus.wsrf.impl.security.descriptor
Class ServiceSecurityDescriptor

java.lang.Object
  extended by org.globus.wsrf.impl.security.descriptor.SecurityDescriptor
      extended by org.globus.wsrf.impl.security.descriptor.ServiceSecurityDescriptor
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ResourceSecurityDescriptor

public class ServiceSecurityDescriptor
extends SecurityDescriptor

Represents a service security descriptor.

See Also:
Serialized Form

Field Summary
private static int BOOTSTRAP_PIP
           
private  java.util.Vector defaultAuthMethods
           
private  RunAsValueType defaultRunAs
           
(package private)  ServiceSecurityConfig desc
           
private  java.lang.String descriptorFilename
           
private static org.apache.commons.logging.Log logger
           
private  java.util.Map methodAuthMethods
           
private  java.util.Map methodRunAsTypes
           
private static int PDP
           
private static int PIP
           
 
Fields inherited from class org.globus.wsrf.impl.security.descriptor.SecurityDescriptor
authzEngine, bootstrapOverwrite, CERT_ENV_VARIABLE, i18n, KEY_ENV_VARIABLE, lastModified, PROXY_ENV_VARIABLE, RESOURCE, subject
 
Constructor Summary
ServiceSecurityDescriptor()
           
ServiceSecurityDescriptor(java.lang.String servicePath, org.xml.sax.InputSource inp)
           
ServiceSecurityDescriptor(java.lang.String servicePath, ServiceSecurityConfig desc_)
           
ServiceSecurityDescriptor(java.lang.String servicePath, java.lang.String filename)
           
 
Method Summary
 void addBootstrapPIP(java.lang.String chainName, java.lang.String[] pipNames, java.util.HashMap params)
           
 void addPDP(java.lang.String chainName, java.lang.String[] pdpNames, java.util.HashMap params)
           
 void addPIP(java.lang.String chainName, java.lang.String[] pipNames, java.util.HashMap params)
           
private static java.util.Vector getAuthMethods(AuthMethodType authMethodType)
           
 java.util.Vector getAuthMethods(javax.xml.namespace.QName methodName)
           
 java.util.Vector getAuthMethods(java.lang.String methodName)
           
static java.lang.String[] getCertKeyFileName(ServiceSecurityConfig desc)
          Returns the certificate and key file name configured.
 java.lang.Integer getContextLifetime()
           
 java.util.Vector getDefaultAuthMethods()
           
 org.globus.security.gridmap.GridMap getDefaultGridMap()
           
 RunAsValueType getDefaultRunAs()
           
 java.util.Map getMethodAuthMethod()
           
 java.util.Map getMethodRunAs()
           
static java.lang.String getProxyFileName(ServiceSecurityConfig desc)
           
 java.lang.Boolean getRejectLimitedProxy()
           
 java.lang.Boolean getReplayAttackFilter()
           
 java.lang.Integer getReplayAttackWindow()
           
static java.lang.String getRequiredAuthMethodsErrorMessage(java.util.Vector methods, javax.xml.namespace.QName opQName)
           
 RunAsValueType getRunAsType(javax.xml.namespace.QName methodQName)
           
 RunAsValueType getRunAsType(java.lang.String methodName)
           
 ServiceSecurityConfig getSecurityDescriptor()
           
protected  void initAuthenticationConfig()
           
protected  void initAuthorizationConfig(java.lang.String servicePath, java.util.HashMap params)
           
 void initialize(java.lang.String servicePath)
           
private  void initialize(java.lang.String servicePath, ServiceSecurityConfig desc_)
           
 boolean isRefreshRequired()
           
protected  java.lang.Long loadCredential(boolean load)
           
protected  void loadCredentials()
           
private  Interceptor[] mergeInterceptor(Interceptor[] inter, Interceptor[] newInterceptors)
           
private static InterceptorConfig[] parseInterceptors(Interceptor[] interceptor, java.util.HashMap parameters)
           
 void setAuthMethods(javax.xml.namespace.QName methodName, java.util.Vector vector)
           
 void setAuthMethods(java.lang.String methodName, java.util.Vector vector)
           
 void setBootstrapPIP(java.lang.String chainName, java.lang.String[] pipNames, boolean overwriteDefault, java.util.HashMap params)
           
 void setDefaultAuthMethods(java.util.Vector vector)
           
 void setDefaultGridMap(org.globus.security.gridmap.GridMap gridMap)
           
 void setDefaultRunAs(RunAsValueType value)
           
private  void setInterceptors(java.lang.String chainName, java.lang.String[] interceptorNames, int type, boolean bootstrapOverwrite, boolean overwrite, java.util.HashMap params)
           
private  void setInterceptors(java.lang.String chainName, java.lang.String[] interceptorNames, int type, boolean overwrite, java.util.HashMap params)
           
 void setMethodAuthMethod(java.util.Map map)
           
 void setMethodRunAs(java.util.Map map)
           
 void setPDP(java.lang.String chainName, java.lang.String[] pdpNames, java.util.HashMap params)
           
 void setPIP(java.lang.String chainName, java.lang.String[] pipNames, java.util.HashMap params)
           
 void setRunAsType(javax.xml.namespace.QName methodQName, RunAsValueType runas)
           
 void setRunAsType(java.lang.String methodName, RunAsValueType runas)
           
 
Methods inherited from class org.globus.wsrf.impl.security.descriptor.SecurityDescriptor
getAuthzEngine, getLastModified, getSubject, isBootstrapOverwrite, refresh, setAuthzEngine, setBootstrapOverwrite, setLastModified, setSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOTSTRAP_PIP

private static int BOOTSTRAP_PIP

PIP

private static int PIP

PDP

private static int PDP

logger

private static org.apache.commons.logging.Log logger

defaultAuthMethods

private java.util.Vector defaultAuthMethods

defaultRunAs

private RunAsValueType defaultRunAs

methodRunAsTypes

private java.util.Map methodRunAsTypes

methodAuthMethods

private java.util.Map methodAuthMethods

descriptorFilename

private java.lang.String descriptorFilename

desc

ServiceSecurityConfig desc
Constructor Detail

ServiceSecurityDescriptor

public ServiceSecurityDescriptor()

ServiceSecurityDescriptor

public ServiceSecurityDescriptor(java.lang.String servicePath,
                                 java.lang.String filename)
                          throws ConfigException
Throws:
ConfigException

ServiceSecurityDescriptor

public ServiceSecurityDescriptor(java.lang.String servicePath,
                                 org.xml.sax.InputSource inp)
                          throws ConfigException
Throws:
ConfigException

ServiceSecurityDescriptor

public ServiceSecurityDescriptor(java.lang.String servicePath,
                                 ServiceSecurityConfig desc_)
                          throws ConfigException
Throws:
ConfigException
Method Detail

initialize

private void initialize(java.lang.String servicePath,
                        ServiceSecurityConfig desc_)
                 throws ConfigException
Throws:
ConfigException

getSecurityDescriptor

public ServiceSecurityConfig getSecurityDescriptor()

setDefaultAuthMethods

public void setDefaultAuthMethods(java.util.Vector vector)

getDefaultAuthMethods

public java.util.Vector getDefaultAuthMethods()

setDefaultRunAs

public void setDefaultRunAs(RunAsValueType value)

getDefaultRunAs

public RunAsValueType getDefaultRunAs()

setAuthMethods

public void setAuthMethods(java.lang.String methodName,
                           java.util.Vector vector)

setAuthMethods

public void setAuthMethods(javax.xml.namespace.QName methodName,
                           java.util.Vector vector)

getAuthMethods

public java.util.Vector getAuthMethods(java.lang.String methodName)

getAuthMethods

public java.util.Vector getAuthMethods(javax.xml.namespace.QName methodName)

getRunAsType

public RunAsValueType getRunAsType(javax.xml.namespace.QName methodQName)

getRunAsType

public RunAsValueType getRunAsType(java.lang.String methodName)

setRunAsType

public void setRunAsType(java.lang.String methodName,
                         RunAsValueType runas)

setRunAsType

public void setRunAsType(javax.xml.namespace.QName methodQName,
                         RunAsValueType runas)

setMethodAuthMethod

public void setMethodAuthMethod(java.util.Map map)

getMethodAuthMethod

public java.util.Map getMethodAuthMethod()

setMethodRunAs

public void setMethodRunAs(java.util.Map map)

getMethodRunAs

public java.util.Map getMethodRunAs()

getReplayAttackWindow

public java.lang.Integer getReplayAttackWindow()

getReplayAttackFilter

public java.lang.Boolean getReplayAttackFilter()

getRejectLimitedProxy

public java.lang.Boolean getRejectLimitedProxy()

getContextLifetime

public java.lang.Integer getContextLifetime()

getDefaultGridMap

public org.globus.security.gridmap.GridMap getDefaultGridMap()
                                                      throws ConfigException
Throws:
ConfigException

setDefaultGridMap

public void setDefaultGridMap(org.globus.security.gridmap.GridMap gridMap)
                       throws ConfigException
Throws:
ConfigException

setPDP

public void setPDP(java.lang.String chainName,
                   java.lang.String[] pdpNames,
                   java.util.HashMap params)
            throws ConfigException
Throws:
ConfigException

setPIP

public void setPIP(java.lang.String chainName,
                   java.lang.String[] pipNames,
                   java.util.HashMap params)
            throws ConfigException
Throws:
ConfigException

setBootstrapPIP

public void setBootstrapPIP(java.lang.String chainName,
                            java.lang.String[] pipNames,
                            boolean overwriteDefault,
                            java.util.HashMap params)
                     throws ConfigException
Throws:
ConfigException

addPDP

public void addPDP(java.lang.String chainName,
                   java.lang.String[] pdpNames,
                   java.util.HashMap params)
            throws ConfigException
Throws:
ConfigException

addPIP

public void addPIP(java.lang.String chainName,
                   java.lang.String[] pipNames,
                   java.util.HashMap params)
            throws ConfigException
Throws:
ConfigException

addBootstrapPIP

public void addBootstrapPIP(java.lang.String chainName,
                            java.lang.String[] pipNames,
                            java.util.HashMap params)
                     throws ConfigException
Throws:
ConfigException

setInterceptors

private void setInterceptors(java.lang.String chainName,
                             java.lang.String[] interceptorNames,
                             int type,
                             boolean overwrite,
                             java.util.HashMap params)
                      throws ConfigException
Throws:
ConfigException

setInterceptors

private void setInterceptors(java.lang.String chainName,
                             java.lang.String[] interceptorNames,
                             int type,
                             boolean bootstrapOverwrite,
                             boolean overwrite,
                             java.util.HashMap params)
                      throws ConfigException
Throws:
ConfigException

mergeInterceptor

private Interceptor[] mergeInterceptor(Interceptor[] inter,
                                       Interceptor[] newInterceptors)

isRefreshRequired

public boolean isRefreshRequired()
                          throws ConfigException
Specified by:
isRefreshRequired in class SecurityDescriptor
Throws:
ConfigException

getRequiredAuthMethodsErrorMessage

public static java.lang.String getRequiredAuthMethodsErrorMessage(java.util.Vector methods,
                                                                  javax.xml.namespace.QName opQName)

initialize

public void initialize(java.lang.String servicePath)
                throws ConfigException
Throws:
ConfigException

getProxyFileName

public static java.lang.String getProxyFileName(ServiceSecurityConfig desc)
                                         throws ConfigException
Throws:
ConfigException

getCertKeyFileName

public static java.lang.String[] getCertKeyFileName(ServiceSecurityConfig desc)
                                             throws ConfigException
Returns the certificate and key file name configured. return String[] First element is certificate filename Second element is key file name

Throws:
ConfigException

loadCredentials

protected void loadCredentials()
                        throws ConfigException
Throws:
ConfigException

loadCredential

protected java.lang.Long loadCredential(boolean load)
                                 throws ConfigException
Specified by:
loadCredential in class SecurityDescriptor
Throws:
ConfigException

initAuthenticationConfig

protected void initAuthenticationConfig()
                                 throws ConfigException
Throws:
ConfigException

getAuthMethods

private static java.util.Vector getAuthMethods(AuthMethodType authMethodType)
                                        throws ConfigException
Throws:
ConfigException

initAuthorizationConfig

protected void initAuthorizationConfig(java.lang.String servicePath,
                                       java.util.HashMap params)
                                throws ConfigException
Throws:
ConfigException

parseInterceptors

private static InterceptorConfig[] parseInterceptors(Interceptor[] interceptor,
                                                     java.util.HashMap parameters)
                                              throws ConfigException
Throws:
ConfigException