7.10.1. Procedure – Encrypting audit trails

Purpose: 

To prevent unauthorized access to the audit trail files, PSM can encrypt:

  • The entire trail.

  • The entire trail, and the upstream part with an additional (set of) certificate(s).

  • Only the upstream part.

With upstream encryption, the passwords are visible only with the private key of the certificate used for encrypting the upstream traffic.

Note

Even if the upstream traffic is encrypted with a separate certificate, only one audit trail file is created for a session.

Encrypting the upstream part has the following limitations:

  • During indexing, command detection does not work without the upstream encryption keys.

Tip

For more information on uploading certificates for indexing and replaying audit trails, see:

Encryption requires one or more RSA keys (in PEM-encoded X.509 certificates), depending on the configuration.

Note

Certificates are used as a container and delivery mechanism. For encryption and decryption, only the keys are used.

Balabit recommends using 2048-bit RSA keys (or stronger).

Use every keypair or certificate only for one purpose. Do not reuse cryptographic keys or certificates, for example, do not use the certificate of the PSM webserver to encrypt audit trails, or do not use the same keypair for signing and encrypting data.

The following encryption options are available:

  • Encrypt with a single certificate. This is the most simple approach: PSM uses one certificate to encrypt the audit trails, and anyone who has the private key of that certificate can replay the audit trails. If that key is lost, there is no way to open the audit trails.

  • Encrypt separately with multiple certificates.PSM uses two or more certificates separately to encrypt the audit trails, and anyone who has the private key of one of the encryption certificates can replay the audit trails.

  • Encrypt jointly with two certificates.PSM uses two certificates together (a certificate-pair) to encrypt the audit trails. The private keys of both encryption certificates are needed to replay the audit trails. This is a kind of "four-eyes in auditing".

You can combine the different encryption methods, so for example it is possible to encrypt the audit trails with multiple certificate-pairs, and to replay the trails only if the private keys of a certificate-pair are available. This is true for encrypting the upstream traffic as well. At the extreme, you will need four private keys to fully replay an audit trail: two to open the normal traffic, and two more to display the upstream traffic.

Note that PSM itself cannot create the certificates used to encrypt the audit trails.

Tip

If two certificates are displayed in a row, they are a certificate-pair and you need the private key of both to replay the audit trails. If two certificates are displayed in separate rows, you need the one of the private keys to replay the audit trails. If there are multiple rows containing two certificates, you need the private keys of the certificate(s) listed in any of the rows.

Figure 7.11. Policies > Audit Policies — Encrypting audit trails: joint encryption with a certificate pair

Policies > Audit Policies — Encrypting audit trails: joint encryption with a certificate pair

Each audit policy can have up to 8 lines of certificate pairs.

Steps: 

  1. Navigate to Policies > Audit Policies and select the audit policy you will use in your connections.

    Tip

    By default, every connection uses the built-in default audit policy. Unless you use a custom audit policy, modifying the default audit policy will affect every audited channel of the connections passing through PSM.

  2. Select the Enable encryption option.

  3. To upload a certificate for encrypting the entire trail:

    1. Click the icon under the Encryption cert (X.509 RSA) 4-eyes cert (X.509 RSA) row.

    2. Click on the left icon and upload a certificate to PSM. This certificate will be used to encrypt the audit trails, and it must not include the private key.

      Note

      To replay the audit trails, you need the private key of the certificate on the computer running the Audit Player application.

    3. Optional step: To encrypt the audit trails jointly with another certificate, click on the right icon and upload a certificate to PSM. Note that the private key of both certificates will be required to replay the audit trails.

    4. Repeat these steps to encrypt the audit trails separately with additional certificates.

  4. To upload a certificate for encrypting the upstream traffic:

    1. Select Encrypt upstream traffic with different certificates.

    2. Click the icon under the Encryption cert (X.509 RSA) 4-eyes cert (X.509 RSA) row.

    3. Click on the left icon and upload a certificate to PSM. This certificate will be used to encrypt the audit trails, and it must not include the private key.

      Note

      To replay the upstream part of the audit trails, you need the private key of the certificate on the computer running the Audit Player application.

    4. Optional step: To encrypt the audit trails jointly with another certificate, click on the right icon and upload a certificate to PSM. Note that the private key of both certificates will be required to replay the audit trails.

    5. Repeat these steps to encrypt the upstream separately with additional certificates.

  5. Click .