SIA-RDP certificate Validation Failure
Symptom
Some customer targets are unable to connect via SIA-RDP with TLS verification enabled.
When TLS verification is disabled, the connection is good.
We verify that all necessary CA certificates have been uploaded to the SIA portal.
This scenario happens with vaulted credentials.
We also check the target server and confirm that the CA-signed certificate is in the certificate store.
In the logs, we can see these errors:
"Certificate Error. Failed to validate target machine certificate."
"error_code":"DPA_RDP_TARGET_CERTIFICATE_ERROR".
"Could not find a fitting certificate for [/CN=xxxxx]".
Environment
Secure Infrastructure Access (formerly DPA) DPA for RDP
SIA-RDP
Cause
This is happening because the CA-sign certificate is not recognized and not configured on the target server.
This might be because a GPO setting is blocking the certificate from being implemented.
Resolution
We need to run the following commands in an elevated PowerShell CLI on the target server:
Get-ChildItem "Cert:\LocalMachine\My"
A list of certificate thumbprints will be shown.
Copy the thumbprint of the CA-signed certificate and run these commands:
First:
$PATH = (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices)
Then:
Set-WmiInstance -Path $PATH -argument @{SSLCertificateSHA1Hash="<CA-signed certificate>"}
Note: the thumbprint should be enclosed with quotes, for example:
@{SSLCertificateSHA1Hash="511E24BB84F3E5CA886C30C40D249A87207D15F6"}
After that, we will need to check that the registry key is being set.
Go to the target's registry and find this key:
Registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
Value name: SSLCertificateSHA1Hash
The value should be the thumbprint for the desired certificate.
After that, the connection with the desired certificate and the certificate validation will be good.