org.gcube.common.core.security.utils
Class ConfigureSecurity

java.lang.Object
  extended by org.gcube.common.core.security.utils.ConfigureSecurity

public class ConfigureSecurity
extends Object

This class contains utility methods to manage credentials and security related stuff for DILIGENT services and clients.

Author:
Paolo Roccetti

Constructor Summary
ConfigureSecurity()
           
 
Method Summary
static void setSecurity(javax.xml.rpc.Stub stub, boolean encryption, GSSCredential credentials, String delegation)
          This method allows to set security properties on service stubs.
static void setSecurity(javax.xml.rpc.Stub stub, boolean encryption, GSSCredential credentials, String delegation, int contextLifetime)
          This method allows to set security properties on service stubs.
static void setSecurity(javax.xml.rpc.Stub stub, GSSCredential credentials)
          This method allows to set security properties on service stubs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigureSecurity

public ConfigureSecurity()
Method Detail

setSecurity

public static void setSecurity(javax.xml.rpc.Stub stub,
                               GSSCredential credentials)
This method allows to set security properties on service stubs. Encryption is used as default protection level. No delegation is performed. A lifetime of 300 seconds will be used for the GSI Secure Conversation context.

Parameters:
stub - The javax.xml.rpc.Stub object where to set security
credentials - The object containing credentials to be set in stub

setSecurity

public static void setSecurity(javax.xml.rpc.Stub stub,
                               boolean encryption,
                               GSSCredential credentials,
                               String delegation)
This method allows to set security properties on service stubs. A lifetime of 300 seconds will be used for the GSI Secure Conversation context.

Parameters:
stub - The javax.xml.rpc.Stub object where to set security
encryption - If true encryption of messages will be asked to the service, if false signature only is used
credentials - The object containing credentials to be set in stub
delegation - The value of delegation required. allowed values are:
  • org.globus.axis.gsi.GSIConstants.GSI_MODE_NO_DELEG: No delegation is performed.
  • org.globus.axis.gsi.GSIConstants.GSI_MODE_LIMITED_DELEG: Limited delegation is performed (credentials cannot be further delegated).
  • org.globus.axis.gsi.GSIConstants.GSI_MODE_FULL_DELEG: Full delegation is performed (credentials can be further delegated).

setSecurity

public static void setSecurity(javax.xml.rpc.Stub stub,
                               boolean encryption,
                               GSSCredential credentials,
                               String delegation,
                               int contextLifetime)
This method allows to set security properties on service stubs.

Parameters:
stub - The javax.xml.rpc.Stub object where to set security, cannot be null.
encryption - If true encryption of messages will be asked to the service, if false signature only is used
credentials - The object containing credentials to be set in stub, cannot be null.
delegation - The value of delegation required, cannot be null. Allowed values are:
  • org.globus.axis.gsi.GSIConstants.GSI_MODE_NO_DELEG: No delegation is performed
  • org.globus.axis.gsi.GSIConstants.GSI_MODE_LIMITED_DELEG: Limited delegation is performed (credentials cannot be further delegated)
  • org.globus.axis.gsi.GSIConstants.GSI_MODE_FULL_DELEG: Full delegation is performed (credentials can be further delegated)
contextLifetime - the lifetime of the GSI Secure Conversation context (in seconds)


Copyright © 2013. All Rights Reserved.