RocketChat / RocketChat/Rocket.Chat
Local storage of credentials for LDAP authenticated users
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Rocket.Chat Version: 0.57.0-rc.1
Running Instances: 1
DB Replicaset OpLog:Disabled
Hi. We have a rocket instance on which user login via both LDAP and the local account system (=users created locally on rocket, not in LDAP). To allow login against both systems, the option "Login Fallback" in the LDAP menu has to be enabled. However, this seems to have the side effect that LDAP users are mirrored to the local account system.
For example, my login on LDAP is the uid attribute which is my FQ email address. The first time I login (when never logged in before on rocket) I need to use my FQ email. From then on I can apparently login using only my "rocket username" (which is my email without @ suffix) . From the log:
[34mI20170621-16:25:49.519(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Connection.info LDAP connected
[34mI20170621-16:25:49.523(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Bind.info Binding admin user REMOVED
[34mI20170621-16:25:49.530(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Search.info Searching user koen.serneels
[34mI20170621-16:25:49.536(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Search.debug searchOptions { filter: '(uid=koen.serneels)', scope: 'sub' }
[34mI20170621-16:25:49.538(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Search.debug domain_base REMOVED
[34mI20170621-16:25:49.546(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Search.info Search result count 0
[34mI20170621-16:25:49.549(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Search.debug Search result []
[34mI20170621-16:25:49.552(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAPHandler ➔ info Search returned 0 record(s) for koen.serneels
[34mI20170621-16:25:49.555(0) rocketchat_logger rocketchat_logger.js:377 [31mLDAPHandler ➔ error [Error: User not Found]
[34mI20170621-16:25:49.559(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAP ➔ Connection.info Disconecting
[34mI20170621-16:25:49.563(0) rocketchat_logger rocketchat_logger.js:377 [34mLDAPHandler ➔ info Fallback to default account system { username: 'koen.serneels' }
Especially the last line is interesting: the user was not found in LDAP (as the uid attribute is my FQ email, not just the part before the @) so rocket tried to authenticate against the local account system. It could do that since I was logged in before and it apparently stored my credentials somewhere locally.
This is not desired. When users are coming from LDAP, the LDAP should remain the only authority (user information could be cached locally, but not account status and credentials). Because if in this case the user had been removed on LDAP login would still be possible until a manual delete of the rocket account was performed.
Is this a bug, a missing feature or am I doing something wrong? :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.