Install the Keyfactor Remote CA Gateway Connector on Windows

To begin the Keyfactor Remote CAClosed A certificate authority (CA) is an entity that issues digital certificates. Within Keyfactor Command, a CA may be a Microsoft CA or a Keyfactor gateway to a cloud-based or remote CA. Gateway ConnectorClosed The Keyfactor Gateway Connector is installed in the customer forest to provide a connection between the on-premise CA and the Azure-hosted, Keyfactor managed Hosted Configuration Portal to provide support for synchronization, enrollment and management of certificates through the Azure-hosted instance of Keyfactor Command for the on-premise CA. It is supported on both Windows and Linux. installation on Windows, place the installation files in a temporary working directory on the Windows server and:

  1. On the Windows machine on which you wish to install the gateway connector, open a PowerShell window using the "Run as Administrator" option and change to the temporary directory where you placed the installation files.
  2. In the PowerShell window, run the following commands to populate a variable with the credentials for the service account, if you plan to run the gateway connector as a custom service account rather than the default of Network Service (see Keyfactor Remote CA Gateway Connector Service), and populate a variable with the client secret for the access token (see Identify the Keyfactor Remote CA Gateway Connector Access Token):

    $credService = Get-Credential
    $clientSecret = ConvertTo-SecureString -Force -AsPlainText 'MySecret'

    Enter the appropriate username and password when prompted and enter the appropriate client secret in place of MySecret. Usernames should be given in DOMAIN\username format.

    Or, to avoid being prompted for credentials:

    $serviceUser = "DOMAIN\myserviceusername"
    $servicePassword = "MySecurePassword"
    $secServicePassword = ConvertTo-SecureString $servicePassword -AsPlainText -Force
    $credService = New-Object System.Management.Automation.PSCredential ($serviceUser, $secServicePassword)
    $clientSecret = ConvertTo-SecureString -Force -AsPlainText 'MySecret'
  3. In the PowerShell window, run the Install-GatewayConnector.ps1 script using the following syntax to begin the installation:

    The output from the command should look similar to the following, given the example commands shown.

    $serviceUser = "KEYEXAMPLE\svc_kyfconnect"
    $servicePassword = "MySecurePassword"
    $secServicePassword = ConvertTo-SecureString $servicePassword -AsPlainText -Force
    $credService = New-Object System.Management.Automation.PSCredential ($serviceUser, $secServicePassword)
    $mySecret = ConvertTo-SecureString -Force -AsPlainText 'h-TM53PDzM9w+!56Gk.z4#TmME=G4=h4r$'
    .\Install-GatewayConnector.ps1 -URL https://kyf101.keyfactorpki.com/RemoteCAManagement -Scope api://a12b345c-1234-8qqe-7521-1d91e647f7bg/.default -AuthURL https://login.microsoftonline.com/mycred.onmicrosoft.com/oauth2/v2.0/token -ClientID 1a234567-8b90-123c-d456-7e89f0123ghi -Name websrvr12.keyexample.com -ServiceUser $credService -clientSecret $mySecret
    Directory: C:\Program Files\Keyfactor\Keyfactor Gateway Connector\logs
    Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 6/23/2021 8:21 AM 0 Gateway_Connector_Log.txt
    Created new file at C:\Program Files\Keyfactor\Keyfactor Gateway Connector\logs\Gateway_Connector_Log.txt
  4. Review the output from the installation to confirm that no errors have occurred.

The script creates a directory, C:\Program Files\Keyfactor\Keyfactor Gateway ConnectorClosed The Keyfactor Gateway Connector is installed in the customer forest to provide a connection between the on-premise CA and the Azure-hosted, Keyfactor managed Hosted Configuration Portal to provide support for synchronization, enrollment and management of certificates through the Azure-hosted instance of Keyfactor Command for the on-premise CA. It is supported on both Windows and Linux. by default, and places the gateway connector files in this directory. Log files are found in C:\Program Files\Keyfactor\Keyfactor Gateway Connector\Logs by default, though this is configurable (see Configure Logging).

The gateway connector service, by default given a display name of Keyfactor Gateway Connector Service (Default), should be automatically started at the conclusion of the install and configured to restart on reboot.

Tip:  Once the installation of the gateway connector is complete, you need to use the Keyfactor Remote CA Configuration Portal to approve the gateway connector (see Gateway Connectors) and configure CAs (see Certificate Authorities). You can then add these CAs in Keyfactor Command as per the the Keyfactor Command Reference Guide instructions.