Procedures

To integrate the UiPath Robotic Process Automation platform with the nShield HSM:

Deploy the backbone server

To deploy the backbone server:

Configure the backbone server, domain groups, and users

To configure the backbone server, domain groups, and users:

  1. For prerequisites, see https://docs.uipath.com/orchestrator/standalone/2022.4/installation-guide/orchestrator-prerequisites-for-installation.

  2. Install and configure Microsoft Windows Server Operating System.

  3. Install and configure the ADDS role.

  4. Create a domain group. (i.e., AutoEnrollGroup)

  5. Create the user accounts to be used by the Robots for authentication.

    1. Open Active Directory Users and Computers through the Windows Start menu or the Microsoft Management Console.

    2. Enable the advanced view so you can see the Published Certificates tab for user accounts.

    3. Right-click Users under your domain name and select New.

    4. Select User.

    5. Create users such as RobotVM3 for the Robot user on system VM3. This helps distinguish that this particular Robot user has its Softcard or key on VM3.

  6. Add group memberships to the Robot accounts so they can sign in to the Windows Server machines.

    1. In AD Users and Computers, select Users and find the users that were created.

    2. Right-click each user and select Properties.

    3. Select the Member Of tab.

    4. Add the following groups:

      • Administrators

      • Enterprise Admins

      • Domain Admins

      • Domain Users

      • AutoEnrollGroup

  7. Enable Log On as a batch job rights for the Application Pool user.

    1. Select Windows > Run > mmc.

    2. Select File > Add/Remove Snap-in.

    3. Add Group Policy Object.

    4. Select Finish.

    5. Select OK.

Configure ADCS

Microsoft ADCS does not have to be installed on the same "backbone" server as ADDS. For testing purposes, this document describes the specific steps for setting up all needed roles on the same machine.

To configure ADCS:

Install and configure the Active Directory Certificate Services role

To install and configure the Active Directory Certificate Services role:

  1. Open Server Manager and Install ADCS.

  2. Configure as an enterprise root CA.

  3. Optionally, if you want the CA to use the HSM for its signing key:

    1. Select the nShield CNG provider to write the CA key.

    2. Select RSA2048/SHA256.

    3. Select module protected key for simplicity.

Configure the ADCS certificate templates

To configure the ADCS certificate templates:

  1. Open the Certification Authority Microsoft Management Console.

  2. Expand the CA node.

  3. Right-click Certificate Templates and select Manage to create a new certificate template for the Robot.

  4. Right-click Smartcard Logon and select Duplicate Template.

  5. Configure the following tabs:

    Do not select Apply or OK until the end, else the template will be saved with the incorrect name.
    Tab Configuration option Recommended setting or value

    Compatibility

    Show resulting changes

    Clear the selection box.

    Certification Authority

    Windows Server 2012 or higher (required for CNG)

    Certificate recipient

    Windows 8 / Windows Server 2012 or higher (required for CNG)

    General

    Template Display Name

    UiPath Robot nShield KSP

    Validity period

    Select appropriate value

    Renewal period

    Select appropriate value

    Publish certificate in Active Directory

    Select this option

    Do not automatically reenroll if a duplicate certificate exists in Active Directory

    Select this option

    Request handling

    If an ECC key is to be used instead of RSA, the Signature and smartcard logon choice forces an ECDH key which will not work with the nShield.

    To force ADCS into issuing an ECDSA certificate for SCL: After previously selecting Signature and smartcard logon, change to Signature. ADCS will add the appropriate certificate extensions/attributes to the template for Signature and smartcard logon. When you afterwards switch to Signature, it retains those extensions/attributes but allows ECDSA keys.

    Signature and smartcard logon, select YES in the dialog

    Do the following when the subject is enrolled and when the private key associated with this certificate is used

    Prompt the user during enrollment

    Cryptography

    Provider Category

    Key Storage Provider (which is CNG)

    Algorithm name

    RSA or ECDSA_P384

    Minimum key size

    2048 (for RSA)

    384 (for ECDSA_P384)

    Choose which cryptographic providers can be used for requests

    Requests must use one of the following providers

    Providers

    nCipher Security World Key Storage Provider

    Request Hash

    SHA256 (for RSA)

    SHA-384 (for ECDSA_P384)

    Security

    Select Add, enter AutoEnrollGroup and select Check Names.

    Then select OK.

    Select AutoEnrollGroup from the list and enable permissions read enroll autoenroll.

    Subject name

    Build from this Active Directory Information

    Select this option

    Subject name format

    Fully distinguished name

    Include this information in alternate subject name

    Ensure only UPN is selected

  6. Select OK.

    The new certificate template is included in the list.

  7. In the Certification Authority Microsoft Management Console, right-click Certificate Templates and select New > Certificate Template to issue.

  8. Ctrl+click to select both Web Server and UiPath Robot nShield KSP and select OK.

  9. Both templates are added to the Certificate Templates list and can now be issued.

Set up UiPath Orchestrator

The procedures described in this guide are an example test set-up for integration purposes. Your organization’s needs may require alternate steps for set-up and deployment.

Select one of the three following installation options:

Set up a cloud Orchestrator

To set up a cloud Orchestrator:

  1. Go to https://cloud.uipath.com.

  2. Create an account and sign in.

  3. Select Create new.

  4. Under Services, select the Orchestrator link.

  5. Use a UI Path License to allocate one Unattended Runtime slot for each Robot you intend to use.

  6. Create a machine:

    1. Go to Tenant and then select Machines.

    2. Select Add machine.

    3. Select Standard machine.

    4. Enter a name for the machine.

      The name must match exactly the name of the workstation on which the Robot is installed. To check it, run hostname on the Robot machine.

      Add one Production (Unattended) runtime.

      This is a type of license that allows the Robot to run triggered from Orchestrator.

    5. Select Provision.

    6. Make sure to copy the Machine key. You will need the key when you are connecting UiPath Assistant to the Orchestrator instance.

  7. Create a Robot Account: Select Admin from the top left menu.

    1. Select Manage.

    2. Select Accounts & Groups.

    3. Select Robot accounts.

    4. Select Add Robot Account:

      1. Enter a name for the Robot Account.

      2. Designate the Group Membership for the account.

      3. Select Add.

  8. On the Orchestrator, select Tenant > Manage Access > Assign roles > Robot Account, then set its properties:

    Search for a Robot account

    Select the Robot account that you created.

    Roles

    Designate roles for the Robot account.

    Foreground automation settings

    Select Use a specific Windows user account. Add credentials below.

    Domain\Username

    <domain\username>

    Credential Store

    Select Orchestrator Database.

    Password

    <Softcard passphrase>

    Credential type

    Select nShield Key Storage Provider.

    The <domain\username> will be for the Robot machine account. To check the Robot username at the command prompt on the Robot machine, use whoami.
  9. Under Logging settings, select Login to console > YES.

  10. Select Assign.

  11. Assign the Robot Account to your folder:

    1. Select the folder to be used and then Settings.

    2. Select Assign Account/Group.

    3. Enter and select the Robot Account previously created.

    4. Designate roles.

    5. Select Assign.

  12. Upload a package:

    Select Tenant > Packages > Upload.

  13. Browse to a package to upload:

    Select your Folder > Automations > Add process.

    Create the process from the package that you previously uploaded.

The Orchestrator has been created and configured.

Set up a local Orchestrator through UiPath Platform

To set up a local Orchestrator through UiPath Platform:

  1. Read https://docs.uipath.com/installation-and-upgrade/docs/orchestrator-about-installation.

  2. Ensure that your environment meets these requirements: https://docs.uipath.com/installation-and-upgrade/docs/orchestrator-prerequisites-for-installation.

  3. Run UI Path Platform.

  4. Accept the Agreement.

  5. Select Install Single Node, and then select Next.

  6. Enter Computer Account Username and Password.

  7. Select Next until the Host and Tenant passwords menu appears.

  8. Enter the Host and Tenant passwords. These will be used to log in to Orchestrator later.

  9. Select Enable Windows Authentication.

  10. Next to Active Directory Domain, enter the domain name, and then select Next.

  11. Make a note of the URL. This will be used to access the Orchestrator interface through a web browser.

  12. Select Install.

Set up a local Orchestrator with the installer

It is required to set up Microsoft IIS and SQL Server before proceeding with the on-premise local Orchestrator install.

To configure Internet Information Services (IIS):

  1. Request a Web Server certificate from ADCS using RSA2048/SHA256.

  2. Open IIS.

  3. Select Server Certificates.

  4. Select Create Domain Certificate.

  5. Fill in the required information and then select Next.

  6. Specify the Certificate Authority that was created earlier.

  7. Enter Friendly Name.

  8. Select Finish.

To install Microsoft SQL Server:

  1. Select Custom Installation.

  2. Select New SQL Server stand-alone installation or add features to an existing installation.

  3. Select the product license.

  4. Accept the terms.

  5. Select Use Microsoft Update to check for updates (recommended), and then select Next.

  6. Select the following features:

    Microsoft SQL Server features
  7. Select Next.

  8. Select Next.

  9. Select Add Current User and select Next.

  10. Continue selecting Next until Install.

  11. Close the installer.

To set up a local Orchestrator with the installer:

  1. Right-click the UiPathOrchestrator.msi file, and select Install.

  2. Select Next on the welcome screen.

  3. Accept the terms and select Install.

  4. On the Product Features menu, select Next.

  5. The Orchestrator IIS Settings should be auto-filled.

  6. If there is an error about SSL certificate, edit the box and paste in the thumbprint of the certificate requested in IIS.

  7. Select Next.

  8. On the Orchestrator Application Pool Settings screen, make sure Custom Account is selected.

  9. Enter the username and password of the Orchestrator Computer Account, and then select Next.

  10. On the Orchestrator Database Settings screen, select Leave as is.

  11. Select Next.

  12. On the Identify Server Settings screen, make a note of the Orchestrator public URL.

  13. Paste in the Signing Certificate Thumbprint.

  14. Select Next.

  15. On the Orchestrator Elasticsearch Log Settings screen, select Next.

  16. On the Orchestrator Authentication Settings screen, enter passwords for the Host and Default Tenant.

  17. Select Enable Windows Authentication.

  18. Enter the Domain Name.

  19. Select Next.

  20. Select Install.

  21. Select Finish.

Deploy a Robot service

To deploy a Robot service:

  1. Install the operating system on the machine that will host the Robot service.

    Windows Server 2022, Windows 10, Windows Server 2019, and Windows Server 2016 were tested as the host operating systems for the Robot service.

  2. Join the server to the domain.

  3. Install the nShield Security World client.

    1. Configure the existing Security World.

    2. Run the CNG wizard or the cnginstall command.

    3. Create an HSM Softcard.

      For example, at the command prompt run the following command:

      ppmk --new RobotVM1
  4. Configure the custom CNG provider.

    The SmartCardLogin functionality is protected by a registry setting. Configure the following SmartCardMode registry settings to the recommended values in the table. This will enable the SmartCardLogin support on any machine where the revised CNG provider is installed:

    Parameter Value

    HKEY_LOCAL_MACHINE\SOFTWARE\nCipher\CryptoNG\SmartCardMode

    1 a

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\nCipher\CryptoNG\SmartCardMode

    1 b

    HKEY_LOCAL_MACHINE\SOFTWARE\nCipher\CryptoNG\UseModuleKeys

    0 c

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\nCipher\CryptoNG\UseModuleKeys

    0 c

    a It will be necessary to add the DWORD value for the 64-bit CNG provider.

    b It will be necessary to add the DWORD value for the 32-bit CNG provider.

    c This value is set to 0 so distinct protection tokens can be used for each user associated with a SmartCardLogin certificate.

  5. Sign in to the Robot machine with the Robot user account that was created in Configure the backbone server, domain groups, and users.

  6. Request the user certificate UiPath Robot nShield KSP using the HSM Softcard.

    1. Select Control Panel > Manage User Certificates.

    2. Right-click the Personal node, and select All Tasks > Request New Certificate.

    3. On the Before You Begin screen, select Next.

    4. On the Select Certificate Enrollment Policy screen, keep the default Active Directory Enrollment Policy selected and then select Next.

    5. On the Request Certificates screen:

      1. Select the UiPath Robot nShield KSP certificate template and Select Enroll.

      2. On the nCipher Key Storage Provider - Create Key screen, select Next.

      3. On the Select a method to protect new key screen, select Softcard protection (unavailable in HSM Pool mode), and select Next.

      4. Select the previously created Softcard and select Finish.

      5. On the password screen, enter the Softcard passphrase and select Finish.

    6. On the Certificate Installation Results screen, ensure that it shows successful enrollment and select Finish.

  7. Install UiPath Studio (Robot):

    1. Double-click on the MSI installer to begin installation.

    2. On the Please read the UiPath Studio License Agreement screen:

      1. (Optional) Select Advanced to configure any specific packages.

      2. Select I accept the terms in the License Agreement.

      3. Select Install.

    3. On the Completed the UiPath Studio Setup Wizard screen, select Finish.

Configure UiPath for Robots

To configure UiPath for Robots:

Configure UiPath for nShield HSMs

Configure the Robot to use only the 64-bit nShield CNG provider with the Microsoft CorFlags tool: https://docs.microsoft.com/en-us/dotnet/framework/tools/corflags-exe-corflags-conversion-tool.

Visual Studio 2019 is required to run the Visual Studio Command Line, which is needed to run the corflags.exe command.
  1. Stop the UiRobotSvc service.

  2. From the Administrator command prompt, run the corflags.exe command:

    CorFlags.exe "C:\Program Files (x86)\UiPath\Studio\UiPath.Service.Host.exe" /32BITPREF-
  3. Restart the UiRobotSvc service.

Configure UiPath for Robots if a local Orchestrator was used

Skip this section if the Robot was set up through a cloud Orchestrator. This is because these steps would already have been completed in Set up a cloud Orchestrator.

If a local Orchestrator was used, the Robot must be set up to get the machine key.

  1. Sign in to the machine with Orchestrator.

  2. Enter the Orchestrator URL into a browser.

  3. Make sure the organization is set to host.

  4. Enter admin as the username and use the password set for the host when the local Orchestrator was installed.

  5. Select License and enter your license in whichever way works best: online or offline.

  6. When the license has been activated, select Tenants and select the 3 vertical dots on the right side of the Default Tenant.

  7. Select Allocate Licenses.

  8. Allocate one Production (Unattended) Runtime slot for each Robot you intend to use.

  9. Log out of the tenant host and login with the organization set to default. Use admin as the username and use the password set for tenant when the local Orchestrator was installed.

  10. Select Tenant.

  11. Select Add machine.

  12. Select Standard Machine.

  13. Enter the machine name.

    The name must match exactly the name of the workstation on which the Robot is installed. To check it, run hostname on the Robot machine.
  14. Under License - Unattended Runtimes, enter 1.

  15. Select Provision, then select Copy to copy the machine key.

  16. Go to Default > Robots > Add > Standard Robot.

  17. Under Runtime license (execution slots) - Production (Unattended), enter 1.

  18. Select Provision, then select Copy to copy the machine key. You will need the key when you are connecting UiPath Assistant to the Orchestrator instance.

  19. Select Tenant > Folders > Your_Folder > Machines > Manage Machines in Folder

  20. Add the previously created machine.

  21. Create a Robot Account:

    1. Select Tenant.

    2. Select Manage Access.

    3. Select Manage Accounts & Groups.

    4. Select Robot accounts.

    5. Select Add Robot Account.

      1. Enter a name for the Robot Account.

      2. Designate the Group Membership for the account.

      3. Select Add.

  22. On the Orchestrator, select Tenant > Manage Access > Assign roles > Robot Account, then set its properties:

    Search for a Robot account

    Select the Robot account that you created.

    Roles

    Designate roles for the Robot account.

    Settings

    Select Machine login credentials.

    Domain\Username

    <domain\username>

    Credential Store

    Select Orchestrator Database.

    Password

    <Softcard passphrase>

    Credential type

    Select nShield Key Storage Provider.

    The <domain\username> will be for the Robot machine account. To check the Robot username at the command prompt on the Robot machine, use whoami. If the nShield Key Storage Provider option does not exist, ensure the Features.SmartCardAuthentication.Enabled parameter is set to True in C:\Program Files(x86)\UiPath\Orchestrator\UiPath.Orchestrator.dll.config.
  23. Under Logging settings, select Login to console > YES.

  24. Select Assign.

  25. Assign the Robot Account to your folder:

    1. Select the folder to be used and then Settings.

    2. Select Assign Account/Group.

    3. Enter and select the Robot Account previously created.

    4. Designate roles.

    5. Select Assign.

  26. Upload a package:

    Select Tenant > Packages > Upload.

  27. Browse to a package to upload:

    1. Select your Folder > Automations > Add process.

    2. Create the process from the package that you previously uploaded.

The Orchestrator has been created and configured.

Connect the Robot Machine to the Orchestrator

To connect the Robot Machine to the Orchestrator:

  1. On the Robot Machine, start UiPath Assistant from the Windows Start menu.

  2. Select Preferences > Orchestrator Settings, and add the Orchestrator URL and the machine key that you created.

  3. Select Connect.

The Robot can now be connected. The processes should now be viewable.

Test the UiPath Studio Robot

To test the UiPath Studio Robot, run the process that you have added in Orchestrator.

To start a process from Orchestrator:

  1. On the Orchestrator screen, select your Folder > Automations > Start a job.

  2. Select the Process Name, Account, and Machine.

  3. Select Start.