RocketChat / RocketChat/Rocket.Chat

When using LDAP authentication, log entries do not include usernames for failed login attempts

Open
#18,145 6 comments 6 reactions 1 assignee View on GitHub

@pierre-lehnen-rc is already working on this.

Since Oct 22, 2020.

area: authentication
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When using LDAP authentication, log entries do not include usernames for failed login attempts.

Steps to reproduce:
  1. In administration / settings / LDAP, enable LDAP authentication.
  2. Configure LDAP host, port, encryption etc. to match your LDAP server.
  3. Once your LDAP authentication works, attempt to log in with an intentionally incorrect password.
Expected behavior:

Usernames for failed login attempts get entered into logs normally.

Actual behavior:

Logs appear with "unknown" fields where usernames should appear, albeit with the correct IP address:

Jul 02 08:53:51 rocketchat.ourdomain.net rocketchat[25799]: Failed login detected - Username[unknown] ClientAddress[null] ForwardedFor[undefined] XRealIp[4021:483:12:4028:c::4d] UserAgent[Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0]
Jul 02 08:55:13 rocketchat.ourdomain.net rocketchat[25799]: Failed login detected - Username[unknown] ClientAddress[null] ForwardedFor[undefined] XRealIp[4021:483:12:4028:c::4d] UserAgent[Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0]

Server Setup Information:
  • Version of Rocket.Chat Server: 3.4.0
  • Operating System: CentOS Linux release 7.8.2003 (Core)
  • Deployment Method: tar
  • Number of Running Instances: 20
  • DB Replicaset Oplog: yes
  • NodeJS Version: v12.16.1
  • MongoDB Version: v3.6.18
Relevant logs:

Above.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.