mit-pdos / noria

Fast web applications through dynamic, partially-stateful dataflow
Apache License 2.0
4.99k stars 242 forks source link

[NoriaCS2390] Implement Delete Logic #148

Closed wsyou closed 4 years ago

wsyou commented 4 years ago

GDPR requires the application to delete User Data upon user requests. In this PR, I designed this logic: (1) we requires the developer to specify one and only one special Table as the user_table. Only when developer sends sql query to delete user from this table, we will check every other table to delete the information for that particular user. This is why we requires every table to have a field called "is_user_table". Only one table's this field will be true. Only deleting from this table can trigger a checking of all other tables. (2) when checking other tables, we check whether its field "contains_personal_info" is true, if false, we ignore this table. (3) for tables whose field "contains_personal_info == true", we continue to check whether table field "erasable == true", if not, ignore this table, otherwise, we delete all rows in this table that is associated with that user.

An alternative is, instead of adding the field "is_user_table" to Table class, we require any application to have one table with table name "User".