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, Serializable

public class ClientSecurityDescriptor
extends ElementParser
implements CredentialParamsParserCallback, ClientParamsParserCallback, Serializable

Represents a client's security descriptor.

See Also:
Serialized Form

Field Summary
private  Boolean anonymous
           
private  Authorization authz
           
private  String certFile
           
private  String delegation
           
private  org.ietf.jgss.GSSCredential gsiCred
           
private  Integer gsiSecConv
           
private  Integer gsiSecMsg
           
private  Integer gsiTransport
           
protected static org.globus.util.I18n i18n
           
private  String keyFile
           
private  Long lastModified
           
static String NS
           
private  String peerCredFile
           
private  javax.security.auth.Subject peerSubject
           
private  String proxyFile
           
private static QName QNAME
           
static String RESOURCE
           
 
Fields inherited from class org.globus.wsrf.impl.security.descriptor.util.ElementParser
elementHandlers
 
Constructor Summary
ClientSecurityDescriptor()
           
 
Method Summary
 Boolean getAnonymous()
          Returns if client is anonymous
 Authorization getAuthz()
          Returns the authorization scheme configured on client side.
 String getCertFilename()
          Returns the filename from which certificate was loaded
 String getDelegation()
          Returns type of delegation
 Integer getGSISecureConv()
          Returns the protection type configured with GSI Secure Conversation.
 Integer getGSISecureMsg()
          Returns the protection type configured with GSI Transport Transport If null is returned, this method was not configured to be used.
 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()
           
 String getKeyFilename()
          Returns the filename from which key was laoded
 Long getLastModified()
          Returns the time when the credential/proxy file was last modified
 String getPeerCredentials()
           
 javax.security.auth.Subject getPeerSubject()
           
 String getProxyFilename()
          Returns the file name of the proxy
protected  void readObject(FixedObjectInputStream 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(String certName, String keyName)
          Sets the file name certificate and key file to load credentials from.
 void setDelegation(String deleg)
          Sets type of delegation.
 void setGSISecureConv(Integer val)
          Indicates that GSI Secure Conversation needs to be used on client side and configured the protection that is required.
 void setGSISecureMsg(Integer val)
          Indicates that GSI Secure Message needs to be used on client side and configured the protection that is required.
 void setGSITransport(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(Long modified)
          Sets the time when the credential/proxy file was last modified
 void setPeerCredentials(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(String value)
          Sets the file name of the proxy to load credentials from
protected  void writeObject(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 String RESOURCE
See Also:
Constant Field Values

i18n

protected static org.globus.util.I18n i18n

NS

public static final String NS
See Also:
Constant Field Values

QNAME

private static final QName QNAME

lastModified

private Long lastModified

proxyFile

private String proxyFile

certFile

private String certFile

keyFile

private String keyFile

peerCredFile

private String peerCredFile

authz

private Authorization authz

gsiSecConv

private Integer gsiSecConv

gsiTransport

private Integer gsiTransport

gsiSecMsg

private Integer gsiSecMsg

anonymous

private Boolean anonymous

delegation

private 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(String value)
Sets the file name of the proxy to load credentials from

Specified by:
setProxyFilename in interface CredentialParamsParserCallback

setCertificateFiles

public void setCertificateFiles(String certName,
                                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 String getProxyFilename()
Returns the file name of the proxy


getCertFilename

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


getKeyFilename

public 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(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 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(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 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(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 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 Boolean getAnonymous()
Returns if client is anonymous


setDelegation

public void setDelegation(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 String getDelegation()
Returns type of delegation


setPeerCredentials

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

Specified by:
setPeerCredentials in interface ClientParamsParserCallback

getPeerCredentials

public String getPeerCredentials()

setLastModified

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


getLastModified

public 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(ObjectOutputStream oos)
                    throws IOException
Throws:
IOException

readObject

protected void readObject(FixedObjectInputStream ois)
                   throws IOException,
                          ClassNotFoundException
Throws:
IOException
ClassNotFoundException