Skip to content

LDAP "Sync Now" not working corectly 4.0.0 #23458

Closed

Description

@andys448

Description:

Hi All.
After upgrading from version 3.18.1 to 4.0.0, synchronization stopped working for no apparent reason.
"Test connection" and "test LDAP Search" are working correctly.

Steps to reproduce:

  1. Go to LDAP settings
  2. Try to Sync Now
  3. Get error "Not authorized"

Expected behavior:

Actual behavior:

Server Setup Information:

Version of Rocket.Chat Server: 4.0.0
Operating System: Windows
Deployment Method: tar
Number of Running Instances: 4
DB Replicaset Oplog: +
NodeJS Version: v12.18.4
MongoDB Version: 4.4
Proxy: nginx
Firewalls involved: -

Client Setup Information

  • Desktop App or Browser Version:
  • Operating System:

Additional context

Relevant logs:

{"level":30,"time":"2021-10-
14T12:57:00.644Z","pid":650556,"hostname":"HOSTNAME","name":"LDAP","section":"Search","msg":"Closed"} 
{"level":35,"time":"2021-10-14T12:57:07.538Z","pid":650556,"hostname":"HOSTNAME","name":"API","method":"POST","url":"/api/v1/ldap.syncNow","userId":"8D3ohoTXbvhE37LnX","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36","length":"2","host":"HOSTNAME","referer":"https://HOSTNAME/admin/LDAP","remoteIP":"10.24.64.12","err":{"type":"Error","message":"error-not-authorized","stack":"Error: error-not-authorized<br>    at Object.post (ee/server/api/ldap.ts:18:10)<br>    at app/api/server/api.js:406:82<br>    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)<br>    at Object._internalRouteActionHandler [as action] (app/api/server/api.js:406:39)<br>    at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)<br>    at packages/nimble_restivus/lib/route.coffee:59:33<br>    at packages/simple_json-routes.js:98:9"},"status":400,"responseTime":3,"msg":"error-not-authorized"} 

Thanks for any help!

Activity

  1. ankar84 commented on Oct 15, 2021

    @ankar84

    Confirm that issue on 4.0.0 version!

  2. reetp commented on Oct 16, 2021

    @reetp
    Collaborator
  3. cydRabbit commented on Oct 18, 2021

    @cydRabbit

    exactly same issue. I have admin role on my server, but when I click 'Sync Now' button then I could see 'Not Authorized' toast message.

  4. zverev-iv commented on Oct 21, 2021

    @zverev-iv

    Confirm that issue on 4.0.3

  5. alexleosumy commented on Oct 24, 2021

    @alexleosumy

    4.0.4 same problem

  6. zverev-iv commented on Oct 27, 2021

    @zverev-iv

    4.0.5 same problem :(

  7. lent85 commented on Nov 2, 2021

    @lent85

    Same problem here, on 4.0.5. Some users on our system randomly unable to login also.

  8. eevrenci commented on Nov 3, 2021

    @eevrenci

    at 4.1 still same problem.

  9. ankar84 commented on Nov 30, 2021

    @ankar84

    Looks like manual sync is back in 4.2.0!
    With one addition of asking of users password to start (security purposes I guess)
    image
    image

    So, that and related to manual sync issues can be closed now

  10. reetp commented on Nov 30, 2021

    @reetp
    Collaborator

    Looks like manual sync is back in 4.2.0!

    Yup. This PR refers - can't imagine why they never linked/closed all these bugs

    #23761

    Sneaked out, sneaked back. Hilarious really.

    With one addition of asking of users password to start (security purposes I guess)

    2FA password nonsense again. I am logged in as admin. If I really wanted 2FA then it should be applied as I login. But I don't.

    If a hacker has got this far you are already in it up to your neck and yet another password prompt is not going to save you, no matter what the Security Department might think.

    So because we know that a hacker really isn't worried about your LDAP sync we can easily surmise that the password is just there to try and prevent people easily using the API to trigger a background sync. That's it. Simples.

  11. andys448 commented on Dec 1, 2021

    @andys448
    Author

    The same result - manual sync seems works fine.

  12. smallfish01 commented on Dec 15, 2021

    @smallfish01

    The same result - manual sync seems works fine.

    Hello AndreySemenov1,

    Could you please let me know how to manual sync LDAP users?

    Thank you.

  13. brlarini commented on May 13, 2022

    @brlarini

    So, what's the status of this topic?

    As of CE version 4.7.0 users will only be listed if they login for the first time.
    Clicking on Sync now button apparently does nothing.

    Is this still the expected behavior on CE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions