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

java.lang.Object
  extended byorg.globus.wsrf.impl.security.descriptor.util.ElementParser
      extended byorg.globus.wsrf.impl.security.descriptor.SecurityDescriptor
All Implemented Interfaces:
AuthzParamParserCallback, CredentialParamsParserCallback, ElementHandler, GlobalParamsParserCallback, java.io.Serializable
Direct Known Subclasses:
ContainerSecurityDescriptor, ServiceSecurityDescriptor

public class SecurityDescriptor
extends ElementParser
implements GlobalParamsParserCallback, CredentialParamsParserCallback, AuthzParamParserCallback, java.io.Serializable

Base class for security descriptor. Stores credential parameters, global paramaters (reject limited proxy, authorization, gridmap, replay filter, replay window, context lifetime). Also, used to store Subject(created off credentials), GridMap and if authorization class is configured, an instance of class that implements ServiceAuthorization

See Also:
Serialized Form

Field Summary
private  java.lang.String authz
           
private  ServiceAuthorizationChain authzChain
           
private  java.lang.String certFile
           
private  java.lang.Integer contextLifetime
           
private  org.globus.security.gridmap.GridMap gridMap
           
private  java.lang.String gridMapFile
           
protected static org.globus.util.I18n i18n
           
private  java.lang.String keyFile
           
private  java.lang.Long lastModified
           
static java.lang.String NS
           
private  java.lang.String proxyFile
           
private static javax.xml.namespace.QName QNAME
           
private  java.lang.String rejectLimitedProxy
           
private  java.lang.String replayFilter
           
private  java.lang.String replayWindow
           
static java.lang.String RESOURCE
           
private  javax.security.auth.Subject subject
           
 
Fields inherited from class org.globus.wsrf.impl.security.descriptor.util.ElementParser
elementHandlers
 
Constructor Summary
SecurityDescriptor()
           
 
Method Summary
 java.lang.String getAuthz()
          Returns the authorization mechanism.
 ServiceAuthorizationChain getAuthzChain()
          Returns an authorization chain instance.
 java.lang.String getCertFilename()
          Returns the certificate filename
 java.lang.Integer getContextLifetime()
          Returns the lifetime of context created when secure conversation is used.
 org.globus.security.gridmap.GridMap getGridMap()
          Returns gridmap object
 java.lang.String getGridMapFile()
          Returns grid map file name
 java.lang.String getKeyFilename()
          Returns the key filename
 java.lang.Long getLastModified()
          Returns the time when the credential/proxy file was last modified
 java.lang.String getProxyFilename()
          Returns the filename of proxy
 java.lang.String getRejectLimitedProxyState()
          Returns if limited proxy can be rejected or not
 java.lang.String getReplayAttackFilter()
          Returns the set replay attack filter value
 java.lang.String getReplayAttackWindow()
          Returns replay attack prevention window value in minutes
 javax.security.auth.Subject getSubject()
          Returns the subject
 boolean isRefreshRequired()
          Returns if the credential object needs to be refreshed based on the timestamp on configured file and last modified value.
protected  void readObject(FixedObjectInputStream ois)
           
 void setAuthz(java.lang.String value)
          Sets the authorization mechanism to use.
 void setAuthzChain(ServiceAuthorizationChain chain)
          Sets an authorization chain instance.
 void setCertificateFiles(java.lang.String certName, java.lang.String keyName)
          Sets the filenames to pick up certificate and key
 void setContextLifetime(java.lang.Integer lifetime)
          Sets the lifetime to be set on context when secure conversation is used
 void setGridMap(org.globus.security.gridmap.GridMap map)
          Sets the gridmap object
 void setGridMapFile(java.lang.String value)
          Sets grid map filename
 void setLastModified(java.lang.Long modified)
          Sets the time when the credential/proxy file was last modified
 void setProxyFilename(java.lang.String value)
          Sets proxy file to use
 void setRejectLimitedProxy(java.lang.String value)
          Sets whether limited proxy should be rejected or not
 void setReplayAttackFilter(java.lang.String value)
          Sets replay attack filter value.
 void setReplayAttackWindow(java.lang.String value)
          Sets replay attack window size
 void setSubject(javax.security.auth.Subject sub)
          Sets the subject
protected  void writeObject(java.io.ObjectOutputStream oos)
           
 
Methods inherited from class org.globus.wsrf.impl.security.descriptor.util.ElementParser
checkElement, getFirstChildElement, getQName, parse, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

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

i18n

protected static org.globus.util.I18n i18n

NS

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

QNAME

private static final javax.xml.namespace.QName QNAME

rejectLimitedProxy

private java.lang.String rejectLimitedProxy

proxyFile

private java.lang.String proxyFile

certFile

private java.lang.String certFile

keyFile

private java.lang.String keyFile

authz

private java.lang.String authz

gridMapFile

private java.lang.String gridMapFile

replayFilter

private java.lang.String replayFilter

replayWindow

private java.lang.String replayWindow

contextLifetime

private java.lang.Integer contextLifetime

subject

private javax.security.auth.Subject subject

lastModified

private java.lang.Long lastModified

gridMap

private org.globus.security.gridmap.GridMap gridMap

authzChain

private ServiceAuthorizationChain authzChain
Constructor Detail

SecurityDescriptor

public SecurityDescriptor()
Method Detail

setRejectLimitedProxy

public void setRejectLimitedProxy(java.lang.String value)
Sets whether limited proxy should be rejected or not

Specified by:
setRejectLimitedProxy in interface GlobalParamsParserCallback
Parameters:
value - If true, rejects limited proxy. If not, allows limited proxy

getRejectLimitedProxyState

public java.lang.String getRejectLimitedProxyState()
Returns if limited proxy can be rejected or not

Returns:
string that indicated limited proxy rejection.

setProxyFilename

public void setProxyFilename(java.lang.String value)
Sets proxy file to use

Specified by:
setProxyFilename in interface CredentialParamsParserCallback
Parameters:
value - Filename of proxy

setCertificateFiles

public void setCertificateFiles(java.lang.String certName,
                                java.lang.String keyName)
Sets the filenames to pick up certificate and key

Specified by:
setCertificateFiles in interface CredentialParamsParserCallback
Parameters:
certName - Name of certificate file
keyName - Name of key file

getProxyFilename

public java.lang.String getProxyFilename()
Returns the filename of proxy


getCertFilename

public java.lang.String getCertFilename()
Returns the certificate filename


getKeyFilename

public java.lang.String getKeyFilename()
Returns the key filename


setAuthz

public void setAuthz(java.lang.String value)
Sets the authorization mechanism to use.

Specified by:
setAuthz in interface AuthzParamParserCallback
Parameters:
value - String representing the authz mechanism to use. See org.globus.wsrf.impl.security.authorization.Authorization

getAuthz

public java.lang.String getAuthz()
Returns the authorization mechanism. See

Returns:
String representing the authz mechanism to use. See org.globus.wsrf.impl.security.authorization.Authorization

setAuthzChain

public void setAuthzChain(ServiceAuthorizationChain chain)
Sets an authorization chain instance.

Parameters:
chain - Instance of ServiceAuthorizationChain

getAuthzChain

public ServiceAuthorizationChain getAuthzChain()
Returns an authorization chain instance.

Returns:
Instance of ServiceAuthorizationChain

setGridMapFile

public void setGridMapFile(java.lang.String value)
Sets grid map filename

Specified by:
setGridMapFile in interface GlobalParamsParserCallback
Parameters:
value - Gridmap filename

getGridMapFile

public java.lang.String getGridMapFile()
Returns grid map file name

Returns:
Grid map file name

setReplayAttackFilter

public void setReplayAttackFilter(java.lang.String value)
Sets replay attack filter value. If set to true, replay attack prevention is enforced. If not, it is not enforced.

Specified by:
setReplayAttackFilter in interface GlobalParamsParserCallback
Parameters:
value - String to indicate if replay attack filter is required.

getReplayAttackFilter

public java.lang.String getReplayAttackFilter()
Returns the set replay attack filter value

Returns:
configured replay attack string.

setReplayAttackWindow

public void setReplayAttackWindow(java.lang.String value)
Sets replay attack window size

Specified by:
setReplayAttackWindow in interface GlobalParamsParserCallback
Parameters:
value - String representation of replay attack prevention window value in minutes

getReplayAttackWindow

public java.lang.String getReplayAttackWindow()
Returns replay attack prevention window value in minutes

Returns:
replay attack [revention window

setContextLifetime

public void setContextLifetime(java.lang.Integer lifetime)
Sets the lifetime to be set on context when secure conversation is used

Specified by:
setContextLifetime in interface GlobalParamsParserCallback
Parameters:
lifetime - lifetime of context

getContextLifetime

public java.lang.Integer getContextLifetime()
Returns the lifetime of context created when secure conversation is used.

Returns:
lifetime of context

setSubject

public void setSubject(javax.security.auth.Subject sub)
Sets the subject


setLastModified

public void setLastModified(java.lang.Long modified)
Sets the time when the credential/proxy file was last modified


setGridMap

public void setGridMap(org.globus.security.gridmap.GridMap map)
Sets the gridmap object


getSubject

public javax.security.auth.Subject getSubject()
Returns the subject


getLastModified

public java.lang.Long getLastModified()
Returns the time when the credential/proxy file was last modified


getGridMap

public org.globus.security.gridmap.GridMap getGridMap()
Returns gridmap object


isRefreshRequired

public boolean isRefreshRequired()
Returns if the credential object needs to be refreshed based on the timestamp on configured file and last modified value.


writeObject

protected void writeObject(java.io.ObjectOutputStream oos)
                    throws java.io.IOException
Throws:
java.io.IOException

readObject

protected void readObject(FixedObjectInputStream ois)
                   throws java.io.IOException,
                          java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException