Configuring Access Control
One of the first administration tasks that you will want to perform in the MongoDB shell is to add users to configure access control. MongoDB provides authentication and authorization at the database level, meaning that users exist in the context of a single database. For basic authentication purposes, MongoDB stores user credentials inside a collection call system.users in each database.
Initially, the admin database does not have any users assigned to it. When no users are defined in the admin database, MongoDB allows connections on the local host to have full administrative access to the database. Therefore, your first step in setting up a new MongoDB instance is to create user administrator and database administrator ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access