|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.myproxy.MyProxy
This class provides API for communicating with MyProxy servers.
It provides main functions for retrieving, removing and
storing credentials on MyProxy server. It also provides functions
for getting credential information and changing passwords.
Note: This version only works with myproxy-0.2 and greater
More information about MyProxy is available on the MyProxy page
| Field Summary | |
protected Authorization |
authorization
|
static int |
CHANGE_PASSWORD
|
protected GSSContext |
context
|
static int |
DEFAULT_PORT
|
static int |
DESTROY_PROXY
|
static int |
GET_PROXY
|
protected String |
host
|
static int |
INFO_PROXY
|
static int |
MIN_PASSWORD_LENGTH
|
static String |
MYPROXY_PROTOCOL_VERSION
|
protected int |
port
|
static int |
PUT_PROXY
|
| Constructor Summary | |
MyProxy()
|
|
MyProxy(String host,
int port)
|
|
| Method Summary | |
void |
changePassword(GSSCredential credential,
ChangePasswordParams params)
Changes the password of the credential on the MyProxy server. |
void |
destroy(GSSCredential credential,
DestroyParams params)
Removes delegated credentials from MyProxy server. |
void |
destroy(GSSCredential credential,
String username,
String passphrase)
Removes delegated credentials from MyProxy server. |
static void |
destroy(String host,
int port,
GSSCredential credential,
String username,
String passphrase)
Removes delegated credentials from MyProxy server. |
static void |
destroy(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
String subjectDN)
Removes delegated credentials from MyProxy server. |
GSSCredential |
get(GSSCredential credential,
GetParams params)
Retrieves delegated credentials from MyProxy server. |
GSSCredential |
get(GSSCredential credential,
String username,
String passphrase,
int lifetime)
Retrieves delegated credentials from MyProxy server. |
static GSSCredential |
get(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime)
Retrieves delegated credentials from MyProxy server. |
static GSSCredential |
get(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime,
String subjectDN)
Retrieves delegated credentials from MyProxy server. |
GSSCredential |
get(String username,
String passphrase,
int lifetime)
Retrieves delegated credentials from MyProxy server Anonymously (without local credentials) Notes: Performs simple verification of private/public keys of the delegated credential. |
Authorization |
getAuthorization()
|
String |
getHost()
|
int |
getPort()
|
CredentialInfo[] |
info(GSSCredential credential,
InfoParams params)
Retrieves credential information from MyProxy server. |
CredentialInfo |
info(GSSCredential credential,
String username,
String passphrase)
Retrieves credential information from MyProxy server. |
void |
put(GSSCredential credential,
InitParams params)
Stores credentials on MyProxy server. |
void |
put(GSSCredential credential,
String username,
String passphrase,
int lifetime)
Stores credentials on MyProxy server. |
static void |
put(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime)
Stores credentials on MyProxy server. |
static void |
put(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime,
String subjectDN)
Stores credentials on MyProxy server. |
void |
setAuthorization(Authorization authorization)
|
void |
setHost(String host)
|
void |
setPort(int port)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MIN_PASSWORD_LENGTH
public static final String MYPROXY_PROTOCOL_VERSION
public static final int DEFAULT_PORT
public static final int GET_PROXY
public static final int PUT_PROXY
public static final int INFO_PROXY
public static final int DESTROY_PROXY
public static final int CHANGE_PASSWORD
protected String host
protected int port
protected Authorization authorization
protected GSSContext context
| Constructor Detail |
public MyProxy()
public MyProxy(String host,
int port)
| Method Detail |
public void setHost(String host)
public String getHost()
public void setPort(int port)
public int getPort()
public void setAuthorization(Authorization authorization)
public Authorization getAuthorization()
public void put(GSSCredential credential,
String username,
String passphrase,
int lifetime)
throws MyProxyException
credential - The GSI credentials to use.username - The username to store the credentials under.passphrase - The passphrase to use to encrypt the stored
credentials.lifetime - The requested lifetime of the stored credentials.
MyProxyException - If an error occurred during the operation.
public void put(GSSCredential credential,
InitParams params)
throws MyProxyException
credential - The GSI credentials to use.params - The parameters for the put operation.
MyProxyException - If an error occurred during the operation.
public void destroy(GSSCredential credential,
String username,
String passphrase)
throws MyProxyException
credential - The local GSI credentials to use.username - The username of the credentials to remove.passphrase - The passphrase of the credentials to remove.
MyProxyException - If an error occurred during the operation.
public void destroy(GSSCredential credential,
DestroyParams params)
throws MyProxyException
credential - The local GSI credentials to use.params - The parameters for the destroy operation.
MyProxyException - If an error occurred during the operation.
public void changePassword(GSSCredential credential,
ChangePasswordParams params)
throws MyProxyException
credential - The local GSI credentials to use.params - The parameters for the change password operation.
MyProxyException - If an error occurred during the operation.
public CredentialInfo info(GSSCredential credential,
String username,
String passphrase)
throws MyProxyException
credential - The local GSI credentials to use.username - The username of the credentials to remove.passphrase - The passphrase of the credentials to remove.
MyProxyException - If an error occurred during the operation.
public CredentialInfo[] info(GSSCredential credential,
InfoParams params)
throws MyProxyException
credential - The local GSI credentials to use.params - The parameters for the info operation.
MyProxyException - If an error occurred during the operation.
public GSSCredential get(String username,
String passphrase,
int lifetime)
throws MyProxyException
username - The username of the credentials to retrieve.passphrase - The passphrase of the credentials to retrieve.lifetime - The requested lifetime of the retrieved credential.
MyProxyException - If an error occurred during the operation.
public GSSCredential get(GSSCredential credential,
String username,
String passphrase,
int lifetime)
throws MyProxyException
credential - The local GSI credentials to use. Can be set to null
if no local credentials.username - The username of the credentials to retrieve.passphrase - The passphrase of the credentials to retrieve.lifetime - The requested lifetime of the retrieved credential.
MyProxyException - If an error occurred during the operation.
public GSSCredential get(GSSCredential credential,
GetParams params)
throws MyProxyException
credential - The local GSI credentials to use. Can be set to null
if no local credentials.params - The parameters for the get operation.
MyProxyException - If an error occurred during the operation.
public static void put(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime)
throws MyProxyException
host - The hostname of MyProxy server.port - The port number of MyProxy server.credential - The GSI credentials to use.username - The username to store the credentials under.passphrase - The passphrase to use to encrypt the stored
credentials.lifetime - The requested lifetime of the stored credentials.
MyProxyException - If an error occurred during the put operation.
public static void put(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime,
String subjectDN)
throws MyProxyException
host - The hostname of MyProxy server.port - The port number of MyProxy server.credential - The GSI credentials to use.username - The username to store the credentials under.passphrase - The passphrase to use to encrypt the stored
credentials.lifetime - The requested lifetime of the stored credentials.subjectDN - The expected subject name of MyProxy server. This
is used for security purposes. If null, host
authentication will be performed.
MyProxyException - If an error occurred during the put operation.
public static void destroy(String host,
int port,
GSSCredential credential,
String username,
String passphrase)
throws MyProxyException
host - The hostname of MyProxy server.port - The port number of MyProxy server.credential - The GSI credentials to use.username - The username of the credentials to remove.passphrase - The passphrase of the credentials to remove.
Right now it is ignored by the MyProxy sever.
MyProxyException - If an error occurred during the operation.
public static void destroy(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
String subjectDN)
throws MyProxyException
host - The hostname of MyProxy server.port - The port number of MyProxy server.credential - The GSI credentials to use.username - The username of the credentials to remove.passphrase - The passphrase of the credentials to remove.
Right now it is ignored by the MyProxy sever.subjectDN - The expected subject name of MyProxy server. This
is used for security purposes. If null, host
authentication will be performed.
MyProxyException - If an error occurred during the operation.
public static GSSCredential get(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime)
throws MyProxyException
host - The hostname of MyProxy server.port - The port number of MyProxy server.credential - The GSI credentials to use.username - The username of the credentials to retrieve.passphrase - The passphrase of the credentials to retrieve.lifetime - The requested lifetime of the retrieved credential.
MyProxyException - If an error occurred during the operation.
public static GSSCredential get(String host,
int port,
GSSCredential credential,
String username,
String passphrase,
int lifetime,
String subjectDN)
throws MyProxyException
host - The hostname of MyProxy server.port - The port number of MyProxy server.credential - The GSI credentials to use.username - The username of the credentials to retrieve.passphrase - The passphrase of the credentials to retrieve.lifetime - The requested lifetime of the retrieved credential.subjectDN - The expected subject name of MyProxy server. This
is used for security purposes. If null, host
authentication will be performed.
MyProxyException - If an error occurred during the operation.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||