I'm developing CPM REST plugin, my lab rest endpoint has only self signed certificate. Can i disable certificte validation somehow when using my CPM REST Plugin ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I'm developing CPM REST plugin, my lab rest endpoint has only self signed certificate. Can i disable certificte validation somehow when using my CPM REST Plugin ?

L0 Member

16/12/2025 05:12:50.349 | ERROR -> BaseAction :: HandleGeneralError -> Received exception: System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. 

4 REPLIES 4

L5 Sessionator

hi @Haim Marko​ 

 

Place below snippet anywhere in your PowerShell script to ignore Certificate validation.

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

 

Hi Sanzu, Thank you for your response. However, I am not developing a PowerShell script; I am building a REST API CPM plugin, which is documented here: https://docs.cyberark.com/pam-self-hosted/latest/en/content/plugins/cpm-plugins-rest-api.htm Could you please provide a solution for disabling certificate validation within the context of a CPM REST API plugin? Thanks, Haim Marko

@Haim Marko​ 

You are using XML based Rest API plugin. I was under impression that you are using Process.ini and Prompts.ini file with some sort scripts to manage the password. Thanks for clarification. I don't think XML file can bypass Certificate Validation as I myself have never done to bypass certificate validation. However, I have pasted some sample snippet for xml and you may try if that can help. Nevertheless, I can suggest you install that self-signed certificate inside Trusted root if it completely self-signed or inside Intermediate Root Store in your CPM server if cert is not self-signed as well as if web site has static ip then you can map those ip and fqdn in hosts file too.

 

Sample XML snippet.

<configuration> <system.net> <settings> <servicePointManager checkCertificateName="false" checkCertificateRevocationList="false" /> </settings> </system.net> </configuration>

Application-specific XML settings

Some tools allow this via XML because they implement the bypass internally.

<ssl> <trustAllCertificates>true</trustAllCertificates> </ssl>     OR   <security> <validateCertificates>false</validateCertificates> </security>   ✅ This works only if the application explicitly supports it.

 

L4 Transporter

Hi @Haim Marko​ 

 

It seems that Sanzu provided an answer to your question. Could you kindly let us know if this solution helped?

If so, please mark the answer as 'Select as Best' to assist other community members.

 

Thank you, Omri

  • 95 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!