Skip to content

WPB-21744: invalidate pending email update when a user is put under SCIM control - #5333

Merged
blackheaven merged 4 commits into
developfrom
gdifolco/WPB-21744-scim-verification-email-resend
Jul 15, 2026
Merged

WPB-21744: invalidate pending email update when a user is put under SCIM control#5333
blackheaven merged 4 commits into
developfrom
gdifolco/WPB-21744-scim-verification-email-resend

Conversation

@blackheaven

Copy link
Copy Markdown
Contributor

https://wearezeta.atlassian.net/browse/WPB-21744

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@blackheaven
blackheaven requested review from a team as code owners July 10, 2026 17:28
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jul 10, 2026
…CIM control

When a user's managed_by transitioned from Wire to SCIM, a pending
email-address update was left dangling: team settings kept offering a
"resend verification" action that failed with 403 managed-by-scim, and a
stale activation link could still change a SCIM-managed user's email
outside of SCIM.

- Add internal brig endpoint DELETE /i/users/:uid/pending-email-update
  that removes the user's unvalidated email and its activation token.
- Call it from spar's two Wire->SCIM transition sites (lazy SCIM
  adoption via GET /Users/:id and getUserById).
- Add defense-in-depth: brig's email-activation path now rejects
  SCIM-managed users (InvalidActivationManagedByScim -> 403
  managed-by-scim).
- Add ActivationCodeStore.deleteActivationCode (effect + Cassandra +
  in-memory impls).
@blackheaven
blackheaven force-pushed the gdifolco/WPB-21744-scim-verification-email-resend branch from da772d7 to 8bff71c Compare July 12, 2026 09:54

@supersven supersven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good so far, however I would expect new tests to show that the changes really solve the issue.

Comment thread libs/wire-subsystems/src/Wire/StoredUser.hs Outdated
@blackheaven
blackheaven requested a review from supersven July 13, 2026 16:01
@blackheaven

Copy link
Copy Markdown
Contributor Author

Looking good so far, however I would expect new tests to show that the changes really solve the issue.

added

@blackheaven
blackheaven force-pushed the gdifolco/WPB-21744-scim-verification-email-resend branch from b54a527 to 40b2b80 Compare July 13, 2026 21:43
@blackheaven
blackheaven merged commit e1455dc into develop Jul 15, 2026
10 checks passed
@blackheaven
blackheaven deleted the gdifolco/WPB-21744-scim-verification-email-resend branch July 15, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants