Built-in User Roles in mongoDB used for granding user for priviledges for authentication and authorization of database user in MongoDB.
1. Why Roles in MongoDB
Authorization with MongoDB, refer to Role bases accesses control. You can secure your database from any user which you don’t know want to access with permission. Authorization means access permission to a particular resource in DB.
First of all , you may think, what is Role? You can carefully observer following quote, you can understand the Role very well. Just for you simplicity , I highlighted important keyword with bold so that you can understand easily.
Roles are group of Previledge, actions over resources, that are granted to users over a given namespace ( database)
Let us talk about what Action is in above quote. All operations and commands user has to perform on mongoDB is called action , few of them are following.
- delete etc
Actions are performed on Resources. So, what is Resources now? The following are some example of resources in the context of Role bases access control in mongoDB.
- mongoDB Cluster
You can visit docs.mongodb.com for more details.
Thanks for visiting this post for built-in roles in MongoDB. You can also visit MongoDB Tutorial Listing page for more articles on MongoDB document-oriented database.
Your comments are welcome to improve this post. Happy Learning 🙂