Cora Knowledge Center

Support

Setting HTTPS Site Bindings

V9.0

Description

Use this script to configure the Cora SeQuence site to use the HTTPS protocol.

Prerequisites

Before you run the script, make sure that:

  • The certificate is installed on the server.
  • You have the certificate thumbprint.
  • You have configured your DNS and/or load balancer accordingly.

Procedure

Run the script on the servers where the Flowtime and Administration site applications are deployed.

  1. Set the $hostHeader and $certificateThumbprint parameters as required.
  2. For Get-CoraSeQuenceSite, replace the SiteType parameter with the relevant site type: Administration or Flowtime.  
  3. Run the script.

Sample 

#Set the required variables
$hostHeader = "administration.corasequence.com"
$certificateThumbprint = "XXXXX"

#Get the site
$site = Get-CoraSeQuenceSite -SiteType Administration
if (-not ($site))
{
    Write-Error -Message "Site not found!"
}
else
{
    #Remove all existing bindings - it is recommended to have a single binding per site
    $site | Get-WebBinding | Remove-WebBinding
    #Create the new HTTPS binding
    New-WebBinding -Protocol https -Port 443 -HostHeader $hostHeader -IPAddress * -Name $site.Name
    $binding = Get-WebBinding -Name $site.Name
    #Get the certificate and add it to the binding
    $certificate = Get-Item -Path "Cert:\LocalMachine\My\$certificateThumbprint"
    $binding.AddSslCertificate($certificate.GetCertHashString(),"my")
    #Set the WCF configuration for HTTPS - also requires the current authentication type to be provided
    Set-CoraSeQuenceSiteWCFConfiguration -SiteType Administration -AuthenticationType Windows -Protocol HTTPS
}