EJBCA deprecated
Certificate lookup and certificate issuance with EJBCA
Overview
This article describes the connection of OX Guard to EJBCA. EJBCA is a certificate authority software that issues and manages certificates. OX Guard uses an EJBCA server for two functions:
- OX Guard searches the EJBCA server for the certificates of recipients.
- OX Guard requests new S/MIME certificates for the users of the deployment from the EJBCA server.
Connection
OX Guard calls the REST API of the EJBCA server over HTTPS and authenticates with a client certificate. The following properties configure the connection:
com.openexchange.guard.pki.ejbca.serverBaseUrlspecifies the base URL of the REST API, for examplehttps://ejbca.example.com/ejbca/ejbca-rest-api/.com.openexchange.guard.pki.ejbca.certificateandcom.openexchange.guard.pki.ejbca.keycontain the client certificate and the private key of the client certificate in PEM format.com.openexchange.guard.pki.ejbca.cacontains the certificate of the certificate authority in PEM format. OX Guard accepts the TLS certificate of the EJBCA server only if the certificate chain of the TLS certificate is verified against this certificate authority.com.openexchange.guard.pki.ejbca.verifySSLHostnameandcom.openexchange.guard.pki.ejbca.timeoutcontrol the verification of the host name and the timeout of the requests.
The connection to EJBCA is only active if the property com.openexchange.guard.pki.ejbca.enabled is true and the three properties for the base URL, the client certificate and the private key are set.
Certificate lookup
OX Guard searches the EJBCA server for active certificates whose subject contains the common name CN=<address> of the recipient. OX Guard uses a found certificate only if the certificate is valid and the certificate chain is verified against a certificate authority that the sender trusts. With the property com.openexchange.guard.pki.ejbca.trustAll, OX Guard trusts every certificate from the EJBCA server without this verification.
The certificate lookup is only active if the property com.openexchange.guard.pki.ejbca.lookupAvail is true. The section EJBCA in the article Key and Certificate Discovery describes the position of EJBCA in the lookup order.
Certificate issuance
A user for whom EJBCA manages the certificates creates a new S/MIME certificate in the OX Guard settings. OX Guard issues the certificate in the following steps:
- OX Guard creates a new key pair of the type in
com.openexchange.guard.pki.ejbca.cryptoType. - OX Guard sends a certificate signing request with the mail address of the user as common name to the EJBCA server. The request names the certificate authority, the certificate profile and the end entity profile from the properties
com.openexchange.guard.pki.ejbca.certificateAuthority,com.openexchange.guard.pki.ejbca.certificateProfileandcom.openexchange.guard.pki.ejbca.endEntityProfile. The IMAP login of the user is the user name of the end entity in EJBCA. - OX Guard verifies the issued certificate against the certificate authorities that the user trusts, unless
com.openexchange.guard.pki.ejbca.trustAllistrue. - OX Guard stores the certificate and the private key, protected by the password of the user, as the current S/MIME certificate of the user.
The EJBCA server has to issue the certificate immediately. OX Guard does not support an approval process in EJBCA. The property com.openexchange.guard.pki.ejbca.customCreateMessage specifies a text that the client shows to the user before the creation of the certificate.
The certificate issuance is only available to a user if the property com.openexchange.guard.pki.ejbca.managesUsersCertificates is true for the user.