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

java.lang.Object
  extended byorg.globus.wsrf.impl.security.descriptor.util.ElementParser
      extended byorg.globus.wsrf.impl.security.descriptor.ClientSecurityDescriptor
All Implemented Interfaces:
ClientParamsParserCallback, CredentialParamsParserCallback, ElementHandler, java.io.Serializable

public class ClientSecurityDescriptor
extends ElementParser
implements CredentialParamsParserCallback, ClientParamsParserCallback, java.io.Serializable

Represents a client's security descriptor.

See Also:
Serialized Form

Field Summary
private  java.lang.Boolean anonymous
           
private  Authorization authz
           
private  java.lang.String certFile
           
private  java.lang.String delegation
           
private  org.ietf.jgss.GSSCredential gsiCred
           
private  java.lang.Integer gsiSecConv
           
private  java.lang.Integer gsiSecMsg
           
private  java.lang.Integer gsiTransport
           
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 peerCredFile
           
private  javax.security.auth.Subject peerSubject
           
private  java.lang.String proxyFile
           
private static javax.xml.namespace.QName QNAME
           
static java.lang.String RESOURCE
           
 
Fields inherited from class org.globus.wsrf.impl.security.descriptor.util.ElementParser
elementHandlers
 
Constructor Summary
ClientSecurityDescriptor()
           
 
Method Summary
 java.lang.Boolean getAnonymous()
          Returns if client is anonymous
 Authorization getAuthz()
          Returns the authorization scheme configured on client side.
 java.lang.String getCertFilename()
          Returns the filename from which certificate was loaded
 java.lang.String getDelegation()
          Returns type of delegation
 java.lang.Integer getGSISecureConv()
          Returns the protection type configured with GSI Secure Conversation.
 java.lang.Integer getGSISecureMsg()
          Returns the protection type configured with GSI Transport Transport If null is returned, this method was not configured to be used.
 java.lang.Integer getGSITransport()
          Returns the protection type configured with GSI Secure Transport If null is returned, this method was not configured to be used.
 org.ietf.jgss.GSSCredential getGSSCredential()
           
 java.lang.String getKeyFilename()
          Returns the filename from which key was laoded
 java.lang.Long getLastModified()
          Returns the time when the credential/proxy file was last modified
 java.lang.String getPeerCredentials()
           
 javax.security.auth.Subject getPeerSubject()
           
 java.lang.String getProxyFilename()
          Returns the file name of the proxy
protected  void readObject(java.io.ObjectInputStream ois)
           
 void setAnonymous()
          If set, client is used in anonymous mode.
 void setAuthz(Authorization value)
          sets the authorization scheme to be used on the client side.
 void setCertificateFiles(java.lang.String certName, java.lang.String keyName)
          Sets the file name certificate and key file to load credentials from.
 void setDelegation(java.lang.String deleg)
          Sets type of delegation.
 void setGSISecureConv(java.lang.Integer val)
          Indicates that GSI Secure Conversation needs to be used on client side and configured the protection that is required.
 void setGSISecureMsg(java.lang.Integer val)
          Indicates that GSI Secure Message needs to be used on client side and configured the protection that is required.
 void setGSITransport(java.lang.Integer val)
          Indicates that GSI Secure Transport needs to be used on client side and configured the protection that is required.
 void setGSSCredential(org.ietf.jgss.GSSCredential cred)
          Sets the credential to use on client side for securing message
 void setLastModified(java.lang.Long modified)
          Sets the time when the credential/proxy file was last modified
 void setPeerCredentials(java.lang.String str)
          Sets file name from which to load credentials to be used for encryption.
 void setPeerSubject(javax.security.auth.Subject subject)
          Sets the subject to use for encryption
 void setProxyFilename(java.lang.String value)
          Sets the file name of the proxy to load credentials from
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

lastModified

private java.lang.Long lastModified

proxyFile

private java.lang.String proxyFile

certFile

private java.lang.String certFile

keyFile

private java.lang.String keyFile

peerCredFile

private java.lang.String peerCredFile

authz

private Authorization authz

gsiSecConv

private java.lang.Integer gsiSecConv

gsiTransport

private java.lang.Integer gsiTransport

gsiSecMsg

private java.lang.Integer gsiSecMsg

anonymous

private java.lang.Boolean anonymous

delegation

private java.lang.String delegation

gsiCred

private org.ietf.jgss.GSSCredential gsiCred

peerSubject

private javax.security.auth.Subject peerSubject
Constructor Detail

ClientSecurityDescriptor

public ClientSecurityDescriptor()
Method Detail

setProxyFilename

public void setProxyFilename(java.lang.String value)
Sets the file name of the proxy to load credentials from

Specified by:
setProxyFilename in interface CredentialParamsParserCallback

setCertificateFiles

public void setCertificateFiles(java.lang.String certName,
                                java.lang.String keyName)
Sets the file name certificate and key file to load credentials from.

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

getProxyFilename

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


getCertFilename

public java.lang.String getCertFilename()
Returns the filename from which certificate was loaded


getKeyFilename

public java.lang.String getKeyFilename()
Returns the filename from which key was laoded


setAuthz

public void setAuthz(Authorization value)
sets the authorization scheme to be used on the client side.

Specified by:
setAuthz in interface ClientParamsParserCallback

getAuthz

public Authorization getAuthz()
Returns the authorization scheme configured on client side.


setGSISecureConv

public void setGSISecureConv(java.lang.Integer val)
Indicates that GSI Secure Conversation needs to be used on client side and configured the protection that is required.

Specified by:
setGSISecureConv in interface ClientParamsParserCallback
Parameters:
val - Either Constants.SIGNATURE or Constants.ENCRYPTION

getGSISecureConv

public java.lang.Integer getGSISecureConv()
Returns the protection type configured with GSI Secure Conversation. If null is returned, this method was not configured to be used.


setGSITransport

public void setGSITransport(java.lang.Integer val)
Indicates that GSI Secure Transport needs to be used on client side and configured the protection that is required. Atleast integrity protection is always turned on.

Parameters:
val - Either Constants.SIGNATURE or Constants.ENCRYPTION

getGSITransport

public java.lang.Integer getGSITransport()
Returns the protection type configured with GSI Secure Transport If null is returned, this method was not configured to be used.


setGSISecureMsg

public void setGSISecureMsg(java.lang.Integer val)
Indicates that GSI Secure Message needs to be used on client side and configured the protection that is required.

Specified by:
setGSISecureMsg in interface ClientParamsParserCallback
Parameters:
val - Either Constants.SIGNATURE or Constants.ENCRYPTION

getGSISecureMsg

public java.lang.Integer getGSISecureMsg()
Returns the protection type configured with GSI Transport Transport If null is returned, this method was not configured to be used.


setAnonymous

public void setAnonymous()
If set, client is used in anonymous mode. Applicable for GSI Transport and GSI Secure Conversation.

Specified by:
setAnonymous in interface ClientParamsParserCallback

getAnonymous

public java.lang.Boolean getAnonymous()
Returns if client is anonymous


setDelegation

public void setDelegation(java.lang.String deleg)
Sets type of delegation. Can be limited or full. Applicable only for GSI Secure Conversation

Specified by:
setDelegation in interface ClientParamsParserCallback

getDelegation

public java.lang.String getDelegation()
Returns type of delegation


setPeerCredentials

public void setPeerCredentials(java.lang.String str)
Sets file name from which to load credentials to be used for encryption.

Specified by:
setPeerCredentials in interface ClientParamsParserCallback

getPeerCredentials

public java.lang.String getPeerCredentials()

setLastModified

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


getLastModified

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


setGSSCredential

public void setGSSCredential(org.ietf.jgss.GSSCredential cred)
Sets the credential to use on client side for securing message


getGSSCredential

public org.ietf.jgss.GSSCredential getGSSCredential()

setPeerSubject

public void setPeerSubject(javax.security.auth.Subject subject)
Sets the subject to use for encryption


getPeerSubject

public javax.security.auth.Subject getPeerSubject()

writeObject

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

readObject

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