I received a message in Firebase
letting me know that my project Realtime database
has insecure rules. But when I check it, I don't quite see what is insecure.
It shows up like this:
{
"rules": {
".read": true,
".write": "(auth != null) && (auth.uid == '123...myUID ...xyz')",
"CollectionOne": {
".indexOn": ["name", "url"]
},
"CollectionTwo": {
".indexOn": ["name"]
}
}
}
I left the read access the way it is, because this is supporting a web site. So anyone visiting the site should be able to read the data.
And for the write access, as far as I can see, I am the only one who can write.
Just one note, I have a third collection (CollectionThree) which is not mentioned in the rules. Could that be the reason?
Beside I could also imagine that the read access could be given to only the web server in order to serve the contents to the visitors and not directly to anyone, but I don't think that is the case. And if this was the case I wouldn't know how to set this rule.
If someone can shed some light on this, that would be helpful.