-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Remove unused E2EE messaging code #31193
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
Remove unused E2EE messaging code #31193
Conversation
We will need to either keep the |
RE: the |
We thought the same about the Doorkeeper::Application.where("scopes LIKE '%crypto%'").in_batches do |applications|
applications.update_all("scopes = replace(scopes, 'crypto', '')")
end
Doorkeeper::AccessToken.where("scopes LIKE '%crypto%'").in_batches do |access_tokens|
access_tokens.update_all("scopes = replace(scopes, 'crypto', '')")
end Should be sufficient. Arguably we should trim whitespace, but the whitespace isn't meaningfully important. I don't generally suggest doing |
8df1888
to
51424a8
Compare
d249338
to
b30f7f0
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
b30f7f0
to
9ab7f82
Compare
This pull request has resolved merge conflicts and is ready for review. |
9ab7f82
to
bf0f09e
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
bf0f09e
to
2b56d11
Compare
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
2b56d11
to
c617299
Compare
This pull request has resolved merge conflicts and is ready for review. |
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.
We decided to remove the unused E2EE code for now, as this code is unused and untested.
Adding E2EE to Mastodon is still something we could like some day, but this implementatin attempt was never conclusive. We will be following the various projects working on adding E2EE to ActivityPub, like https://github.com/swicg/activitypub-e2ee
If they end up with something that we can implement, we will see if it makes sense to add back this code for the new implementation.
@renchap fantastic news! The one thing this still absolutely needs is the migration to drop the OAuth Scopes for crypto, otherwise we'll be having errors & breakages: #31193 (comment) |
Sorry, just saw this...
Are those cases the same though? In the case of the I'll add a migration here or as followup if necessary, but I still don't understand the path where it could have been used. |
@mjankowski it existed in the UI when creating an application, was documented and was accepted when creating an application via API; it should likely be silently dropped & future applications should not be able to be created with it. Just dropping the scope & the locales without rewriting the records will potentially result in applications that when viewed result in a 500 |
Ah, I see ... I was thinking totally about the inbound permissions checking from the commented-out routes and couldnt see how they'd have created anything. Noted on that pathway/exposure. I can work on that migration and either add here or as followup if this merges first. Separately...
|
Not quite a full revert of #13820 - but close to it. Sort of a first pass which removes the bulk of what I think can safely be removed. There were a few areas where the underlying code changed a bit (ie, a straight revert wasn't possible) which may have room for more future refactor/cleanup after the initial attempt here.
This feature is the largest chunk of untested unused code in the app, I suspect - and (as far as I can tell) there's not an imminent plan to enable/activate it. I know there is separate work being done to formalize an AP-protocol-level E2EE standard, which we would presumably adopt if that is realized, so this is in some way prep/clean-out work in advance of that.
If I'm wrong about this and there IS a plan to enable this feature using the current impl, there's a lot of coverage we should add in advance of that.