I am new to database management. I was going through the mongodb docs for Role Based Authentication Control. I have understood how it works, but I have a few questions.

How is it applied in real life scenarios? For example let's say I am running a blogging web app. How would I use Role Based Authentication Control to improve my database management?

1 Answer 1


You can group several privileges into one Role. It is simpler to grant roles rather than dealing with a bunch of privileges.

In a multi-tier architecture this might be no so important. You may have a user admin, backup, http - that's it.

However, when your database is used by many (human) users distributed over several departments with different responsibilities then Roles make your life much easier.

You create (or use built-in) roles like backup, clusterAdmin, developer, reporter, powerUser, etc. and grant such roles to users. You would have serious security flaws if every user would get full admin privileges on entire database.

Not the answer you're looking for? Browse other questions tagged or ask your own question.