匿名用户在django [英] Anonymizing users in django
问题描述
我正在考虑的一个解决方案是在数据库中存储哈希的user_id,或者创建一些将用户标识的中间表。
哈希它不会解决这个问题,因为它仍然可以带回用户。
是否可以使用Cookie或IP? / p>
如果您希望能够将数据与特定用户相关联,则将在某种程度上与某些用户链接。
也许您可以模仿其他安全认证系统,例如让用户生成公钥和私钥,并用他们的公钥手动加密他们的数据,然后他们将是唯一可以访问它们的数据。
有可能取决于你的限制。
I have a system which keeps all actions of a user in the database. The problem is that now I can track which data belongs to which user. How to make users not identifiable in the database? One of the solutions I was thinking of is to store hashed user_id in the database, or create some middle table that will hashed user id.
Hashing it will not solve this problem as it can still be brought back to the user.
Are cookies or IPs something you could use?
At the end of the day if you want to be able to relate data back to a specific user it will in some way have to be linked to the user. Perhaps you could mimic other security authentication systems, such as having a user generate public and private keys and manually encrypting their data with their public key and then they'll be the only ones with access to it.
There are possibilities it depends on what your restrictions are.
这篇关于匿名用户在django的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!