匿名用户在django [英] Anonymizing users in django

查看:98
本文介绍了匿名用户在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆