Skip to content

[WPB-6144] Prevent MLS one-to-one messaging for a blocking user (q1-2024)#3900

Closed
mdimjasevic wants to merge 4 commits intoq1-2024from
wpb-6144/cherry-pick-from-develop-to-q1-2024
Closed

[WPB-6144] Prevent MLS one-to-one messaging for a blocking user (q1-2024)#3900
mdimjasevic wants to merge 4 commits intoq1-2024from
wpb-6144/cherry-pick-from-develop-to-q1-2024

Conversation

@mdimjasevic
Copy link
Contributor

@mdimjasevic mdimjasevic commented Feb 26, 2024

This is a backport of PR #3889 from develop to q1-2024. The diff is much bigger than PR #3889 because dependent PR #3786 had to be cherry-picked too.

Tracked by https://wearezeta.atlassian.net/browse/WPB-6144.

Checklist

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

akshaymankar and others added 2 commits February 26, 2024 10:53
This commit introduces the concept of Subsystems. Each of these subsystems will
represent an important part of the domain concepts in the product that will
interact with other subsystems. We will use effect systems to encode these
subsystems and test them in isolation as much as possible.

This commit consolidates all the code that spoke to gundeck from brig and galley
into the NotificationSubsystem.

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

---------

Co-authored-by: Magnus Viernickel <magnus.viernickel@wire.com>
Co-authored-by: Leif Battermann <leif.battermann@wire.com>
* Test: no MLS 1-to-1 when a connection is blocked

* Test: a test with expected behavior after blocking the connection

* Check if sending a msg to 1-to-1 and not connected

* Add a changelog

* WIP: Debugging a test failure

* Update the confirming test

* Revert "Check if sending a msg to 1-to-1 and not connected"

This reverts commit c4af1508ecf4eac88db83b71d1af35024a7a7de1.

* WIP: generalise the Update.blockConv handler

* Connections: Also block MLS one2one conv when blocking conn

* Test: Parameterise over One2OneScenario

* Add the missing connection ID in an internal endpoint

* Wrap a function comment for readability

* Introduce a Galley internal endpoint: blocking a qualified conversation

* WIP: Check if an MLS 1-1 conv exists before blocking

What is left to do is to make this check work for an MLS 1-1 conv that
can be remote

* Make upsertOne2OneConv always take a Conv ID

Brig can determine this ID based on protocol of the conversation or read it from
the DB. Inventing this in galley causes more trouble for having two One2One
convs for proteus and mls.

* WIP: Remove user from 1:1 MLS conv when they block someone

* WIP: Remove mls clients on connection block

* fixup! WIP: Remove mls clients on connection block

* Make sure 1-1 conv is established before updating

* Finalise the bug-confirming test

* Remove debugging output from application code

* Fix a changelog

* Remove redundant constraints

* Properly check if an MLS 1-1 conversation exists before blocking it

* Remove more of unused code

* Remove an unused connection ID in an internal Galley endpoint for blocking a conv

---------

Co-authored-by: Akshay Mankar <akshay@wire.com>
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Feb 26, 2024
@mdimjasevic mdimjasevic changed the title Wpb 6144/cherry pick from develop to q1 2024 [WPB-6144] Prevent MLS one-to-one messaging for a blocking user (q1-2024) Feb 26, 2024
Copy link
Contributor

@stefanwire stefanwire left a comment

Choose a reason for hiding this comment

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

Is this PR supposed to merge the new notification subsystem?

* Don't remove MLS clients from a 1-1 conversation

* Update the changelog
@mdimjasevic
Copy link
Contributor Author

Closing in favor of #3906 .

@mdimjasevic mdimjasevic closed this Mar 5, 2024
@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

echoes: unplanned Any work item that isn’t part of the product or technical roadmap. 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.

4 participants