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

java.lang.Object
  extended byorg.globus.wsrf.impl.security.descriptor.SecurityConfig
      extended byorg.globus.wsrf.impl.security.descriptor.ContainerSecurityConfig

public class ContainerSecurityConfig
extends SecurityConfig

Helper class for initialization of container security descriptor. All values returned from this class are determined by the security descriptor file configured for the container. If a file was not configured, null is returned for all values, other than subject. If no file was configured or credential was not configured, then default credentials, if present, are used.


Field Summary
(package private)  org.ietf.jgss.GSSCredential defaultCredential
           
(package private)  boolean defaultCredUsed
           
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
private  java.util.Map properties
           
protected static ContainerSecurityConfig securityConfig
           
 
Fields inherited from class org.globus.wsrf.impl.security.descriptor.SecurityConfig
CONT_SEC_DESCRIPTOR, desc, descriptorFile, jndiPathName, SECURITY_DESCRIPTOR, SECURITY_INIT_NAME, SECURITY_PROP
 
Constructor Summary
(package private) ContainerSecurityConfig(java.lang.String descFile)
           
 
Method Summary
 ServiceAuthorizationChain getAuthzChain()
          Retrieves the ServiceAuthorizationChain for the container
static ContainerSecurityConfig getConfig()
          Returns container config object, assuming container security config filename is set in the global deployment descriptor as paramater CONT_SEC_DESCRIPTOR
static ContainerSecurityConfig getConfig(java.lang.String secDescFilename)
           
private  javax.security.auth.Subject getDefaultSubject()
           
 org.globus.security.gridmap.GridMap getGridMap()
          Retrieves the GridMap for the container
private static java.lang.String getSecurityDescFile()
           
 ContainerSecurityDescriptor getSecurityDescriptor()
          Retrieves the ContainerSecurityDescriptor for this service
 java.lang.String getSecurityDescriptorFile()
          Returns the container security descriptor filename
 javax.security.auth.Subject getSubject()
          Retrieves the Subject for the container
protected  void initCredentials()
           
protected  void initialize()
           
protected  void initSecurityDescriptor(org.w3c.dom.Document doc)
           
protected  boolean isInitialized()
           
protected  void loadAuthorization()
           
 void refresh()
          Reloads the credentials, if need be.
 void setAuthzChain(ServiceAuthorizationChain authzChain)
          Stores the ServiceAuthorizationChain for container, overwriting whatever exists.
 void setGridMap(org.globus.security.gridmap.GridMap gridMap)
          Stores the GridMap for container, overwriting whatever exists.
protected  void setInitialized(boolean init)
           
 void setSecurityDescriptor(ContainerSecurityDescriptor desc)
          Stores the ContainerSecurityDescriptor for this service, overwriting whatever exists.
 void setSubject(javax.security.auth.Subject subject)
          Stores the Subject for container, overwriting whatever exists.
protected  void storeSecurityDescriptor()
           
 
Methods inherited from class org.globus.wsrf.impl.security.descriptor.SecurityConfig
initSecurityDescriptor, isInitialized, isRefreshRequired, loadCredentials, loadGridMap, loadSecurityDescriptor, loadSecurityDescriptor, putObject, retrieveAuthzChain, retrieveGridMap, retrieveSecurityDescriptor, retrieveSubject, storeAuthzChain, storeGridMap, storeSecurityDescriptor, storeSubject, toGSSCredential
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

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

i18n

private static org.globus.util.I18n i18n

securityConfig

protected static ContainerSecurityConfig securityConfig

defaultCredential

org.ietf.jgss.GSSCredential defaultCredential

defaultCredUsed

boolean defaultCredUsed

properties

private java.util.Map properties
Constructor Detail

ContainerSecurityConfig

ContainerSecurityConfig(java.lang.String descFile)
Method Detail

getConfig

public static ContainerSecurityConfig getConfig()
                                         throws ConfigException
Returns container config object, assuming container security config filename is set in the global deployment descriptor as paramater CONT_SEC_DESCRIPTOR

Throws:
ConfigException

getConfig

public static ContainerSecurityConfig getConfig(java.lang.String secDescFilename)
                                         throws ConfigException
Throws:
ConfigException

storeSecurityDescriptor

protected void storeSecurityDescriptor()
                                throws ConfigException
Overrides:
storeSecurityDescriptor in class SecurityConfig
Throws:
ConfigException

initialize

protected void initialize()
                   throws ConfigException
Overrides:
initialize in class SecurityConfig
Throws:
ConfigException

isInitialized

protected boolean isInitialized()
                         throws ConfigException
Throws:
ConfigException

setInitialized

protected void setInitialized(boolean init)
                       throws ConfigException
Overrides:
setInitialized in class SecurityConfig
Throws:
ConfigException

initSecurityDescriptor

protected void initSecurityDescriptor(org.w3c.dom.Document doc)
                               throws ConfigException
Specified by:
initSecurityDescriptor in class SecurityConfig
Throws:
ConfigException

loadAuthorization

protected void loadAuthorization()
                          throws ConfigException
Specified by:
loadAuthorization in class SecurityConfig
Throws:
ConfigException

initCredentials

protected void initCredentials()
                        throws ConfigException
Specified by:
initCredentials in class SecurityConfig
Throws:
ConfigException

getDefaultSubject

private javax.security.auth.Subject getDefaultSubject()
                                               throws ConfigException
Throws:
ConfigException

getSecurityDescFile

private static java.lang.String getSecurityDescFile()
                                             throws ConfigException
Throws:
ConfigException

refresh

public void refresh()
             throws ConfigException
Reloads the credentials, if need be.

Throws:
ConfigException

getSubject

public javax.security.auth.Subject getSubject()
                                       throws ConfigException
Retrieves the Subject for the container

Throws:
ConfigException

getGridMap

public org.globus.security.gridmap.GridMap getGridMap()
                                               throws ConfigException
Retrieves the GridMap for the container

Throws:
ConfigException

getAuthzChain

public ServiceAuthorizationChain getAuthzChain()
                                        throws ConfigException
Retrieves the ServiceAuthorizationChain for the container

Throws:
ConfigException

getSecurityDescriptor

public ContainerSecurityDescriptor getSecurityDescriptor()
                                                  throws ConfigException
Retrieves the ContainerSecurityDescriptor for this service

Throws:
ConfigException

setSubject

public void setSubject(javax.security.auth.Subject subject)
                throws ConfigException
Stores the Subject for container, overwriting whatever exists.
Note: If this method is used, then when a refresh is called, it overwrites the subject with whatever subject is generated from the credentials configured in the security descriptor or default credential

Throws:
ConfigException

setGridMap

public void setGridMap(org.globus.security.gridmap.GridMap gridMap)
                throws ConfigException
Stores the GridMap for container, overwriting whatever exists.

Throws:
ConfigException

setAuthzChain

public void setAuthzChain(ServiceAuthorizationChain authzChain)
                   throws ConfigException
Stores the ServiceAuthorizationChain for container, overwriting whatever exists.

Throws:
ConfigException

setSecurityDescriptor

public void setSecurityDescriptor(ContainerSecurityDescriptor desc)
                           throws ConfigException
Stores the ContainerSecurityDescriptor for this service, overwriting whatever exists.

Throws:
ConfigException

getSecurityDescriptorFile

public java.lang.String getSecurityDescriptorFile()
Returns the container security descriptor filename