|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface EjbcaWS
Primary interface to the EJBCA RA WebService. Observe: All methods have to be called using client authenticated https otherwise an AuthorizationDenied exception will be thrown.
| Method Summary | |
|---|---|
void |
caCertResponse(java.lang.String caname,
byte[] cert,
java.util.List<byte[]> cachain,
java.lang.String keystorepwd)
Receives a certificate as a response to a CSR from the CA. |
byte[] |
caRenewCertRequest(java.lang.String caname,
java.util.List<byte[]> cachain,
boolean regenerateKeys,
boolean usenextkey,
boolean activatekey,
java.lang.String keystorepwd)
Generates a certificate request (CSP) from a CA. |
CertificateResponse |
certificateRequest(UserDataVOWS userData,
java.lang.String requestData,
int requestType,
java.lang.String hardTokenSN,
java.lang.String responseType)
Generates a certificate for a user. |
RevokeStatus |
checkRevokationStatus(java.lang.String issuerDN,
java.lang.String certificateSN)
Returns revocation status for given user. |
void |
createCRL(java.lang.String caname)
Generates a CRL for the given CA. |
CertificateResponse |
crmfRequest(java.lang.String username,
java.lang.String password,
java.lang.String crmf,
java.lang.String hardTokenSN,
java.lang.String responseType)
Generates a certificate for a user. |
void |
customLog(int level,
java.lang.String type,
java.lang.String caName,
java.lang.String username,
Certificate certificate,
java.lang.String msg)
Generates a Custom Log event in the database. |
java.util.List<Certificate> |
cvcRequest(java.lang.String username,
java.lang.String password,
java.lang.String cvcreq)
Generates a CV certificate for a user. |
boolean |
deleteUserDataFromSource(java.util.List<java.lang.String> userDataSourceNames,
java.lang.String searchString,
boolean removeMultipleMatch)
Removes user data from a user data source. |
void |
editUser(UserDataVOWS userdata)
Edits/adds a user to the EJBCA database. |
boolean |
existsHardToken(java.lang.String hardTokenSN)
Looks up if a serial number already have been generated. |
java.util.List<UserDataSourceVOWS> |
fetchUserData(java.util.List<java.lang.String> userDataSourceNames,
java.lang.String searchString)
Fetches userdata from an existing UserDataSource. |
java.util.List<Certificate> |
findCerts(java.lang.String username,
boolean onlyValid)
Retrieves a collection of certificates generated for a user. |
java.util.List<UserDataVOWS> |
findUser(UserMatch usermatch)
Retrieves information about users in the database. |
java.util.List<TokenCertificateResponseWS> |
genTokenCertificates(UserDataVOWS userData,
java.util.List<TokenCertificateRequestWS> tokenRequests,
HardTokenDataWS hardTokenData,
boolean overwriteExistingSN,
boolean revokePreviousCards)
Adds certificates and/or data to a hardtoken. |
java.util.List<NameAndId> |
getAuthorizedEndEntityProfiles()
Fetches the end-entity profiles that the administrator is authorized to use. |
java.util.List<NameAndId> |
getAvailableCAs()
Fetch a list of the ids and names of available CAs. |
java.util.List<NameAndId> |
getAvailableCAsInProfile(int entityProfileId)
Fetches the ids and names of available CAs in an end entity profile. |
java.util.List<NameAndId> |
getAvailableCertificateProfiles(int entityProfileId)
Fetches available certificate profiles in an end entity profile. |
Certificate |
getCertificate(java.lang.String certSNinHex,
java.lang.String issuerDN)
Fetches issued certificate. |
java.lang.String |
getEjbcaVersion()
Returns the version of the EJBCA server. |
HardTokenDataWS |
getHardTokenData(java.lang.String hardTokenSN,
boolean viewPUKData,
boolean onlyValidCertificates)
Fetches information about a hard token. |
java.util.List<HardTokenDataWS> |
getHardTokenDatas(java.lang.String username,
boolean viewPUKData,
boolean onlyValidCertificates)
Fetches all hard tokens for a given user. |
java.util.List<Certificate> |
getLastCAChain(java.lang.String caname)
Retrieves the latest CA path Note: the whole certificate chain is returned. |
java.util.List<Certificate> |
getLastCertChain(java.lang.String username)
Retrieves the latest certificate issued to the user. |
int |
getPublisherQueueLength(java.lang.String name)
Returns the length of a publisher queue. |
int |
isApproved(int approvalId)
Looks up if a requested action has been approved. |
boolean |
isAuthorized(java.lang.String resource)
Checks if a user is authorized to a given resource. |
void |
keyRecoverNewest(java.lang.String username)
Marks the user's latest certificate for key recovery. |
CertificateResponse |
pkcs10Request(java.lang.String username,
java.lang.String password,
java.lang.String pkcs10,
java.lang.String hardTokenSN,
java.lang.String responseType)
Generates a certificate for a user. |
KeyStore |
pkcs12Req(java.lang.String username,
java.lang.String password,
java.lang.String hardTokenSN,
java.lang.String keyspec,
java.lang.String keyalg)
Creates a server-generated keystore. |
void |
republishCertificate(java.lang.String serialNumberInHex,
java.lang.String issuerDN)
Republishes a selected certificate. |
void |
revokeCert(java.lang.String issuerDN,
java.lang.String certificateSN,
int reason)
Same as revokeCertBackdated(String, String, int, String) but revocation date is current time. |
void |
revokeCertBackdated(java.lang.String issuerDN,
java.lang.String certificateSN,
int reason,
java.lang.String sDate)
Revokes a user certificate. |
void |
revokeToken(java.lang.String hardTokenSN,
int reason)
Revokes all certificates mapped to a hardtoken. |
void |
revokeUser(java.lang.String username,
int reason,
boolean deleteUser)
Revokes all of a user's certificates. |
KeyStore |
softTokenRequest(UserDataVOWS userData,
java.lang.String hardTokenSN,
java.lang.String keyspec,
java.lang.String keyalg)
Generates a soft token certificate for a user. |
CertificateResponse |
spkacRequest(java.lang.String username,
java.lang.String password,
java.lang.String spkac,
java.lang.String hardTokenSN,
java.lang.String responseType)
Generates a certificate for a user. |
| Method Detail |
|---|
void caCertResponse(java.lang.String caname,
byte[] cert,
java.util.List<byte[]> cachain,
java.lang.String keystorepwd)
throws ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ca_functionality/renew_ca - /ca/<ca to import certificate>This method auto-senses if there is a new CA key that needs to be activated, it does this by comparing the public key in cert with public keys in the CAs token
caname - The name in EJBCA for the CA that will create the CSRcert - the CA certificate to import. Certificate format is the binary certificate bytes.cachain - the certificate chain for the CA this request is targeted for, the signing CA is in pos 0, it's CA (if it exists) in pos 1 etc. Certificate format is the binary certificate bytes.keystorepwd - If there is a new CA key that must be activates the keystore password is needed. Set to null if the request was generated using the existing CA keys.
CADoesntExistsException_Exception - if caname does not exist
AuthorizationDeniedException_Exception - if administrator is not authorized to import certificate.
ApprovalException_Exception - if the operation requires approval from another CA administrator, in this case an approval request is created for another administrator to approve
WaitingForApprovalException_Exception - if there is already a request waiting for approval
EjbcaException_Exception - other errors in which case an org.ejbca.core.ErrorCade is set in the EjbcaException
byte[] caRenewCertRequest(java.lang.String caname,
java.util.List<byte[]> cachain,
boolean regenerateKeys,
boolean usenextkey,
boolean activatekey,
java.lang.String keystorepwd)
throws ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ca_functionality/renew_ca - /ca/<ca to renew>
caname - The name in EJBCA for the CA that will create the CSRcachain - the certificate chain for the CA this request is targeted for, the signing CA is in pos 0, it's CA (if it exists) in pos 1 etc. Certificate format is the binary certificate bytes.
For DV renewals the cachain may be an empty list if there is a matching imported CVCA.
Matching means having the same mnemonic,country and sequence as well as being external.regenerateKeys - if renewing a CA this is used to also generate a new KeyPair, if this is true and activatekey is false, the new key will not be activated immediately, but added as "next" signingkey.usenextkey - if regenerateKey is true this should be false. Otherwise it makes a request using an already existing "next" signing key, perhaps from a previous call with regenerateKeys true.activatekey - if regenerateKey is true or usenextkey is true, setting this flag to true makes the new or "next" key be activated when the request is created.keystorepwd - password used when regenerating keys or activating keys, can be null if regenerateKeys and activatekey is false.
CADoesntExistsException_Exception - if caname does not exist
AuthorizationDeniedException_Exception - if administrator is not authorized to create request, renew keys etc.
ApprovalException_Exception - if a non-expired approval for this action already exists, i.e. the same action has already been requested.
WaitingForApprovalException_Exception - if the operation requires approval from another CA administrator, in this case an approval request is created for another administrator to approve
EjbcaException_Exception - other errors in which case an org.ejbca.core.ErrorCade is set in the EjbcaException
CertificateResponse certificateRequest(UserDataVOWS userData,
java.lang.String requestData,
int requestType,
java.lang.String hardTokenSN,
java.lang.String responseType)
throws ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
UserDoesntFullfillEndEntityProfile_Exception,
WaitingForApprovalException_Exception
Authorization requirements:
- Administrator flag set - /administrator - /ra_functionality/create_end_entity and/or edit_end_entity - /endentityprofilesrules/<end entity profile of user>/create_end_entity and/or edit_end_entity - /ca_functionality/create_certificate - /ca/<ca of user>When the requestType is PUBLICKEY the requestData should be an SubjectPublicKeyInfo structure either base64 encoded or in PEM format.
userData - the userrequestData - the PKCS10/CRMF/SPKAC/PUBLICKEY request in base64requestType - PKCS10, CRMF, SPKAC or PUBLICKEY request as specified by
CertificateHelper.CERT_REQ_TYPE_ parameters.hardTokenSN - If the certificate should be connected with a hardtoken, it is
possible to map it by give the hardTokenSN here, this will simplify revocation of a token
certificates. Use null if no hardtokenSN should be associated with the certificate.responseType - indicating which type of answer that should be returned, on of the
CertificateHelper.RESPONSETYPE_ parameters.
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized to request
NotFoundException_Exception - if user cannot be found
UserDoesntFullfillEndEntityProfile_Exception
ApprovalException_Exception
WaitingForApprovalException_Exception
EjbcaException_Exception
IllegalQueryExceptioneditUser(UserDataVOWS)
RevokeStatus checkRevokationStatus(java.lang.String issuerDN,
java.lang.String certificateSN)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /ca/<ca of certificate>
issuerDN - certificateSN - a hexa decimal string
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized.
EjbcaException_ExceptionRevokeStatus
void createCRL(java.lang.String caname)
throws ApprovalException_Exception,
ApprovalRequestExpiredException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /ca/<caid>
caname - the name in EJBCA of the CA that should have a new CRL generated
CADoesntExistsException_Exception - if a referenced CA does not exist
ApprovalException_Exception
EjbcaException_Exception - if an error occured
ApprovalRequestExpiredException_Exception
CertificateResponse crmfRequest(java.lang.String username,
java.lang.String password,
java.lang.String crmf,
java.lang.String hardTokenSN,
java.lang.String responseType)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception
username - the unique usernamepassword - the password sent with editUser callcrmf - the CRMF request message (only the public key is used.)responseType - indicating which type of answer that should be returned, on of the
CertificateHelper.RESPONSETYPE_ parameters.
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception
NotFoundException_Exception
EjbcaException_Exceptionpkcs10Request(String, String, String, String, String)
void customLog(int level,
java.lang.String type,
java.lang.String caName,
java.lang.String username,
Certificate certificate,
java.lang.String msg)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /log_functionality/log_custom_events (must be configured in advanced mode when editing access rules)
level - of the event, one of IEjbcaWS.CUSTOMLOG_LEVEL_ constantstype - userdefined string used as a prefix in the log commentcaName - of the ca related to the event, use null if no specific CA is related.
Then will the ca of the administrator be used.username - of the related user, use null if no related user exists.certificate - that relates to the log event, use null if no certificate is relatedmsg - message data used in the log comment. The log comment will have
a syntax of 'type : msg'
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if the administrators isn't authorized to log.
EjbcaException_Exception - if error occured server side
java.util.List<Certificate> cvcRequest(java.lang.String username,
java.lang.String password,
java.lang.String cvcreq)
throws ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
CertificateExpiredException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
SignRequestException_Exception,
UserDoesntFullfillEndEntityProfile_Exception,
WaitingForApprovalException_Exception
CertificateHelper.RESPONSETYPE_CERTIFICATE.
username - the user name of the user requesting the certificate.password - the password for initial enrollment, not used for renewal requests that can be authenticated using signatures with keys with valid certificates.cvcreq - Base64 encoded CVC request message.
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if administrator is not authorized to edit end entity or if an authenticated request can not be verified
SignRequestException_Exception - if the provided request is invalid, for example not containing a username or password
UserDoesntFullfillEndEntityProfile_Exception
NotFoundException_Exception
EjbcaException_Exception - for other errors, an error code like ErrorCode.SIGNATURE_ERROR (popo/inner signature verification failed) is set.
ApprovalException_Exception
WaitingForApprovalException_Exception
CertificateExpiredException_ExceptioneditUser(UserDataVOWS),
pkcs10Request(String, String, String, String, String),
ErrorCode
boolean deleteUserDataFromSource(java.util.List<java.lang.String> userDataSourceNames,
java.lang.String searchString,
boolean removeMultipleMatch)
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception,
MultipleMatchException_Exception,
UserDataSourceException_Exception
- Administrator flag set - /administrator - /userdatasourcesrules/<user data source>/remove_userdata (for all the given user data sources) - /ca/<all cas defined in all the user data sources>
userDataSourceNames - the names of the userdata source to remove fromsearchString - the search string to search forremoveMultipleMatch - if multiple matches of a search string should be removed othervise is none removed.
AuthorizationDeniedException_Exception - if the user isn't authorized to remove userdata from any of the specified user data sources
MultipleMatchException_Exception - if the searchstring resulted in a multiple match and the removeMultipleMatch was set to false.
UserDataSourceException_Exception - if an error occured during the communication with the user data source.
EjbcaException_Exception - if error occured server side
void editUser(UserDataVOWS userdata)
throws ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
UserDoesntFullfillEndEntityProfile_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ra_functionality/create_end_entity and/or edit_end_entity - /endentityprofilesrules/<end entity profile of user>/create_end_entity and/or edit_end_entity - /ca/<ca of user>
userdata - contains all the information about the user about to be added.
clearPwd indicates it the password should be stored in clear text, required
when creating server generated keystores.
CADoesntExistsException_Exception - if a referenced CA does not exist
ApprovalException_Exception
AuthorizationDeniedException_Exception
UserDoesntFullfillEndEntityProfile_Exception
WaitingForApprovalException_Exception
EjbcaException_Exception
IllegalQueryException
boolean existsHardToken(java.lang.String hardTokenSN)
throws EjbcaException_Exception
hardTokenSN - the serial number of the token to look for.
EjbcaException_Exception - if error occurred server side
java.util.List<UserDataSourceVOWS> fetchUserData(java.util.List<java.lang.String> userDataSourceNames,
java.lang.String searchString)
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception,
UserDataSourceException_Exception
- Administrator flag set - /administrator - /userdatasourcesrules/<user data source>/fetch_userdata (for all the given user data sources) - /ca/<all cas defined in all the user data sources>If not turned of in jaxws.properties then only a valid certificate required
userDataSourceNames - a List of User Data Source NamessearchString - to identify the userdata.
UserDataSourceException_Exception - if an error occurred connecting to one of UserDataSources
AuthorizationDeniedException_Exception
EjbcaException_Exception
java.util.List<Certificate> findCerts(java.lang.String username,
boolean onlyValid)
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /ra_functionality/view_end_entity - /endentityprofilesrules/<end entity profile>/view_end_entity - /ca/<ca of user>
username - a unique usernameonlyValid - only return valid certs not revoked or expired ones.
AuthorizationDeniedException_Exception - if client isn't authorized to request
EjbcaException_Exception
java.util.List<UserDataVOWS> findUser(UserMatch usermatch)
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception,
IllegalQueryException_Exception
- Administrator flag set - /administrator - /ra_functionality/view_end_entity - /endentityprofilesrules//view_end_entity - /ca/
usermatch - the unique user pattern to search for
UserDataVOWS objects (Max 100) containing the information about the user or null if there are no matches.
AuthorizationDeniedException_Exception - if client isn't authorized to request
IllegalQueryException_Exception - if query isn't valid
EjbcaException_Exception
java.util.List<TokenCertificateResponseWS> genTokenCertificates(UserDataVOWS userData,
java.util.List<TokenCertificateRequestWS> tokenRequests,
HardTokenDataWS hardTokenData,
boolean overwriteExistingSN,
boolean revokePreviousCards)
throws ApprovalException_Exception,
ApprovalRequestExecutionException_Exception,
ApprovalRequestExpiredException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
HardTokenExistsException_Exception,
UserDoesntFullfillEndEntityProfile_Exception,
WaitingForApprovalException_Exception
If the caller is an administrator - Administrator flag set - /administrator - /ra_functionality/create_end_entity and/or edit_end_entity - /endentityprofilesrules/<end entity profile>/create_end_entity and/or edit_end_entity - /ra_functionality/revoke_end_entity (if overwrite flag is set) - /endentityprofilesrules/<end entity profile>/revoke_end_entity (if overwrite flag is set) - /ca_functionality/create_certificate - /ca/<ca of all requested certificates> - /hardtoken_functionality/issue_hardtokensIf the user isn't an administrator the request will be added to a queue for approval.
userData - of the user that should be generatedtokenRequests - a list of certificate requestshardTokenData - data containing PIN/PUK infooverwriteExistingSN - if the the current hardtoken should be overwritten instead of throwing HardTokenExists exception.
If a card is overwritten, all previous certificates on the card is revoked.revokePreviousCards - tells the service to revoke old cards issued to this user. If the present card have the label TEMPORARY_CARD
old cards is set to CERTIFICATE_ONHOLD otherwise UNSPECIFIED.
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if the administrator isn't authorized.
WaitingForApprovalException_Exception - if the caller is a non-admin a must be approved before it is executed.
HardTokenExistsException_Exception - if the given hardtoken serial number already exists.
ApprovalRequestExpiredException_Exception - if the request for approval have expired.
ApprovalException_Exception - if error happened with the approval mechanisms
WaitingForApprovalException - if the request haven't been processed yet.
ApprovalRequestExecutionException_Exception - if the approval request was rejected
UserDoesntFullfillEndEntityProfile_Exception
EjbcaException_Exception
java.util.List<NameAndId> getAuthorizedEndEntityProfiles()
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /endentityprofilesrules/<end entity profile>Authored by Sebastien Levesque, Linagora. Javadoced by Tomas Gustavsson
EjbcaException_Exception - if an error occured
AuthorizationDeniedException_Exception
java.util.List<NameAndId> getAvailableCAs()
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception
- Administrator flag set - /administratorIf not turned of in jaxws.properties then only a valid certificate required Authored by Sebastien Levesque, Linagora. Javadoced by Tomas Gustavsson
EjbcaException_Exception - if an error occured
AuthorizationDeniedException_Exception
java.util.List<NameAndId> getAvailableCAsInProfile(int entityProfileId)
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /endentityprofilesrules/<end entity profile>If not turned of in jaxws.properties then only a valid certificate required Authorws by Sebastien Levesque, Linagora. Javadoced by Tomas Gustavsson
entityProfileId - id of an end entity profile where we want to find which CAs are available
EjbcaException_Exception - if an error occured
AuthorizationDeniedException_Exception
java.util.List<NameAndId> getAvailableCertificateProfiles(int entityProfileId)
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /endentityprofilesrules/<end entity profile>Authored by Sebastien Levesque, Linagora. Javadoced by Tomas Gustavsson
entityProfileId - id of an end entity profile where we want to find which certificate profiles are available
EjbcaException_Exception - if an error occured
AuthorizationDeniedException_Exception
Certificate getCertificate(java.lang.String certSNinHex,
java.lang.String issuerDN)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception
- A valid certificate - /ca_functionality/view_certificate - /ca/<of the issing CA>
certSNinHex - the certificate serial number in hexadecimal representationissuerDN - the issuer of the certificate
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if the calling administrator isn't authorized to view the certificate
EjbcaException_Exception - if error occured server sidejava.lang.String getEjbcaVersion()
HardTokenDataWS getHardTokenData(java.lang.String hardTokenSN,
boolean viewPUKData,
boolean onlyValidCertificates)
throws ApprovalRequestExecutionException_Exception,
ApprovalRequestExpiredException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
HardTokenDoesntExistsException_Exception,
NotFoundException_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ra_functionality/view_hardtoken - /endentityprofilesrules/<end entity profile>/view_hardtoken - /endentityprofilesrules/<end entity profile>/view_hardtoken/puk_data (if viewPUKData = true) - /ca/<ca of user>If the user isn't an administrator the request willbe added to a queue for approval.
hardTokenSN - of the token to look for.viewPUKData - if PUK data of the hard token should be returned.onlyValidCertificates - of all revoked and expired certificates should be filtered.
CADoesntExistsException_Exception - if a referenced CA does not exist
HardTokenDoesntExistsException_Exception - if the hardtokensn don't exist in database.
NotFoundException_Exception - if user for wich the hard token is registered does not exist
ApprovalRequestExpiredException_Exception - if the request for approval have expired.
ApprovalException - if error happened with the approval mechanisms
WaitingForApprovalException_Exception - if the request haven't been processed yet.
ApprovalRequestExecutionException_Exception - if the approval request was rejected
AuthorizationDeniedException_Exception
EjbcaException_Exception - if an exception occurred on server side.
java.util.List<HardTokenDataWS> getHardTokenDatas(java.lang.String username,
boolean viewPUKData,
boolean onlyValidCertificates)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /ra_functionality/view_hardtoken - /endentityprofilesrules/<end entity profile>/view_hardtoken - /endentityprofilesrules/<end entity profile>/view_hardtoken/puk_data (if viewPUKData = true)
username - to look for.viewPUKData - if PUK data of the hard token should be returned.onlyValidCertificates - of all revoked and expired certificates should be filtered.
EjbcaException_Exception - if an exception occurred on server side.
CADoesntExistsException_Exception
AuthorizationDeniedException_Exception
java.util.List<Certificate> getLastCAChain(java.lang.String caname)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /ca/<ca in question>
caname - a unique caname
AuthorizationDeniedException_Exception - if client isn't authorized to request
CADoesntExistsException_Exception
EjbcaException_Exception
java.util.List<Certificate> getLastCertChain(java.lang.String username)
throws AuthorizationDeniedException_Exception,
EjbcaException_Exception
- Administrator flag set - /administrator - /ra_functionality/view_end_entity - /endentityprofilesrules/<end entity profile>/view_end_entity - /ca/<ca of user>
username - a unique username
AuthorizationDeniedException_Exception - if client isn't authorized to request
EjbcaException_Exception
int getPublisherQueueLength(java.lang.String name)
throws EjbcaException_Exception
name - of the queue
EjbcaException_Exception
int isApproved(int approvalId)
throws ApprovalException_Exception,
ApprovalRequestExpiredException_Exception,
EjbcaException_Exception
approvalId - unique id for the action
ApprovalException_Exception - if approvalId doesn't exists
ApprovalRequestExpiredException_Exception - Throws this exception one time if one of the approvals have expired, once notified it wount throw it anymore.
EjbcaException_Exception - if error occured server side
boolean isAuthorized(java.lang.String resource)
throws EjbcaException_Exception
resource - the access rule to test
EjbcaException_ExceptionRevokeStatus
void keyRecoverNewest(java.lang.String username)
throws ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ra_functionality/keyrecovery - /endentityprofilesrules/<end entity profile>/keyrecovery - /ca/
username - unique username i EJBCA
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized.
NotFoundException_Exception - if user doesn't exist
WaitingForApprovalException_Exception - if request has bean added to list of tasks to be approved
ApprovalException_Exception - if there already exists an approval request for this task
EjbcaException_Exception - if there is a configuration or other error
CertificateResponse pkcs10Request(java.lang.String username,
java.lang.String password,
java.lang.String pkcs10,
java.lang.String hardTokenSN,
java.lang.String responseType)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception
- Administrator flag set - /administrator - /ra_functionality/view_end_entity - /endentityprofilesrules/<end entity profile>/view_end_entity - /ca_functionality/create_certificate - /ca/<ca of user>
username - the unique usernamepassword - the password sent with editUser callpkcs10 - the base64 encoded PKCS10 (only the public key is used.)hardTokenSN - If the certificate should be connected with a hardtoken, it is
possible to map it by give the hardTokenSN here, this will simplify revocation of a tokens
certificates. Use null if no hardtokenSN should be associated with the certificate.responseType - indicating which type of answer that should be returned, on of the
CertificateHelper.RESPONSETYPE_ parameters.
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized to request
NotFoundException_Exception - if user cannot be found
EjbcaException_Exception
KeyStore pkcs12Req(java.lang.String username,
java.lang.String password,
java.lang.String hardTokenSN,
java.lang.String keyspec,
java.lang.String keyalg)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception
UserDataVOWS.TOKEN_TYPE_P12.- Administrator flag set - /administrator - /ra_functionality/view_end_entity - /endentityprofilesrules/<end entity profile>/view_end_entity - /ca_functionality/create_certificate - /ca/<ca of user>
username - the unique usernamepassword - the password sent with editUser callhardTokenSN - If the certificate should be connected with a hardtoken, it is
possible to map it by give the hardTokenSN here, this will simplify revocation of a tokens
certificates. Use null if no hardtokenSN should be associated with the certificate.keyspec - that the generated key should have, examples are 1024 for RSA or prime192v1 for ECDSA.keyalg - that the generated key should have, RSA, ECDSA. Use one of the constants in
AlgorithmConstants.KEYALGORITHM_...
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized to request
NotFoundException_Exception - if user cannot be found
EjbcaException_Exception
void republishCertificate(java.lang.String serialNumberInHex,
java.lang.String issuerDN)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
PublisherException_Exception
- Administrator flag set - /administrator - /ra_functionality/view_end_entity - /endentityprofilesrules/<end entity profile>/view_end_entity - /ca/<ca of user>
serialNumberInHex - of the certificate to republishissuerDN - of the certificate to republish
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if the administratior isn't authorized to republish
PublisherException_Exception - if something went wrong during publication
EjbcaException_Exception - if other error occured on the server side.
void revokeCert(java.lang.String issuerDN,
java.lang.String certificateSN,
int reason)
throws AlreadyRevokedException_Exception,
ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
WaitingForApprovalException_Exception
revokeCertBackdated(String, String, int, String) but revocation date is current time.
issuerDN - certificateSN - reason -
CADoesntExistsException_Exception
AuthorizationDeniedException_Exception
NotFoundException_Exception
EjbcaException_Exception
ApprovalException_Exception
WaitingForApprovalException_Exception
AlreadyRevokedException_Exception
void revokeCertBackdated(java.lang.String issuerDN,
java.lang.String certificateSN,
int reason,
java.lang.String sDate)
throws AlreadyRevokedException_Exception,
ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
DateNotValidException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
RevokeBackDateNotAllowedForProfileException_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ra_functionality/revoke_end_entity - /endentityprofilesrules//revoke_end_entity - /ca/<ca of certificate>
To use this call the certificate to be used must be from a certificate profile that has 'Allow back dated revocation' enabled.
If RevokeBackDateNotAllowedForProfileException is throwed then the CA is not
allowing back date and you could then revoke with revokeCert(String, String, int).
DateNotValidException means that the date parameter can't be parsed and in this case it might also
be better with a fall back to revokeCert(String, String, int).
issuerDN - of the certificate to revokecertificateSN - of the certificate to revokereason - for revocation, one of RevokeStatus.REVOKATION_REASON_ constants.sDate - The revocation date. If null then the current date is used. If specified then the profile of the certificate must allow
"back dating" and the date must be i the past. The parameter is specified as an
ISO 8601 string.
An example: 2012-06-07T23:55:59+02:00
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized.
NotFoundException_Exception - if certificate doesn't exist
WaitingForApprovalException_Exception - If request has bean added to list of tasks to be approved
ApprovalException_Exception - There already exists an approval request for this task
AlreadyRevokedException_Exception - The certificate was already revoked, or you tried to unrevoke a permanently revoked certificate
EjbcaException_Exception - internal error
RevokeBackDateNotAllowedForProfileException_Exception - if back date is not allowed in the certificate profile
DateNotValidException_Exception - if the date is not a valid ISO 8601 string or if it is in the future.
void revokeToken(java.lang.String hardTokenSN,
int reason)
throws AlreadyRevokedException_Exception,
ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ra_functionality/revoke_end_entity - /endentityprofilesrules//revoke_end_entity - /ca/<ca of certificates on token>
hardTokenSN - of the hardTokenSNreason - for revocation, one of RevokeStatus.REVOKATION_REASON_ constants
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized.
NotFoundException_Exception - if token doesn't exist
WaitingForApprovalException_Exception - If request has bean added to list of tasks to be approved
ApprovalException_Exception - There already exists an approval request for this task
AlreadyRevokedException_Exception - The token was already revoked.
EjbcaException_Exception
void revokeUser(java.lang.String username,
int reason,
boolean deleteUser)
throws AlreadyRevokedException_Exception,
ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
WaitingForApprovalException_Exception
- Administrator flag set - /administrator - /ra_functionality/revoke_end_entity - /endentityprofilesrules/<end entity profile>/revoke_end_entity - /ca/
username - unique username i EJBCAreason - for revocation, one of RevokeStatus.REVOKATION_REASON_ constants
or use RevokeStatus.NOT_REVOKED to un-revoke a certificate on hold.deleteUser - deletes the users after all the certificates have been revoked.
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized.
NotFoundException_Exception - if user doesn't exist
WaitingForApprovalException_Exception - if request has bean added to list of tasks to be approved
ApprovalException_Exception - if there already exists an approval request for this task
AlreadyRevokedException_Exception - if the user already was revoked
EjbcaException_Exception
KeyStore softTokenRequest(UserDataVOWS userData,
java.lang.String hardTokenSN,
java.lang.String keyspec,
java.lang.String keyalg)
throws ApprovalException_Exception,
AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception,
UserDoesntFullfillEndEntityProfile_Exception,
WaitingForApprovalException_Exception
UserDataVOWS.TOKEN_TYPE_ (JKS or P12).
A token password must also be defined.Authorization requirements:
- Administrator flag set - /administrator - /ra_functionality/create_end_entity and/or edit_end_entity - /endentityprofilesrules/<end entity profile of user>/create_end_entity and/or edit_end_entity - /ca_functionality/create_certificate - /ca/<ca of user>
userData - the userhardTokenSN - If the certificate should be connected with a hardtoken, it is
possible to map it by give the hardTokenSN here, this will simplify revocation of a token
certificates. Use null if no hardtokenSN should be associated with the certificate.keyspec - that the generated key should have, examples are 1024 for RSA or prime192v1 for ECDSA.keyalg - that the generated key should have, RSA, ECDSA. Use one of the constants in
AlgorithmConstants.KEYALGORITHM_...
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception - if client isn't authorized to request
NotFoundException_Exception - if user cannot be found
UserDoesntFullfillEndEntityProfile_Exception
ApprovalException_Exception
WaitingForApprovalException_Exception
EjbcaException_Exception
IllegalQueryExceptioneditUser(UserDataVOWS)
CertificateResponse spkacRequest(java.lang.String username,
java.lang.String password,
java.lang.String spkac,
java.lang.String hardTokenSN,
java.lang.String responseType)
throws AuthorizationDeniedException_Exception,
CADoesntExistsException_Exception,
EjbcaException_Exception,
NotFoundException_Exception
username - the unique usernamepassword - the password sent with editUser callspkac - the SPKAC (netscape) request message (only the public key is used.)responseType - indicating which type of answer that should be returned, on of the
CertificateHelper.RESPONSETYPE_ parameters.
CADoesntExistsException_Exception - if a referenced CA does not exist
AuthorizationDeniedException_Exception
NotFoundException_Exception
EjbcaException_Exceptionpkcs10Request(String, String, String, String, String)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||