SSL Termination

The SSL Termination feature allows a load balancer user to terminate SSL traffic at the load balancer layer versus at the web server layer. A user may choose to configure SSL Termination using a key and an SSL certificate or an (Intermediate) SSL certificate.

When SSL Termination is configured on a load balancer, a secure shadow server is created that listens only for secure traffic on a user-specified port. This shadow server is only visible to and manageable by the system. Existing or updated attributes on a load balancer with SSL Termination will also apply to its shadow server. For example, if Connection Logging is enabled on an SSL load balancer, it will also be enabled on the shadow server and Cloud Files logs will contain log files for both.

Setup

In order to interact with this feature you must first retrieve a particular load balancer, like so:

$loadBalancer = $service->loadBalancer('{id}');

View configuration

/** @var $sslConfig OpenCloud\LoadBalancer\Resource\SSLTermination **/
$sslConfig = $loadBalancer->SSLTermination();

Update configuration

$sslConfig->update(array(
    'enabled'     => true,
    'securePort'  => 443,
    'privateKey'  => $key,
    'certificate' => $cert
));

For a full list, with explanations, of required and optional attributes, please consult the official documentation

Get the executable PHP script for this example

Delete configuration

$sslConfig->delete();