noun: authentication; plural noun: authentications the process or action of proving or showing something to be true, genuine, or valid. COMPUTING the process or action of verifying the identity of a user or process.
{ "somerandomsessionid": { "title": "Fire Safety", "description": "Fire safety is the set of practices intended to reduce the destruction caused by fire. Fire safety measures include those that are intended to prevent ignition of an uncontrolled fire, and those that are used to limit the development and effects of a fire after it starts.", "start_time": "18:50", "end_time": "19:20" }, ... } }
{ "somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { "google": "gogo", "phone": "phos", "peppa": "peppa", "crocodile": "croco", ... }, "parents": { "cXuBkCQuV2YX7vW2HA4dbc2cNyC2": "Mother", "FzDkcwhMQ4eOVj3LfKokitXS6mZ2": "Father" } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby Authorization
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby Authorization
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { ".read": true, ".write": true } } Authorization babies/somerandomidforemily/name auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { ".read": "auth != null", ".write": "auth != null" } } Authorization Using auth variable babies/somerandomidforemily/name auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { ".read": "auth != null", ".write": "auth != null" } } Authorization Using auth variable babies/somerandomidforemily/name auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { ".read": false, ".write": false } } Authorization babies/somerandomidforemily/name auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { } } Authorization babies/somerandomidforemily/name auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "somerandomidforemily": { ".read": true } } } } Authorization babies/somerandomidforemily/name auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { ".read": true } } } } Authorization Wildcard path ($) babies/somerandomidforemily/name auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { ".read": true "words": { ".read": "auth != null && data.parent().child('age_in_months').val() > 24" } } } } } Authorization Referencing data babies/somerandomidforemily/words auth
"somerandomidforemily": { "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { ".read": true "words": { ".read": "auth != null && data.parent().child('age_in_months').val() > 24" } } } } } Authorization Rules Cascade babies/somerandomidforemily/words auth
"somerandomidforemily": { "info": { }, "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { ".read": true "words": { ".read": "auth != null && data.parent().child('age_in_months').val() > 24" } } } } } Authorization Rules Cascade babies/somerandomidforemily/words auth
"somerandomidforemily": { "info": { }, "name": "Emily", "age_in_months": 21, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('age_in_months').val() > 24" } } } } } Authorization babies/somerandomidforemily/words auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" } } } } } Authorization babies/somerandomidforemily/words auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" } } } } } Authorization babies/somerandomidforemily/info/name auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" } } } } } Authorization babies/somerandomidforemily/words auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" ".write": "data.parent().child('parents').hasChild(auth.uid)" } } } } } Authorization Write > babies/somerandomidforemily/words auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" ".write": "data.parent().child('parents').hasChild(auth.uid)" } } } } } Authorization Write > babies/somerandomidforemily/words auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" ".write": "data.parent().child('parents').hasChild(auth.uid)" } } } } } Authorization Write > babies/somerandomidforemily/words parent auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" ".write": "data.parent().child('parents').hasChild(auth.uid)" } } } } } Authorization babies/somerandomidforemily/words parent auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby { "rules": { "babies": { "$baby": { ".read": "data.child('parents').hasChild(auth.uid)" "info": { ".read": true }, "words": { ".read": "auth != null && data.parent().child('info').child('age_in_months').val() > 24" ".write": "data.parent().child('parents').hasChild(auth.uid)" } } } } } Authorization babies/somerandomidforemily/words parent auth
"somerandomidforemily": { "info": { "name": "Emily", "age_in_months": 21 }, "words": { … }, "parents": { … } }, ... } } Everybody can see Name Age All authenticated users can see only if the baby is over 2yo Words Parents can modify Words * Parents can see all info on their baby Authorization .validate ".validate": "newData.val().matches('some(Regex)*')" ".validate": "newData.isBoolean()" ".validate": "newData.val().contains('o')" ".validate": "newData.hasChildren(['some', children'])"