Articles → MONGODB → Built-In Roles In Mongodb
Built-In Roles In Mongodb
Database Users
- read → A user with the read role can read data from the database but cannot modify it. This includes querying collections and reading their contents.
- readWrite → A user with the readWrite role can read and write data. This includes querying collections, inserting new documents, updating existing records, and deleting records.
Database Administrative Roles
- dbAdmin → A user with the dbAdmin role can create, delete, and modify indexes, collect database statistics, view database profiling information, and execute administrative commands.
- userAdmin → A user with the userAdmin role can create, modify, and manage users and their roles within a specific database.
- dbOwner → A user with the dbOwner role has full administrative access to a specific database.
All-Database Roles
- readAnyDatabase → A user with the readAnyDatabase role can read data from all databases except the local and config databases.
- readWriteAnyDatabase → A user with the readWriteAnyDatabase role can read and write data across all databases except the local and config databases.
- userAdminAnyDatabase → A user with the userAdminAnyDatabase role can manage users and their roles across all databases.
- dbAdminAnyDatabase → A user with the dbAdminAnyDatabase role can perform administrative tasks across any database. These tasks include creating and modifying indexes, gathering database statistics, and running administrative commands.
Roles For Cluster
- ClusterAdmin → The user with the ClusterAdmin role manages cluster-wide administrative tasks and settings.
- ClusterManager → The user with the ClusterManager role oversees sharding and replica set configurations.
- ClusterMonitor → The user with the ClusterMonitor role has read-only access to monitoring and diagnostic tools.
- HostManager → The user with the HostManager role manages server operations, including starting and stopping the server.
Backup/Restore Role
Super User Roles
- DbOwner (admin) → Manages all administrative functions for their database, including user management.
- UserAdmin (admin) → Manages users and roles within the admin database
- UserAdminAnyDatabase → Manages users and roles across all databases in the MongoDB instance.
- Root → Has full access to all administrative and operational functions across the MongoDB instance.
| Posted By - | Karan Gupta |
| |
| Posted On - | Friday, June 21, 2024 |