I am developing an application that allows users to post things anonymously yet comment on posts with their name and profile picture. I want to create a method of data storage that makes it impossible for anyone, even me, to find the posts of a specific person given their public user id.

The process would look something like this:

  1. User authenticates my app with a Facebook login button. They're signed in with their Facebook ID that is unique to them.

  2. I use some deterministic, unknown to me hashing function to return a salted/hashed user app-ID.

  3. User posts and the post is associated with this hashed ID.

  4. Another user comments on this post, and the comment is associated with their public Facebook ID.

Obvious the problem is if someone knows a user ID and has access to my database (either me or a breacher), they can salt and hash it to find the posts associated with this person. I do not want this ability.

I was considering using some user-unique, secret deterministic key that is unknown to me and not stored on my database to salt each Facebook user ID. For this perhaps there is some parameter returned from the Facebook ID that is unique to the user and does not ever change that I could use, but I am reluctant on relying on Facebook API to do this handshake because I don't want the app to break in the future if it ever changes.

Does something like this sound possible? If so, what are your ideas for implementation?

  • How would you deal with getting in problems for hosting illegal content? – jrtapsell Jun 4 '18 at 11:45
  • Anonymous posts can be reported; if a post is reported X times it is deleted and the hashed user ID gets a flag. If a user gets Y posts removed this way he is shadowbanned and his posts no longer show up anywhere. Also, I would not allow posting images, videos, or links. Only plaintext (at least for now) – Luke Bordonaro Jun 4 '18 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.