RocketChat / RocketChat/Rocket.Chat
User joined Channel message not created
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When a new user joins RocketChat with LDAP the user joins the default channel but the message "UserXY joined Channel general" is not created.
Steps to reproduce:
- New user logs in with LDAP
- Look at the default channel
Expected behavior:
Message UserXY joined Channel general" is showing
Actual behavior:
No message is showing
Server Setup Information:
- Version of Rocket.Chat Server: 6.2.9
- Operating System: ubuntu 22.04.2 LTS
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: wiredTiger
- NodeJS Version: v14.21.3
- MongoDB Version: 5.0.18
Client Setup Information
- Desktop App or Browser Version: Chrome 114.0.5735.199
- Operating System: Windows 10
Relevant logs:
I cant see anything useful in the logs but this is everything from the login. I only excluded the attribute mapping.
{"level":20,"time":"2023-07-06T13:46:47.334Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","msg":"Init LDAP login","username":"dillmor"}
{"level":30,"time":"2023-07-06T13:46:47.334Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Connection","msg":"Init Setup"}
{"level":30,"time":"2023-07-06T13:46:47.335Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Connection","msg":"Connecting","url":"ldap://dc02.bkh-lohr.local:389"}
{"level":20,"time":"2023-07-06T13:46:47.335Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Connection","msg":"clientOptions","clientOptions":{"url":"ldap://dc02.bkh-lohr.local:389","timeout":60000,"connectTimeout":1000,"idleTimeout":1000,"reconnect":true,"log":{}}}
{"level":30,"time":"2023-07-06T13:46:47.441Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Connection","msg":"LDAP connected"}
{"level":20,"time":"2023-07-06T13:46:47.442Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Connection","clazz":"Client","ldap_id":"11__ldap://dc02.bkh-lohr.local:389","msg":"connected after 1 attempt(s) %j"}
{"level":30,"time":"2023-07-06T13:46:47.443Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Search","msg":"Searching by username","username":"dillmor","baseDN":"DC=bkh-lohr,DC=local","searchOptions":{"filter":"(&(objectclass=user)(sAMAccountName=dillmor))","scope":"sub","sizeLimit":3000,"attributes":["","+"],"paged":{"pageSize":250,"pagePause":false}}}
{"level":30,"time":"2023-07-06T13:46:47.444Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Bind","msg":"Binding UserDN","userDN":"CN=Marius Dill,OU=KHV5,OU=Verwaltung,OU=Lohr,OU=Benutzer,OU=ZZZ-BKH,DC=bkh-lohr,DC=local"}
{"level":20,"time":"2023-07-06T13:46:47.451Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Search","msg":"searchOptions","searchOptions":{"filter":"(&(objectclass=user)(sAMAccountName=dillmor))","scope":"sub","sizeLimit":3000,"attributes":["","+"],"paged":{"pageSize":250,"pagePause":false}},"baseDN":"DC=bkh-lohr,DC=local"}
{"level":30,"time":"2023-07-06T13:46:47.486Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Search","msg":"LDAP Search found 1 entries and loaded the data of 1."}
{"level":30,"time":"2023-07-06T13:46:47.495Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Auth","msg":"Authenticating","dn":"CN=Morty Dill,OU=KHV5,OU=EDV,OU=bkh-lohr,DC=bkh-lohr,DC=local"}
{"level":30,"time":"2023-07-06T13:46:47.501Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Auth","msg":"Authenticated","dn":"CN=Morty Dill,OU=KHV5,OU=EDV,OU=bkh-lohr,DC=bkh-lohr,DC=local"}
{"level":20,"time":"2023-07-06T13:46:47.501Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Auth","msg":"User authenticated successfully, performing additional search."}
{"level":20,"time":"2023-07-06T13:46:47.501Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Search","msg":"searchOptions","searchOptions":{"scope":"sub"},"baseDN":"CN=Morty Dill,OU=KHV5,OU=EDV,OU=bkh-lohr,DC=bkh-lohr,DC=local"}
{"level":30,"time":"2023-07-06T13:46:47.505Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Search","msg":"LDAP Search found 1 entries and loaded the data of 1."}
{"level":20,"time":"2023-07-06T13:46:47.506Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","msg":"Querying user","uniqueId":"2fec86bfa58b434b8f2159f9d68d57d0"}
{"level":20,"time":"2023-07-06T13:46:47.510Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","msg":"User does not exist, creating","username":"dillmor"}
{"level":20,"time":"2023-07-06T13:46:47.510Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","msg":"Syncing user data","ldapUser":{"dn":"CN=Morty Dill,OU=KHV5,OU=EDV,OU=bkh-lohr,DC=bkh-lohr,DC=local","controls":[],"objectClass":["top","person","organizationalPerson","user"],"cn":"Morty Dill","sn":"Dill","givenName":"Morty","distinguishedName":"CN=Morty Dill,OU=KHV5,OU=EDV,OU=bkh-lohr,DC=bkh-lohr,DC=local","instanceType":"4","whenCreated":"20230417111359.0Z","whenChanged":"20230629071717.0Z","displayName":"Morty Dill","uSNCreated":"98904623","memberOf":["CN=CVAD_2021-Desktop-Scanner,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=CVAD-2021-VDAs,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=CVAD-2021-keineHaertung,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=CVAD-2021-Druckerumleitung,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=CVAD_2021-Client-USB,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=CVAD_2021-Client-Laufwerke,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=CVAD_2021-Desktop-default,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=CVAD-2021_Admins,OU=Gruppen,OU=CVAD-2020,DC=bkh-lohr,DC=local","CN=Internet_Mitarbeiter,OU=Internetgruppen,OU=Berechtigungsgruppen,DC=bkh-lohr,DC=local"],"uSNChanged":"111488795","proxyAddresses":["X400:C=us;A= ;P=Bezirkskrankenha;O=Exchange;S=Dill;G=Morty;","SMTP:Morty.Dill@bezirkskrankenhaus-lohr.de"],"homeMDB":"CN=MDB19-200MB,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=Bezirkskrankenhaus-Lohr,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=bkh-lohr,DC=local","mDBUseDefaults":"TRUE","mailNickname":"dillmor","name":"Morty Dill","objectGUID":"/솿��CK�!Y�֍W�","userAccountControl":"512","badPwdCount":"0","codePage":"0","countryCode":"0","badPasswordTime":"133325849145751070","lastLogoff":"0","lastLogon":"133328498643649342","pwdLastSet":"133324963633043946","primaryGroupID":"513","objectSid":"\u0001\u0005\u0000\u0000\u0000\u0000\u0000\u0005\u0015\u0000\u0000\u0000���t 8�$���(<m\u0000\u0000","accountExpires":"9223372036854775807","logonCount":"23","sAMAccountName":"dillmor","sAMAccountType":"805306368","showInAddressBook":["CN=Alle Benutzer,CN=All Address Lists,CN=Address Lists Container,CN=Bezirkskrankenhaus-Lohr,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=bkh-lohr,DC=local","CN=Bezirkskrankenhaus Lohr,CN=All Global Address Lists,CN=Address Lists Container,CN=Bezirkskrankenhaus-Lohr,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=bkh-lohr,DC=local"],"legacyExchangeDN":"/o=Bezirkskrankenhaus-Lohr/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=2007acb2d45c4e7d86ed82f47df1d46e-","userPrincipalName":"dillmor@bkh-lohr.local","lockoutTime":"0","objectCategory":"CN=Person,CN=Schema,CN=Configuration,DC=bkh-lohr,DC=local","dSCorePropagationData":["20230607072801.0Z","20230607072800.0Z","20230607072152.0Z","20230607072151.0Z","16010714223649.0Z"],"lastLogonTimestamp":"133324966369441103","msTSExpireDate":"20230616121730.0Z","msTSLicenseVersion":"655361","msTSManagingLS":"00429-70000-08327-AT850","msTSLicenseVersion2":"7","msTSLicenseVersion3":"C50-10.01-S","textEncodedORAddress":"X400:C=us;A= ;P=Bezirkskrankenha;O=Exchange;S=Dill;G=Morty;","mail":"Morty.Dill@bezirkskrankenhaus-lohr.de","msExchPoliciesIncluded":["bf741036-b086-4fb8-8e85-657b78363258","{26491cfc-9e50-4857-861b-0cb8df22b5d7}"],"msExchHomeServerName":"/o=Bezirkskrankenhaus-Lohr/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=EXCHANGE2019","msExchMailboxSecurityDescriptor":"\u0001\u0000\u0004�\u0014\u0000\u0000\u0000 \u0000\u0000\u0000\u0000\u0000\u0000\u0000,\u0000\u0000\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0000\u0005
\u0000\u0000\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0000\u0005
\u0000\u0000\u0000\u0004\u0000\u001c\u0000\u0001\u0000\u0000\u0000\u0000\u0002\u0014\u0000\u0001\u0000\u0002\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0000\u0005
\u0000\u0000\u0000","msExchUserAccountControl":"0","msExchMailboxGuid":"\u0014�2,�TO��y�\u000f�U","msExchRBACPolicyLink":"CN=Default Role Assignment Policy,CN=Policies,CN=RBAC,CN=Bezirkskrankenhaus-Lohr,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=bkh-lohr,DC=local","msExchTextMessagingState":["302120705","16842751"],"msExchDumpsterQuota":"31457280","msExchArchiveQuota":"104857600","msExchELCMailboxFlags":"130","msExchWhenMailboxCreated":"20230417115656.0Z","msExchRecipientDisplayType":"1073741824","msExchUMDtmfMap":["emailAddress:667893455","lastNameFirstName:345566789","firstNameLastName:667893455"],"msExchArchiveWarnQuota":"94371840","msExchCalendarLoggingQuota":"6291456","msExchVersion":"88218628259840","msExchRecipientTypeDetails":"1","msExchDumpsterWarningQuota":"20971520"},"user":{}}
{"level":20,"time":"2023-07-06T13:46:47.601Z","pid":1,"hostname":"b21abf4bf77b","name":"Callbacks","msg":"Executing callback with id dolphin for hook beforeCreateUser"}
{"level":20,"time":"2023-07-06T13:46:47.602Z","pid":1,"hostname":"b21abf4bf77b","name":"Callbacks","msg":"Executing callback with id check-max-user-seats for hook onCreateUser"}
{"level":20,"time":"2023-07-06T13:46:47.715Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","msg":"Querying user","uniqueId":"2fec86bfa58b434b8f2159f9d68d57d0"}
{"level":20,"time":"2023-07-06T13:46:47.718Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","msg":"running onLDAPLogin"}
{"level":30,"time":"2023-07-06T13:46:47.798Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Connection","msg":"Disconnecting"}
{"level":30,"time":"2023-07-06T13:46:47.801Z","pid":1,"hostname":"b21abf4bf77b","name":"LDAP","section":"Search","msg":"Closed"}
{"level":20,"time":"2023-07-06T13:46:47.802Z","pid":1,"hostname":"b21abf4bf77b","name":"Callbacks","msg":"Executing callback with id validateLdapLoginFallback for hook beforeValidateLogin"}
{"level":20,"time":"2023-07-06T13:46:47.803Z","pid":1,"hostname":"b21abf4bf77b","name":"Callbacks","msg":"Executing callback with id 2fa for hook onValidateLogin"}
{"level":20,"time":"2023-07-06T13:46:47.810Z","pid":1,"hostname":"b21abf4bf77b","name":"Callbacks","msg":"Executing callback with id K7QBJD8krAMsMxreF for hook afterValidateLogin"}
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.
Research direction
Start by reproducing the LDAP login flow described in the issue and trace what happens when the new user is added to the default channel. Confirm that the expected join message appears in the default channel after login, and add coverage for this behavior if the relevant test entry point is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100