Skip to content

feat: sync federated users from LDAP #35718

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

Merged
merged 11 commits into from
Apr 11, 2025

Conversation

pierre-lehnen-rc
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc commented Apr 7, 2025

Proposed changes (including videos or screenshots)

This PR allows pre-registering federated users through the LDAP sync process, by loading the federation domain name from an LDAP attribute. If the specified attribute is missing or equal to the workspace's Home Server, the user will be created as a local user; If it's a different value, then the user will be created as a federated user.

With this, it's possible to display the display name and other profile information about remote users even before anyone talks to them using federation.

The federation domain will only be loaded on user creation. If an user is created as local, it can't be changed to a remote user. If it's a remote user, it can't be changed to local nor can its domain be changed.

Issue(s)

CORE-1072

Steps to test or reproduce

Further comments

Copy link
Contributor

dionisio-bot bot commented Apr 7, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Apr 7, 2025

🦋 Changeset detected

Latest commit: dc2b23e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 37 packages
Name Type
@rocket.chat/core-typings Minor
@rocket.chat/i18n Minor
@rocket.chat/meteor Minor
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/rest-typings Minor
@rocket.chat/ui-contexts Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/mock-providers Patch
@rocket.chat/web-ui-registration Major
@rocket.chat/network-broker Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pierre-lehnen-rc pierre-lehnen-rc added this to the 7.6.0 milestone Apr 7, 2025
@pierre-lehnen-rc pierre-lehnen-rc marked this pull request as ready for review April 7, 2025 20:48
@pierre-lehnen-rc pierre-lehnen-rc requested review from a team as code owners April 7, 2025 20:48
Copy link
Contributor

github-actions bot commented Apr 7, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35718/

Built to branch gh-pages at 2025-04-11 18:25 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

codecov bot commented Apr 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 59.62%. Comparing base (1eeb139) to head (dc2b23e).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #35718      +/-   ##
===========================================
- Coverage    59.62%   59.62%   -0.01%     
===========================================
  Files         2832     2832              
  Lines        68352    68356       +4     
  Branches     15138    15155      +17     
===========================================
  Hits         40754    40754              
- Misses       24992    24995       +3     
- Partials      2606     2607       +1     
Flag Coverage Δ
unit 75.49% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

debdutdeb
debdutdeb previously approved these changes Apr 9, 2025
Copy link
Member

@debdutdeb debdutdeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from federation code perspective

debdutdeb
debdutdeb previously approved these changes Apr 10, 2025
@pierre-lehnen-rc pierre-lehnen-rc added the stat: QA assured Means it has been tested and approved by a company insider label Apr 11, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 11, 2025
@kodiakhq kodiakhq bot merged commit 4b28126 into develop Apr 11, 2025
43 checks passed
@kodiakhq kodiakhq bot deleted the feat/ldap-sync-federation-homeserver branch April 11, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants