Hey fellow nerds, I have an idea that Iād like to discuss with you. All feedback ā positive or negative ā is welcome. Consider this a baby RFC (Request for Comments).
So. Iāve been having a think on how to implement the right to be forgotten (one of the cornerstones of eg. the GDPR) in the context of federated services. Currently, itās not possible to remove your comments, posts, etc., from the Fediverse and not just your āhome instanceā without manually contacting every node in the network. in my opinion, this is a fairly pressing problem, and there would already be a GDPR case here if someone were to bring the āeye of Sauronā (ie. a national data protection authority) upon us.
Please note that this is very much a draft and it does have some issues and downsides, some of which Iāve outlined towards the end.
The problem
In a nutshell, the problem Iām trying to solve is how to guarantee that āwell-behavedā instances, which support this proposal, will delete user content even in the most common exceptional cases, such as changes in network topology, network errors, and server downtime. These are situations where youād typically expect messages about content or user deletion to be lost. Itās important to note that Iāve specifically approached this from the āright to be forgottenā perspective, so the current version of the proposal solely deals with āmass deletionā when user accounts are deleted. It doesnāt currently integrate or work with the normal content deletion flow (Iāll further discuss this below).
While I understand that in a federated or decentralized network itās impossible to guarantee that your content will be deleted (and the Wayback Machine exists), but we canāt let āperfect be the enemy of good enoughā. Making a concerted effort to ensure that in most cases user content is deleted (initially this could even just be a Lemmy thing and not a wider Fediverse thing) from systems under our control when the user so wishes would already be a big step in the right direction.
I havenāt yet looked into āprior artā except some very cursory searches and I had banged the outline of this proposal out before I even went looking, but I now know that eg. Mastodon has the ability to set TTLs on posts. This proposal is sort of adjacent and could be massaged a bit to support this on Lemmy (or whatever else service) too.
1. The proposal: TTLs on user content
- Every comment, post etc. (content) must by default have an associated TTL (eg. a
live_until
timestamp). This TTL can be long, on the order of weeks or even a couple of months. Users can also opt out (see below) - well before the contentās TTL runs out (eg. even halfway through the TTL, with some random jitter to prevent āthundering herdsā), an instance asks the āhome instanceā of the user who created the content whether the user account is still live. If it is, great, update the TTL and go on with life
- in cases where the āhome instanceā of a content creator canāt be reached due to eg. network problems, this āliveness checkā must be repeated at random long-ish intervals (eg. every 20 ā 30h) until an answer is gotten or the TTL runs out
- information about user liveness should be cached, but with a much shorter TTL than content
- liveness check requests to other instances should be batched, with some sensible time limit on how long to wait for the batch to fill up, and an upper limit for the batch size
- in cases where the userās home instance isnāt in an instanceās linked instance list or is in their blocked instance list, this liveness check may be skipped
- when a user liveness check hasnāt succeeded and a contentās TTL runs out, or when a user liveness check specifically comes back as negative, the content must be deleted
- when a liveness check comes back as negative and the user has been removed, instances must delete the rest of that userās content and not just the one whose TTL ran out
- when a liveness check fails (eg. the userās home instance doesnāt respond), instances may delete the rest of that userās content. Or maybe should? My reason for handling this differently from an explicit negative liveness check is to prevent the spurious deletion of all of a userās content in cases where their home instance experiences a long outage, but Iām not sure if this distinction really matters. Needs more thinkifying
- user accounts must have a TTL, on the order of several years
- when a user performs any activity on the instance, this TTL must be updated
- when this TTL runs out, the account must be deleted. The userās content must be deleted if the user hasnāt opted out of the content deletion (see below)
- instances may eg. ping users via email to remind them about their account expiring before the TTL runs out
- users may opt out of the content deletion mechanism, both on a per-user basis or on a per-content basis
- if a user has opted out of the mechanism completely, their content must not be marked with a TTL. However, this does present a problem if they later change their mind
2. Advantages of this proposal
- guarantees that user content is deleted from āwell behavedā instances, even in the face of changing network topologies when instances defederate or disappear, hiccups in message delivery, server uptime and so on
- would allow supporting Mastodon-like general content TTLs with a little modification, hence why it has TTLs per content and not just per user. Maybe something like a
refresh_liveness
boolean field on content that says whether an instance should do user liveness checks and refresh the contentās TTL based on it or not? - with some modification this probably could (and should) be made to work with and support the regular content deletion flow. Something for draft v0.2 in case this gets any traction?
3. Disadvantages of this proposal
- more network traffic, DB activity, and CPU usage, even during ānormalā operation and not just when something gets deleted. Not a huge amount but the impact should probably be estimated so weād have at least an idea of what itād mean
- however, considering the nature of the problem, some extra work is to be expected
- as noted, the current form of this proposal does not support or work with the regular deletion flow for individual comments or posts, and only addresses the more drastic scenario when a user account is deleted or disappears
- spurious deletions of content are theoretically possible, although with long TTLs and persistent liveness check retries they shouldnāt happen except in rare cases. Whether this is actually a problem requires more thinkifying
- requires buy-in from the rest of the Fediverse as long as itās not a protocol-level feature (and thereās more protocols than just ActivityPub). This same disadvantage would naturally apply to all proposals that arenāt protocol-level. The end goal would definitely be to have this feature be a protocol thing and not just a Lemmy thing, but one step at a time
- need to deal with the case where a user opts out of having their content deleted when they delete their account (whether they did this for all of their content or specific posts/comments) and then alter changes their mind. Will have limitations, such as not having any effect on instances that are no longer federated with their home instance
3.1 āItās a feature, not a bugā
- when an instance defederates or otherwise leaves the network, content from users on that instance will eventually disappear from instances no longer connected to its network. This is a feature: when you lose contact with an instance for a long time, you have to assume that itās been ālost at seaā to make sure that the usersā right to forgotten is respected. As a side note, this would also help prune content from long gone instances
- content canāt be assumed to be forever. This is by design: in my opinon Lemmy shouldnāt try to be a permanent archive of all content, like the Wayback Machine
- content can be copied to eg. the Wayback Machine (as noted above), so you canāt actually guarantee deletion of all of a userās content from the whole Internet. As noted in the problem statement this is absolutely true, but what Iām looking for here is best effort to make sure content is deleted from compliant instances. Just because itās impossible to guarantee total deletion of content from everywhere does not mean no effort at all should be made to delete it from places that are under our control
- this solution is more complex than simply actually deleting content when the user so wishes, instead of just hiding it from view like itās done now in Lemmy. While ātrue deletionā definitely needs to also be implemented, itās not enough to guarantee eventual content deletion in cases like defederation, or network and server errors leading to an instance not getting the message about content or a user being deleted
TTL on all content scales extremely poorly. You touch on this but I donāt think you appreciate just hope big of a
SELECT * WHERE TTL ...
this would be in just a few months/years. As an alternative, every instance sync should come with a list of newly deleted users. Retrying would not need to be reimplemented. If a user who wishes to be forgotten has had their home instance go dark, there will need to be a way for them to prove ownership over the original account (signup confirmation email perhaps) so a delete can be started from a foreign instance.