Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide data in firebase console

I am new to firebase and I am doing for chat application.

enter image description here

  1. In my firebase console, I can see raw data like this. Since it is private information, can I hide some info (or all)?

  2. If I cannot hide, I have used encryption for "text". So, in my mobile device, I encrypt and decrypt. It is still okay. Problem is I cannot search/query text because it is already encrypted in server. How shall I do?

If I can just hide data in firebase console, I don't need to do encryption, etc already. Purpose is to prevent developer (like me) to see user data.

like image 786
Khant Thu Linn Avatar asked Jun 22 '18 08:06

Khant Thu Linn


People also ask

Can we encrypt data in Firebase?

Firebase services encrypt data in transit using HTTPS and logically isolate customer data. In addition, several Firebase services also encrypt their data at rest: Cloud Firestore.

How do I encrypt data on firestore?

Firestore automatically encrypts all data before it is written to disk. There is no setup or configuration required and no need to modify the way you access the service. The data is automatically and transparently decrypted when read by an authorized user.


1 Answers

There is no way to hide certain data in the Firebase console. The only thing you can do is revoke the permission of the developer to see the database altogether.

Doing client-side encryption/decryption (also known as end-to-end encryption) is a common solution for your scenario. But that does mean that your searches will also need to search for encrypted values.

While this is a bit tricky, it is possible and has been done by developer before you in a similar situation. If you're having trouble making it work, post a question with the minimal code that reproduces where got stuck and we'll have a look.

like image 90
Frank van Puffelen Avatar answered Nov 15 '22 11:11

Frank van Puffelen