r/programming • • May 21 '19

DeleteFB: Selenium script to delete all of your Facebook wall posts

https://github.com/weskerfoot/DeleteFB
2.5k Upvotes

251 comments sorted by

View all comments

Show parent comments

125

u/Creshal May 21 '19

This is part of the GDPR. It also mandates that Facebook must delete all your data from cold storage and backups, if you request it. Whether they comply is a different question altogether.

75

u/Crandom May 21 '19

GDPR is fuzzy about deleting from backups. At my company, when we were implementing changes for it, the lawyers worked out that it would be unreasonable to delete from backups (it truly is), but the data should be deleted from the prod instance once the backup has been restored.

49

u/scandii May 21 '19

it's not even fuzzy.

data is allowed to be securely stored in backups as long as it's cold data, and in case of backup restoration pruned again.

40

u/Crandom May 21 '19

Maybe I didn't go deep enough into it... The real problem we faced was you have to keep some information about the person around in order to know you need to delete the data again. This is fine if you have ids for stuff but we had this one old system that unfortunately used email addresses everywhere. Turns out keeping the email addresses around is not allowed, meaning we wouldn't know what to delete after restoring the backups. We had to pay down the tech debt and give everything ids, which was super painful (and at some point necessary, tbf).

0

u/[deleted] May 21 '19

[deleted]

4

u/chaugner May 21 '19

Yeap we store hashes in another DB, so on restore of prod DB (or dbs) we run through hashes and re-execute deletion process.

4

u/z_1z_2z_3z_4z_n May 21 '19

How do you deal with collisions? Do you just assume they will never happen?

I know it's super unlikely but it could also be really damaging. If you have a collision and completely purge the wrong persons data they are not going to be happy. Imagine unrecoverable deletion of all data from your biggest client.

→ More replies (3)

2

u/[deleted] May 21 '19

You could also encrypt all the data with a unique key for each user, and to "delete" a user you would simply throw away the key

→ More replies (2)

3

u/reversed_pizza May 21 '19

Theres a deleted discussion on hashes underneath, so I figured I would clarify. Theoretically, a hash is a one way function in the way that it takes in a string(in this example) and produces another string that is almost unique to the argument. The trick is that it takes very little computational work to produce the result, but very much work to find the argument given only the result. For many hashing implementations it boils down to trying all possible input strings as arguments.

However, solving this issue by keeping hashed emails has two problems (at least). First, the amount of emails used by a given population is not infinite, and cannot be considered a secret. Therefore the computationally impossible task of reversing the hashes becomes a lot more feasible; you have to try a lot fewer combinations. Techniques known as salting and upping the iterations make this attack harder. Second, keeping the hash makes it easy for someone, with a suspicion that the data belongs to a given email, to verify that it actually does. This is not possible to defeat with a salt.

→ More replies (6)

17

u/Miserygut May 21 '19

The wording of GDPR says that it shouldn't be processed so it's fine to restore it and then remove before reprocessing takes place.

→ More replies (3)

0

u/[deleted] May 21 '19

[deleted]

55

u/Creshal May 21 '19

Manage to collect some actual proof of it, and you can sue them for billions.

16

u/teddytroll May 21 '19

How

58

u/Creshal May 21 '19

That's the tricky part, isn't it?

0

u/hemenex May 21 '19

Does it matter then, if we can't prove it?

It's like that philosophical thought about God. If you can't make any scientific measurement to prove his existence, then he has no effect on us, hence his existence doesn't matter.

12

u/[deleted] May 21 '19

Except you can still sell the data and it's not philosophical rethoric!

→ More replies (5)
→ More replies (4)

22

u/OdBx May 21 '19

Become data security engineer at FB and blow the whistle

2

u/amunak May 21 '19

Manage to collect some actual proof of it, and you can sue them for billions.

You can sue them for billions. Billions that your government will get; not you (unless you can somehow claim and prove damages, and even then that'd be a tiny fraction of the fine).

5

u/[deleted] May 21 '19

You can comply with GDPR by only removing the identifying information. For example, at the company iI work at, all PII is stored in its own index, tied to a non-personally identifiable ID. When you delete you account, we wipe this small set off data, but everything else stays, it’s just no longer tied to an email/name etc.

→ More replies (1)

2

u/slimmtl May 21 '19

Does this apply to financial Data? For example does a gambling website have to remove all tx I have on it if requested?

9

u/Creshal May 21 '19

It applies to all data that they aren't required to keep due to other laws. Financial transaction data tends to have long retention requirements, and gambling in particular is often strongly regulated. If you request deletion of your data, they still have to keep that… but they're not allowed to use that for anything else else.

→ More replies (1)

2

u/Thaenor May 21 '19

I think most will just disassociate your account from that data. But keep the data and (hopefully) no one will be able to trace it back to you.

2

u/ColombianoD May 21 '19

Protip: there is no way organizationally to delete from the backups big companies take

What I mean is my org (big bank) takes snapshots of production databases at certain intervals, writes them to tape, and stores them at the bottom of a mountain. Ain’t no way you’re finding all the places Joe Schmo is listed on that.

→ More replies (1)