Hi,
After review the docs and Q in support area, I still have unclarity regarding the right way of fully secure the data and permission of my DB.
In my application there are 2 users only:
User that can "Read" the information from DB (read the data from DB and display it on screen),
I will use single user for this since log in is not required, this user is only for getting DB "Read" permission only.
User that can read/write/edit/delete records (admin)
In that case my DB design goal is the following:
Provide the ability to access the DB in "Read" only mode,
means that the users that will access to the DB will be able to read the data from collections and that's it! (cannot edit or ADD new records).
REMINDER: In my application all users will use the same User since this user is only for DB protection, nothing else unique that I need per user.1.a. Block the application users that has "Read" only access to:
1.a.1 - Add additional User with full permissions to Users collection and by that get full control on DB.
1.b.2 - Get the list of existing Users that saved in the collection.Provide the ability to access the DB in "Read" and "Write" mode (Admin access), means that the users that will access to the DB will be able to read and write data from/to collections.
Based on all the information that I read and tested:
To handle item #1 we need to do the following steps:Create user in Users collection.
Set collection as secured
*Access all collections and add restriction for this user that he will not be able to read any record (and this needs to be done on record level!)
Till here - OK, the user can only read the rows data and cannot edit it.The Issues:
This user CAN add new record to the collection (with ANY permission that he wants!!!).
This user CAN add new User with full permission to the application!!!!
Need to add permission per record to support it instead doing it on collection level
*Set the collection permission as "Read" only will not solve since I have Admin user that needs Write permission also.To handle item #2 we need to do the following steps:
Create user in Users collection.
Set collection as secured
*Access all collections and add full permission to this user (and this needs to be done on record level!).
Till here - OK, the user can Read and Write.The Issues:
Need to add permission per record to support it instead doing it on collection level.
Since all above items I cannot identify the right way to define the users and collections to support FULLY secured DB access.
Can you review and let me know the right way to achieve all above.
In addition I saw that in case I'm using the same DB User for all application users they will get the same token in case it still alive.
Is there any issue with that?Reference that I used:
Appery docs (http://devcenter.appery.io/documentat...)
Related post - "how_to_set_database_permission_correctly" (https://getsatisfaction.com/apperyio/...)
Thanks