Enabling HTTPS for the Add-on service

You can enable HTTPS for your Add-on Service by hand by using standard ASP .NET Core settings in its appsettings.json file, but you can also use a script included with the product to generate an HTTPS certificate and update appsettings.json at the same time.

Procedure

  1. Go to the root location of your Add-on service.
  2. If you are on a Windows machine, run the following command:
    generateCertificate.ps1 -Name SERVICENAME -DNS DNSNAME -Location CERTIFICATELOCATION -Store CERTIFICATESTORE -UpdateAppSettings
    where:
    • SERVICENAME is a human-friendly name for the certificate. If you omit the -Name parameter, its value defaults to Tridion_AddonService.
    • DNSNAME is the DNS name to put into the subject of the certificate. If you omit the DNS parameter, its value defaults to localhost.
    • CERTIFICATELOCATION is the name of the certificate location. If you omit the Location parameter, its value defaults to LocalMachine.
    • CERTIFICATESTORE is the name of the certificate store. If you omit the Store parameter, its value defaults to Root.
    • the -UpdateAppSettings switch, if specified, causes the new certificate to be configured in appsettings.json. By default, this switch is turned off, and the file isn't modified.
  3. Alternatively, if you are on a Linux machine, run the following command:
    generateCertificate.sh -password=PASSWORD -updateappsettings
    where:
    • PASSWORD is a human-friendly name for the certificate. If you omit the -password parameter, its value defaults to tridion.
    • the -updateappsettings switch, if specified, causes the new certificate to be configured in appsettings.json. By default, this switch is turned off, and the file isn't modified.