You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disabled LDAP accounts can still login into Rocket Chat #4554
Disabling an user account in Active Directory does not prevent that user from being able to login to Rocket Chat;
Disabling an user account in Active Directory does not terminate any existing Rocket Chat session for that user. Each authenticated session should perform periodic re-authentication, or the server should have an ldap listener and terminate the session(s) for any account which is no longer valid in the directory.
Tested using latest develop branch, still happening. Login Fallback will prevent disabled users from logging on, but it will not allow local users (such as admin) to login (as designed).
We're using this filter for LDAP logins, this allows subtree search and logins with username or email, for enabled users only:
{"filter": "(&(objectClass=person)(|(userAccountControl=512)(userAccountControl=66048))(|(mail=#{username})(sAMAccountName=#{username})))", "scope": "sub", "userDN": "SERVICE_ACCOUNTS@your-company.com", "password": "HIDDEN"}
Perhaps this could be set as a default filter for a clean Rocket.Chat install? It will speed up adoption and ease the process of integrating with LDAP.
Reacted by Mustafa Tozlu, idoop, CSW4Lyfe and vastit
I can confirm the problem: a removed user from AD is still able to login as long as "LDAP/Login Fallback" is set to "True". If it's set to "False" the user can't login, but this disables the initial, local admin user too and one has to put another AD user to admin group the get admin access again:
But what happens if one changes the LDAP configuration to something wrong and the LDAP connection is not working any more? In that case your are blocked completely.
If the LDAP/AD connection is fine and "Domain Search User" can log in, an user object that does not exist any more, to my mind this is not a case of LDAP_Login_Fallback.
I think doing what's suggested in #7235 should work for LDAP auth. Basically you would disable RC users that are disabled or missing in LDAP directory. This would be during regular LDAP database sync. I don't think regular re-auth is a good idea in the case of an unstable LDAP connection locking out users. Sync on the other hand, is more definitive--- If the user is disabled in the LDAP/AD database, it gets disabled in RC.
If your LDAP servers connectivity is unstable, you have bigger things to worry about than access to RocketChat. This is why people run multiple directory servers. We have two in every office, and additional ones in offsite datacenters.
If the RocketChat server's connectivity is down, the link to an LDAP server is kinda moot.
Live queries to an LDAP server is the way to go, in my opinion. We have no other services that cache authentication credentials except RocketChat. Clients frequently cache credentials, but that's a different story.
Alan.
On Jun 13, 2017, at 12:43 PM, gregs007 ***@***.***> wrote:
I think doing what's suggested in #7235 should work for LDAP auth. Basically you would disable RC users that are disabled or missing in LDAP directory. This would be during regular LDAP database sync. I don't think regular re-auth is a good idea in the case of an unstable LDAP connection locking out users. Sync on the other hand, is more definitive--- If the user is disabled in the LDAP/AD database, it gets disabled in RC.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
I thank you (rocket chat team) and encourage you to keep forward and make rocket chat a real community worldwide people project. Unfortunately many of us still rely on closed monopolistic technologies like Microsoft Windows workstations (i'm grateful with windows, in a way i have benefited a lot from it and i enjoy some of their products, but in a philosophical way i can not agree ) and therefore Active Directory almost like the natural method for administration.
27 апр. 2020 г., в 02:38, winstonrojas ***@***.***> написал(а):
I thank you (rocket chat team) and encourage you to keep forward and make rocket chat a real community worldwide people project. Unfortunately many of us still rely on closed monopolistic technologies like Microsoft Windows workstations (i'm grateful with windows, in a way i have benefited a lot from it and i enjoy some of their products, but in a philosophical way i can not agree ) and therefore Active Directory almost like the natural method for administration.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
So, it's been another three years since @engelgabriel said:
Rocketeers, after consideration, we will merge the code to fix these LDAP issues into the main repository. I am reopening a few of the LDAP issues to be resolved this week.
To me, that implied the required features to enable proper LDAP sync and (I inferred) automatic user disabling during said sync. Perhaps I misunderstood, but if not, those features are still not working in the CE version. Both appear to be enterprise only features.
... notably, the following obviously useful features:
Advanced Sync
Sync User Active State: Determine if users should be enabled or disabled on Rocket.Chat based on the LDAP status.
Auto Logout Deactivated Users
Enable Auto Logout: Set true to enable auto-logout.
Auto Logout Interval: Allows you to set the interval for auto-logout.
Background Sync
Background Sync: Enable periodic background sync.
Background Sync interval: The interval between synchronizations
While I totally understand the financial need to break out some features into the enterprise version so that the company may generate revenue, I completely disagree that any security-related capabilities should not be automatic, and in the community edition, especially if the contributions made came from the community.
If not, and without the ability to automatically and periodically update user "disabled" status and auto-logout (newly) disabled users, RocketChat has decided that the security of users using the community edition version is not of their concern.
Moreover, having the bug/feature reports remain open implies that it's still a possibility, when in fact there is no intention to "fix", since it's already working, if one is using Enterprise mode. Someone should at least acknowledge the "enterprise only" decision and close the issue.
You are correct that after Gabriel’s comment which you quoted we refactored LDAP code including addressing a number of open issues. At that time we made the updated functionality part of the enterprise offering. We will close the associated issues.
@caskelly - I appreciate the acknowledgement here (and #6174 and #7235), but I encourage you to read my entire post again. While I get the motivation for revenue, I would encourage you to consider any features that affect the security of deployments and not put those behind paywalls. In this case, there is an implicit expectation that an account disabled in some LDAP / AD system would be forbidden from logging into RC, but that's not true.
While I don't know the extent to which the code that implements the LDAP integration came from CE contributions, I completely believe that security related code should never be behind a paywall. Other stuff that makes life better? Sure. But don't endanger contributing CE users by putting features like the LDAP sync and auto-disable in the enterprise only version. That's just asking for people to be impacted negatively, which will reflect poorly on your product when incidents occur. Oh, and blaming the user? That's not an option.
Activity
doctorwho92 commentedon Oct 6, 2016
Would like to request that high priority be given to this issue, since it is a serious security issue.
Thanks in advance.
jamie-owen commentedon Oct 7, 2016
@doctorwho92 Why did you close this? As you said, it's a pretty big problem for people using LDAP auth.
doctorwho92 commentedon Oct 7, 2016
I didn't close it, or certainly not deliberately.
qk4l commentedon Nov 8, 2016
Have anybody tried to disable LDAP > Login Fallback to prevent this security issue?
alexvranceanu commentedon Dec 20, 2016
Tested using latest develop branch, still happening. Login Fallback will prevent disabled users from logging on, but it will not allow local users (such as admin) to login (as designed).
alexvranceanu commentedon Dec 22, 2016
We're using this filter for LDAP logins, this allows subtree search and logins with username or email, for enabled users only:
{"filter": "(&(objectClass=person)(|(userAccountControl=512)(userAccountControl=66048))(|(mail=#{username})(sAMAccountName=#{username})))", "scope": "sub", "userDN": "SERVICE_ACCOUNTS@your-company.com", "password": "HIDDEN"}
Details about userAccountControl values here:
https://support.microsoft.com/en-us/kb/305144
and here:
http://jackstromberg.com/2013/01/useraccountcontrol-attributeflag-values/
Perhaps this could be set as a default filter for a clean Rocket.Chat install? It will speed up adoption and ease the process of integrating with LDAP.
localguru commentedon Feb 25, 2017
I can confirm the problem: a removed user from AD is still able to login as long as "LDAP/Login Fallback" is set to "True". If it's set to "False" the user can't login, but this disables the initial, local admin user too and one has to put another AD user to admin group the get admin access again:
db.users.update({username:'otheruser'}, {$set: {'roles' : [ "admin" ]}});
But what happens if one changes the LDAP configuration to something wrong and the LDAP connection is not working any more? In that case your are blocked completely.
LDAP_Login_Fallback workaround?
db.rocketchat_settings.update({'_id':'LDAP_Login_Fallback'}, {$set: { 'value':true }})
If the LDAP/AD connection is fine and "Domain Search User" can log in, an user object that does not exist any more, to my mind this is not a case of LDAP_Login_Fallback.
Ciao!
gregs007 commentedon Jun 13, 2017
I think doing what's suggested in #7235 should work for LDAP auth. Basically you would disable RC users that are disabled or missing in LDAP directory. This would be during regular LDAP database sync. I don't think regular re-auth is a good idea in the case of an unstable LDAP connection locking out users. Sync on the other hand, is more definitive--- If the user is disabled in the LDAP/AD database, it gets disabled in RC.
doctorwho92 commentedon Jun 13, 2017
40 remaining items
winstonrojas commentedon Apr 26, 2020
I thank you (rocket chat team) and encourage you to keep forward and make rocket chat a real community worldwide people project. Unfortunately many of us still rely on closed monopolistic technologies like Microsoft Windows workstations (i'm grateful with windows, in a way i have benefited a lot from it and i enjoy some of their products, but in a philosophical way i can not agree ) and therefore Active Directory almost like the natural method for administration.
Shaverdoff commentedon Apr 26, 2020
moonwolf-github commentedon Oct 21, 2020
Looks like in 3.5.3 it still doesn't work as it should.
Nikk-0 commentedon Jul 1, 2021
Hi,
Any news about this ?
eengstrom commentedon May 5, 2023
So, it's been another three years since @engelgabriel said:
To me, that implied the required features to enable proper LDAP sync and (I inferred) automatic user disabling during said sync. Perhaps I misunderstood, but if not, those features are still not working in the CE version. Both appear to be enterprise only features.
... notably, the following obviously useful features:
While I totally understand the financial need to break out some features into the enterprise version so that the company may generate revenue, I completely disagree that any security-related capabilities should not be automatic, and in the community edition, especially if the contributions made came from the community.
If not, and without the ability to automatically and periodically update user "disabled" status and auto-logout (newly) disabled users, RocketChat has decided that the security of users using the community edition version is not of their concern.
Moreover, having the bug/feature reports remain open implies that it's still a possibility, when in fact there is no intention to "fix", since it's already working, if one is using Enterprise mode. Someone should at least acknowledge the "enterprise only" decision and close the issue.
caskelly commentedon May 5, 2023
Thanks for your comment,
You are correct that after Gabriel’s comment which you quoted we refactored LDAP code including addressing a number of open issues. At that time we made the updated functionality part of the enterprise offering. We will close the associated issues.
Regards,
Chris Skelly
eengstrom commentedon May 6, 2023
@caskelly - I appreciate the acknowledgement here (and #6174 and #7235), but I encourage you to read my entire post again. While I get the motivation for revenue, I would encourage you to consider any features that affect the security of deployments and not put those behind paywalls. In this case, there is an implicit expectation that an account disabled in some LDAP / AD system would be forbidden from logging into RC, but that's not true.
While I don't know the extent to which the code that implements the LDAP integration came from CE contributions, I completely believe that security related code should never be behind a paywall. Other stuff that makes life better? Sure. But don't endanger contributing CE users by putting features like the LDAP sync and auto-disable in the enterprise only version. That's just asking for people to be impacted negatively, which will reflect poorly on your product when incidents occur. Oh, and blaming the user? That's not an option.