Take an extremely technical engineer with extremely good communication skills and extreme work ethic to put together such an extensive series and you get this guy
02:57 Rules in the Firebase Console 04:11 Rules do not cascade (unlike RTDB) 05:37 Wildcard variables 07:53 Rules will be mostly based on 3 pieces of data: data request, target documents, some other data 10:21 CRUD: create rules 12:06 CRUD: update rules 14:04 CRUD: read rules 16:49 Limit restaurant updates to editors and owners 18:18 Adding SuperAdmin and Moderators 19:25 Custom Functions 20:15 Check if Resource is valid using a function and refactoring rules Full playlist: ru-vid.com/group/PLl-K7zZEsYLluG5MCVEzXAQ7ACZBCuZgZ
Wow, easily the best video education series I've ever watched. Production quality through the roof and presenter is clearly knowledgable and able to communicate in a fun and direct way. Thank You!
Thank you for using a realistic use case like the restaurant app, with some decently complex data, instead of just a "to do app" like every other tutorial out there hah
The whole series is great! I'm glad you aren't afraid of lengthy videos. The short videos on the channel are good too, but intermediate or more experienced developers want more details. Please keep this up! Also, I feel I laughed more than I should at the "moist" joke :)
I dunno what kinda docs you're taking about, but when I spent hours each night struggling to figure out these rules (which I eventually figured out), you answers all my questions in a single 20 min video.
Security Rules, like the noun, but also Security Rules! like the verb... All I know is Database Robin Williams Rules! Seriously thank you for making learning a new language much less intimidating
So nice with a high-quality tutorial series where the presenter is SO good that he doesn't need to beg the viewer to subscribe; we'll do it anyway! And share! Can't wait for the next instalment.
Love your entire series. Would love to see a video on perhaps the best ways to combine all the services together. For example in my current app, we are using realtime database, firestore, firebase authentication, storage and now cloud messaging. With so many products one could see how confusing the entire product ecosystem is...
So happy with this video. It really goes into proper depth and will definitely help me secure everything properly! The local emulator definitely deserves another episode though (or maybe an example on git?), as the documentation is quite hard to comprehend fully.
Love the video! Thanks a lot for clear instructions. They have helped me a lot to improve my app!! It's nice to watch which gives an honest approach to the content.
How do you handle when people put random irrelevant data in a document? Is there a way to whitelist which fields are allowed on a document? This could be a security problem if they predict a field that we would add later.
Commonly a large company would have front AND backend devs working on a project. (assuming a 'traditional' server backend is involved). But with Firestore, is this still the case?... for example, with Firebase (and cloud functions, security rules, etc.) typically would this mostly still be done by a backend developer? Or with Firebase is the intent for the front end devs to do this themselves (and thus essentially be full stack)?
While running the Firestore Rules simulator, request.token seems to be null. And if at all we provide it using Custom Auth Provider, we need to provide "super_admin" it at the "token" level, which is not the case with actual real world situation, as the custom claim is in "customClaims" property of "token" property. TL;DR: With simulation -> "token":{ "super_admin":true } With real case -> "token":{ "customClaims":{ "super_admin":true } }
Is Cloud Firestore a good selection for a bank account? Can it be safe and reliable to save people's money which is a number to the Cloud Firestore? My concern is reliability and security. Any suggestions?
Great video, great episode: this answered a lot of questions I had regarding security for which I am grateful! I still have one concern regarding security due to the schemaless nature of the database. How can I prevent malicious users from spamming my database by writing data to 'fields' I haven't defined? Because from what I understand, anybody with 'write' access to a certain documents can make a function that writes random key:value pairs to the database and run it from a console. Is is possible to write a function that prevents all keys that aren't defined by me 'the programmer' to be written to the database?
Even though it's possible to create Security Rules on each document-attribute, is it possible for a client to add new fields in the update? I can't help but thinking about having all updates/create go theough a Cloud Function first to make more fine-grained validation.
What if technically someone retrieved information from my app and created his own with the same credentials? He can send to my database the same requests as I do, e.g. send message. I am really confused by it because my project information is public on my website.
I really like the idea of all these videos, but because I’m a bit of a noob developer, I have a hard time picturing the use cases in real apps. What has always helped is having super basic apps using these cases and watching what happens instead of just discussing what would happen.
I don't know if something has changed at the moment, but it continues to appear in the documentation that the first thing we must put is "rules_version = '2';"; the truth is that it is the first error and it does not allow publishing only by placing that in the rules
Hi Guys. I implement Firestore within my Backend with Express and have all types of validations against Client side requests. Do i really still need to implement those rules ?
how to allow only some specific internal ip addresses from login into my firebase auth login we app?? please provide me some tips it is turning like a nightmare.
Is it true that using sub-collections basically is a kind of extra security? For example, you know that users can only get a sub-collection that belongs to a specific parent id, so unless they know all the parent ids and loop over that, there is no way they can just get a list of all the item in a sub-collection.
How can we stop users adding new properties for objects? E.g. I can validate the name and dob fields, but how do I stop them adding 50 new fields on an update for example?
@@jihadmahde word play? "you rock" = "your rule" --> verb... while same time "rules of the game" (noun) ... --> so u can read the title both ways.... just a silly word play in a moment of boredom, nothing to read too deep into :-)
When you have a "roles" map of uid => role, how can you validate to ensure only the owner can add/remove editors, but an editor can remove themselves from the map?
is this any better or worse than using a node.js backend? It seems like a LOT of little rules to write when node.js would make it simpler or would it not?
it's only now hitting me that i created an entire backend for my app because i didnt understand security rules and therefore couldnt open up writes to the frontend 😥😥
if I choose to store my users info using the firebase auth user profile and use the user.diplayName field to store username, and on a Firestore collection('reviews') I have reference to the username. Say when I want to update a user's username (user.displayName), I also need to go and update all duplicated data on the reviews collection. My question is can I make a batch job that consists of a auth.updateProfile and a firestore.docRef.update?
It says that the video will cover a case where access will be based on some other data in some other collection but then never covers this part. "Some other data located in some other part of your db"
Lets say i have school. teacher wants to create collection in document for specific students, and few documents for all students in calss . how can i model this ?? I cant assign roles at such granular control
Hi brother can u help me pls. I have this security rules for an ecommerce site but why is it that the products are not showing unless I do allow access top the shallowest match path. This line below, knowing if I allow read access to this line then everyone can read all my documents even those I want to set private. match /{document=**} { allow read if false; // I have to set this to true before all products for selling by all users are displayed in the dashboards of any user. So I cannot do selective securty if I do set it to true since everything is allowed to be read. rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read,create,update,delete: if false; match /users/{uid}{ allow read; allow update:if request.auth.uid == uid; match /users/{uid}/products { allow read; allow create: if request.auth.uid != null; match /users/{uid}/products/{product}{ allow read; allow create: if request.auth.uid != null; allow delete,update: if request.auth.uid == uid; } } } } } }