Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Deactivate account admin API is not deleting server side key backup #14923

Closed
BillCarsonFr opened this issue Jan 26, 2023 · 5 comments · Fixed by #15181
Closed

Deactivate account admin API is not deleting server side key backup #14923

BillCarsonFr opened this issue Jan 26, 2023 · 5 comments · Fixed by #15181
Assignees
Labels
A-Account-Deactivation "Deleting"/"Removing" a user, GDPR erasure (erased) A-Admin-API A-E2EE End-to-end encryption for Matrix clients O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@BillCarsonFr
Copy link
Member

As per https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#deactivate-account

When you deactivate an account it will clear all account data, so it will remove all 4S data (this includes the server side megolm backup encrypted key)
So even if you reactivate the backup will be unusable.

Notice that it's possible to setup a backup without using 4S (in this case it would be possible to recover your key backup).

Nonetheless, it looks sensible to delete the backup when deactivating the account.
If not, it would be good to then save the 4S account data keys and to restore them on reactivation.

@BillCarsonFr BillCarsonFr changed the title Deactivate account admin API is not deleting server side key backiup Deactivate account admin API is not deleting server side key backup Jan 26, 2023
@DMRobertson
Copy link
Contributor

Notice that it's possible to setup a backup without using 4S (in this case it would be possible to recover your key backup).

via /room_keys/version?

@BillCarsonFr
Copy link
Member Author

Notice that it's possible to setup a backup without using 4S (in this case it would be possible to recover your key backup).

via /room_keys/version?

Yes, it's totally up to clients to setup a backup without using 4S.
But element client are now creating a 4S with the provided passphrase(or key), then generating a random key for the room_keys/version that is saved encrypted in the 4S.

@DMRobertson DMRobertson added z-bug (Deprecated Label) A-Admin-API S-Minor Blocks non-critical functionality, workarounds exist. A-E2EE End-to-end encryption for Matrix clients T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. O-Occasional Affects or can be seen by some users regularly or most users rarely and removed z-bug (Deprecated Label) labels Jan 26, 2023
@erikjohnston
Copy link
Member

@BillCarsonFr to clarify, is Synapse being inconsistent with what data it deletes on deactivation? And is this causing an issue with clients? Would you be happy if we deleted all data on deactivation?

@H-Shay H-Shay self-assigned this Feb 23, 2023
@H-Shay
Copy link
Contributor

H-Shay commented Feb 27, 2023

It looks like we could probably achieve this by adding a function in here to delete all the columns in e2e_room_keys and e2e_room_keys_versions associated with the user, am I missing anything?

@erikjohnston
Copy link
Member

@H-Shay That sounds correct

@MadLittleMods MadLittleMods added the A-Account-Deactivation "Deleting"/"Removing" a user, GDPR erasure (erased) label Apr 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Account-Deactivation "Deleting"/"Removing" a user, GDPR erasure (erased) A-Admin-API A-E2EE End-to-end encryption for Matrix clients O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants