There could be a chances of few question must be in your mind, like why we need role based access control? Why you required either role based or user based access privilege. The answer is simple and best way to described is :
A high level of responsibility isolation for the operational tasks.
In any Database, there are different type of Roles and users, which required to access different resources for different purposes. Some of the Role as:
- Developer: Application developer or database developer which usually required to read, write , delete , and update on a particular database.
- DBA: who manages database for different purpose like building of different type of index, backup, monitoring, user management, etc
- Data Scientist: who can read particular database or tables.
- User Admin: who manages the users for the database.
- cluster admin: who manages the cluster of database.
Roles Based Access Control in mongoDB
In mongoDB , there are so many built in Roles and you can create user defined Role as well. First of all , always search from existing Role and if you are not able to fit in your requirement you can build and developed you own roles in mongoDB.
Roles bases access control in Application
In any logged-in based application, different user has different level of permission to access the resources. Customize Role based on roles and apply in your application. Provide menu or menu-item or link to those user which has a particular role to access that. if you do not want to access then you use to show ‘You are not authorized to access this resource.’
Your comments are welcome to encourage this post.