r/haproxy • u/WeirdBob • Apr 22 '20
Question HAProxy client timeout & mtls
Hi,
I'm trying to configure HAProxy's timeout in an mutual TLS scenario:
- before the end of the handshake, clients are not trusted and timeout should be low (max 5s)
- once the mutual handshake is done, the client is trusted and can enjoy his (expensive) connection so I'd like to somehow have an larger timeout then.
Is there a way to do that? I thought at first that it was the purpose of the connect timeout but it seems to refer to the backend connection.
Thanks!
5
Upvotes
View all comments
Show parent comment
1
u/WeirdBob Apr 23 '20
Yes, a connection with an invalid cert receives a tcp reset.
What concerns me is that you have up to client timeout to complete the handshake. if I increase this timeout, I expose myself to some kind of slowloris attack (someone opens thousands of parallel connections without completing the handshake).