TLS Connections in PCF Deployments

Pivotal Cloud Foundry (PCF) uses Transport Layer Security (TLS) protocols to secure connections between internal components, app containers, and customer hardware.

Within a PCF deployment, TLS secures connections between components like the Ops Manager Director and service tiles. PCF components also use TLS connections to secure communications with external hardware, such as customer load balancers.

In Elastic Runtime, app instance containers have identity credentials that enable TLS communication by app instances.

App Instance Container Identity Credentials

Each app instance container in PCF has a PEM-encoded X.509 certificate and PKCS #1 RSA private key. App developers can use these credentials to enable secure TLS communications from their apps.

Instance container certificates are issued from the platform root Certificate Authority (CA) and have the following property values:

  • Common Name is the app instance GUID
  • Organizational Unit is the app GUID
  • Subject Alternative Name (SAN) contains the container IP address for the app instance

Each container stores its credentials in the following variables:

Credential / Keypair Element Environment Variable Command to Retrieve Value
Certificate CF_INSTANCE_CERT cf ssh APP-NAME -c 'cat $CF_INSTANCE_CERT'
Private Key CF_INSTANCE_KEY cf ssh APP-NAME -c 'cat $CF_INSTANCE_KEY'

Each container VM also stores the platform root CA certificate in /etc/cf-system-certificates.

To run TLS connections or otherwise use instance container credentials from their apps, developers must first add the certificates to their development stack configuration.

For more information about instance ID creds, see the Instance Identity document in the diego-release repository.

TLS Cipher Suites

By default, PCF uses a limited set of cipher suites to secure its internal communications. However, some components used in PCF, like Gorouter and HAProxy, may support additional TLS cipher suites to accommodate older clients outside of PCF.

The AWS Classic load balancer does not support the recommended TLS cipher suites. See Securing Traffic into Cloud Foundry for details and mitigations.

For components that allow you to configure TLS cipher suites, only specify the TLS cipher suites that you need.

TLS Cipher Suite Recommendations

The default and recommended version of TLS to use is TLS v1.2.

The recommended TLS cipher suites to use within PCF are the following:

  • TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

Gorouter Configuration

As part of your Elastic Runtime networking configuration, you must specify the TLS cipher suites that Gorouter uses to secure its communications. Only specify the cipher suites that you need.

The recommended TLS cipher suites for Gorouter are:

  • ECDHE-RSA-AES128-GCM-SHA256
  • ECDHE-RSA-AES256-GCM-SHA384

You can specify other cipher suites and a different minimum version of TLS support if your deployment requires it. For a list of other cipher suites and other versions of TLS that are optionally supported by Gorouter, see Securing Traffic into Cloud Foundry.

For instructions on how to configure the TLS cipher suites for Gorouter, see the Elastic Runtime installation documentation for the IaaS of your deployment. For example, if you are deploying Elastic Runtime on GCP, see Step 6: Configure Networking.

HAProxy Configuration

As part of your Elastic Runtime networking configuration, you must specify the TLS cipher suites that HAProxy uses to secure its communications. Only specify the cipher suites that you need.

The recommended TLS cipher suites for HAProxy are:

  • DHE-RSA-AES128-GCM-SHA256
  • DHE-RSA-AES256-GCM-SHA384
  • ECDHE-RSA-AES128-GCM-SHA256
  • ECDHE-RSA-AES256-GCM-SHA384

You can specify other cipher suites and a different minimum version of TLS support if your deployment requires it. For a list of other cipher suites and other versions of TLS that are optionally supported by HAProxy, see ciphers - Cipher Suite Names in the OpenSSL documentation.

If you use the default and recommended Gorouter TLS cipher suites in Elastic Runtime, then ensure you have included these Gorouter TLS cipher suites in your HAProxy TLS cipher suite configuration.

If you change the default Gorouter TLS cipher suites in Elastic Runtime, and you change the TLS cipher suites for HAProxy, ensure that you have at least one overlapping TLS cipher suite within the two sets.

For instructions on how to configure the TLS cipher suites for HAProxy, see the Elastic Runtime installation documentation for the IaaS of your deployment. For example, if you are deploying Elastic Runtime on GCP, see Step 6: Configure Networking.

Create a pull request or raise an issue on the source for this page in GitHub