We are using GitLab CE and have connected LDAP for login. However, the error message “Could not authenticate you from LDAPSERVERNAME because ‘Invalid credentials for Username’” appears after an incorrect login. This means that the server name from LDAP is exposed. Is there a solution to this, perhaps how the error message can be adjusted or how the type of error message can be switched off?
Yeah, the label is LOCAL-NEW at our side, currently for testing. But the security guy wants us to modify the error message, so that also “Could not authenticate you from LDAPSERVERNAME because ‘Invalid credentials for Username’” is just ‘Invalid credentials for Username’
Theoretically, this could be resolved most likely by editing the following file /opt/gitlab/embedded/service/gitlab-rails/config/locales/devise.en.yml since it includes the
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
the problem with editing this manually is either:
Upgrading your Gitlab could overwrite this file meaning you lose your changes.
Upgrading Gitlab may not overwrite this file after the changes, meaning you would have inconsistency in your Gitlab installation for potential new fixes relating to Gitlab.
The correct way forward would be to open an issue. Temporarily you could try editing that file, but as I mentioned, this could bite you later.