Hardening security

This section gives you information on hardening security for your Helix DAM instance.

In this section:

Enable MongoDB authentication

By default, MongoDB only listens on localhost on Standard installations and does not use authentication. For added security, authentication can also be configured on Standard installations.

  1. Run the following command to create TeamHub MongoDB admin and user credentials:

     sudo su - hth
     create_mongodb_users.sh
    
  2. Update the TeamHub Configuration file at /var/opt/hth/shared/hth.json with the TeamHub MongoDB user credentials:

     "backend": {
       ...
       "db_username": "Enter username of Helix TeamHub MongoDB user",
       "db_password": "Enter password of Helix TeamHub MongoDB user"
       ...
     }
     ...
     "mongodb": {
       ...
       "username": "Enter username of Helix TeamHub MongoDB user",
       "password": "Enter password of Helix TeamHub MongoDB user"
       ...
     }
    
  3. Apply the changes by reconfiguring Helix DAM:

     sudo hth-ctl reconfigure
    

Configure HTTPS and SSL

HTTPS

By default, Helix DAM does not enforce HTTPS and SSL connections to your server instance. This may be acceptable for services running behind an organization's firewall, but enforcing HTTPS and SSL is recommended if the Helix DAM instance is exposed to a public network.

To enforce HTTPS:

  1. Log in to the /admin URL of the Helix DAM installation and navigate to Preferences.
  2. Under Security, select Enforce HTTPS.

    Configuring HTTPS and SSL
  3. Click Save preferences.

SSL services

If Enforce HTTPS is selected:

  • To configure the Helix DAM services to use the SSL certificates uploaded to your server, select Enable SSL services.

  • If have Helix DAM running in Enterprise mode with a load balancer, leave Enable SSL services unselected when SSL is offloaded to your load balancer. The SSL certificates must be setup on your load balancer.

To enable SSL services:

  1. Log in to the /admin URL of the Helix DAM installation and navigate to Preferences.
  2. Under Security, select Enable SSL services.

    Configuring HTTPS and SSL
  3. Upload a valid x509 certificate and private key (RSA) in PEM format, with base64-encoded content between header and footer lines.

    Note

    Instructions for generating the certificate and private key depend on the provider. For security reasons, we recommend that you only use a self-signed certificate for testing.

    To generate a self-signed certificate and key, you can use OpenSSL:

    openssl req -newkey rsa:2048 -new -x509 -days 730 -nodes -out hth.crt -keyout hth.key
  4. Click Save preferences.

    The certificate expiration date and the assigned domain are displayed.

Troubleshooting tips

Include all certificates to the PEM file.

A single PEM file can contain a number of certificates and a key. For example:

  • Public certificate
  • Intermediate Certificate
  • Root certificate
  • Private key

Include all of the certificates in the PEM file, but not the private key. Otherwise, Git clients may receive the following error messages when doing operations against repositories:

https://helixteamhub.com/hth/projects/platform/repositories/git/insufficient-ssl-cert/': SSL certificate problem: unable to get local issuer certificate

or

error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing.

Configure nginx security

The following nginx security settings are configured using the nginx configuration flags.

Limiting access to the Admin UI by IP address

Limit access to the Admin user interface to specified IP addresses or CIDR (Classless Inter-Domain Routing) using the admin_allowed_ips configuration flag.

The default value is [], all IP addresses have access to TeamHub Admin.

Limiting access to specific hosts

Specify the hosts that can connect to Helix DAM by adding them to the allowed_hosts configuration flag. This mitigates host header injection attacks.

  • [] All hosts can connect to Helix DAM. This is the default value.

  • ["https://other1.com", "https://other2.com"] An array of specific hosts that can connect to Helix DAM.

Configuring Cross-Origin Resource Sharing (CORS)

Cross-Origin Resource Sharing controls the external domains that can be used with Helix DAM. Set the cors_allowed_domains configuration flag to the external domains to use with Helix DAM:

  • "*" An asterisk allows any domain. This is the default value.

  • "" An empty string disables CORS support.

  • ["https://other1.com", "https://other2.com"] An array of specific external domains to support for CORS.

For more information about CORS, see Cross-Origin Resource Sharing (CORS).

Specifying enabled ciphers

Specify the nginx ciphers you want enabled in the ssl_ciphers configuration flag in the format understood by the OpenSSL library

The default nginx ciphers are:

ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305

Enabling the SSL protocols to use

Specify the SSL protocols you want enabled using the ssl_protocols configuration flag.

The default value is TLSv1.2 TLSv1.3.

Configure anti-virus protection

To protect your Helix DAM data, set up your preferred anti-virus tool to scan the following locations:

  • Helix Core Server that Helix DAM connects to

  • /var/opt/hth/shared directory where all attachments are stored for Helix DAM

Enable backups

Tip

For more information about managing backups and restoring backups, see Backups and restoration.

To enable backups, activate them by setting the configuration flags as shown below:

Standard

  1. Merge the following configuration to /var/opt/hth/shared/hth.json and make sure you add the backup settings under the existing keys if they already exist in the configuration.

    {
      "backend": {
        "backups": true
      },
      "mongodb": {
        "backups": true
      },
      "repos": {
        "backups": true
      },
      "docker_registry": {
        "backups": true
      }
    }
    
  2. Apply the changes by reconfiguring TeamHub:

  3. sudo hth-ctl reconfigure

Enterprise

In Enterprise deployment, the Helix DAM services are distributed across the server roles. To enable backups, activate the backup flags in /var/opt/hth/shared/hth.json on the appropriate servers. Make sure you add the backup settings under the existing keys if they already exist in the configuration.

Helix TeamHub DB

{
  "mongodb": {
    "backups": true
  }
}

By default, mailing is not configured for the DB node. To get notifications if failures occur during DB backups, you need to add the following:

  1. Configure the postfix section of hth.json to be identical with the one on your web node.
  2. Add the email that will receive the notifications to the app section of hth.json:

    {
      "app": {
        "email": "support@acme.com"
    
      }
    }
    

Helix DAM Web

{
  "backend": {
    "backups": true
  },
  "repos": {
    "backups": true
  },
  "docker_registry": {
	"backups": true
  }
}

Apply the changes by reconfiguring Helix DAM on each server:

sudo hth-ctl reconfigure