Create a new Microsoft Windows (PowerShell) machine¶
Creating a new machine is the initial step in enabling TLS Protect Cloud to connect directly to application keystores for certificate management. Once you have created machines, you can move on to provisioning certificates to those machines.
Before you begin¶
Choose an authentication method. Always use the most secure authentication method available that your organization allows. Methods like Kerberos over HTTPS offer stronger protection with built-in encryption to secure data over the network. Less secure options like Basic Authentication over HTTPS are more vulnerable to credential data exposure because they send username and password data in plaintext over the network if TLS is disabled. Choosing less secure options increases the liklihood of data exposure or interception.
The following list is ordered from most to least secure:
- Kerberos authentication over HTTPS is your best option if the Windows Server is joined to a domain and you already have a trusted TLS Server Certificate installed. Additional steps may be required to bind that certificate to the WinRM HTTPS Listener.
- Kerberos authentication over HTTP is your best option if the Windows Server is joined to a domain and you are not able to bootstrap the windows server with a TLS Server Certificate originally. This requires you to set the WinRM configuration to allow for unencrypted communication.
- Basic authentication over HTTPS is your only option for push installation to a Windows server that is not joined to a domain.
Follow the configuration steps below:
-
Ensure that the PowerShell script configured on the Microsoft Windows (PowerShell) machine is managed and written to execute your intended actions, not exhaust system resources, and sign with a trusted certificate on the target system. The script must contain a specific function that would be executed to consume (bind) the certificate from the CAPI store.
Warning
You are responsible for managing, writing, and securing your PowerShell script. To minimize exposure and prevent unauthorized access, use a dedicated user account with only the necessary permissions (least privilege) instead of an admin or shared account, as a compromised script with broad access increases security risks. Script signing ensures integrity after deployment but does not gaurantee the security of its source or development environment.
Refer to the following PowerShell script example:
``` <################## .NAME bind-certificate .DESCRIPTION consumes a certificate from the CAPI store, mainly used to bind the certificate to a Windows service .PARAMETER certificateStore The Windows Certificates store location where the certificate is stored .PARAMETER thumbprint A text string that represents the public key hash of the certificate .NOTES A successful script execution returns an exit code 0. If the script fails, it returns a non-zero exit code and TLS Protect Cloud would show the error message in the UI ##################> function bind-certificate( [string]$certificateStore, [string]$thumbprint ) { return "Success" } ```
-
Ensure that you know the Windows Remote Management (WinRM) port you plan to use.
- Minimum required credentials on Microsoft Windows (PowerShell): Choose between user credentials or shared credentials. You must have permissions to create, read, and write to the CAPI stores, and to update network certificate configuration on the Microsoft Windows (PowerShell) instance. The easiest way is to use a service account with local or domain admin permissions unless you have a delegated user with the permissions to update CAPI store.
- User credentials: The username and password you enter.
- Shared credentials: Optionally, you can use shared credentials from your credential provider (CyberArk is the only credential provider currently supported by TLS Protect Cloud). To use this option, first set up the connection to CyberArk.
-
If using Kerberos, you will also need:
- Domain Name
- Key distribution center address or hostname
- Service Principal Name
-
Supported Windows versions
- Windows Server 2019 and 2022
Configure the machine¶
From the Authentication Type drop-down, select either Basic Authentication or Kerberos Authentication, then follow the steps below.
Warning
Authentication types vary in security level. Always use the most secure authentication type available that your organization allows. Methods like Kerberos over HTTPS offer stronger protection with built-in encryption to secure data over the network. Less secure options like Basic Authentication over HTTPS are more vulnerable to credential data exposure because they send username and password data in plaintext over the network if TLS is disabled. Choosing less secure options increases the liklihood of data exposure or interception.
The following list is ordered from most to least secure:
- Kerberos Authentication over HTTPS
- Kerberos Authentication over HTTP
- Basic Authentication over HTTPS
Note
For each of the methods outlined below, please follow these guidelines:
- If the UPN (UserPrincipalName) format fails for your username, try removing the domain name, leaving just the common name of the username, such as "jsmith".
- Windows Management Framework (WMF) 5.1 or higher is required.
Prerequisite configuration¶
If your organization requires Kerberos over HTTPS, your target Windows host must already have a valid TLS Server Certificate installed before you can use Kerberos Authentication to rotate the existing certificate or install new certificates. Because of this prerequisite, Kerberos Authentication or push installation may not be suitable for all use cases. See the VCert Readme for information on how to pull installations of certificates on Windows-based systems.
Note
Kerberos Authentication over HTTPS provides the highest level of security with built-in encryption to secure data over the network.
Note
The certificate must be installed in the LocalMachine\My
CAPI store (Local Computer > Personal store if using the Certificates MMC snap-in) so WinRM can use it.
-
An Active Directory domain user that is directly or indirectly a member of the local “Administrators” group.
-
Kerberos Authentication set to True
winrm set winrm/config/service/auth @{Kerberos="true"}
winrm set winrm/config/service/auth '@{Kerberos="true"}'
-
A certificate with “Server Authentication” Extended Key Usage
winrm set winrm/config/service @{CertificateThumbprint="ABC"}
winrm set winrm/config/service '@{CertificateThumbprint="ABC"}'
(replacing
ABC
with the actual thumbprint of the certificate referenced above) -
An HTTPS listener configured with that certificate
winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{CertificateThumbprint="ABC"}
winrm create winrm/config/Listener?Address=*+Transport=HTTPS '@{CertificateThumbprint="ABC"}'
- Enter the Microsoft Windows (PowerShell) Hostname and the WinRM Port.
-
Enable Use TLS for WinRM if you want TLS to be used when TLS Protect Cloud communicates with the Microsoft Windows (PowerShell) server.
Tip
Since Kerberos already has built-in encryption, this option isn't necessary to secure data sent over the network.
-
Enter the Domain Name, Key Distribution Center Address/Hostname, and Service Principal Name.
Tip
Need to view your SPN? Run the
setspn –L hostname
command, where hostname is the actual hostname of the computer object that you want to query. -
(Optional) From the Credential Type drop-down, select either Enter Credentials or Select Credentials. Only users with the enabled "CyberArk shared credential" capability will see this option.
Important
Your view of credentials may be limited due to your role. System Administrators and PKI Administrators should be able to select any credential, but users with the Resource Owner role are limited to only using the credentials associated with their teams.
Note
- Enter Credentials - Is used to enter your admin credentials manually.
- Select Credentials - Is used to select your shared credentials from CyberArk.
- If you choose Enter Credentials, enter your Microsoft Windows (PowerShell) admin credentials in the Username and Password fields.
- If you choose Select Credentials. From the Credential drop-down, select your shared credentials.
-
Enter your Microsoft Windows (PowerShell) admin credentials in the Username and Password fields.
Warning
If you encounter an error message while using a username formatted as a User Principal Name (UPN), such as "jsmith@company.com", try using only the common name of the username, for example, "jsmith".
Warning
Remember to store your username and password securely when creating a new machine. For security reasons, you will not be able to modify the fields under the "Access" tab without these credentials. This ensures that only authorized individuals can modify these fields.
-
Click Test Access, the click Create. Note that Create is only enabled if the Test Access is successful.
Prerequisite configuration¶
-
An Active Directory domain user that is directly or indirectly a member of the local “Administrators” group.
-
Kerberos Authentication set to True
winrm set winrm/config/service/auth @{Kerberos="true"}
winrm set winrm/config/service/auth '@{Kerberos="true"}'
-
Unencrypted traffic allowed so Kerberos authentication can be negotiated with WinRM:
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
- Enter the Microsoft Windows (PowerShell) Hostname and the WinRM Port.
-
Leave Use TLS for WinRM disabled so TLS Protect Cloud communicates with the Microsoft Windows (PowerShell) server over HTTP.
Tip
Since kerberos already has built-in encryption, this option isn't necessary to secure data sent over the network.
-
Enter the Domain Name, Key Distribution Center Address/Hostname, and Service Principal Name.
Tip
Need to view your SPN? Run the
setspn –L hostname
command, where hostname is the actual hostname of the computer object that you want to query. -
(Optional) From the Credential Type drop-down, select either Enter Credentials or Select Credentials. Only users with the enabled "CyberArk shared credential" capability will see this option.
Important
Your view of credentials may be limited due to your role. System Administrators and PKI Administrators should be able to select any credential, but users with the Resource Owner role are limited to only using the credentials associated with their teams.
Note
- Enter Credentials - Is used to enter your admin credentials manually.
- Select Credentials - Is used to select your shared credentials from CyberArk.
- If you choose Enter Credentials, enter your Microsoft Windows (PowerShell) admin credentials in the Username and Password fields.
- If you choose Select Credentials. From the Credential drop-down, select your shared credentials.
-
Enter your Microsoft Windows (PowerShell) admin credentials in the Username and Password fields.
Warning
If you encounter an error message while using a username formatted as a User Principal Name (UPN), such as "jsmith@company.com", try using only the common name of the username, for example, "jsmith".
Warning
Remember to store your username and password securely when creating a new machine. For security reasons, you will not be able to modify the fields under the "Access" tab without these credentials. This ensures that only authorized individuals can modify these fields.
-
Click Test Access, the click Create. Note that Create is only enabled if the Test Access is successful.
Prerequisite configuration¶
To do Basic Authentication securely, you must do it over a TLS-encrypted connection. Disabling the TLS option will send the username and password in plaintext over the network and increases the liklihood of interception and unauthorized access. TLS encrypts communication between clients and servers to prevent this. Always keep the TLS option enabled to minimize the risk of exposing sensitive data. This means that your target Windows host must already have a valid TLS Server Certificate installed before you can use Basic Authentication to rotate the existing certificate or install new certificates. Because of this prerequisite, basic authentication or push installation may not be suitable for all use cases. See the VCert Readme for information on how to pull installations of certificates on Windows-based systems.
Note
The certificate must be installed in the LocalMachine\My
CAPI store (Local Computer > Personal store if using the Certificates MMC snap-in) so WinRM can use it.
-
A local (non-domain) user that is a member of the local “Administrators” group.
-
Basic Authentication set to True
winrm set winrm/config/service/auth @{Basic="true"}
winrm set winrm/config/service/auth '@{Basic="true"}'
-
A certificate with “Server Authentication” Extended Key Usage
winrm set winrm/config/service @{CertificateThumbprint="ABC"}
winrm set winrm/config/service '@{CertificateThumbprint="ABC"}'
(replacing
ABC
with the actual thumbprint of the certificate referenced above) -
An HTTPS listener configured with that certificate
winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{CertificateThumbprint="ABC"}
winrm create winrm/config/Listener?Address=*+Transport=HTTPS '@{CertificateThumbprint="ABC"}'
- Enter the Microsoft Windows (PowerShell) Hostname and the Windows Remote Management (WinRM Port) port.
-
Enable Use TLS for WinRM to secure the username and password when TLS Protect Cloud communicates with the Microsoft Windows (PowerShell) server.
Warning
Disabling this option will send the username and password in plaintext over the network.
-
(Optional) From the Credential Type drop-down, select either Enter Credentials or Select Credentials. Only users with the enabled "CyberArk shared credential" capability will see this option.
Important
Your view of credentials may be limited due to your role. System Administrators and PKI Administrators should be able to select any credential, but users with the Resource Owner role are limited to only using the credentials associated with their teams.
Note
- Enter Credentials - Is used to enter your admin credentials manually.
- Select Credentials - Is used to select your shared credentials from CyberArk.
- If you choose Enter Credentials, enter your Microsoft Windows (PowerShell) admin credentials in the Username and Password fields.
- If you choose Select Credentials. From the Credential drop-down, select your shared credentials.
-
Enter your Microsoft Windows (PowerShell) admin credentials in the Username and Password fields.
Warning
If you encounter an error message while using a username formatted as a User Principal Name (UPN), such as "jsmith@company.com", try using only the common name of the username, for example, "jsmith".
Warning
Remember to store your username and password securely when creating a new machine. For security reasons, you will not be able to modify the fields under the "Access" tab without these credentials. This ensures that only authorized individuals can modify these fields.
-
Click Test Access, and then click Create. Note that Create is only enabled if the Test Access is successful.
What's next?¶
-
Now that you have one or more machines created, you can provision certificates to those machines.
-
You can also discover certificates on machines to enable easy tracking of certificates deployed to your machines.