Config (Java Globus API)

org.globus.security
Class Config

java.lang.Object
  |
  +--org.globus.security.Config

Deprecated. Please use CoGProperties instead.

public class Config
extends java.lang.Object

Note: This class is now deprecated. Please use CoGProperties instead.
Responsible for managing the properties file "~/.globus/cog.properties", which holds information about various properties needed by the security classes. These properties include:

  • the location of the user certificate file
  • the location of the user key file
  • the location of the CA certificates
  • the location of the proxy file
  • the tcp port range
  • the local ip address for DHCP systems


Constructor Summary
Config()
          Deprecated.  
 
Method Summary
protected static java.lang.String get(java.lang.String type)
          Deprecated.  
protected static java.lang.String get(java.lang.String type, java.lang.String defaultValue)
          Deprecated.  
static java.lang.String getCaCertFile()
          Deprecated. Use getCaCertLocations() instead.
static java.lang.String getCaCertLocations()
          Deprecated. Retrieves the location of the CA cert files.
static java.lang.String getCaCerts()
          Deprecated. Use getCaCertLocations() instead.
static java.lang.String getIPAddress()
          Deprecated. Returns the user specified ip address.
static java.lang.String getOrgMDSBaseDN()
          Deprecated.  
static java.lang.String getOrgMDSHost()
          Deprecated.  
static java.lang.String getOrgMDSPort()
          Deprecated.  
static java.lang.String getPKCS11LibraryName()
          Deprecated.  
static java.lang.String getProxyFile()
          Deprecated. Retrieves the location of the proxy file.
static java.lang.String getRootMDSBaseDN()
          Deprecated.  
static java.lang.String getRootMDSHost()
          Deprecated.  
static java.lang.String getRootMDSPort()
          Deprecated.  
static java.lang.String getTcpPortRange()
          Deprecated. Returns the tcp port range.
static java.lang.String getUserCertFile()
          Deprecated. Retrieves the location of the user cert file.
static java.lang.String getUserKeyFile()
          Deprecated. Retrieves the location of the user key file.
protected static boolean isNullOrEmpty(java.lang.String tmp)
          Deprecated.  
static java.util.Properties readProperties(java.lang.String file)
          Deprecated. Reads all properties from the specified configuration file and stores them into a Properties object.
protected static int toInt(java.lang.String label, int defValue)
          Deprecated.  
static boolean useDevRandom()
          Deprecated. Returns whether to use the /dev/urandom device for seed generation.
protected static boolean yesOrNo(java.lang.String key, boolean defaultValue)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Config

public Config()
Deprecated. 
Method Detail

getUserCertFile

public static java.lang.String getUserCertFile()
Deprecated. 
Retrieves the location of the user cert file. If the 'usercert' property is not set in the configuration file then the X509_USER_CERT system property is checked. If the system property is not set, then the default value is returned. The default value is the 'usercert.pem' file in the user's globus directory. For example: ${user.home}/.globus/usercert.pem.

Returns:
String the location of the user cert file

getPKCS11LibraryName

public static java.lang.String getPKCS11LibraryName()
Deprecated. 

getUserKeyFile

public static java.lang.String getUserKeyFile()
Deprecated. 
Retrieves the location of the user key file. If the 'userkey' property is not set in the configuration file then the X509_USER_KEY system property is checked. If the system property is not set, then the default value is returned. The default value is the 'userkey.pem' file in the user's globus directory. For example: ${user.home}/.globus/userkey.pem.

Returns:
String the location of the user key file

getIPAddress

public static java.lang.String getIPAddress()
Deprecated. 
Returns the user specified ip address. This is used for DHCP machines where java is unable to determine the right IP address.

Returns:
String the ip address of the machine.

getCaCertFile

public static java.lang.String getCaCertFile()
Deprecated. Use getCaCertLocations() instead.

Returns:
String the locations of the CA certificates
See Also:
getCaCertLocations

getCaCerts

public static java.lang.String getCaCerts()
Deprecated. Use getCaCertLocations() instead.

Returns:
String the locations of the CA certificates
See Also:
getCaCertLocations

getCaCertLocations

public static java.lang.String getCaCertLocations()
Deprecated. 
Retrieves the location of the CA cert files. If the 'cacert' property is not set in the configuration file then the X509_CERT_DIR system property is checked. If the system property is not set, then the ${user.home}/certificates directory is checked. If the directory does not exist, and on a Unix machine, the /etc/grid-security/certificates directory is checked next. Otherwise, null is returned. This indicates the the certificates directory could not be found.
Moreover, this function can return multiple file and directory locations. The locations must be comma separated.

Returns:
String the locations of the CA certificates

getProxyFile

public static java.lang.String getProxyFile()
Deprecated. 
Retrieves the location of the proxy file. If the 'proxy' property is not set in the configuration file then the X509_USER_PROXY system property is checked. If the system property is not set, then it defaults to a value based on the following rules:
If a UID system property is set, and running on a Unix machine it returns /tmp/x509up_u${UID}. If any other machine then Unix, it returns ${tempdir}/x509up_u${UID}, where tempdir is a platform-specific temporary directory as indicated by the java.io.tmpdir system property. If a UID system property is not set, the username will be used instead of the UID. That is, it returns ${tempdir}/x509up_u_${username}
This is done this way because Java is not able to obtain the current uid.

Returns:
String the location of the proxy file

getTcpPortRange

public static java.lang.String getTcpPortRange()
Deprecated. 
Returns the tcp port range. It first checks the 'org.globus.tcp.port.range' system property. If the system property is not set then it returns the value specified in the configuration file. Returns null if the port range is not defined.
The port range is in the following form: ,

Returns:
String the port range.

useDevRandom

public static boolean useDevRandom()
Deprecated. 
Returns whether to use the /dev/urandom device for seed generation.

Returns:
true if the device should be used (if available of course) Returns true by default unless specified otherwise by the user.

readProperties

public static java.util.Properties readProperties(java.lang.String file)
                                           throws java.io.IOException
Deprecated. 
Reads all properties from the specified configuration file and stores them into a Properties object.

Parameters:
file - the configuration file to read properties from
Returns:
Properties object containing read properties
java.io.IOException

getRootMDSHost

public static java.lang.String getRootMDSHost()
Deprecated. 

getRootMDSPort

public static java.lang.String getRootMDSPort()
Deprecated. 

getRootMDSBaseDN

public static java.lang.String getRootMDSBaseDN()
Deprecated. 

getOrgMDSHost

public static java.lang.String getOrgMDSHost()
Deprecated. 

getOrgMDSPort

public static java.lang.String getOrgMDSPort()
Deprecated. 

getOrgMDSBaseDN

public static java.lang.String getOrgMDSBaseDN()
Deprecated. 

yesOrNo

protected static boolean yesOrNo(java.lang.String key,
                                 boolean defaultValue)
Deprecated. 

get

protected static java.lang.String get(java.lang.String type)
Deprecated. 

get

protected static java.lang.String get(java.lang.String type,
                                      java.lang.String defaultValue)
Deprecated. 

toInt

protected static int toInt(java.lang.String label,
                           int defValue)
Deprecated. 

isNullOrEmpty

protected static boolean isNullOrEmpty(java.lang.String tmp)
Deprecated.