Skip to content

Commit

Permalink
merge: DOCS-79
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Kleinman committed Oct 25, 2012
2 parents 70dd87e + 154f62f commit cb2cb85
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions draft/tutorial/control-access-to-mongodb-with-authentication.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,21 +192,29 @@ for each database.
{ "_id": ObjectId("507420ba032a960d16f43951"), "user": "eve", "readOnly": false, "pwd": "5dcc2819b97e68d5cfe51da6cae8a7f6" }

Alice has read and write accounts on both ``db1`` and ``db2`` and
also has access on the ``admin`` database. Consider the following:
also has access on the ``admin`` database. Consider the following
example where Alice authenticates to the ``admin`` db:

.. code-block:: javascript

use admin
db.auth("alice", "pass")

Consider the output of :method:`find() <db.collection.find()>` on
the ``system.users`` collection:

.. code-block:: javascript

db.system.users.find()

This operation returns the following document:
The following output confirms that the user has the same password and hash:

.. code-block:: javascript

{ "_id": ObjectId("50742045032a960d16f43950"), "user": "alice", "readOnly": false, "pwd": "ac2061b4a08ef8f2d60a07dc18ab4a0a" }

Thanks to Will Urbanksi, from Dell SecureWorks, for identifying this issue.

Configuration Considerations for Authentication
-----------------------------------------------

Expand Down

0 comments on commit cb2cb85

Please sign in to comment.