3dbeginner
3dbeginner2y ago

are audit keys like updatedBy visible to

are audit keys like _updatedBy visible to all users with access to the document, or is that protected in some way I don't understand? Specifically, if I have a customer facing app that retrieves the document (because everything else about that document ought to be public), is the email address of the content manager of that document being leaked to the public via the _updatedBy key?
4 Replies
3dbeginner
3dbeginnerOP2y ago
so I've been looking at this further and it does seem that the user managing the content will have their name, email, and google user profile picture leaked under the _updatedBy key (assuming your customer facing site makes client side requests direct to firestore). Is there a way to scrub this? Or is server side processing/rendering the recommended pattern for apps?
Harini
Harini2y ago
Hi @3dbeginner if you would like the data in a specific table to be available only to specific role - i.e. ADMIN user can read and write to a table with audit turned on in the table but that same data collection be visible to your end users in the app and not have specific columns only visible - then we suggest using stricter roles via the Firestore rules management directly and creating a customer role for use in your app https://firebase.google.com/docs/firestore/security/rules-fields Let us know if you need any help with getting this setup with granular field level access to your collections in your customer facing app.
3dbeginner
3dbeginnerOP2y ago
yeah, I get how that can be done. I think if auditing is as easy a checkbox, it might be good to either have a note next to it about what data is being placed on the document and made available to all with access to the document, or provide some autogenerated access control configuration for these
Harini
Harini2y ago
Cool we will improve the UI for the field level as well so that it can be done visually similar to how it is for the table.