Problem and How to configure haproxy für TPP?

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

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Problem and How to configure haproxy für TPP?

L0 Member

Hi,

 

I habe problems to configure haproxy with two TPP-Server.

After configure the haproxy and the dns, I can see the loginpage. I try to login and I get back to the login page. I have analyse the login with developer tools of chrome and found this failure reponse.

"response": { "status": 401, "statusText": "Unauthorized", "httpVersion": "http/2.0", "headers": [ { "name": "cache-control", "value": "no-cache,no-store, no-cache, max-age=0, must-revalidate" }, { "name": "content-length", "value": "54" }, { "name": "content-security-policy", "value": "default-src 'self' https://data.analytics.venafi.com https://app.pendo.io https://cdn.analytics.venafi.com;object-src none;script-src 'sha256-H3SVZBYrbqBt3ncrT/nNmOb6nwCjC12cPQzh5jnW4Y0=' 'self' https://data.analytics.venafi.com https://app.pendo.io https://cdn.analytics.venafi.com ;style-src 'self' https://cdn.analytics.venafi.com" }, { "name": "content-type", "value": "application/json; charset=utf-8" }, { "name": "date", "value": "Fri, 05 Dec 2025 06:44:07 GMT" }, { "name": "expires", "value": "-1,0" }, { "name": "pragma", "value": "no-cache,no-cache" }, { "name": "referrer-policy", "value": "same-origin" }, { "name": "server", "value": "" }, { "name": "strict-transport-security", "value": "max-age=31536000" }, { "name": "x-content-type-options", "value": "nosniff" }, { "name": "x-frame-options", "value": "SAMEORIGIN" }, { "name": "x-ua-compatible", "value": "IE=Edge" }, { "name": "x-xss-protection", "value": "1; mode=block" } ], "cookies": [], "content": { "size": 54, "mimeType": "application/json" }, "redirectURL": "", "headersSize": -1, "bodySize": -1, "_transferSize": 899, "_error": null, "_fetchedViaServiceWorker": false }, "serverIPAddress": "SERVERIP", "startedDateTime": "2025-12-05T06:44:07.458Z", "time": 165.60200000003533, "timings": { "blocked": 2.6259999998392884, "dns": -1, "ssl": -1, "connect": -1, "send": 112.83099999999999, "wait": 49.527999999593774, "receive": 0.6170000006022747, "_blocked_queueing": 0.6039999998392886, "_workerStart": -1, "_workerReady": -1, "_workerFetchStart": -1, "_workerRespondWithSettled": -1 } },

This response is not the first. The first response is my credentials and I get an API key back and some good response with code 200. But if the system is open "https://cyberarktpp.de/platformsetting?" I got this response back.

In the TPP Logs I found 1 entries:

A Mismatch with Loadbalancing. The IP of the client is not sending.

But with the option "option forwardfor header X-Real-IP" in haproxy it has to send, but it's not.

 

Here is my config for HAProxy:

defaults log global mode http balance roundrobin option httplog option log-health-checks option log-separate-errors option dontlog-normal option dontlognull option socket-stats retries 3 maxconn 10000 timeout connect 5s timeout client 50s timeout server 450s   frontend ssl_443 bind :80 bind :443 ssl crt /etc/haproxy/SERVERCERT.pem http-request redirect scheme https code 301 unless { ssl_fc } mode http http-request set-header X-Forwarded-For %[src] option http-use-proxy-header option http-keep-alive default_backend ssl_443   backend ssl_443 mode http balance roundrobin option forwardfor header X-Real-IP http-request set-header X-Forwarded-For %[src] cookie SERVERID insert indirect nocache server web1 server1.domain.de ssl verify none server web2 server2.domain.de ssl verify none

What does I unseen? Does I need some other options for haproxy?

 

Thanks,

Rob

 

1 accepted solution

Accepted Solutions

L0 Member

While, I haven't deployed this with Haproxy, typically getting a login screen after having already logged in suggest a persistence problem (you're sent to the wrong server).

 

https://www.haproxy.com/documentation/haproxy-configuration-tutorials/proxying-essentials/session-persistence/

 

Looking at the haproxy documentation, you may to have some options missing in the backend ssl_443 configuration:

 

cookie SERVERID insert indirect nocache

server web1 server1.domain.de cookie web1 ssl verify none

server web2 server2.domain.de cookie web2 ssl verify none

 

Key here is the 'cookie web1' parameter for each of the servers. Alternatively, you can use source IP address persistence.

 

View solution in original post

3 REPLIES 3

L0 Member

While, I haven't deployed this with Haproxy, typically getting a login screen after having already logged in suggest a persistence problem (you're sent to the wrong server).

 

https://www.haproxy.com/documentation/haproxy-configuration-tutorials/proxying-essentials/session-persistence/

 

Looking at the haproxy documentation, you may to have some options missing in the backend ssl_443 configuration:

 

cookie SERVERID insert indirect nocache

server web1 server1.domain.de cookie web1 ssl verify none

server web2 server2.domain.de cookie web2 ssl verify none

 

Key here is the 'cookie web1' parameter for each of the servers. Alternatively, you can use source IP address persistence.

 

L4 Transporter

Hi @Robert Knappe​ ,

I noticed you received a suggestion regarding your question. Could you kindly let us know if this solution worked for you?

If so, please mark the answer as ‘Best Answer’ to assist other community members with similar questions.

Thank you, Omri

L0 Member

@Omri Bar Natan​ Thank you for your reminder.

Yes, it works. LB is now working.

  • 1 accepted solution
  • 128 Views
  • 3 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!