Load balanced CCP servers sending load balancer IP address.

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

Load balanced CCP servers sending load balancer IP address.

L2 Linker

I'm setting up load balancers for our CCP servers. The load balancer should be configured to use the X-Forwarded-For header and the IP address of the load balancer is the trusted proxy in the web.config file.

 

However based on the CCP logs it looks like it's authenticating based on the IP address of the load balancer and not the originating machine. Is this the expected behavior? Or should I be able to only have the originating machine in the allowed machine list on the application and I have something configured incorrectly?

6 REPLIES 6

L7 Applicator

There is additional config required .

 

From the docs

​

https://docs.cyberark.com/credential-providers/12.4/en/content/ccp/load-balancing-the-central-credential-provider.htm#

​

If the load balancer replaces the source IP of the routed packets with its own IP, the Central Credential Provider will not be able to IP-authenticate the machine that initiated the password request. To enable the Central Credential Provider to resolve the IP of the machine that initiated the request, apply one of the following configurations:

  • Define the load balancer as a Transparent Proxy to preserve the source IP of the originator. This way the load balancer does not modify the packet and the Central Credential Provider is not aware that the load balancer is managing the network traffic.
  • Set the load balancer to attach the X-Forwarded-For header to the routed packets with the specification of the original source IP. This requires configuration in both the load balancer and the Central Credential Provider.

​

And

 

Open the web.config on the Central Credential Provider server found in the folder where the web service is installed. Add a list of trusted-proxy IPs (TrustedProxies).

The Central Credential Provider will look up an X-Forwarded-For header for this list of proxy servers in an attempt to resolve the true originating IP address of the request. If the request is received from a server that is NOT on this list of proxy servers, it will use the IP of the proxy server and not the originating IP.

<!-- Set Trusted proxies ip list (Part of a feature that support ip-auth for machines behind proxies )-->

<add key="TrustedProxies" value="1.2.3.4, 5.6.7.8"/>

The X-Forwarded-For header must specify only one IP

​

Yes all of the required load balancer steps have been completed and the load balancer IP has been added as a trusted proxy. I've also added the X-Forwarded-For header in the logging for my CCP site in IIS and can see it coming though.

 

#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken X-Forwarded-For

 

GET /AimWebService/api/Accounts AppID=***REDACTED_APP_ID***&Safe=***REDACTED_SAFE_NAME***&Username=***REDACTED_USERNAME*** 443 - ***REDACTED_LOAD_BALANCER_IP*** [User-Agent Redacted] - 400 0 0 49 ***REDACTED_CLIENT_IP***

 

L7 Applicator

Hi @Conner DeRosier​ 

 

Have you tried bypassing LB and test direct request to see if correct IP is used?

 

 

Yes, if I call the CCP server directly it works fine and uses the correct IP.

L7 Applicator

Does increasing debug help?

 

Enable debug for Central Credential Provider (Version 12.6 and above)

5. Open the file C:\inetpub\wwwroot\AIMWebService\web.config 

6. Find the line that say <level value="INFO"/>

 and set the value to ALL (verbose).

[CCP Web Service logging is used for troubleshooting purposes only and must be revert to INFO when troubleshooting is completed.]

7. Go to C:\inetpub\wwwroot\AIMWebService and create a new folder, called "logs" 

8. Right click the logs folder > Properties > Security > Edit 

9. There should already be an inherited permission for the IIS_IUSRS group (name may be different depending on your app pool setup). Check the boxes for Allow Modify and Allow Write for IIS_IUSRS. 

10.From an elevated command prompt, run "iisreset" to make the configuration change take effect.

Sort of. I'm seeing more info and I can see only the load balancer IP coming through in that log. Which would explain why CCP is erring. I'm just not sure what additional setup is required on the IIS server when the W3SVC1 log files are showing an X-Forwarded-For header coming through with the client IP.

 

Here's the log example of what I'm seeing coming through in the AIMWebService although I've redacted most of the info. There is a cert error here although it seems to be because we're not using passthrough but we can't use an X-Forwarded-For header with pass through mode.

 

2025-07-07 10:45:31,950 | Request [***] | AIMWS011I CyberArk Central Credential Provider version *******, SDK Protocol version *******

2025-07-07 10:45:31,950 | Request [***] | AIMWS001I Start handling request

2025-07-07 10:45:31,950 | Request [***] | AIMWS016W User authentication failed

2025-07-07 10:45:31,950 | Request [***] | AIMWS025V Client certificate does not exist

2025-07-07 10:45:31,950 | Request [***] | AIMWS025V Client certificate does not exist

2025-07-07 10:45:31,950 | Request [***] | AIMWS002I Creating WebService request

2025-07-07 10:45:31,950 | Request [***] | AIMWS010I WebService request from : [***.***.***.***], AppID: [***], Query: [UserName=***;Safe=***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [RemoteAppID], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [RemoteIPAddress], value is: [LOAD BALANCER IP ADDRESS]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [RemoteOSUser], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [RemoteCertificateSerialNumber], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [RemoteCertificateAttr], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [RequiredProperties], value is: [System.Collections.ArrayList]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [Safe], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [Folder], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [Object], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [QueryFormat], value is: [Exact]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [Query], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [PolicyID], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [UserName], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [Address], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [Database], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [AppID], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [Reason], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [ConnectionPort], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [ConnectionTimeout], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS014V Key is: [FailRequestOnPasswordChange], value is: [***]

2025-07-07 10:45:31,950 | Request [***] | AIMWS007I Sending request to the Provider

2025-07-07 10:45:31,982 | Request [***] | AIMWS009E Caught exception : APPEX003E The Credential Provider has encountered an error. For more information, see the Credential Provider logs.

  • 535 Views
  • 6 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!