I am referring to <https://firebase.google.com/docs/database/admin/start>

I have node.js code as mentioned below: 

```
var admin = require("firebase-admin");
var serviceAccount = require('mySdkJSONFile');
admin.initializeApp({
    credential: admin.credential.cert({
                    projectId: "myProjectId",
                    clientEmail: "myClientEmail",
                    apiKey: "myApiKey",
                    privateKey: "myPrivateKey"
                }),
    databaseURL: "....",
    databaseAuthVariableOverride: {
        uid: "my-service-worker"
    }
});
var db = admin.database();
var usersDB = db.ref("/users");
usersDB.set({
  name: "myName",
  date: "yesterday"
});

```

And in the database the rules are set as 

```
{
 "rules": {
 "public": {
     ".read": false,
     ".write": false
  },
 "users": {
    "$uid": {
      ".read": "auth.uid == 'my-service-worker'",
      ".write": "auth.uid == 'my-service-worker'"
            }
          }
      }
}

```

If for "/user" I set read and write permissions to true, everything works fine, no config issues.