Skip to content
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

fix: SAML "Overwrite user fullname" setting is not being honored #32628

Merged
merged 9 commits into from
Jul 11, 2024

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Jun 18, 2024

Proposed changes (including videos or screenshots)

  • Check for SAML "Overwrite user fullname" setting before updating a user identity coming from a SAML login.
  • Add end-to-end tests to validate that names are only overwritten when the setting is enabled (and also to make sure they won't be updated along with the username when the latter is changed)

Issue(s)

Steps to test or reproduce

  1. Create a user in RC;
  2. Login using SAML with a user that has the same name or username (following the "Immutable field name" setting in SAML > General > Behavior ) as the previously created user, but a distinct name;

Expected behavior: the user's full name should only be updated/overwritten in case the "Overwrite user fullname (use idp attribute)" setting is enabled. Otherwise, it shouldn't be changed (even if the username is updated on login).
Current behavior the user's full name is updated regardless of the "Overwrite user fullname (use idp attribute)" setting.

Further comments

SUP-605

@matheusbsilva137 matheusbsilva137 added this to the 6.10 milestone Jun 18, 2024
Copy link
Contributor

dionisio-bot bot commented Jun 18, 2024

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

Copy link

changeset-bot bot commented Jun 18, 2024

🦋 Changeset detected

Latest commit: 7652eb5

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

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@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/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@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

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.84%. Comparing base (d7de0a9) to head (7652eb5).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32628      +/-   ##
===========================================
+ Coverage    56.68%   56.84%   +0.16%     
===========================================
  Files         2504     2501       -3     
  Lines        55524    55383     -141     
  Branches     11442    11422      -20     
===========================================
+ Hits         31472    31485      +13     
+ Misses       21368    21184     -184     
- Partials      2684     2714      +30     
Flag Coverage Δ
e2e 56.52% <ø> (+0.05%) ⬆️

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

@scuciatto scuciatto removed this from the 6.10 milestone Jun 19, 2024
@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review June 19, 2024 12:23
@matheusbsilva137 matheusbsilva137 requested a review from a team as a code owner June 19, 2024 12:23
@scuciatto scuciatto added this to the 6.11 milestone Jul 3, 2024
@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label Jul 10, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 10, 2024
Copy link
Member

@gabriellsh gabriellsh left a comment

Choose a reason for hiding this comment

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

lgtm!

@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Jul 11, 2024
@matheusbsilva137 matheusbsilva137 added the stat: ready to merge PR tested and approved waiting for merge label Jul 11, 2024
@kodiakhq kodiakhq bot merged commit 1251442 into develop Jul 11, 2024
50 checks passed
@kodiakhq kodiakhq bot deleted the fix/saml-name-overwrite branch July 11, 2024 19:46
gabriellsh added a commit that referenced this pull request Jul 12, 2024
…/removeUsers

* 'develop' of github.com:RocketChat/Rocket.Chat:
  refactor(omnichannel): replace create and find by findAndUpdate (#32773)
  chore: Bump apps engine 1.44-alpha (#32774)
  refactor(client): Remove usage of `React.FC` type (#32760)
  refactor(Livechat): `Livechat/Message/markdown.js` -> TS (#32295)
  refactor(omnichannel): spare few Room.find on requestRoom method (#32363)
  refactor:  `dispatchInquiryPosition` being called multiple times (#32767)
  fix: SAML "Overwrite user fullname" setting is not being honored (#32628)
  fix(Omnichannel): Use Correct components on ChatInfo (#32592)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad: core 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.

5 participants