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

java.lang.Object
  extended byorg.globus.wsrf.impl.security.descriptor.SecurityConfig
Direct Known Subclasses:
ContainerSecurityConfig, ResourceSecurityConfig, ServiceSecurityConfig

public abstract class SecurityConfig
extends java.lang.Object

Helper base class for initialization and storing of security descriptor in JNDI


Field Summary
static java.lang.String CONT_SEC_DESCRIPTOR
           
(package private)  SecurityDescriptor desc
           
(package private)  java.lang.String descriptorFile
           
private static org.globus.util.I18n i18n
           
(package private)  java.lang.String jndiPathName
           
private static org.apache.commons.logging.Log logger
           
static java.lang.String SECURITY_DESCRIPTOR
           
static java.lang.String SECURITY_INIT_NAME
           
static java.lang.String SECURITY_PROP
           
 
Constructor Summary
(package private) SecurityConfig()
           
protected SecurityConfig(SecurityDescriptor desc)
           
protected SecurityConfig(java.lang.String jndiPathName, SecurityDescriptor desc)
           
protected SecurityConfig(java.lang.String jndiPathName, java.lang.String descFileName)
           
 
Method Summary
private static javax.naming.Context createContext(java.lang.String jndi)
           
private static java.lang.String getConfigDir()
           
private static java.lang.String getContextPath(java.lang.String jndiPathName)
           
private static java.lang.Object getObject(java.lang.String objectName, java.lang.String jndiPath)
           
private static javax.naming.Context getSecurityContext(java.lang.String jndiPath)
           
protected abstract  void initCredentials()
           
protected  void initialize()
           
protected  void initSecurityDescriptor()
           
protected abstract  void initSecurityDescriptor(org.w3c.dom.Document doc)
           
protected static boolean isInitialized(java.lang.String jndiPathName)
           
protected static boolean isRefreshRequired(java.lang.String servicePath)
           
protected abstract  void loadAuthorization()
           
protected  boolean loadCredentials()
           
protected  void loadGridMap()
           
protected  void loadSecurityDescriptor()
           
static org.w3c.dom.Document loadSecurityDescriptor(java.lang.String file)
           
protected static void putObject(java.lang.String objectName, java.lang.Object object, java.lang.String jndiPath)
           
private static java.io.File resolvePath(java.lang.String pathName)
           
protected static ServiceAuthorizationChain retrieveAuthzChain(java.lang.String jndiPath)
           
protected static org.globus.security.gridmap.GridMap retrieveGridMap(java.lang.String jndiPath)
           
protected static SecurityDescriptor retrieveSecurityDescriptor(java.lang.String jndiPath)
           
protected static javax.security.auth.Subject retrieveSubject(java.lang.String jndiPath)
           
protected  void setInitialized(boolean init)
           
protected static void storeAuthzChain(ServiceAuthorizationChain authzChain, java.lang.String jndiPath, SecurityDescriptor desc)
           
protected static void storeGridMap(org.globus.security.gridmap.GridMap gridmap, java.lang.String jndiPath, SecurityDescriptor desc)
           
protected  void storeSecurityDescriptor()
           
protected static void storeSecurityDescriptor(SecurityDescriptor desc, java.lang.String jndiPath)
           
protected static void storeSubject(javax.security.auth.Subject subject, java.lang.String jndiPath, SecurityDescriptor desc)
           
static org.ietf.jgss.GSSCredential toGSSCredential(org.globus.gsi.GlobusCredential cred)
           
 
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

CONT_SEC_DESCRIPTOR

public static final java.lang.String CONT_SEC_DESCRIPTOR
See Also:
Constant Field Values

SECURITY_PROP

public static final java.lang.String SECURITY_PROP
See Also:
Constant Field Values

SECURITY_DESCRIPTOR

public static final java.lang.String SECURITY_DESCRIPTOR
See Also:
Constant Field Values

SECURITY_INIT_NAME

public static final java.lang.String SECURITY_INIT_NAME
See Also:
Constant Field Values

jndiPathName

java.lang.String jndiPathName

descriptorFile

java.lang.String descriptorFile

desc

SecurityDescriptor desc
Constructor Detail

SecurityConfig

SecurityConfig()

SecurityConfig

protected SecurityConfig(java.lang.String jndiPathName,
                         java.lang.String descFileName)

SecurityConfig

protected SecurityConfig(SecurityDescriptor desc)

SecurityConfig

protected SecurityConfig(java.lang.String jndiPathName,
                         SecurityDescriptor desc)
Method Detail

initSecurityDescriptor

protected abstract void initSecurityDescriptor(org.w3c.dom.Document doc)
                                        throws ConfigException
Throws:
ConfigException

initCredentials

protected abstract void initCredentials()
                                 throws ConfigException
Throws:
ConfigException

loadAuthorization

protected abstract void loadAuthorization()
                                   throws ConfigException
Throws:
ConfigException

storeSubject

protected static void storeSubject(javax.security.auth.Subject subject,
                                   java.lang.String jndiPath,
                                   SecurityDescriptor desc)
                            throws ConfigException
Throws:
ConfigException

storeGridMap

protected static void storeGridMap(org.globus.security.gridmap.GridMap gridmap,
                                   java.lang.String jndiPath,
                                   SecurityDescriptor desc)
                            throws ConfigException
Throws:
ConfigException

storeAuthzChain

protected static void storeAuthzChain(ServiceAuthorizationChain authzChain,
                                      java.lang.String jndiPath,
                                      SecurityDescriptor desc)
                               throws ConfigException
Throws:
ConfigException

storeSecurityDescriptor

protected static void storeSecurityDescriptor(SecurityDescriptor desc,
                                              java.lang.String jndiPath)
                                       throws ConfigException
Throws:
ConfigException

retrieveSubject

protected static javax.security.auth.Subject retrieveSubject(java.lang.String jndiPath)
                                                      throws ConfigException
Throws:
ConfigException

retrieveGridMap

protected static org.globus.security.gridmap.GridMap retrieveGridMap(java.lang.String jndiPath)
                                                              throws ConfigException
Throws:
ConfigException

retrieveAuthzChain

protected static ServiceAuthorizationChain retrieveAuthzChain(java.lang.String jndiPath)
                                                       throws ConfigException
Throws:
ConfigException

retrieveSecurityDescriptor

protected static SecurityDescriptor retrieveSecurityDescriptor(java.lang.String jndiPath)
                                                        throws ConfigException
Throws:
ConfigException

initialize

protected void initialize()
                   throws ConfigException
Throws:
ConfigException

isInitialized

protected static boolean isInitialized(java.lang.String jndiPathName)
                                throws ConfigException
Throws:
ConfigException

initSecurityDescriptor

protected void initSecurityDescriptor()
                               throws ConfigException
Throws:
ConfigException

setInitialized

protected void setInitialized(boolean init)
                       throws ConfigException
Throws:
ConfigException

loadSecurityDescriptor

protected void loadSecurityDescriptor()
                               throws ConfigException
Throws:
ConfigException

loadSecurityDescriptor

public static org.w3c.dom.Document loadSecurityDescriptor(java.lang.String file)
                                                   throws ConfigException
Throws:
ConfigException

loadCredentials

protected boolean loadCredentials()
                           throws org.ietf.jgss.GSSException,
                                  org.globus.gsi.GlobusCredentialException,
                                  ConfigException
Throws:
org.ietf.jgss.GSSException
org.globus.gsi.GlobusCredentialException
ConfigException

toGSSCredential

public static org.ietf.jgss.GSSCredential toGSSCredential(org.globus.gsi.GlobusCredential cred)
                                                   throws org.ietf.jgss.GSSException
Throws:
org.ietf.jgss.GSSException

loadGridMap

protected void loadGridMap()
                    throws ConfigException
Throws:
ConfigException

getObject

private static java.lang.Object getObject(java.lang.String objectName,
                                          java.lang.String jndiPath)
                                   throws ConfigException
Throws:
ConfigException

putObject

protected static void putObject(java.lang.String objectName,
                                java.lang.Object object,
                                java.lang.String jndiPath)
                         throws ConfigException
Throws:
ConfigException

storeSecurityDescriptor

protected void storeSecurityDescriptor()
                                throws ConfigException
Throws:
ConfigException

getContextPath

private static java.lang.String getContextPath(java.lang.String jndiPathName)

createContext

private static javax.naming.Context createContext(java.lang.String jndi)
                                           throws ConfigException
Throws:
ConfigException

isRefreshRequired

protected static boolean isRefreshRequired(java.lang.String servicePath)
                                    throws ConfigException
Throws:
ConfigException

getSecurityContext

private static javax.naming.Context getSecurityContext(java.lang.String jndiPath)

getConfigDir

private static java.lang.String getConfigDir()

resolvePath

private static java.io.File resolvePath(java.lang.String pathName)