S/MIME deprecated

Using S/MIME with OX Guard

Overview

This article describes the support of S/MIME in OX Guard. OX Guard encrypts and signs mails with S/MIME in addition to PGP. A user can use S/MIME only, PGP only, or both. S/MIME applies to mails only, and OX Guard encrypts Drive files with PGP.

S/MIME and PGP differ in the number of possible recipients. S/MIME requires a certificate from a certificate authority for every participant. With PGP, OX Guard creates a key pair or a guest account for a recipient without a key, which is not possible with S/MIME.

Capability

S/MIME requires no setup beyond the setup of OX Guard. The capability com.openexchange.capability.smime enables S/MIME for a user, alone or together with the capabilities for PGP. The section Capabilities of the article Setup and Configuration describes how capabilities are set for the whole deployment, per context or per user.

Encryption methods

The capabilities of a user determine whether the user has a choice of the encryption method. A user with the capability smime or guard-mail uses one encryption method. A user with both capabilities can use S/MIME and PGP, chooses the method per mail and can have different passwords for S/MIME and PGP.

A user with both capabilities has to enable S/MIME in the settings of OX Guard before the user can use S/MIME. Until then, OX Guard treats the user as a user with PGP only. After that, the user chooses the method when encrypting a mail, and the password prompts name the method.

Certificates

This section describes the certificates of users, the certificate authorities that OX Guard trusts and the check of revoked certificates.

User certificates

A user with S/MIME requires their own certificate with the private key. OX Guard stores the certificate and the private key of the user. OX Guard accepts the certificate as PKCS#12 file, which reaches OX Guard in one of two ways:

  • The user uploads the PKCS#12 file in the settings of OX Guard. The upload accepts files with the extension .p12 or .pfx.
  • An administrator imports the PKCS#12 file for the user with the command mwctl guard import cert in the Toolkit Container. The command requires the context ID and the user ID of the user, the password of the PKCS#12 file and a new password, which protects the private key in OX Guard:
mwctl guard import cert -c <CONTEXT-ID> -i <USER-ID> --password <PASSWORD> --newpassword <NEW-PASSWORD> <FILE>

The section Key and certificate handling of the App Suite Toolkit documentation describes the import of certificates. As an alternative, the legacy command line tool smime in a pod of the OX App Suite Middleware imports the PKCS#12 file:

/opt/open-xchange/sbin/smime -A <ADMIN> -P <ADMIN-PASSWORD> -m <FILE> -c <CONTEXT-ID> -i <USER-ID> -k <PASSWORD> -n <NEW-PASSWORD>

Certificate authorities

OX Guard trusts the certificate authorities in the default truststore of the Java virtual machine of the OX App Suite Middleware. A different truststore with a smaller set of certificate authorities can be configured for the Java virtual machine.

In addition, OX Guard can trust imported certificate authorities, for example the certificate authority of a company or a third-party certificate authority that the default truststore does not contain. In a deployment for several organizations, one organization usually does not trust the certificate authority of another organization. OX Guard therefore assigns every imported certificate authority to a group ID. A user trusts the imported certificate authorities of exactly one group ID, which the property com.openexchange.smime.caGroupId (default 0) specifies. All users with the default value trust the certificate authorities with the group ID 0. The property is config-cascade aware and can be set per context or per user.

The command mwctl guard import cacert in the Toolkit Container imports the certificate of a certificate authority as PEM file for a group ID:

mwctl guard import cacert -g 1 /path/to/ca.pem

As an alternative, the legacy command line tool smime imports the certificate of a certificate authority:

/opt/open-xchange/sbin/smime -A <ADMIN> -P <ADMIN-PASSWORD> -a /path/to/ca.pem -g 1

Certificate revocation

A certificate authority publishes revoked certificates in a certificate revocation list (CRL). A certificate names the address of the CRL in the extension CRL Distribution Points. If the property com.openexchange.smime.checkCRL (default false) is true, OX Guard downloads the CRL from this address and checks whether the certificate is revoked. OX Guard runs the check during the verification of signatures and during the encryption of mails.

OX Guard keeps a downloaded CRL in a cache. If the cache does not contain the CRL, the download of the CRL delays the verification of the signature or the encryption of the mail.

Certificates of recipients

To encrypt a mail with S/MIME, OX Guard requires the certificate of every recipient. The section S/MIME certificates of the article Key and Certificate Discovery describes the sources from which OX Guard obtains the certificates of recipients.