-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crowd Login - password always stored in plaintext in mongo and logged #7674
Comments
I guess the syncing happens because of https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-crowd/server/crowd.js#L128 and https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-crowd/server/crowd.js#L152. However I could be totally wrong here. |
ping @rufushonour, hope you're still working with rocket.chat! :) |
I have patched this on my local instance running 0.65.2. I was not unable to reproduce #4 on your list. Even with all log levels enabled I never saw the plain text password. I added several other features with my changes:
The only thing that is a problem with what i have built is the way im saving the crowd password in conjunction with the Allow Password Change setting. This setting effectively has no effect. A user could change their password in RC but as soon as they logged in with their Crowd credentials the password is overwritten with the crowd password. If anyone else is interested in these improvements I can submit a pull request |
- Added new setting for cleaning crowd usernames and creating an RC compliant name - Added new setting for selecting crowd user data sync interval - Added new button to force an on demand user data sync - When a crowd user authenticates the native method for storing passwords is called allowing RC authentication via fallbackDefaultAccountSystem even if Crowd server is offline
@jsternadel Would be great to see these changes in upstream! |
I can't confirm/reproduce that passwords stored in plaintext, only bcrypt from login, but our crowd is connected to a active directory. @jsternadel Maybe you want apply your additional changes to my fork #11483. |
This should be released as fast as possible. |
Agreed this should be released as soon as possible. In the meantime, is there are recommended method of patching a docker install? |
Can confirm this is an issue and can see plaintext passwords stored in the MongoDB users collection. Using Crowd 3.2.2 with Crowd Internal Directory. |
Here is a Gist with my current working changes: The The biggest change is using There are also some new settings for invoking the cleanUserName() method as well as initiating a user sync from the "Atlassian Crowd" settings page. Unfortunately my normal job is taking up all my dev time right now. Hopefully someone can use this to implement a permanent fix. |
Here is a second Gist for anyone using Rocket Chat in a docker and want to know how to patch it with my latest code. This will have to be done every time you update your container. I am currently on version 0.68.3 and this works for my environment. |
@RocketChat any update? |
Why do we need to patch it manually for so long, that's a SHAME |
same issue here |
@jsternadel Your patch works perfect, I only changed sync part - when user is not found in crowd I do not throw an error - instead just skip this person. |
Why not create a PR then? |
Description:
When using Atlassian Crowd to let users login to Rocket.Chat, the password of the user is always stored in plaintext in the mongo database. This does not happen when using LDAP.
Server Setup Information:
Steps to Reproduce:
deny unauthorized
orsync users
is set.Expected behavior:
Password is not stored at all or hashed.
Actual behavior
Password is stored in plaintext.
The text was updated successfully, but these errors were encountered: