Proxy Configuration in Privilege Cloud
Objective
This article will explain how to setup Idira components when your company requires specific or all traffic to go through proxy.
Each self-hosted component communicates with different services in the Privilege Cloud backend, so it may be
necessary to configure proxies in different places to enable all required communication.
Idira only supports unauthenticated proxy type.
First, we need to understand what traffic Idira communicates with:
- Vault communication over port 1858 (CASOS Protocol)
- Backend communication over port 443 (HTTPS Protocol)
- Backend communication over port 80 (HTTP Protocol) - this is only used for CRL lookups, we will never use insecure protocol for Idira communication.
Each Protocol used is in charge of various things, such as installation, authentication, day 2 day functionality, Cred resets, various API bulk scripts and more.
To configure CASOS (1858) communication over proxy, Idira components typically come with vault.ini file that can be set and enable proxy settings.
To configure HTTP/HTTPS communication over proxy we use Windows/Linux Environment parameters & .NET configuration.
What is currently Supported:
- CPM - Full proxy configuration achievable
- PSM - Full proxy configuration achievable
- PSMP - Full proxy configuration achievable
- CP (Linux & Windows) - Full proxy configuration achievable
- Secure Tunnel - Full proxy configuration achievable
- Other ISPSS services natively support proxy and will not be mentioned here.
Not Supported (Semi):
1. Connector Management - Currently CM itself doesn't support fresh CPM/PSM proxy installs, BUT if you follow the article and install CPM/PSM manually, afterwards you can deploy CM in proxy mode and it will work on subsequent CPM/PSM upgrades, since for CM the process is transparent.
Proxy Config by Connection
Privileged Session Manager (PSM)
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| Privileged Session Manager | Vault | Main service | 1858 | Vault.ini |
| Privileged Session Manager | Identity API | User Authentication | HTTPS | Environment variables |
| Privileged Session Manager | Privilege Cloud REST API | Unlock exclusive accounts after sessions end (ExclusiveUnlockAfterPSMSession) | HTTPS | Environment variables |
| ApiKeyManager | Privilege Cloud REST API | API key reset | HTTPS | Environment variables |
| ApiKeyManager (via Cryptography API) | CRL/OCSP endpoints | Certificate Revocation checks | HTTP | User profile in Windows |
Privileged Session Manager for SSH (PSM for SSH/PSMP)
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| PSM for SSH service | Vault | Main service | 1858 | Vault.ini |
| PSM for SSH service | Identity API | User Authentication | HTTPS | Environment variables |
Password Manager (CPM)
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| Password Manager Service | Vault | Main service | 1858 | Vault.ini |
Password Manager (CPM) Registration
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| Password Manager Setup | Privilege Cloud REST API | Backend configuration | HTTPS | .NET 32 bit |
| Password Manager Setup | Vault | Backend configuration | 1858 | Vault.ini (in CPM installation folder) |
Credential Provider ([C]CP)
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| Credential Provider service | Vault | Main service | 1858 | vault.ini |
| Credential Provider service | Vault | Main service | 1858 | (for Linux) Environmental variables |
CPM Scanner
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| ApiKeyManager | Privilege Cloud REST API | API key reset | HTTPS | Environment variables |
| CPM Scanner Service | Privilege Cloud REST API | Main service | HTTPS | .NET 32 bit |
Secure Tunnel
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| Secure Tunnel Service | Backend Connector | Main service | HTTPS | Application.properties |
CreateCredFile-Helper (Linux)
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| CreateCredFile-Helper | Privilege Cloud REST API | Credential synchronization | HTTPS | Environment variables |
PowerShell Tools
Set-DomainUser
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| Set-DomainUser | Privilege Cloud Vault |
Backend configuration | 1858 | -Proxy parameter |
| Set-DomainUser | Privilege Cloud REST API | Backend configuration | HTTPS | -Proxy parameter |
Other Tools
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| PowerShell | Any | N/A | HTTPS | .NET (64 bit) |
| VaultOperationsTester | Vault | Tool-dependent | 1858 | Vault.ini |
| WebDriverUpdater | Driver download sites | Browser driver update | HTTPS | .NET (32-bit) |
Connector Management Agent
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| PowerShell | Connector Management Backend | Software download | HTTPS | .NET (64 bit) |
| Connector Management Agent | Connector Management Backend | Main service | HTTPS | Built-In UI config |
Identity Connector
| Source | Destination | Purpose | Protocol/Port | Proxy method |
| Identity Connector | Identity API | Main service | HTTPS | Built-in configuration |
Proxy Configuration Methods
.NET 32-bit
- Edit C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Machine.Config
- Add to the <configuration> block:
| <system.net> <defaultProxy> <proxy usesystemdefault="true" proxyaddress="http://proxy_host:proxy_port" bypassonlocal="true" /> </defaultProxy> </system.net> |
Affects:
- CPM Scanner to PCloud REST API
- PSM to PCloud REST API (ExclusiveUnlockAfterPsmSession)
.NET 64-bit
Edit C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Machine.Config
Add to the <configuration> block:
| <system.net> <defaultProxy> <proxy usesystemdefault="true" proxyaddress="http://proxy_host>:<proxy_port" bypassonlocal="true" /> </defaultProxy> </system.net> |
Affects:
- PowerShell commands (Invoke-WebRequest/Invoke-RestMethod)
- Includes most scripts in Privilege Cloud Tools package, but some tools may also communicate with vault so additional configuration may be required
Vault.ini
- Edit vault.ini for the relevant component
Add:
| PROXYTYPE=HTTPS PROXYADDRESS=<proxy_host> PROXYPORT=<proxy_port> |
Windows Profile
- Open Windows Proxy settings
- Location may vary by Windows version but it should be in the Network section of the Windows Settings application
- Add your proxy details
- Add proxy bypasses for:
- 127.0.0.1
- localhost
- the server's LAN IP address
Affects:
- Microsoft Cryptography API, which is used by some Idira tools to validate certificates
- Microsoft Remote Desktop Services management (Server Manager + deployment tools)
Environment Variables
Windows
The http_proxy, https_proxy and no_proxy variables are best defined at system level, as Windows does not really have a facility to define this per-service. To do so:
- Navigate to the system control panel
- The method varies by OS. Open Windows Control Panel or Settings application, find the System section/control panel and open Advanced System Settings
- Select the Advanced tab
- Click Environment variables
- Add the following variables:
- http_proxy
- Value: <proxy_host>:<proxy_port>
- https_proxy
- Value: <proxy_host>:<proxy_port>
- no_proxy
- Value: <IP address of the Connector server>,127.0.0.1
- http_proxy
Affects:
- PSM communication with Identity API for user authentication
- ApiKeyManager (CPM and PSM)
- Secure Tunnel configuration tool
Linux
On Linux these environment variables may be set in 3 contexts:
- Globally
- In the current session
- For the PSM for SSH service
These methods may vary by OS distribution.
To set globally:
- Edit /etc/environment
- Add the following lines
| http_proxy=http://<proxy_host>:<proxy_port> https_proxy=http://<proxy_host>:<proxy_port> |
- Reboot the server
To set in the current session:
- Execute the following commands
| export http_proxy=http://<proxy_host>:<proxy_port> export https_proxy=http://<proxy_host>:<proxy_port> |
To set for the PSM for SSH service:
- Execute the following command as root
| systemctl edit psmpsrv |
- This will open a text editor on an empty file. Write:
| [Service] Environment=http_proxy=http://<proxy_host>:<proxy_port> Environment=https_proxy=http://<proxy_host>:<proxy_port> |
- Restart the psmpsrv service with this command
| systemctl restart psmpsrv |
Setting the proxy configuration globally is recommended to reduce effort for future upgrades and maintenance, but if you prefer selective configuration:
- Set it in the current session while installing PSM for SSH and performing maintenance, such as using CreateCredFile-Helper
- Set it for the PSM for SSH service after installation
Application.properties (Secure Tunnel)
- Edit the application.properties file at
- Add the following lines:
| proxyservice.explicitProxyAddress=<proxy_host> proxyservice.explicitProxyPort=<proxy_port> |
- Restart the Idira Privilege Cloud Secure Tunnel service
More Information
Windows Certificate Validation
Some components use the Windows Cryptography API to verify server certificates. As part of that validation process, the Cryptography API may need to check for revoked certificates, which will require a proxy. The Cryptography API will use the proxy settings of the user (configured in Windows Settings or Internet Control Panel) that initiated the verification check.
More information: https://learn.microsoft.com/en-us/troubleshoot/developer/browsers/security-privacy/description-of-cryptography-api-proxy-from-crl
Environment
14.6 Privilege Cloud Central Policy Manager (CPM);Credential Provider;PSM;Central Credential Provider;PSMP;Reports;Privileged Session Management (PSM);Connector;Privilege Cloud Connector;Secure Tunnel;Secure Tunnel Client;Privilege Cloud Installer;Connector Management
Procedure
Practical Approach
Installing through proxy will require us to do two things:
1. Configure OS level settings
2. Stop the usual installation flow and intervene in the middle, change few things and resume installation.
Video Guide
You can watch the online YouTube videos we have prepared to better understand the process:
CPM, PSM, SecureTunnel, Identity Connector
Components Needed
From Marketplace at https://community.cyberark.com/marketplace/s/#software-aK4Ht000000XZuPKAW-
- Privilege Cloud Connector Installer
- Privilege Cloud Secure Tunnel
- Privilege Cloud Tools Zip
In Shared Services, The "Installeruser@cyberark.cloud.XXXX" (which used for installations) password expires
every 24 Hours. Therefore, it's important to make sure to reset the password before starting
the process.
Prerequisite Checks
When running prerequisite checks on the connector, connectivity tests will fail. That is expected with proxy.
We will need to perform some tests manually.
- For HTTPS connections, test in a browser, or we recommend using CURL
- Download CURL: https://curl.se/windows
- Use CMD to launch it, don't use PowerShell (PowerShell uses "curl" command as alias for invoke-webrequest and will mislead you).
- Test https://connector-subdomain.privilegecloud.cyberark.cloud:
- Example: curl -v https://connector-ofirlab.privilegecloud.cyberark.cloud --proxy http://172.31.91.14:3128
- (Ignore the rest of the errors regarding CERT etc', that is expected, we only are about "200").
- Test https://console.privilegecloud.cyberark.cloud
- Example: curl -v https://console.privilegecloud.cyberark.cloud --proxy http://bod-st.pcloud-london.com:3128
- (Ignore the 403 errors, we only care about "200" and matching certificate like the screenshot).
- Test https://subdomain.privilegecloud.cyberark.cloud
- Example: curl -v https://saascorpslndn.privilegecloud.cyberark.cloud --proxy http://bod-st.pcloud-london.com:3128
- Test https://connector-subdomain.privilegecloud.cyberark.cloud:
- For Vault connection
- Run CPMConnectionTest: .\PSMCheckPrerequisites_PrivilegeCloud.ps1 -CPMConnectionTest
- (You can also run the CM prereq, they perform the same exact check in both scripts, whichever you prefer .\ConnectorCheckPrerequisites_PrivilegeCloud -CPMConnectionTest )
- It will fail, but it will create the vault.ini file
- Enter the VaultOperationsTester directory
- Edit vault.ini
- Add the following lines
- PROXYTYPE=HTTPS
- PROXYADDRESS=<proxy address>
- PROXYPORT=<proxy port>
- Run CPMConnectionTest again. It should succeed now.
Component Installation & Proxy Configuration
-------------------------------------------------------------------
* If you are doing this first time we highly recommend backing up any file you are asked to edit, just in case you want to start fresh again.Windows:
CPM & PSM
- Ensure that the client has configured the server with their proxy settings. (Search proxy settings at the windows start menu to get to these settings)
- Right click the connector installer and run as admin
- Allow connector server installer to run, extracting files, installing RDS, and restart
- After restart stop installation
- Navigate to installation files, same folder that holds installer.bat
- Edit Pre-Requisites.ps1
- Search for the CheckVaultCredentials function
- Comment out lines 341 - 373. The comment is <# #>, anything between those two tags will be a comment.
- Add new line after 373 > return $true
- And another new line and put "}" to close the function.
- This is basically gutting the function CheckVaultCredentials and forcing it to return $true. Example:
- Open Connector.config. This is a shortcut to cygwin64\home\user\privileged-cloud-installer\pconfig.yml, which you can edit with Notepad
- Change PSM_Registration to false
- Save the file
Proxy Configuration (OS level):
- Configure .NET to use a proxy
- Navigate to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
- Run Notepad as an administrator
- Open C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Machine.Config
- Add the following section above the </configuration> tag:
-
<system.net> <defaultProxy> <proxy usesystemdefault="true" proxyaddress="http://<address:port>" bypassonlocal="true" /> </defaultProxy> </system.net> - Example:
-
- Save the file and exit Notepad
- Repeat this process for C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Machine.Config
- The configuration file in Framework64 will affect 64-bit .NET applications, like PowerShell, while the Framework folder is for 32-bit applications, like the CPM Scanner service
- Set system-level environment variables to configure the proxy for use by ApiKeyManager.exe
- Open Windows Control Panel
- Navigate to System
- Click Advanced System Settings
- Click Environment Variables... on the Advanced tab
- In the System Variables section add two variables:
- http_proxy
- http://<proxy address>:<proxy port>
- https_proxy
- http://<proxy address>:<proxy port>
- no_proxy
- <IP address of the Connector server>,127.0.0.1
- This sets two proxy bypasses:
- The IP address of the connector, to allow the installer to communicate with WinRM
- The loopback address, so that the Secure Tunnel Configuration Tool can communicate with the Secure Tunnel service
- you can do CMD -> ipconfig -> to get the internal IP of the connector machine
- This sets two proxy bypasses:
- <IP address of the Connector server>,127.0.0.1
- Example:
- http_proxy
- Add proxy settings to the user's profile
- Open Windows Settings
- Navigate to Network & Internet
- Select the Proxy section
- Enable the Proxy toggle and provide proxy details
- Press Save
Edit Installation Process
These steps will allow the CPM Registration process to be completed with the proxy. This is only required on the active CPMs. It can be performed on servers intended to be passive CPMs, but it won't have any effect.
- Create and edit in Notepad:
- <Privilege Cloud Installation Files>\packages\CPM\InstallationAutomation\Registration\RegistrationTool\vault.ini
- Enter the following details replacing <> with your relevant details.
- (Notice the spacing between VAULT and = sign on the first line, it's important to keep this exact structure)
-
VAULT = "CPM Vault" ADDRESS=<vault address> PORT=1858 PROXYTYPE=HTTPS PROXYADDRESS=<proxy address> PROXYPORT=<proxy port>
-
- Save and Exit.
- Edit <Privilege Cloud Installation Files>\packages\CPM\InstallationAutomation\Registration\RunCPMRegisterComponent.psm1
- Find the line:
-
$registerComponentArguments = "CPM /accepteula $acceptEula /upgrade $isUpgrade /vaultip $vaultip /vaultport $vaultPort /vaultuser $vaultUser /pocmode $pocMode /issrsmode $isSrsMode /installdir `"$installDirectory`" /cpmusername $cpmusername"
-
- Replace with this instead:
-
$registerComponentArguments = "CPM /vaultinifile `"$registerComponentWorkingDir\Vault.ini`" /accepteula $acceptEula /upgrade $isUpgrade /vaultip $vaultip /vaultport $vaultPort /vaultuser $vaultUser /pocmode $pocMode /issrsmode $isSrsMode /installdir `"$installDirectory`" /cpmusername $cpmusername"
-
- Save the file and exit.
- Find the line:
Continue Base Installation
With the changes above, the Installer can complete the
- Open CMD or PS window in admin mode and run the installer.bat from the Privilege Cloud Connector installation files.
Expected Result:
- CPM is fully installed, registered and hardened (when Active)
- PSM is installed and hardened, but not registered
Complete PSM Registration
- Navigate to the directory you installed the software to (default: c:\Program Files (x86)\Cyberark\PSM)
- Edit the \Vault\vault.ini file.
- Enter the following details replacing <> with your relevant details.
- (Notice the spacing between VAULT and = sign on the first line, it's important to keep this exact structure)
-
VAULT = "PSM Vault" ADDRESS=<vault address> PORT=1858 PROXYTYPE=HTTPS PROXYADDRESS=<proxy address> PROXYPORT=<proxy port> TIMEOUT=30
-
- Save and exit.
- Navigate to Connector server Installation file\packages\PSM\InstallationAutomation\Registration
- Edit the RegistrationConfig.xml file filling in the following values with the client specific ones:
-
<Parameter Name= "vaultip" Value="vault-subdomain.privilegecloud.cyberark.cloud"/> <Parameter Name= "vaultport" Value="1858"/> <Parameter Name= "vaultusername" Value="installeruser@cyberark.cloud.xxxx"/> <Parameter Name= "accepteula" Value="Yes"/>
-
- Leave the default values for any not mentioned above.
- Save and exit.
- Open CMD or PS in admin mode in connector server installation files\packages\PSM\InstallationAutomation
- Run the command: .\Execute-stage.ps1 Registration\RegistrationConfig.xml -spwd
- Provide the password when prompted (of the CyberArk Installer User).
- Wait after registration is complete and restart the machine.
- Check service is running and verify PVWA SystemHealth shows service is connected.
Expected Result:
- PSM is fully installed, registered and hardened
Install Secure Tunnel
- Install the Secure Tunnel
- Close the installer once you reach the Authentication page
- Navigate to the install directory for Secure Tunnel (default: c:\Program Files\Cyberark\PrivilegeCloudSecureTunnel)
- Open the Config folder
- Edit the Application.Properties file with an Admin Notepad
- Save and exit.
- Restart the Tunnel service.
- Run the Privilege Cloud Secure Tunnel Configuration Tool
- Authenticate to Privilege Cloud using the InstallerUser
- Complete Secure Tunnel configuration wizard
Expected result:
- Secure Tunnel is fully installed, registered and configured.
Install Credential Provider
The steps for installation and configuration are as follows:
- Start the Credential Provider installation as normal
- Proceed until you are prompted for the Vault username and password
- Open Windows Explorer and navigate to
- <CyberArk installation directory>\ApplicationPasswordProvider\Env
- Use a text editor to create a file called TempVault.ini in this folder with the following content
-
VAULT = "CAMainVault" ADDRESS=<vault address> PORT=1858 PROXYTYPE=HTTPS PROXYADDRESS=<proxy address> PROXYPORT=<proxy port>
- Right-click on the TempVault.ini file and select Properties
- Select the Security tab
- Select your own username
- Select the appropriate checkbox to Deny your user Write permission to the file
- This will prevent the CP Registration process from overwriting this file
- Press OK
- Navigate to the designated installation folder you chose earlier, typically C:\Program Files\ApplicationProvider\Vault.
- Find the vault.ini inside the Vault folder and edit it with the same settings you put earlier in the "TempVault.ini".
- Keep in mind, you don't need to do any permission changes (Deny "write") like you did on the TempVault.ini file.
- Return to the installation window and proceed with the installation as normal
Expected result:
- The vault configuration file should contain the proxy details:
- <CyberArk installation directory>\ApplicationPasswordProvider\Vault\Vault.ini
- The Credential Provider log should indicate successful communication with the vault
Linux:
* Tested on OS that have /etc/environment file configuration (Centos, RHEL, Rocky) which are the supported OS by CyberArk.
* Note that steps for CP and PSMP are similar except that after setting proxy for PSMP you can install it via the psmpwiz script for your comfort, CP for now must be installed manually.
PSMP / CP:
- Edit /etc/environment
- Add the following lines
-
http_proxy=http://<proxy_host>:<proxy_port> https_proxy=http://<proxy_host>:<proxy_port>
- Save the file and exit.
- Restart Machine to take affect.
- Extract the PSMP / CP installation files
- Edit Vault.ini in the installation files to add proxy information, make sure to remove comment sign ( # ).
-
-
- Run the installation (for PSMP you can use psmpwiz script inside pcloud tools zip).
- Note: The Vault connection test will fail as it does not use the proxy. Proceed anyway.
- After Installation is complete we need to define the proxy env params also in PSMP service config files
- Edit the file by using VI command
- vi /usr/lib/systemd/system/psmpsrv-psmpserver.service
- and add the proxy params on the ENVIRONMENT line after the /usr/lib part like this:
- Environment=LD_LIBRARY_PATH=/usr/lib "HTTPS_PROXY=<ProxyAddress>:<Port>"
- Run command -> systemctl daemon-reload
- Run command -> service psmpsrv restart
- Check that service is running with no issues -> service psmpsrv status
- You have finished installing component.
Known Issues
Connector Management Agent does not support a proxy at this time so do not install it.
Troubleshooting
In case of any issues verify the system configuration matches the following:
- PSM\Vault\Vault.ini should contain the following:
-
-
For PSM service to connect to vault via proxy
PROXYTYPE = HTTPSPROXYADDRESS = <Proxy Host>PROXYPORT = <Proxy Port> -
For PSM service to perform ExclusiveUnlockAfterPSMSession:
[API]Addresses="https://<subdomain>.privilegecloud.cyberark.cloud/passwordvault/api"ApiKeyPath="<CyberArk Installation Dir>\PSM\Vault\apigw.cred" -
PSM service does not use the proxy settings from vault.ini for connections to API. (TBC: which proxy settings apply to this connection)
-
- Password Manager\Vault\Vault.ini should contain the following:
-
For CPM service to connect to vault via proxy
PROXYTYPE = HTTPSPROXYADDRESS = <Proxy Host>PROXYPORT = <Proxy Port> - For CPM Scanner service to connect to Privilege Cloud API:
-
-
-
[API]Addresses=https://<subdomain>.privilegecloud.cyberark.com/PasswordVaultCPM Scanner service does not use the proxy settings from vault.ini. It uses 32-bit .NET configuration instead.
CPM Vault.ini Addresses value does not have /api at the end
-
- Verify 32-bit and 64-bit .NET proxy configuration
- Verify environment variables
ERROR: ApiKeyManager (CPM/PSM) error:
[ERROR] 001E Failed to perform request (Reason=[A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.])
Solution: this means that your env variables have incorrect syntax, typically we see users set "https://<proxy>..." under the https_proxy variable, but instead it should be "http://<proxy>..." for both http_proxy and https_proxy.
ERROR: The server did not response CredSSP being an available authentication method - actual: 'Negotiate, Kerberos' unreachable: true
Run these commands in PowerShell and retry install
winrm set winrm/config/service/auth '@{CredSSP="true"}'
winrm set winrm/config/client/auth '@{CredSSP="true"}'
Enable-WSManCredSSP -Role Server
ERROR: ITACM087E Proxy communication error (Code 3). Reason: Timeout : Proxy server could not connect to PrivateArk server. PrivateArk server did not respond
This means you didn't whitelist the proxy public IP, and sometimes they have multiple IPs (Machine Public IP is not the same as Proxy IP).
ERROR: ITACM087E Proxy communication error (Code 3). Reason: HTTP/1.1 502 badgateway
Check the vault.ini PROXYTYPE value, it needs to be HTTPS (users often mistake because their proxy is http:// but it's in fact HTTPS behind the scenes).
ERROR: credssp JTTPSConnectionPool max retries exceeded with url: /wsman (Caused by SSLError "bad handshake: SysCallError(104, "ECONN RESET") "unreachable")
Typically means you run CMD or PS not in admin mode, and tried to execute installer.bat like that.