Home
Tags:

MongoDB Users And Roles

Built-In Roles:
There are a bunch of built-in Roles that MongoDB offers. Roles are permissions to take actions, and mongodb offers a BUNCH of built-in roles. Mongo breaks up their roles into role categories - each of these is a grouping of user roles:

  • DB User: these can be setup for clients who perform normal db operations
  • DB Admin: these can be setup folk a user to have schema,indexing, and statistical insight gathering. This role does not container user or role management details, those details can be done with other roles
  • Cluster Admin: for users to have a scope of work for replica set and sharding administration
  • Backups & Restoration: restricted to the admin db and for backing up and restoring data
  • SuperUser: full privileges on all resources, including a dbOwner, userAdmin, and userAdminAnyDatabase
  • All-Database: reserved for the admin db, and give rights to all dbs except for the local db and the config

Here will live a table view comparing permissions to roles. Many permissions exist in mongo, and roles overlap in allowed actions. This table is an all-visible approach to all roles + permissions.