com.sun.grid.ca
Constructor and Description |
---|
GridCAImpl(GridCAConfiguration config)
Create a new instance of
GridCAImp |
Modifier and Type | Method and Description |
---|---|
void |
createDaemon(java.lang.String daemon,
java.lang.String user,
java.lang.String email)
Create private key and certificate for a sdm daemon.
|
java.security.KeyStore |
createDaemonKeyStore(java.lang.String daemon)
Get the keystore for a daemon.
|
java.security.KeyStore |
createKeyStore(java.lang.String username,
char[] keystorePassword,
char[] privateKeyPassword)
Create a keystore which contains the private key and
certificate of an user.
|
protected Expect |
createProcess() |
java.security.KeyStore |
createSGEDaemonKeyStore(java.lang.String daemon,
char[] keystorePassword,
char[] privateKeyPassword)
Get the keystore for a SGE daemon.
|
void |
createUser(java.lang.String username,
java.lang.String email)
Create private key and certificate for a user.
|
void |
createUser(java.lang.String username,
java.lang.String gecos,
java.lang.String email)
Deprecated.
the gecos field is no longer used, use @{link #createUser(String,String)} instead
|
protected void |
execute(Expect pb) |
protected void |
execute(Expect pb,
boolean setLock) |
protected java.io.File |
getCertFileForDaemon(java.lang.String daemon) |
protected java.io.File |
getCertFileForUser(java.lang.String username) |
java.security.cert.X509Certificate |
getCertificate(java.lang.String username)
Get the X.509 certificate of a user.
|
java.security.cert.X509Certificate |
getDaemonCertificate(java.lang.String daemon)
Get the X.509 certificate of a daemon.
|
protected java.io.File |
getLocalDaemonDir(java.lang.String daemon) |
protected java.io.File |
getLocalUserDir(java.lang.String username) |
void |
init(InitCAParameters params)
Initialize the gridengine ca.
|
void |
renewCaCertificate(int days)
Renew the certificate of the certificate authority
|
java.security.cert.X509Certificate |
renewCertificate(java.lang.String username,
int days)
Renew the certificate of a user.
|
java.security.cert.X509Certificate |
renewDaemonCertificate(java.lang.String daemon,
int days)
Renew the certificate of a daemon.
|
public GridCAImpl(GridCAConfiguration config) throws GridCAException
GridCAImp
config
- the configurationGridCAException
- if the configuration is not validprotected Expect createProcess()
public void init(InitCAParameters params) throws GridCAException
init
in interface GridCA
params
- parmeters for the CAGridCAException
protected java.io.File getLocalUserDir(java.lang.String username)
protected java.io.File getCertFileForUser(java.lang.String username)
protected java.io.File getLocalDaemonDir(java.lang.String daemon)
protected java.io.File getCertFileForDaemon(java.lang.String daemon)
protected void execute(Expect pb) throws GridCAException
GridCAException
protected void execute(Expect pb, boolean setLock) throws GridCAException
GridCAException
public void createUser(java.lang.String username, java.lang.String gecos, java.lang.String email) throws GridCAException
createUser
in interface GridCA
username
- name of the usergecos
- gecos field of the useremail
- email address of the userGridCAException
- if the creation of the private key or the certificate failspublic void createUser(java.lang.String username, java.lang.String email) throws GridCAException
createUser
in interface GridCA
username
- name of the useremail
- email address of the userGridCAException
- if the creation of the private key or the certificate failspublic void createDaemon(java.lang.String daemon, java.lang.String user, java.lang.String email) throws GridCAException
createDaemon
in interface GridCA
daemon
- name of the daemonuser
- username of the daemon (owner of the process)email
- email address of the process ownerGridCAException
- if the create of the daemon failedpublic java.security.cert.X509Certificate getCertificate(java.lang.String username) throws GridCAException
getCertificate
in interface GridCA
username
- name of the userGridCAException
- if the certificate does not existpublic java.security.cert.X509Certificate getDaemonCertificate(java.lang.String daemon) throws GridCAException
getDaemonCertificate
in interface GridCA
daemon
- name of the daemonGridCAException
- if the certificate does not existpublic java.security.cert.X509Certificate renewCertificate(java.lang.String username, int days) throws GridCAException
renewCertificate
in interface GridCA
username
- name of the userdays
- validity of the new certificate in daysGridCAException
- if the certificate can not be renewedpublic java.security.cert.X509Certificate renewDaemonCertificate(java.lang.String daemon, int days) throws GridCAException
renewDaemonCertificate
in interface GridCA
daemon
- name of the daemondays
- validity of the new certificate in daysGridCAException
- if the certificate can not be renewedpublic void renewCaCertificate(int days) throws GridCAException
GridCA
renewCaCertificate
in interface GridCA
days
- validity of the new certificate in daysGridCAException
- if the certificate can not be renewedpublic java.security.KeyStore createKeyStore(java.lang.String username, char[] keystorePassword, char[] privateKeyPassword) throws GridCAException
createKeyStore
in interface GridCA
username
- name of the userkeystorePassword
- password used for encrypt the keystoreprivateKeyPassword
- password for the private keyGridCAException
- if the keystore could not be createdpublic java.security.KeyStore createDaemonKeyStore(java.lang.String daemon) throws GridCAException
createDaemonKeyStore
in interface GridCA
daemon
- name of the daemonGridCAException
public java.security.KeyStore createSGEDaemonKeyStore(java.lang.String daemon, char[] keystorePassword, char[] privateKeyPassword) throws GridCAException
createSGEDaemonKeyStore
in interface GridCA
daemon
- name of the daemonkeystorePassword
- password used to encrypt the keystoreprivateKeyPassword
- password used to encrypt the keyGridCAException