Security is a multifaceted goal in a MongoDB cluster. For the rest of this chapter we will examine different attack vectors and how we can protect against them. In addition to these best practices, developers and administrators must always use common sense so that security interferes only as much as needed with operational goals.
Security
Authentication
Authentication refers to verifying the identity of a client. This prevents impersonating someone else in order to gain access to our data.
The simplest way to authenticate is using a username/password pair. This can be done via the shell in two ways:
> db.auth( <username>, <password> )
Passing in a comma separated username and password will assume default values...