Package com.netscape.certsrv.kra
Interface IKeyService
-
public interface IKeyServiceAn interface representing a recovery service.- Version:
- $Revision$, $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAgentAsyncKeyRecovery(java.lang.String reqID, java.lang.String agentID)add approving agent in asynchronous key recoveryvoidaddDistributedCredential(java.lang.String recoveryID, java.lang.String uid, java.lang.String pwd)Adds password in the distributed recovery operation.java.util.Hashtable<java.lang.String,java.lang.Object>createRecoveryParams(java.lang.String recoveryID)Creates recovery parameters for the given recovery operation.voiddestroyRecoveryParams(java.lang.String recoveryID)Destroys recovery parameters for the given recovery operation.byte[]doKeyRecovery(java.lang.String reqID, java.lang.String password)Async Recovers key for administrators.byte[]doKeyRecovery(java.math.BigInteger kid, Credential[] creds, java.lang.String pwd, org.mozilla.jss.netscape.security.x509.X509CertImpl cert, java.lang.String delivery, java.lang.String nickname, java.lang.String agent)Performs administrator-initiated key recovery.Credential[]getDistributedCredentials(java.lang.String recoveryID)Retrieves credentials in the distributed recovery operation.java.lang.StringgetInitAgentAsyncKeyRecovery(java.lang.String reqID)get async recovery request initiating agentintgetNoOfRequiredAgents()Retrieves number of agent required to perform key recovery operation.java.lang.StringgetRecoveryID()Retrieves recovery identifier.java.util.Hashtable<java.lang.String,java.lang.Object>getRecoveryParams(java.lang.String recoveryID)Retrieves recovery parameters for the given recovery operation.java.lang.StringinitAsyncKeyRecovery(java.math.BigInteger kid, org.mozilla.jss.netscape.security.x509.X509CertImpl cert, java.lang.String agent, java.lang.String realm)Initiate asynchronous key recoverybooleanisApprovedAsyncKeyRecovery(java.lang.String reqID)is async recovery request status APPROVED - i.e.
-
-
-
Method Detail
-
getNoOfRequiredAgents
int getNoOfRequiredAgents() throws EBaseExceptionRetrieves number of agent required to perform key recovery operation.- Returns:
- number of required recovery agents
- Throws:
EBaseException- failed to retrieve value
-
isApprovedAsyncKeyRecovery
boolean isApprovedAsyncKeyRecovery(java.lang.String reqID) throws EBaseExceptionis async recovery request status APPROVED - i.e. all required # of recovery agents approved- Parameters:
reqID- request id- Returns:
- true if # of recovery required agents approved; false otherwise
- Throws:
EBaseException
-
getInitAgentAsyncKeyRecovery
java.lang.String getInitAgentAsyncKeyRecovery(java.lang.String reqID) throws EBaseExceptionget async recovery request initiating agent- Parameters:
reqID- request id- Returns:
- agentUID
- Throws:
EBaseException
-
initAsyncKeyRecovery
java.lang.String initAsyncKeyRecovery(java.math.BigInteger kid, org.mozilla.jss.netscape.security.x509.X509CertImpl cert, java.lang.String agent, java.lang.String realm) throws EBaseExceptionInitiate asynchronous key recovery- Parameters:
kid- key identifiercert- certificate embedded in PKCS12agent- agent requesting recoveryrealm- authorization realm- Returns:
- requestId
- Throws:
EBaseException- failed to initiate async recovery
-
addAgentAsyncKeyRecovery
void addAgentAsyncKeyRecovery(java.lang.String reqID, java.lang.String agentID) throws EBaseExceptionadd approving agent in asynchronous key recovery- Parameters:
reqID- request idagentID- agent id- Throws:
EBaseException- failed to initiate async recovery
-
doKeyRecovery
byte[] doKeyRecovery(java.math.BigInteger kid, Credential[] creds, java.lang.String pwd, org.mozilla.jss.netscape.security.x509.X509CertImpl cert, java.lang.String delivery, java.lang.String nickname, java.lang.String agent) throws EBaseExceptionPerforms administrator-initiated key recovery.- Parameters:
kid- key identifiercreds- list of credentials (id and password)pwd- password to protect PKCS12cert- certificate embedded in PKCS12delivery- delivery mechanism- Returns:
- pkcs12
- Throws:
EBaseException- failed to perform recovery
-
doKeyRecovery
byte[] doKeyRecovery(java.lang.String reqID, java.lang.String password) throws EBaseExceptionAsync Recovers key for administrators. This method is invoked by the agent operation of the key recovery servlet.- signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST used whenever a user private key recovery request is made (this is when the DRM receives the request)
- signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_PROCESSED used whenever a user private key recovery request is processed (this is when the DRM processes the request)
- Parameters:
reqID- request idpassword- password of the PKCS12 package subsystem- Returns:
- a byte array containing the key
- Throws:
EBaseException- failed to recover key
-
getRecoveryID
java.lang.String getRecoveryID()
Retrieves recovery identifier.- Returns:
- recovery id
-
createRecoveryParams
java.util.Hashtable<java.lang.String,java.lang.Object> createRecoveryParams(java.lang.String recoveryID) throws EBaseExceptionCreates recovery parameters for the given recovery operation.- Parameters:
recoveryID- recovery id- Returns:
- recovery parameters
- Throws:
EBaseException- failed to create
-
destroyRecoveryParams
void destroyRecoveryParams(java.lang.String recoveryID) throws EBaseExceptionDestroys recovery parameters for the given recovery operation.- Parameters:
recoveryID- recovery id- Throws:
EBaseException- failed to destroy
-
getRecoveryParams
java.util.Hashtable<java.lang.String,java.lang.Object> getRecoveryParams(java.lang.String recoveryID) throws EBaseExceptionRetrieves recovery parameters for the given recovery operation.- Parameters:
recoveryID- recovery id- Returns:
- recovery parameters
- Throws:
EBaseException- failed to retrieve
-
addDistributedCredential
void addDistributedCredential(java.lang.String recoveryID, java.lang.String uid, java.lang.String pwd) throws EBaseExceptionAdds password in the distributed recovery operation.- Parameters:
recoveryID- recovery iduid- agent uidpwd- agent password- Throws:
EBaseException- failed to add
-
getDistributedCredentials
Credential[] getDistributedCredentials(java.lang.String recoveryID) throws EBaseException
Retrieves credentials in the distributed recovery operation.- Parameters:
recoveryID- recovery id- Returns:
- agent's credentials
- Throws:
EBaseException- failed to retrieve
-
-