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

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

public class ServiceSecurityConfig
extends SecurityConfig

Helper class for initialization of service security descriptor. All values returned from this class are determined by the security descriptor file configured for the said service. If a file was not configured, null is returned.


Field Summary
private static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
 
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) ServiceSecurityConfig(java.lang.String jndiPath, ServiceSecurityDescriptor desc)
           
(package private) ServiceSecurityConfig(java.lang.String servicePath, java.lang.String descFilename)
           
 
Method Summary
static ServiceAuthorizationChain getAuthzChain(java.lang.String servicePath)
          Returns authz chain configured in security descriptor of the service
static org.globus.security.gridmap.GridMap getGridMap(java.lang.String jndiPath)
          Retrieves the GridMap for this service
static ServiceSecurityDescriptor getSecurityDescriptor()
          Retrieves the ServiceSecurityDescriptor for the current service
static ServiceSecurityDescriptor getSecurityDescriptor(java.lang.String jndiPath)
          Retrieves the ServiceSecurityDescriptor for this service
static javax.security.auth.Subject getSubject(java.lang.String servicePath)
          Returns subject configured in security descriptor of the service
protected  void initCredentials()
           
protected  void initialize()
           
static void initialize(org.apache.axis.MessageContext msgCtx)
           
static void initialize(java.lang.String servicePath)
           
static void initialize(java.lang.String servicePath, java.lang.String serviceDescFile)
           
protected  void initSecurityDescriptor(org.w3c.dom.Document doc)
           
protected  void loadAuthorization()
           
static void refresh(java.lang.String jndiPath)
          Reloads the credentials, if need be.
static void setAuthzChain(ServiceAuthorizationChain authzChain, java.lang.String jndiPath)
          Stores the ServiceAuthorizationChain for this service, overwriting whatever exists.
static void setGridMap(org.globus.security.gridmap.GridMap gridmap, java.lang.String jndiPath)
          Stores the GridMap for this service, overwriting whatever exists.
static void setSecurityDescriptor(ServiceSecurityDescriptor desc, java.lang.String jndiPath)
          Stores the ServiceSecurityDescriptor for this service, overwriting whatever exists.
static void setSubject(javax.security.auth.Subject subject, java.lang.String jndiPath)
          Stores the Subject for this service, overwriting whatever exists.
 
Methods inherited from class org.globus.wsrf.impl.security.descriptor.SecurityConfig
initSecurityDescriptor, isInitialized, isRefreshRequired, loadCredentials, loadGridMap, loadSecurityDescriptor, loadSecurityDescriptor, putObject, retrieveAuthzChain, retrieveGridMap, retrieveSecurityDescriptor, retrieveSubject, setInitialized, storeAuthzChain, storeGridMap, storeSecurityDescriptor, 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
Constructor Detail

ServiceSecurityConfig

ServiceSecurityConfig(java.lang.String jndiPath,
                      ServiceSecurityDescriptor desc)

ServiceSecurityConfig

ServiceSecurityConfig(java.lang.String servicePath,
                      java.lang.String descFilename)
                throws SecurityException
Method Detail

initialize

public static void initialize(org.apache.axis.MessageContext msgCtx)
                       throws ConfigException,
                              SecurityException
Throws:
ConfigException
SecurityException

initialize

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

initialize

public static void initialize(java.lang.String servicePath,
                              java.lang.String serviceDescFile)
                       throws ConfigException,
                              SecurityException
Throws:
ConfigException
SecurityException

initialize

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

initSecurityDescriptor

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

initCredentials

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

loadAuthorization

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

getSubject

public static javax.security.auth.Subject getSubject(java.lang.String servicePath)
                                              throws ConfigException,
                                                     SecurityException
Returns subject configured in security descriptor of the service

Throws:
ConfigException
SecurityException

getAuthzChain

public static ServiceAuthorizationChain getAuthzChain(java.lang.String servicePath)
                                               throws ConfigException
Returns authz chain configured in security descriptor of the service

Throws:
ConfigException

refresh

public static void refresh(java.lang.String jndiPath)
                    throws ConfigException,
                           SecurityException
Reloads the credentials, if need be. (MessageContext must be associated with the current thread)

Throws:
ConfigException
SecurityException

setSubject

public static void setSubject(javax.security.auth.Subject subject,
                              java.lang.String jndiPath)
                       throws ConfigException
Stores the Subject for this service, 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. If no security desacriptor file was specified, these credentials are never refreshed.

Throws:
ConfigException

setGridMap

public static void setGridMap(org.globus.security.gridmap.GridMap gridmap,
                              java.lang.String jndiPath)
                       throws ConfigException
Stores the GridMap for this service, overwriting whatever exists.

Throws:
ConfigException

setAuthzChain

public static void setAuthzChain(ServiceAuthorizationChain authzChain,
                                 java.lang.String jndiPath)
                          throws ConfigException
Stores the ServiceAuthorizationChain for this service, overwriting whatever exists.

Throws:
ConfigException

setSecurityDescriptor

public static void setSecurityDescriptor(ServiceSecurityDescriptor desc,
                                         java.lang.String jndiPath)
                                  throws ConfigException
Stores the ServiceSecurityDescriptor for this service, overwriting whatever exists.

Throws:
ConfigException

getGridMap

public static org.globus.security.gridmap.GridMap getGridMap(java.lang.String jndiPath)
                                                      throws ConfigException
Retrieves the GridMap for this service

Throws:
ConfigException

getSecurityDescriptor

public static ServiceSecurityDescriptor getSecurityDescriptor(java.lang.String jndiPath)
                                                       throws ConfigException
Retrieves the ServiceSecurityDescriptor for this service

Throws:
ConfigException

getSecurityDescriptor

public static ServiceSecurityDescriptor getSecurityDescriptor()
                                                       throws ConfigException
Retrieves the ServiceSecurityDescriptor for the current service

Throws:
ConfigException