CCP - Client Certificate Authentication - Example Script
83
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 16:11 PM
Objective
The below PowerShell scripts shows examples of how the CCP can be called using a client certificate for authentication.
These scripts are provided on example basis only, and assume SSL verification is successful between the client and the CCP server.
CCP API Request example (this is the format expected in the first two scripts below):
https://ccp.cybr.com/AIMWebService/api/Accounts?appid=sampleapp&safe=demosafe&address=1.1.1.1
Environment
10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;14.3 Privileged Access Manager (PAM, self-hosted);Privilege Cloud Central Credential Provider
Procedure
For use with .cer certificate file:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$URI = "CCP API request"
$cert = "Absolute path of .cer file"
$res = (Invoke-RestMethod -Method Get -Uri $URI -Certificate $cert)
echo $res
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$URI = "CCP API request"
$certPath = "Absolute path of .pfx file"
$cert = Get-PfxCertificate -FilePath $certPath
$res = (Invoke-RestMethod -Method Get -Uri $URI -Certificate $cert)
echo $res
For use with a certificate in the Windows Certificate Store:
See attached Powershell script file.