title: Can I set Firebase Database rules based on Instance ID?
body: <p>I am new to Firebase Database and I am not planning to use the Firebase Authentication.</p>
  
  <p>Is it possibile to set Firebase Database rules based on the Firebase Instance ID, rather than on the authenticated User ID ?</p>
  
  <p>This is the structure I am thinking to implement:</p>
  
  <pre><code>/instanceIDs
      /iid1
           /somedata
           /someotherdata
      /iid2
           ...
      /iid3
           ...
  </code></pre>
  
  <p>and I would like to restrict read/write permission only to that specific instance ID</p>
  
  <p>anyone can show how to set such rule?</p>
  
  <p>Otherwise, if I set read/write to true for all users, what is the security risk?
  If my native mobile app code only reads/writes on the specific instance ID branch, can I expect some security issues?</p>