-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for unbinding third-party IDs when they are removed from the user account #3
Conversation
Switch off the deprecated on_threepid_bind module callback method.
This method will watch for third-party identifiers being removed from a user's account on Synapse, and subsequently unbind them from the configured Sydent instance. We no longer need to inform the homeserver of the binding, as the module will be able to perform the unbinding now. Having the homeserver perform the unbind was flawed, as homeservers will only attempt to talk to identity servers over HTTPS, whereas this module supports Sydent instances available only over HTTP as well. The only drawback from this change is that the bind will no longer be removed if this module is uninstalled. But that doesn't seem particularly unexpected.
6ae6f5d
to
c4cf9eb
Compare
Synapse v1.79 is the first version to include the required module API callbacks for adding and removing third-party IDs from local Matrix user accounts, which this module makes use of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obviously it's a bit lacking in reliability in that there's no retry mechanism etc, but that is probably fine most of the time and fine for a start.
Yeahhhh, I was cribbing off the other method's choice of:
but we ought to revisit that in an issue - I can imagine there's probably cases where the IS is just overloaded and times out, and we should probably back off and retry a few times. Additionally, since this method will block Synapse returning requests to the client while it runs, it would be nice to kick off the request to the IS asynchronously and not block Synapse. ...looks like I have some issues to write up. |
That's fine, I was thinking more persistent retries to be honest, e.g. if the IS really is down, but (depending on use case) it'd probably be nice if it still sorted itself out eventually. But adding storage to the module sounds like a big chunk of work |
Providing storage is actually pretty simple, as Synapse provides DB a I've created a couple relevant issues:
|
I temporarily modified the CI config in 94b260d in order to test against the upcoming Synapse v1.79 release. CI passed on that commit, hence this PR should continue to pass CI (and can be merged) once Synapse v1.79 is released (due Tuesday, March 14 2023). |
Synapse v1.79.0 has been released, and CI on this PR now passes. We're good to merge. |
This is intended to be used with the
on_add_user_third_party_identifier
andon_remove_user_third_party_identifier
module API callbacks added in matrix-org/synapse#15044. That PR also deprecateson_threepid_bind
, hence replacing it here.Recommended to review commit-by-commit. Supercedes #2.
Note: CI is currently completely failing due to this PR requiring Synapse v1.79 (which is yet to be released). But it passes locally :)
Current status: I would like a review on this PR, but we can't merge it until Synapse v1.79 is released with the Module APIs that it requires.