You can define a private rules to disable read and write access to your database by users. With these rules, you can only access the database when you have administrative privileges (which you can get by accessing the database through the Firebase console or by signing in from a server).
// These rules don't allow anyone read or write access to your database
{
"rules": {
".read": false,
".write": false
}
}