Studio 3T’s Role Manager makes it easy to assign built-in roles and user-defined roles.
But first, let’s look at a few basic MongoDB role management concepts.
A privilege is the foundation of a MongoDB role. It is made up of a resource and actions.
A MongoDB resource is where the privileges are applied to, be it a cluster, a database, or specific collections within a database.
You can choose one of three built-in resource options in Studio 3T’s Role Manager:
MongoDB (privilege) actions
Actions define what a user can do within a MongoDB resource.
Below are the privilege actions found in the Role Manager. If you already know which actions to choose, feel free to skip to the next chapter.
Open Role Manager
To open Role Manager:
Click on Roles in the global toolbar
Right-click on any target database in the Connection Tree and choose Manage Roles
Create a new role
- Click on Add.
- Enter a name for the new role and ensure that the target database is correct.
- To inherit privileges from existing roles, click on the Roles tab and add the relevant role. This will spare the manual task of adding resources and actions step by step. Otherwise, proceed to step 4.
- Click on the Privileges tab.
- Click on Add.
- Choose the appropriate resource and click OK.
- Choose the appropriate actions and click OK.
- Check that everything is correct and click Create Rule.
View a role
Click on View to open the role profile and implement any changes.
Remove a role
Click on the Remove button.
Find users granted a specific role
Follow the steps outlined here.