Description of problem:
When both ldap and htpasswd IDPs are configured, and if LDAP query took more time than allowed Request timeout(default is 60s), user fails to login when credentials from htpasswd are used. Even though request timeout exceeds, it seems logical to try the other IDP.
login succeeds if the order of htpasswd and ldap IDPs are reversed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Apply ldap IDP followed by htpasswd IDP
2. break the connection between ldap server and oauth-server. I achieved this by changing ldap server port number
3. trying to login as user configured in in htpasswd using `oc login`
login fails with "Error from server (InternalError): Internal error occurred: unexpected response: 504"
login to succeed
I think this must have been there at least since 4.1. A solution to consider is to set the timeout the ldap library uses for connections (not the timelimit for searches, that's different) to half/portion of our request timeout. Ref: https://github.com/go-ldap/ldap/blob/bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9/conn.go#L107
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.