proxyDestroy(proxy_file)getAll(proxyfile)getSubject(proxyfile)getIssuer(proxyfile)getType(proxyfile)getTimeLeft(proxyfile)getStrength(proxyfile)checkEnvs()
Cog::Security::Proxy - Perl extension for Proxy's such as creating, destroying and gathering information about a proxy file.
use Cog::Security::Proxy;
use Cog::Security::Proxy;
my $results = proxyInit($pass,$cert,$key,$out,$hours,$limited,$bits,$cert_dir);
if($results!~ /ERROR/){
my @res = &getAll($out);
$res = &getSubject($out);
$res = &getIssuer($out);
$res = &getType($out);
$res = &getTimeLeft($out);
$res = &getStrength($out);
}
my $results = proxyDestroy($out);
MODULE NAME: Cog::Security::Proxy
MODULE DESCRIPTION: Allows you to create, destroy and get information about a specific proxy.
REQUIRED ENV VARS: GLOBUS_BIN_DIR, GLOBUS_INSTALL_PATH
Maytal Dahan, maytal@tacc.utexas.edu Catherine Mills, cmills@sdsc.edu Stephen Mock, mock@sdsc.edu
Usage/Description:
Used to generate a proxy certificate from a key and certfile
my $results = proxyInit($pass,$cert,$key,$out,$hours,$limited,$bits,$cert_dir);
Required Parameters:
-passphrase - the passphrase used to generate the proxy credential
Optional Parameters: (you can leave one blank by putting 'undef' (w/out quotes)
-certfile - the full path of the certificate file if not in the default location
-keyfile - the full path of the keyfile if not in the default location
-proxyfile - the location/filename of the proxyfile to be created
-hours - time in hours that the proxy will be valid for
-limited - if defined this will create a limited proxy
-bits - the number of bits in the key {512|1024|2048|4096}
-certdir - specifies a non standard location for the trusted cert dir
EXAMPLE 1 - here is an example of calling the subroutine with only the
required paramter.
EXAMPLE 2 - here is an example of calling the subroutine with a few of the
optional paramters. The ones on the end can be left out if there are no declared
parameters after them.
proxyInit("pem","/location/cert","/location/key",undef,"20");
Required Environment Variables: GLOBUS_BIN_DIR, GLOBUS_INSTALL_PATH
Returns: A string that is an error or results.
Last Modified: 06/12/01 Maytal Dahan
proxyDestroy(proxy_file)
Description/Usage:
Allows you to destroy a proxy created by proxyInit. If a parameter
is passed in specifying the filename then it is checked that the file exists
before calling destroy.
my $results = proxyDestroy($out); #out is the full path to the proxyfile
Required Parameter:
-filename - the file (including path) of the proxy to destroy.
If no file is specified then it destroys the defualt proxy.
Returns: "SUCCESS" for a successful destroy and an error message if
there is an error.
Last Modified:
06/13/01 Maytal Dahan
getAll(proxyfile)
Description/Usage:
Gets information about the proxy file (follows grid-proxy-info.)
my $results = proxyInit($pass,$cert,$key,$out,$hours,
$limited,$bits,$cert_dir);
my @res = &getAll($out);
Required Parameters:
-proxyfile - the location of the proxy file.
If it is undefined then it gets info on the default proxy
Returns: An array with the results or an error string.
An example of valid output is:
subject : /C=/O=/...
issuer : /C=/O=/....
type : limited OR FULL
strength : # bits
timeleft : hh:mm:ss
Last Modified:
06/13/01 Maytal Dahan
getSubject(proxyfile)
Description/Usage:
Gets the distinguished name of the specified proxy file.
my $results = proxyInit($pass,$cert,$key,$out,$hours,
$limited,$bits,$cert_dir);
my $subject = &getSubject($out);
Parameters:
proxyfile - the location of the proxy file.
If it is undefined then it gets status on the default proxy
Returns: A string with the results or an error string.
Last Modified: 06/13/01 Maytal Dahan
getIssuer(proxyfile)
Description/Usage:
Gets the distinguished name of the issuer (certificate signer).
my $results = proxyInit($pass,$cert,$key,$out,$hours,
$limited,$bits,$cert_dir);
my $issuer = &getIssuer($out);
Parameters:
$file - the location of the proxy file.
If it is undefined then it gets status on the default proxy.
Returns: A string with the results or an error string.
Last Modified: 06/13/01 Maytal Dahan
getType(proxyfile)
Description/Usage:
Gets the type of proxy (full or limited).
my $results = proxyInit($pass,$cert,$key,$out,$hours,
$limited,$bits,$cert_dir);
my $type = &getType($out);
Parameters:
proxyfile - the location of the proxy file.
If it is undefined then it gets status on the default proxy.
Returns: A string with the results or an error string.
Last Modified: 06/13/01 Maytal Dahan
getTimeLeft(proxyfile)
Description/Usage:
Gets the time left in seconds of a proxy.
my $results = proxyInit($pass,$cert,$key,$out,$hours,
$limited,$bits,$cert_dir);
my $time = &getTimeLeft($out);
Parameters:
proxyfile - the location of the proxy file.
If it is undefined then it gets status on the default proxy.
Returns: A string with the results or an error string.
Last Modified: 06/13/01 Maytal Dahan
getStrength(proxyfile)
Description/Usage:
Gets the strength of proxy.
my $results = proxyInit($pass,$cert,$key,$out,$hours,
$limited,$bits,$cert_dir);
my $strength = &getType($out);
Parameters:
proxyfile - the location of the proxy file.
If it is undefined then it gets status on the default proxy.
Returns: A string with the results or an error string.
Last Modified: 06/13/01 Maytal Dahan
checkEnvs()
Description/Usage:
Used to check that the environment variables needed are set.
@errors = &checkEnvs();
Parameters: none needed
Returns: nothing, or an array with env variables which were not set.
Description/Usage:
Allows user to set the Expect debug level.
setDebug(1);
Returns: nothing
Cog::lib::Cog::Globus::Job, Cog::lib::Cog::Globus::RSL, Cog::lib::Cog::Globus::Run, Cog::lib::Cog::Globus::URLCopy, Cog::lib::Cog::MDS::Search, Cog::lib::Cog::Security::Cacl, Cog::lib::Cog::Security::Myproxy, Cog::lib::Cog::Security::Proxy, Cog::src::Config, CogUtil::lib::CogUtil::Log, CogUtil::lib::CogUtil::UnixRun, Gridport::lib::Gridport::Authentication, Gridport::lib::Gridport::FileTransfer, Gridport::lib::Gridport::Job, Gridport::lib::Gridport::ProxyForward, Gridport::lib::Gridport::SRB, NWS::lib::NWS, SRB::lib::SRB