org.nees.util.grid
Class GridUtils

java.lang.Object
  extended byorg.nees.util.grid.GridUtils

public class GridUtils
extends java.lang.Object


Constructor Summary
GridUtils()
           
 
Method Summary
static org.globus.gsi.GlobusCredential deserializeGlobusCredential(java.lang.String serializedGlobusCredential)
          Deserialize a Globus credential.
static org.ietf.jgss.GSSCredential getCurrentSubjectCredential()
          Get the current JAAS subject's credential.
static org.ietf.jgss.GSSCredential getDefaultCredential()
          Get the default GSS credential in the current environment
static org.globus.gsi.GlobusCredential getGlobusCredential(org.ietf.jgss.GSSCredential cred)
          If this GSSCredential wraps a Globus credential, get the Globus credential.
static java.lang.String getGlobusDistinguishedName(org.ietf.jgss.GSSCredential cred)
          If this GSSCredential wraps a Globus credential, get the Globus credential's distinguished name in Globus format "/CN=..."
static org.ietf.jgss.GSSCredential getSubjectCredential(javax.security.auth.Subject subject)
          Get a subject's GSS credentials.
static java.lang.String serializeGlobusCredential(org.globus.gsi.GlobusCredential cred)
          Serialize a Globus credential.
static void setFullDelegationSecureConversation(java.rmi.Remote service, org.ietf.jgss.GSSCredential gssCred)
          Configures a service stub for GSI Secure Conversation (encrypted) Full delegation No authorization
static void setLimitedDelegationSecureConversation(java.rmi.Remote service, org.ietf.jgss.GSSCredential gssCred)
          Configures a service stub for GSI Secure Conversation (encrypted) Limited delegation No authorization
static void setSecureConversation(java.rmi.Remote service, org.ietf.jgss.GSSCredential gssCred)
          Configures a service stub for GSI Secure Conversation (encrypted) No authorization
static void setSecureConversation(java.rmi.Remote service, org.ietf.jgss.GSSCredential gssCred, java.lang.String deleg)
          Configures a grid service service stub for GSI Secure Conversation (encrypted) No authorization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridUtils

public GridUtils()
Method Detail

getDefaultCredential

public static org.ietf.jgss.GSSCredential getDefaultCredential()
                                                        throws java.lang.Exception
Get the default GSS credential in the current environment

Throws:
java.lang.Exception

serializeGlobusCredential

public static java.lang.String serializeGlobusCredential(org.globus.gsi.GlobusCredential cred)
Serialize a Globus credential.

Parameters:
cred - the Globus credential
Returns:
a string representation of the Globus credential

deserializeGlobusCredential

public static org.globus.gsi.GlobusCredential deserializeGlobusCredential(java.lang.String serializedGlobusCredential)
Deserialize a Globus credential.

Parameters:
serializedGlobusCredential - a string representation of the Globus credential
Returns:
the Globus credential

setSecureConversation

public static void setSecureConversation(java.rmi.Remote service,
                                         org.ietf.jgss.GSSCredential gssCred,
                                         java.lang.String deleg)
Configures a grid service service stub for
  1. GSI Secure Conversation (encrypted)
  2. No authorization

Parameters:
service - the service stub
gssCred - the credential to use for authentication
deleg - the delegation mode

setSecureConversation

public static void setSecureConversation(java.rmi.Remote service,
                                         org.ietf.jgss.GSSCredential gssCred)
Configures a service stub for
  1. GSI Secure Conversation (encrypted)
  2. No authorization

Parameters:
service - the service stub
gssCred - the credential to use for authentication

setFullDelegationSecureConversation

public static void setFullDelegationSecureConversation(java.rmi.Remote service,
                                                       org.ietf.jgss.GSSCredential gssCred)
Configures a service stub for
  1. GSI Secure Conversation (encrypted)
  2. Full delegation
  3. No authorization

Parameters:
service - the service stub
gssCred - the credential to use for authentication

setLimitedDelegationSecureConversation

public static void setLimitedDelegationSecureConversation(java.rmi.Remote service,
                                                          org.ietf.jgss.GSSCredential gssCred)
Configures a service stub for
  1. GSI Secure Conversation (encrypted)
  2. Limited delegation
  3. No authorization

Parameters:
service - the service stub
gssCred - the credential to use for authentication

getSubjectCredential

public static org.ietf.jgss.GSSCredential getSubjectCredential(javax.security.auth.Subject subject)
Get a subject's GSS credentials.


getCurrentSubjectCredential

public static org.ietf.jgss.GSSCredential getCurrentSubjectCredential()
Get the current JAAS subject's credential.


getGlobusCredential

public static org.globus.gsi.GlobusCredential getGlobusCredential(org.ietf.jgss.GSSCredential cred)
If this GSSCredential wraps a Globus credential, get the Globus credential.


getGlobusDistinguishedName

public static java.lang.String getGlobusDistinguishedName(org.ietf.jgss.GSSCredential cred)
If this GSSCredential wraps a Globus credential, get the Globus credential's distinguished name in Globus format "/CN=..."