| 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
GridCAImpconfig - the configurationGridCAException - if the configuration is not validprotected Expect createProcess()
public void init(InitCAParameters params) throws GridCAException
init in interface GridCAparams - parmeters for the CAGridCAExceptionprotected 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
GridCAExceptionprotected void execute(Expect pb, boolean setLock) throws GridCAException
GridCAExceptionpublic void createUser(java.lang.String username,
java.lang.String gecos,
java.lang.String email)
throws GridCAException
createUser in interface GridCAusername - 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 GridCAusername - 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 GridCAdaemon - 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 GridCAusername - name of the userGridCAException - if the certificate does not existpublic java.security.cert.X509Certificate getDaemonCertificate(java.lang.String daemon)
throws GridCAException
getDaemonCertificate in interface GridCAdaemon - 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 GridCAusername - 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 GridCAdaemon - name of the daemondays - validity of the new certificate in daysGridCAException - if the certificate can not be renewedpublic void renewCaCertificate(int days)
throws GridCAException
GridCArenewCaCertificate in interface GridCAdays - 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 GridCAusername - 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 GridCAdaemon - name of the daemonGridCAExceptionpublic java.security.KeyStore createSGEDaemonKeyStore(java.lang.String daemon,
char[] keystorePassword,
char[] privateKeyPassword)
throws GridCAException
createSGEDaemonKeyStore in interface GridCAdaemon - name of the daemonkeystorePassword - password used to encrypt the keystoreprivateKeyPassword - password used to encrypt the keyGridCAException