Skip to content

Log LDAP lookup errors and don't swallow unrelated exceptions

Originally opened at !6103 (closed) by @toupeira.


What does this MR do?

Log errors when trying to authenticate over LDAP, and don't swallow unrelated exceptions.

Are there points in the code the reviewer needs to double check?

  • Previously all exceptions were ignored, now only Net::LDAP::Error and exceptions that inherit from it are caught by the rescue clause. There might be other exceptions that should also be ignored / dealt with.
  • Not sure if the Rails production log is a good choice for this, or if the GitLab application log would be more appropriate.

Why was this MR needed?

To help with troubleshooting LDAP issues, previously if a user login was rejected due to a backend error there was no indication in the logs.

Does this MR meet the acceptance criteria?

Merge request reports