UiPath Robotic Process Automation: nShield Integration Guide
Table of Contents
Introduction
UiPath Robots log in to systems to perform automated functions using username and passwords. Integrating the UiPath Robotic Process Automation (RPA) platform with the nShield Hardware Security Module (HSM) provides strong client authentication. When HSM-integrated Robots log in to domain systems, they are using certificate-based login.
Product configurations
We have successfully tested nShield HSM integration in the following configurations:
Product | Version |
---|---|
UiPath Orchestrator (Local and Cloud) |
20.10.7 |
UiPath Studio (Robot) |
20.10.6 |
Operating system for the Robot machine |
Windows 10 Windows Server 2016 Windows Server 2019 |
Operating system for the backbone Orchestrator |
Windows Server 2016 |
Security World |
12.71.0 |
nShield HSM |
Connect XC Connect+ |
PowerShell |
4.0 or later |
.NET Framework |
4.7.2 or later |
IIS |
7.5 or later |
Test scenarios
The following setup scenarios were tested using UiPath Orchestrator (Local and Cloud).
Scenario 1 | Scenario 2 | Scenario 3 | |
---|---|---|---|
Cipher suite |
DLf3072s256mRijndael |
DLf3072s256mAEScSP800131Ar1 |
|
Security World mode |
FIPS 140-2 Level 3 |
Unrestricted |
FIPS 140-2 Level 3 |
HSM firmware |
3.4.2/vsn37 (FIPS) |
12.50.11/vsn37 (FIPS) |
|
HSM netimage |
12.60.10/vsn31 |
12.70.3/vsn31 |
|
Security World software |
12.71.0 |
||
Key protection mechanism |
Softcard only |
||
Robot credential |
RSA or ECDSA |
ECDSA only 1 |
1 ECDSA credential is required for the Robot to force Windows PKINIT to use something other than SHA-1.
Software prerequisites
The following nShield software versions were used during this integration:
Security World client | nShield Connect Image | Firmware |
---|---|---|
12.71.0 |
12.60.10/12.70.3 |
12.50.11/12.50.8/3.4.2 |
An nShield Security World Software installation is required prior to using UiPath RPA. Instructions on how to setup an nShield Connect, a Remote File System (RFS) for the nShield Connect, a client computer, and installation instructions for the nShield Security World are included in the nShield Connect Installation Guide and nShield Connect User Guide .
To access and use cryptographic keys from within a Security World, you will need to load or create a Security World on the nShield Connect and map the key management data folder (
kmdata
) from your container host machine into the running application containers.
Procedures
Deploy the backbone server
Configure the backbone server domain, groups, and users
-
For prerequisites, see https://docs.uipath.com/installation-and-upgrade/docs/orchestrator-prerequisites-for-installation .
-
Install and configure Microsoft Windows Server 2012 R2, 2016, or 2019.
-
Install and configure the ADDS role.
-
Create the domain group AutoEnrollGroup .
-
Create the user accounts to be used by the Robots for authentication.
-
Open Active Directory Users and Computers through the Windows Start menu or the Microsoft Management Console.
-
Enable the advanced view so you can see the Published Certificates tab for user accounts.
-
Right-click Users under your domain name and select New .
-
Select User .
-
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.
-
-
Add group memberships to the Robot accounts so they can sign in to the Windows Server machines.
-
In AD Users and Computers , select Users , and find the users that were created.
-
Right-click each user and select Properties .
-
Select the Member Of tab.
-
Add the following groups:
-
Administrators
-
Enterprise Admins
-
Domain Admins
-
Domain Users
-
AutoEnrollGroup
-
-
-
Enable Log On as a batch job rights for the Application Pool user.
-
Select Windows > Run > mmc .
-
Select File > Add/Remove Snap-in .
-
Add Group Policy Object .
-
Select Finish .
-
Select OK .
-
Navigate to Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Log on as a batch job .
-
Select Add User or Group .
-
Add the current user who is logged into the Orchestrator machine, that is, Administrators .
-
Configure ADCS
Install and configure Active Directory Certificate Services role
-
Open Server Manager and Install ADCS.
-
Configure as an enterprise root CA.
-
Optionally, if you want the CA to use the HSM for its signing key:
-
Select the nShield CNG provider to write the CA key.
-
Select RSA2048/SHA256 .
-
Select module protected key for simplicity.
-
Configure the ADCS certificate templates
-
Open the Certification Authority Microsoft Management Console.
-
Expand the CA node.
-
Right-click Certificate Templates and select Manage to create a new certificate template for the Robot .
-
Right-click Smartcard Logon , and select Duplicate Template .
-
Configure the following tabs:
NoteDo not select Apply or OK until the end. Otherwise 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 .
By doing it this way, ADCS will add the appropriate certificate extensions/attributes to the template for Signature and smartcard logon (but wants ECDH key), and when you afterwards switch to Signature , it retains those extensions/attributes but allows ECDSA keys.
Signature and smartcard logon (Select YES at the pop-up)
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
-
Select OK .
The new certificate template name should be shown in the list.
-
In the Certification Authority Microsoft Management Console, right-click Certificate Templates and select New > Certificate Template to issue .
-
Ctrl+click to select both Web Server and UiPath Robot nShield KSP , and select OK .
Make sure that the Domain Controller Authentication template is also issued.
-
Both templates should have been added to the Certificate Templates list and can now be issued.
Install the Internet Information Services (IIS) role
-
Request Web Server certificate from ADCS using RSA2048/SHA256.
-
Open IIS.
-
Select Server Certificates .
-
Select Create Domain Certificate .
-
Fill in information accordingly, and then select Next .
-
Specify the Certificate Authority that was created earlier.
-
Enter Friendly Name.
-
Select Finish .
Install Microsoft SQL Server
-
Select Custom Installation .
-
Select New SQL Server stand-alone installation or add features to an existing installation .
-
Select the product license.
-
Accept the terms.
-
Select Use Microsoft Update to check for updates (recommended) , and then select Next .
-
Select the following features:
-
Select Next .
-
Select Next .
-
Select Add Current User and select Next .
-
Continue selecting Next until Install .
-
Close the installer.
Install UiPath Orchestrator
For information, see also https://docs.uipath.com/installation-and-upgrade/docs/orchestrator-about-installation .
Select one of the three following installation options:
Set up a cloud Orchestrator
-
Go to https://cloud.uipath.com .
-
Create an account and sign in.
-
Select Create new .
-
Select the Orchestrator link under Services .
-
Use a UI Path License to allocate one Unattended Runtime slot for each Robot you intend to use.
-
Create a machine:
-
Go to TENANT and then select MACHINES .
-
Create a Machine from the right side.
-
Add the name of the machine.
Add one unattended runtime.
This is a type of license that allows the Robot to run triggered from Orchestrator.
-
Select Provision .
-
Make sure to copy the key for this VM. You will need the key when you are connecting the Robot.
-
-
Create a Robot: Select Default > Robots > Add > Standard Robot , then set its properties:
Machine Name Select the machine name that you created
Display Name Give the Robot a display name
Type Select Unattended
Credential type Select nShield KSP
Domain\Username and Password <domain\username and Softcard passphrase>
NoteThe <domain\username> will be for the Robot machine account.
To check the Robot username at the command prompt on the Robot machine:
whoami
-
From the Settings tab select Login to console > YES .
-
Create an environment and add the Robot to it.
-
Navigate to DEFAULT > Environment .
-
Select Create an environment .
-
Enter a name, and select the Robot that you created.
-
-
Upload a package:
Select TENANT > PACKAGE UPLOAD .
-
Create a process and assign it to your environment:
Select DEFAULT > AUTOMATIONS > + .
Create the process from the package that you have uploaded.
The Orchestrator has been created and configured.
Set up a local Orchestrator through UiPath Platform
-
Read https://docs.uipath.com/installation-and-upgrade/docs/orchestrator-about-installation .
-
Ensure that your environment meets these requirements: https://docs.uipath.com/installation-and-upgrade/docs/orchestrator-prerequisites-for-installation
-
Run UI Path Platform .
-
Accept the Agreement.
-
Select Install Single Node , and then select Next .
-
Enter Computer Account Username and Password .
-
Select Next until the Host and Tenant passwords menu is displayed.
-
Enter the Host and Tenant passwords. These will be used to log in to Orchestrator later.
-
Select Enable Windows Authentication .
-
Next to Active Directory Domain , enter the domain name, and then select Next .
-
Make a note of the URL. This will be used to access the Orchestrator interface through a web browser.
-
Select Install .
Set up a local Orchestrator with the installer
-
Right-click the
UiPathOrchestrator.msi
file, and select Install . -
Select Next at the welcome screen.
-
Accept the terms and select Install .
-
On the Product Features menu, select Next .
-
The Orchestrator IIS Settings should be auto-filled.
-
If there is an error about SSL certificate, edit the box and paste in the thumbprint of the certificate requested in IIS.
-
Select Next .
-
On the Orchestrator Application Pool Settings page, make sure Custom Account is selected.
-
Enter the username and password of the Orchestrator Computer Account, and then select Next .
-
On the Orchestrator Database Settings page, select Leave as is .
-
Select Next .
-
On the Identify Server Settings page, make a note of the Orchestrator public URL.
-
Paste in the Signing Certificate Thumbprint.
-
Select Next .
-
On the Orchestrator Elasticsearch Log Settings page, select Next .
-
On the Orchestrator Authentication Settings page, enter passwords for the Host and Default Tenant .
-
Select Enable Windows Authentication .
-
Enter the Domain Name .
-
Select Next .
-
Select Install .
-
Select Finish .
Deploy a Robot service
-
Install the operating system on the machine that will host the Robot service.
Windows 10, Windows Server 2019, and Windows Server 2016 were tested as the host operating systems for the Robot service.
-
Join the server to the domain.
-
Install the nShield Security World client.
-
Configure the existing Security World.
-
Run the CNG wizard or the
cnginstall
command. -
Create an HSM Softcard.
For example, at the command prompt run the following command:
ppmk --new RobotVM1
-
-
Install and 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
aHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\nCipher\CryptoNG\SmartCardMode
1
bHKEY_LOCAL_MACHINE\SOFTWARE\nCipher\CryptoNG\UseModuleKeys
0
cHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\nCipher\CryptoNG\UseModuleKeys
0
ca It will be necessary to set this
DWORD
value for the 64-bit CNG provider.b It will be necessary to set this
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 aSmartCardLogin
certificate. -
Sign in to the Robot machine with the Robot user account that was created in Configure the backbone server domain, groups, and users .
-
Request the user certificate UiPath Robot nShield KSP using the HSM Softcard.
-
Select Control Panel > Manage User Certificates .
-
Right-click the Personal node, and select All Tasks > Request New Certificate .
-
At the Before You Begin screen, select Next .
-
At the Select Certificate Enrollment Policy screen, keep the default Active Directory Enrollment Policy selected, and then select Next .
-
At the Request Certificates screen, select UiPath Robot nShield KSP certificate template and Select Enroll
-
At the pop-up screen nCipher Key Storage Provider - Create Key screen select Next .
-
At the Select a method to protect new key screen, select Softcard protection (unavailable in HSM Pool mode), and select Next .
-
Select the previously created Softcard and select Finish .
-
At the password pop-up screen, enter the Softcard passphrase and select Finish .
-
-
At the Certificate Installation Results screen (it should show successful enrollment), select Finish .
-
-
Install UiPath Studio (Robot) .
-
Double click on the MSI installer to begin installation.
-
At the Please read the UiPath Studio License Agreement screen, check I accept the terms in the License Agreement and select Install .
Select Advanced if you want to configure any specific packages).
-
At the Completed the UiPath Studio Setup Wizard screen, select Finish .
-
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 .
Note
|
Visual Studio 2019 is required to run the Visual Studio Command Line, which is needed to run the
corflags.exe
command.
|
-
Stop the
UiRobotSvc
service. -
From the Administrator command prompt, run the
corflags.exe
command:CorFlags.exe "C:\Program Files (x86)\UiPath\Studio\UiPath.Service.Host.exe" /32BITPREF-
-
Restart the
UiRobotSvc
service.
Configure UiPath for Robots if a local Orchestrator was used
Note
|
Skip this section if the Robot was set up through a cloud Orchestrator. |
If a local Orchestrator was used, the Robot must be set up to get the machine key.
-
Sign in to the machine with Orchestrator.
-
Enter the Orchestrator URL into a browser.
-
Make sure the login is set to tenant host .
-
Enter admin as the username and use the password set for the host when the local Orchestrator was installed.
-
Select License and enter your license in whichever way works best: online or offline.
-
When the license has been activated, select Tenants and select the 3 vertical dots on the right side of the Default Tenant .
-
Select Allocate Licenses .
-
Allocate one Unattended Runtime slot for each Robot you intend to use.
-
Log out of the tenant host and login to tenant default. Use admin as the username and use the password set for tenant when the local Orchestrator was installed.
-
Select Machines under Management .
-
Select Add (+) .
-
Select Standard Machine .
-
Enter the machine name.
NoteThe name must match exactly the name of the workstation on which the Robot is installed. To check it, run hostname
on the Robot machine. -
Under License - Unattended Runtimes , enter 1 .
-
Select Provision , then select Copy to copy the machine key.
-
Go to Default > Robots > Add > Standard Robot .
-
Create a Robot: Select Default > Robots > Add > Standard Robot , then set its properties:
Machine Name Select the machine name that you created
Display Name Give the Robot a display name
Type Select Unattended
Credential type Select nShield Key Storage Provider
Domain\Username and Password <domain\username and Softcard passphrase>
NoteIn the local version of Orchestrator, the Default folder cannot be used to create a Robot. Create a folder and use it instead of the Default folder in this and later steps when you are creating and deploying the Robot.
If the nShield Key Storage Provider option does not exist, make sure the
Features.SmartCardAuthentication.Enabled
parameter is set toTrue
inC:\Program Files(x86)\UiPath\Orchestrator\UiPath.Orchestrator.dll.config
.The <domain\username> will be for the Robot machine account.
To check the Robot username at the command prompt on the Robot machine:
whoami
-
From the Settings tab select Login to console > YES .
-
Create an environment and add the Robot to it.
-
Navigate to DEFAULT > Environment .
-
Select Create an environment .
-
Enter a name, and select the Robot that you created.
-
-
Upload a package:
Select TENANT > PACKAGE UPLOAD .
-
Create a process and assign it to your environment:
Select DEFAULT > AUTOMATIONS > + .
Create the process from the package that you have uploaded.
The Orchestrator has been created and configured.
Connect the Robot to the Orchestrator
-
On the machine on which the Robot is located, start the UiPathAssistant from the Windows Start menu.
-
Select User button > Preferences > Orchestrator Settings , and add the Orchestrator URL and the machine key that you created.
-
Select Connect .
The Robot should now be connected and the processes should now be viewable.
Test the UiPath Studio Robot
-
Run the process that you have added in Orchestrator.
-
To start a process from Orchestrator: On the Orchestrator page, select DEFAULT > JOBS > START JOB .
-
Select the process name, the Robot name, and then select Start .
-
Integration GuidenShield HSM Integration Guide for UiPath RPA
-
ProductsnShield Connect
-
ProductsnShield as a Service